Usage

Learn how to use the WDK Core module

This package serves as the main entry point and orchestrator for all WDK wallet modules, allowing you to register and manage different blockchain wallets and protocols through a single interface.

Installation

Install the @tetherto/wdk-core package:

npm install @tetherto/wdk

Basic Usage

Importing WDK Core

Import WDK Core
import WDK from '@tetherto/wdk'

Creating a WDK Instance

Create WDK Instance
// Generate a random seed phrase
const seedPhrase = WDK.getRandomSeedPhrase()

// Create WDK instance
const wdk = new WDK(seedPhrase)

// Or use your own seed phrase
const wdk = new WDK('your existing seed phrase here...')

Wallet Registration

Registering Wallets


Account Management

Getting Accounts

Multi-Chain Account Management


Balance Operations

Cross-Chain Balance Checking


Transaction Operations

Sending Transactions

Multi-Chain Transaction Function


Protocol Integration

Registering Protocols

Using Protocols

Multiple Protocol Types


Middleware

Logging Middleware

Failover Middleware


Complete Examples

Multi-Chain Wallet Setup


Error Handling

Handling Common Errors

Memory Management


Next Steps


Need Help?