debridge
Complete deBridge Protocol SDK for building cross-chain bridges, message passing, and token transfers on Solana. Use when building cross-chain applications, bridging assets between Solana and EVM chains, or implementing trustless external calls.
What this skill does
# deBridge Solana SDK Development Guide A comprehensive guide for building Solana programs with the deBridge Solana SDK - enabling decentralized cross-chain transfers of arbitrary messages and value between blockchains. ## Overview deBridge is a cross-chain infrastructure protocol enabling: - **Cross-Chain Transfers**: Bridge assets between Solana and 20+ EVM chains - **Message Passing**: Send arbitrary messages across blockchains - **External Calls**: Execute smart contract calls on destination chains - **Sub-Second Settlement**: ~2 second median settlement time - **Capital Efficiency**: Intent-based architecture with 4bps lowest spreads ### Key Features - 26+ security audits (Halborn, Zokyo, Ackee Blockchain) - $200K bug bounty on Immunefi - 100% uptime since launch - Zero security incidents ## Quick Start ### Installation Add the SDK to your Anchor/Solana program: ```bash cargo add --git ssh://[email protected]/debridge-finance/debridge-solana-sdk.git debridge-solana-sdk ``` Or add to `Cargo.toml`: ```toml [dependencies] debridge-solana-sdk = { git = "ssh://[email protected]/debridge-finance/debridge-solana-sdk.git" } ``` ### Basic Setup (Anchor) ```rust use anchor_lang::prelude::*; use debridge_solana_sdk::prelude::*; declare_id!("YourProgramId11111111111111111111111111111"); #[program] pub mod my_bridge_program { use super::*; pub fn send_cross_chain( ctx: Context<SendCrossChain>, target_chain_id: [u8; 32], receiver: Vec<u8>, amount: u64, ) -> Result<()> { // Invoke deBridge send debridge_sending::invoke_debridge_send( debridge_sending::SendIx { target_chain_id, receiver, is_use_asset_fee: false, // Use native SOL for fees amount, submission_params: None, referral_code: None, }, ctx.remaining_accounts, )?; Ok(()) } } #[derive(Accounts)] pub struct SendCrossChain<'info> { #[account(mut)] pub sender: Signer<'info>, // Additional accounts passed via remaining_accounts } ``` ## Core Concepts ### 1. Chain IDs deBridge uses 32-byte chain identifiers for all supported networks: ```rust use debridge_solana_sdk::chain_ids::*; // Solana let solana = SOLANA_CHAIN_ID; // Solana mainnet // EVM Chains let ethereum = ETHEREUM_CHAIN_ID; // Chain ID: 1 let polygon = POLYGON_CHAIN_ID; // Chain ID: 137 let bnb = BNB_CHAIN_CHAIN_ID; // Chain ID: 56 let arbitrum = ARBITRUM_CHAIN_ID; // Chain ID: 42161 let avalanche = AVALANCHE_CHAIN_ID; // Chain ID: 43114 let fantom = FANTOM_CHAIN_ID; // Chain ID: 250 let heco = HECO_CHAIN_ID; // Chain ID: 128 ``` ### 2. Program IDs ```rust use debridge_solana_sdk::{DEBRIDGE_ID, SETTINGS_ID}; // Main deBridge program for sending/claiming let debridge_program = DEBRIDGE_ID; // Settings and confirmation storage program let settings_program = SETTINGS_ID; ``` ### 3. Fee Structure deBridge supports multiple fee payment methods: ```rust // Native Fee (SOL) is_use_asset_fee: false // Pay fees in SOL // Asset Fee is_use_asset_fee: true // Pay fees in the bridged token // Fee Constants const BPS_DENOMINATOR: u64 = 10000; // Basis points divisor ``` ### 4. Flags Control transfer behavior with flags: ```rust use debridge_solana_sdk::flags::*; // Available flags (bit positions) const UNWRAP_ETH: u8 = 0; // Unwrap to native ETH on destination const REVERT_IF_EXTERNAL_FAIL: u8 = 1; // Revert if external call fails const PROXY_WITH_SENDER: u8 = 2; // Include sender in proxy call const SEND_HASHED_DATA: u8 = 3; // Send data as hash const DIRECT_WALLET_FLOW: u8 = 31; // Use direct wallet flow // Setting flags on submission params let mut flags = [0u8; 32]; flags.set_reserved_flag(UNWRAP_ETH); flags.set_reserved_flag(REVERT_IF_EXTERNAL_FAIL); ``` ## Sending Cross-Chain Transfers ### Basic Token Transfer ```rust use debridge_solana_sdk::prelude::*; pub fn send_tokens( ctx: Context<SendTokens>, amount: u64, ) -> Result<()> { debridge_sending::invoke_debridge_send( debridge_sending::SendIx { target_chain_id: chain_ids::ETHEREUM_CHAIN_ID, receiver: recipient_eth_address.to_vec(), is_use_asset_fee: false, amount, submission_params: None, referral_code: Some(12345), // Optional referral }, ctx.remaining_accounts, )?; Ok(()) } ``` ### Transfer with Fixed Native Fee ```rust pub fn send_with_native_fee( ctx: Context<Send>, target_chain_id: [u8; 32], receiver: Vec<u8>, amount: u64, ) -> Result<()> { // Get the fixed fee for the target chain let fee = debridge_sending::get_chain_native_fix_fee( &target_chain_id, ctx.remaining_accounts, )?; debridge_sending::invoke_debridge_send( debridge_sending::SendIx { target_chain_id, receiver, is_use_asset_fee: false, amount, submission_params: None, referral_code: None, }, ctx.remaining_accounts, )?; Ok(()) } ``` ### Transfer with Asset Fee ```rust pub fn send_with_asset_fee( ctx: Context<Send>, target_chain_id: [u8; 32], receiver: Vec<u8>, amount: u64, ) -> Result<()> { // Check if asset fee is available for this chain let is_available = debridge_sending::is_asset_fee_available( &target_chain_id, ctx.remaining_accounts, )?; if !is_available { return Err(error!(ErrorCode::AssetFeeNotAvailable)); } debridge_sending::invoke_debridge_send( debridge_sending::SendIx { target_chain_id, receiver, is_use_asset_fee: true, // Use asset for fees amount, submission_params: None, referral_code: None, }, ctx.remaining_accounts, )?; Ok(()) } ``` ### Transfer with Exact Amount ```rust pub fn send_exact_amount( ctx: Context<Send>, target_chain_id: [u8; 32], receiver: Vec<u8>, exact_receive_amount: u64, ) -> Result<()> { // Calculate total amount including fees let total_with_fees = debridge_sending::add_all_fees( exact_receive_amount, &target_chain_id, ctx.remaining_accounts, )?; debridge_sending::invoke_debridge_send( debridge_sending::SendIx { target_chain_id, receiver, is_use_asset_fee: true, amount: total_with_fees, submission_params: None, referral_code: None, }, ctx.remaining_accounts, )?; Ok(()) } ``` ### Transfer from PDA (Signed) ```rust pub fn send_from_pda( ctx: Context<SendFromPda>, target_chain_id: [u8; 32], receiver: Vec<u8>, amount: u64, pda_seeds: Vec<Vec<u8>>, ) -> Result<()> { // Use signed variant for PDA-owned tokens debridge_sending::invoke_debridge_send_signed( debridge_sending::SendIx { target_chain_id, receiver, is_use_asset_fee: false, amount, submission_params: None, referral_code: None, }, ctx.remaining_accounts, &pda_seeds, )?; Ok(()) } ``` ## Message Passing Send messages without token transfers: ```rust use debridge_solana_sdk::prelude::*; pub fn send_message( ctx: Context<SendMessage>, target_chain_id: [u8; 32], receiver: Vec<u8>, message_data: Vec<u8>, ) -> Result<()> { // Create submission params with message let submission_params = debridge_sending::SendSubmissionParamsInput { execution_fee: 0, flags: [0u8; 32], fallback_address: receiver.clone(), external_call_shortcut: compute_keccak256(&message_data), }; // Send message (zero amount) debridge_sending::in
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.