npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gasyard-sdk

v1.0.10

Published

SDK for Gasyard.fi bridge API interactions

Readme

Gasyard SDK

A Node.js SDK for interacting with the Gasyard API, supporting cross-chain quotes, bridging, status, history, and balance queries.

Installation

npm install gasyard-sdk

Usage

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

const sdk = new GasyardSDK({
  apiKey: 'YOUR_API_KEY',
  // baseUrl: 'https://api.gasyard.fi/api/sdk', // optional, defaults to mainnet
  // timeout: 10000 // optional
});

Methods

getConfig

Retrieve configuration details for all supported networks.

const networks = await sdk.getConfig();
  • Returns: ConfigResponse[]
  • Fields: networkName, networkChainID, chainID, baseToken, decimals, gatewayContract, solverContract, logoURL, supportedAddress

getQuote

Fetch a quote for token swaps between networks.

const quote = await sdk.getQuote({
  inputTokenContract: '...',
  inputNetwork: 1,
  outputNetwork: 2,
  inputTokenAmount: '1000000',
  outputTokenContract: '...'
});
  • Returns: QuoteResponse
  • Note: Use valid network/token pairs from getConfig.

getStatus

Check the status of a transaction.

const status = await sdk.getStatus({ sourceHash: '0x...' });
  • Returns: StatusResponse[]
  • Fields include:
    • inputTxHash, outputTxHash, managerHash?, outputChainAmount?, collateral?, status, solver?, refundHash?, unlockHash?, fillTime?, inputChainID, outputChainID, inputToken?, outputToken?, inputChainAmount?, inputAddress?, outputAddress?, orderID?, createdAt?, updatedAt?, id?
    • Fields marked ? are optional or may be null.

getHistory

Fetch transaction history for a wallet address.

const history = await sdk.getHistory({ inputAddress: '0x...' });
  • Returns: HistoryResponse
  • results array fields:
    • inputTxHash, outputTxHash, managerHash, outputChainAmount, fees, collateral, status, solver, refundHash?, unlockHash?, fillTime?, _id?, inputChainID, outputChainID, inputToken, outputToken, inputChainAmount, inputAddress, outputAddress, orderID, createdAt, updatedAt, filledAt
    • Fields marked ? are optional or may be null.

bridge

Initiate a token bridging transaction.

const bridgeTx = await sdk.bridge({
  sourceNetwork: 1,
  destinationNetwork: 2,
  tokenOutAddress: '...',
  destinationAddress: '0x...',
  tokenInAddress: '...',
  sourceTokenAmount: '1000000'
});
  • Returns: BridgeResponse

getBalance

Get the token balances for a user address (EVM or Solana).

const balance = await sdk.getBalance({ userAddress: '0x...' });
  • Returns: BalanceResponse
  • Fields:
    • walletAssets.totalBalanceUsd, walletAssets.assets[] (see below)
    • Asset fields (EVM): blockchain, tokenName, tokenSymbol, tokenDecimals, tokenType, contractAddress, holderAddress?, balance, balanceRawInteger?, balanceUsd, tokenPrice?, thumbnail?
    • Asset fields (Solana): blockchain, tokenName, tokenSymbol, tokenDecimals, tokenType, contractAddress, balance, balanceUsd

Keeping SDK Interfaces in Sync

  • The SDK interfaces are regularly validated against the live API using the included test-sdk.js script.
  • To run all tests and see the actual API responses compared to the SDK types:
node test-sdk.js
  • This will print the structure of all responses and highlight any mismatches.

Error Handling

  • All methods throw GasyardSDKError on error, with a clear message and status code if available.

License

MIT