Getting Started
Table of Contents
Create your own wallet
Prerequisites
Setup your block source or have a URL to a remote node
Electrum and Bitcoin Core
Web3 and Wallet Indexer
Latest version of Node.js
Guide
1. Wallet seed/mnemonic
In WDK, we use 1 seed phrase for all assets. To learn more check out the course here.
To reuse an existing seed phrase from a different wallet:
The seed
is now ready to be used to secure your assets.
2. Database
In WDK we use a database to keep track of the overall state of the wallet. This includes things like balances, past transactions, addresses etc.
WDK does not depend on any particular database. Out of the box we support Hyperbee, a distributed key value store.
If you do not want persistance storage and want to use in memory storage leave the store_path
field as empty.
3. Setup assets
Each blockchain/asset has its own module that encapsulates all of the logic. Each asset can have its own configuration.
Lets setup Bitcoin:
Let's set-up Ethereum and USDt
You've now setup Ethereum and USDt. You can now generate addresses and send and receive funds.
Putting it all together
We configure the main Wallet class with the assets we want to use:
The wallet is now setup and ready to be used.
Use your wallet.
Generate addresses:
Sync your wallet
WDK automatically listens to new incoming transactions for your latest transactions if you are online. When you close and reopen the wallet, you need to resync with the blockchain.
Perform transactions
Check out some of the simple APIs available for building a wallet.
Sending USDt on Ethereum
Wallet history
Transaction history now works via an iterator.
Last updated