LogoLogo
  • 👋Introduction
    • Welcome
      • Actived Aggregators
      • Supported Chains
    • Vision
    • Upcoming development
    • Tokenomics
  • 📖User Guide
    • Get Started
      • How to connect a wallet
      • How to swap tokens
      • How to switch chains
    • FAQ
    • Disclaimer
  • 🤖Features
    • Staking
    • Trading Signals
    • Referral Program
    • Cross-chain Swap
    • LSD Aggregator
  • AMBASSADOR
    • Community Ambassador
      • Application Form
    • Trading Ambassador
      • Application Form
  • Widget
    • Getting Started
    • Example Themes
    • Widget Config Reference
  • SDK
    • Quick Start
    • SDK API
    • SDK Swap
  • API
    • Best Practice
    • API Reference
    • Cross Chain API
  • APPENDIX
    • 0xGen Wallet
    • Fee Overview
    • Media Kit
  • MORE
    • Github
    • Discord
    • Telegram
    • Twitter
    • Blog
Powered by GitBook
On this page
  • How to install
  • Available public chain
  • How to use the sdk in your project
  1. SDK

Quick Start

How to install

You can install the SDK by npm.

npm i @gen-io/gen-sdk

Or, if you use yarn as your module management tool.

yarn add @gen-io/gen-sdk

Available public chain

eth,ropsten,rinkeby,bsc,solana,polygon,avax,fantom,arbitrum,terra,xdai,boba,ont,tron,heco,okex,optimism,harmony,dot,neo,aurora,cronos,moonriver,bsctest

How to use the sdk in your project

import { GenSdk } from '@gen-io/gen-sdk';
const genSdk = new GenSdk()
const { api, swapSdk, config, web3, utils } = genSdk

let data = await api.getGasPrice({
   chain: 'bsc'
})

You can then use all the functions explored by the SDK (API and swapSdk).

PreviousWidget Config ReferenceNextSDK API

Last updated 2 years ago