docs.wallet.tether.io Open in urlscan Pro
2606:4700:10::ac43:852  Public Scan

URL: https://docs.wallet.tether.io/
Submission: On November 12 via api from JP — Scanned from JP

Form analysis 0 forms found in the DOM

Text Content

More


Ask or SearchCtrl +โ€†K
 * Wallet Dev Kit by Tether
 * Blockchains
   * Bitcoin
   * Ethereum and ERC20
 * Components
   * Wallet seed
   * Wallet store
   * Wallet indexer
   * Wallet test-tools
      * Bitcoin
      * Ethereum
 * Guides
   * Getting Started
   * Integrating new assets
 * Examples
   * Seashell Node
   * Seashell Bare
   * AI Agent Demo

Powered by GitBook
On this page
 * โญ Features
 * ๐Ÿ”— Blockchains
 * Development
 * ๐Ÿš€ Getting started
 * ๐Ÿš Seashell Example Wallet
 * ๐Ÿ› ๏ธ Dev Environment
 * ๐Ÿฑ Building your own asset
 * ๐Ÿงช Testing
 * ๐Ÿ”’ Security

Export as PDF



WALLET DEV KIT BY TETHER

Multi asset cryptocurrency wallet library in JavaScript. Supported on 3
platforms: Node.js, Browser, Bare Runtime

โญ FEATURES

๐Ÿ”‘ Non custodial: not your keys, not your coins.

๐Ÿงฉ Composable: Single facade to interact with multiple assets and wallets

๐Ÿ“ฆ Modular: All components are modular and can be used independently.

๐Ÿ› ๏ธ Extensible: Easily add new asset, seed source, block source...etc

๐Ÿ”— BLOCKCHAINS

BITCOIN

 * Electrum block data source. Support for TCP and Websocket on browser.

 * P2WPKH / BIP84 address support.

USDT ON ETHEREUM

 * Web3 and Wallet indexer block data source.

 * ERC20 support.

 * BIP44 address generation.

MORE ASSETS COMING SOON

BlockchainSupportedToken Protocol

Bitcoin

โœ…

-

Ethereum

โœ…

ERC20

Tron

โŒ›

TRC20

TON

โŒ›

Jettons

Avalanche

โŒ›

C-Chain

Solana

โŒ›

Solana Token

Celo

โŒ›

ERC20

Liquid

โŒ›

Liquid Asset

Tezos

โŒ›

Tezos Token

Aptos

โŒ›

Fungible Asset

Cosmos

โŒ›

ERC20

Near

โŒ›

Near Token

Polkadot

โŒ›

AssetHub

additional support coming soon

๐Ÿ—๏ธ ARCHITECTURE


Architecture
๐Ÿงฉ COMPONENTS

The library comes with all the components needed to build a wallet. You can also
use these as an example to build your own components.

 * Wallet seed: Generate BIP39 seed for all assets

 * Wallet store: Store transaction history and track state.

 * Wallet indexer: Remote blockchain data provider

 * Wallet test-tools: Tools for development and testing

</> EXAMPLE USAGE

Checkout Quick start guide for a more detailed guide.


Copy


  const seed = await BIP39Seed.generate(/** seed phrase or leave empty to generate one */)

  // Setup wallet store. Modular data store for  writing data
  const store = new WalletStoreHyperbee({
    store_path: './wallet-store' // Leave empty to use in-memory store
  })

  // Setup Bitcoin asset
  const btcPay = new BitcoinPay({
    // Asset name is used to identify the asset in the wallet.
    // You can have multiple assets of same currency
    asset_name: 'btc',
    // Bitcoin network you'll be using
    network: 'regtest'
  })
  

  // Setup Usdt on Ethereum


  // Prepare USDT ERC20 configuration
  const USDT = erc20CurrencyFac(TetherCurrency.ERC20())

  // Setup Ethereum with USDT
  const ethPay = new EthPay({
    asset_name: 'eth',
    provider,
    store,
    network: 'sepolia',
    token: [
      new Erc20({
        currency: USDT
      })
    ]
  })

  // Setup main wallet class
  const wallet = new Wallet({
    store,
    seed,
    // List of assets 
    assets: [ btcPay, ethPay ]
  })

  // Start wallet and initialize
  // Connect to block source 
  // Add asset to wallet registry 
  await wallet.initialize()

  // Traverse wallet history of all assets and sync them. This might take a while depending on wallet size 
  await wallet.syncHistory(opts)


  // All payment features are namespaced under wallet.pay[asset_name][action](opts, ...args)
  // Get a new bitcoin address using api below
  const btcAddress = await wallet.pay.btc.getNewAddress()

  // Get new Eth account for  ETH and USDT.
  const ethAcct = await wallet.pay.eth.getNewAddress()

  // Get Tx history
  await wallet.pay.btc.getTransactions((tx) =>{
    // do something here 
  }))


  // get balances
  const btcBalance = await wallet.pay.btc.getBalance()
  // USDT balance
  const usdtBalance = await wallet.pay.eth.getBalance({ token : 'USDT' })

  // get list of eth addresses and their token holdings
  const addrBal = await wallet.pay.eth.getFundedTokenAddresses({ token : 'USDT' })


  // Sending Transactions:
  // Send 0,1 bitcoin
  const send = await wallet.pay.btc.sendTransaction({}, {
    amount: 0.1, // quantity of bitcoin
    unit: 'main', // unit: main = bitcoin, base = satoshi
    address: 'bcr111', // recipient
    fee: 10 // 10 satVbyte in fees
  })
  // Send 10 USDT
  const send = await wallet.pay.eth.sendTransaction({
      token: 'USDT', // name of the token
  }, {
    amount: '10', // quantity of USDT
    unit: 'main', // main unit of USDT: 10 USDT
    address: '0x0000', // recipient
    sender: '0x1111' // ETH account sending from
  })



DEVELOPMENT

๐Ÿš€ GETTING STARTED

The best way to get started developing:

 1. Setup local development environment.

 2. Configure example apps to connect to your local blockchains.

 3. Start hacking on example apps. After you have example apps running:

 * Fork/modify existing assets

 * Build new assets.

๐Ÿš SEASHELL EXAMPLE WALLET

There is a working example wallet that supports Ethereum/BTC. This wallet can be
used as an example for making your own integrations.

 * Node.js cli wallet

 * Bare runtime cli wallet

 * AI Agent Demo

๐Ÿ› ๏ธ DEV ENVIRONMENT

The wallet is designed to work with local test environments.

 * See Wallet test tools to setup local environments

 * Setup Wallet indexer service

๐Ÿฑ BUILDING YOUR OWN ASSET

See guide for how to add new assets

๐Ÿงช TESTING

 * Brittle is used for testing

 * Tests included in this repo cover
   
    * Shared modules
   
    * Integration of various blockchains

 * Each asset has its own tests included in its repo.

๐Ÿ”’ SECURITY

For vulnerabilities and bug reports, please reach out to us at bounty@tether.io.
Your insights help us keep WDK by Tether secure and reliable!

NextBitcoin

Last updated 17 hours ago