Config SDK
get started and set up Butter SDK .
Setup SDK
To get started, you need to set up configuration for the Butter SDK. This configuration contains the shared settings and data required for the proper functioning of other SDK features that developers will use. Additionally, the configuration can be updated later as needed.
Config rpcs
Update SDK Configuration
To update the configuration, you need to import the global configuration object and use its methods.
Configure SDK Providers
The SDK offers EVM , Solana , TRON , TON and NEAR providers, all with similar configuration options respective to their ecosystems.
Config EVM
The EVM provider execution logic is built based on the Viem library, using some of its types and terminology.
Options available for configuring the EVM provider:
walletClient
: a signer object that implements theWalletClient
interface.
Config Near
The Near provider execution logic is built based on the @near-wallet-selector/core
library, using some of its types and terminology.
Options available for configuring the Near provider:
getWallet
: a function that returns a wallet object.
Config Solana
The Solana provider execution logic is built based on the @solana/web3.js
and @solana/wallet-adapter-base
libraries, using some of its types and terminology.
Options available for configuring the SOLANA provider:
getWalletAdapter
: a function that returns a wallet adapter object.
Config Tron
The Tron provider execution logic is built based on the @tronweb3/tronwallet-adapters
library, using some of its types and terminology.
Options available for configuring the SOLANA provider:
getAdapter
: a function that returns a wallet adapter object.
Config Ton
The Ton provider execution logic is built based on the @tonconnect/ui-react
library, using some of its types and terminology.
Options available for configuring the TON provider:
getConnector
: a function that returns aTonConnectUI
object.
Last updated