Building Blocks
Discover and install building blocks to extend your WDK integration.
Discover and install building blocks to extend your WDK integration.
@tetherto/wdk-wallet-btc
Bitcoin SegWit wallet with BIP-39/BIP-44 support
Loading README…
Ethereum and EVM-compatible chains wallet
ERC-4337 Account Abstraction for EVM chains
Solana blockchain wallet
Note: This package is currently in beta. Please test thoroughly in development environments before using in production.
A Bitcoin wallet module for WDK. It derives BIP-84 Native SegWit or BIP-44 legacy accounts from BIP-39 seed phrases and supports balance queries, transaction signing and broadcasting, transfer history, and message signing.
This module is part of the WDK (Wallet Development Kit) project, which empowers developers to build secure, non-custodial wallets with unified blockchain access, stateless architecture, and complete user control.
For detailed documentation about the complete WDK ecosystem, visit docs.wdk.tether.io.
npm install @tetherto/wdk-wallet-btcExisting BIP-44 wallets: Since
v1.0.0-beta.4, the default is BIP-84. When reopening a wallet created with the earlier BIP-44 default, setbip: 44; otherwise, the same seed derives different addresses. See Configuration for derivation details.
Security: The seed phrase below is public test data. Never use it to hold funds. Generate and protect a unique BIP-39 seed phrase before using a wallet in production.
import WalletManagerBtc from '@tetherto/wdk-wallet-btc'
const seedPhrase = 'cook voyage document eight skate token alien guide drink uncle term abuse'
const wallet = new WalletManagerBtc(seedPhrase, {
network: 'bitcoin',
bip: 84
})
const account = await wallet.getAccount(0)
const address = await account.getAddress()
console.log('Address:', address)
wallet.dispose()Call dispose() when finished to erase account private-key material and close internally managed client connections. Never log or expose the seed phrase or account.keyPair.privateKey.
IBtcClientProduction clients: The default public Electrum endpoint is provided for convenience. Configure a Bitcoin service you operate or trust for production; public endpoints can be slow or unavailable for addresses with extensive transaction histories. See Configuration for Electrum, Blockbook, custom-client, and failover options.
TLS/SSL: Electrum TLS and SSL connections verify the server certificate and hostname. Configure a certificate trusted by the client; self-signed or hostname-mismatched certificates are rejected. The default plaintext TCP transport is unchanged.
| Topic | Description | Link |
|---|---|---|
| Overview | Module overview and feature summary | Wallet BTC Overview |
| Usage | End-to-end integration walkthrough | Wallet BTC Usage |
| Configuration | Network, derivation, client, and failover configuration | Wallet BTC Configuration |
| API Reference | Complete class, client, and type reference | Wallet BTC API Reference |
Join the WDK Discord to connect with other developers.
For support, please open an issue on GitHub or reach out via email.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.