SDK Implementation
Installation
npm install gasyard-sdkInitialization
import { ConfigResponse, GasyardSDK } from 'gasyard-sdk';
const sdk = new GasyardSDK({
apiKey: 'DEMO',});Need Help?
1. Get a Swap Quote
Example Usage:
const getQuote = async () => {
try {
const quote = await sdk.getQuote({
inputNetwork: 2,
outputNetwork: 5,
inputTokenAmount: "5000000000000000",
outputTokenContract: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
});
console.log(quote);
} catch (error) {
console.error(error);
}
};
getQuote();2. Get Network Configuration
Example Usage:
3. Check Transaction Status
Example Usage:
4. Get Transaction History
Example Usage:
5. Bridge Tokens
Example Usage:
Last updated