githubEdit

gearConfiguration

Configuration options and settings for @tetherto/wdk

WDK Manager Configuration

Create WDK Instance
import WDK from '@tetherto/wdk'

const wdk = new WDK(seedPhrase)

The WDK Manager itself only requires a seed phrase for initialization. Configuration is done through the registration of wallets and protocols.

Wallet Registration Configuration

Register WDK Wallet
import WDK from '@tetherto/wdk'
import WalletManagerEvm from '@tetherto/wdk-wallet-evm'
import WalletManagerTon from '@tetherto/wdk-wallet-ton'

const wdk = new WDK(seedPhrase)
  .registerWallet('ethereum', WalletManagerEvm, {
    provider: 'https://eth.drpc.org'
  })
  .registerWallet('ton', WalletManagerTon, {
    tonApiKey: 'YOUR_TON_API_KEY',
    tonApiEndpoint: 'https://tonapi.io'
  })

Protocol Registration Configuration

Configuration Options

Wallet Configuration

Each wallet manager requires its own configuration object when registered. The configuration depends on the specific wallet module being used.

EVM Wallet Configuration

TON Wallet Configuration

Protocol Configuration

Protocols also require their own configuration objects when registered.

Swap Protocol Configuration

Middleware Configuration

Middleware functions can be registered to enhance account functionality.


Next Steps


Need Help?