The Gasyard SDK provides seamless cross-chain bridging capabilities across multiple blockchain networks. This guide will walk you through the complete integration process.

Swagger API Integration guide can be found here:

https://gasyard.github.io/gasyard-sdk-documentation/

Installation

Install the Gasyard SDK via npm:

npm install gasyard-sdk

Quick Start

const { GasyardSDK } = require('gasyard-sdk');

// Initialize the SDK
const sdk = new GasyardSDK({
  apiKey: 'your-api-key' // Use 'trial' for testing
});

Supported Networks

The SDK supports bridging across the following networks:

Network Gasyard ChainID Network Chain ID Base Token Supported Tokens Token Addresses
Ethereum 1 1 ETH (18 decimals) ETH, USDC, USDT 0x0000000000000000000000000000000000000000, 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, 0xdAC17F958D2ee523a2206206994597C13D831ec7
Base 2 8453 ETH (18 decimals) ETH, USDC 0x0000000000000000000000000000000000000000, 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
BNB Chain 3 56 BNB (18 decimals) BNB, BNB-USD 0x0000000000000000000000000000000000000000, 0x55d398326f99059fF775485246999027B3197955
Arbitrum 4 42161 ETH (18 decimals) ETH, USDC 0x0000000000000000000000000000000000000000, 0xaf88d065e77c8cC2239327C5EDb3A432268e5831
Hyperliquid 5 42161 USDC (18 decimals) USDC 0xaf88d065e77c8cC2239327C5EDb3A432268e5831
Movement 6 126 MOVE (8 decimals) MOVE, USDT, USDC 0x0000000000000000000000000000000000000000, 0x447721a30109c662dde9c73a0c2c9c9c459fb5e5a9c92f03c50fa69737f5d08d, 0x83121c9f9b0527d1f056e21a950d6bf3b9e9e2e8353d0e95ccea726713cbea39
Solana 7 1329 SOL (9 decimals) SOL, USDC, USDT 0x0000000000000000000000000000000000000000, EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v, Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
Bera 8 80094 BERA (18 decimals) None No supported tokens configured
Sei 9 1329 SEI (18 decimals) None No supported tokens configured
Polygon 10 137 POL (18 decimals) POL, USDC 0x0000000000000000000000000000000000000000, 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359

Important Notes:

Core Methods

1. Get Network Configuration

Retrieve all supported networks and their configurations:

async function getNetworkConfig() {
  try {
    const config = await sdk.getConfig();
    console.log('Supported networks:', config);
    return config;
  } catch (error) {
    console.error('Error fetching config:', error);
  }
}

2. Get Bridge Quote