.claude/skills/wdk/SKILL.md
Tether Wallet Development Kit (WDK) for building non-custodial multi-chain wallets. Use when working with @tetherto/wdk-core, wallet modules (wdk-wallet-btc, wdk-wallet-evm, wdk-wallet-evm-erc-4337, wdk-wallet-solana, wdk-wallet-spark, wdk-wallet-ton, wdk-wallet-tron, ton-gasless, tron-gasfree), and protocol modules including swap (wdk-protocol-swap-velora-evm), bridge (wdk-protocol-bridge-usdt0-evm), and lending (wdk-protocol-lending-aave-evm). Covers wallet creation, transactions, token transfers, DEX swaps, cross-chain bridges, and DeFi lending/borrowing.
npx skillsauth add tetherto/wdk-docs wdkInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Multi-chain wallet SDK. All modules share common interfaces from @tetherto/wdk-wallet.
Official Docs: https://docs.wallet.tether.io
When working with WDK tasks, follow this workflow to access documentation:
Identify relevant URLs - Based on the task, determine which module documentation pages are needed (see Module Documentation Links below) Attempt to fetch - Try web_fetch on the URL directly If fetch fails - Search for the exact URL:
web_search("https://docs.wallet.tether.io/sdk/wallet-modules/wallet-spark/usage") This makes the URL appear in search results, which unlocks fetching.
Fetch after search - Now web_fetch will work on that URL
Example workflow: Task: Build a Spark wallet app
Relevant URLs identified:
web_fetch("https://docs.wallet.tether.io/sdk/wallet-modules/wallet-spark/usage") → If permission error, proceed to step 3
web_search("https://docs.wallet.tether.io/sdk/wallet-modules/wallet-spark/usage") → URL now appears in results
web_fetch("https://docs.wallet.tether.io/sdk/wallet-modules/wallet-spark/usage") → Success - full page content retrieved
For each module, documentation is organized into subpages:
/usage - Example usage and patterns /configuration - Configuration options and settings /api-reference - Complete API documentation
@tetherto/wdk-core # Orchestrator - registers wallets + protocols
├── @tetherto/wdk-wallet # Base classes (WalletManager, IWalletAccount)
│ ├── wdk-wallet-btc # Bitcoin (BIP-84, SegWit)
│ ├── wdk-wallet-evm # Ethereum & EVM chains
│ ├── wdk-wallet-evm-erc-4337 # EVM with Account Abstraction
│ ├── wdk-wallet-solana # Solana
│ ├── wdk-wallet-spark # Spark/Lightning
│ ├── wdk-wallet-ton # TON
│ ├── wdk-wallet-ton-gasless # TON gasless
│ ├── wdk-wallet-tron # TRON
│ └── wdk-wallet-tron-gasfree # TRON gas-free
└── Protocol Modules
├── wdk-protocol-swap-velora-evm # DEX swaps on EVM
├── wdk-protocol-bridge-usdt0-evm # Cross-chain USDT0 bridge
└── wdk-protocol-lending-aave-evm # Aave V3 lending
Docs: https://docs.wallet.tether.io/sdk/get-started
import WDK from '@tetherto/wdk'
import WalletManagerEvm from '@tetherto/wdk-wallet-evm'
import WalletManagerBtc from '@tetherto/wdk-wallet-btc'
const wdk = new WDK(seedPhrase)
.registerWallet('ethereum', WalletManagerEvm, { provider: 'https://eth.drpc.org' })
.registerWallet('bitcoin', WalletManagerBtc, { host: 'electrum.blockstream.info', port: 50001 })
const ethAccount = await wdk.getAccount('ethereum', 0)
const btcAccount = await wdk.getAccount('bitcoin', 0)
import WalletManagerBtc from '@tetherto/wdk-wallet-btc'
const wallet = new WalletManagerBtc(seedPhrase, {
host: 'electrum.blockstream.info',
port: 50001,
network: 'bitcoin'
})
const account = await wallet.getAccount(0)
All wallet accounts implement IWalletAccount:
| Method | Returns | Description |
|--------|---------|-------------|
| getAddress() | Promise<string> | Account address |
| getBalance() | Promise<bigint> | Native token balance (base units) |
| getTokenBalance(addr) | Promise<bigint> | Token balance |
| sendTransaction({to, value}) | Promise<{hash, fee}> | Send native tokens |
| quoteSendTransaction({to, value}) | Promise<{fee}> | Estimate tx fee |
| transfer({token, recipient, amount}) | Promise<{hash, fee}> | Transfer tokens |
| quoteTransfer(opts) | Promise<{fee}> | Estimate transfer fee |
| sign(message) | Promise<string> | Sign message |
| verify(message, signature) | Promise<boolean> | Verify signature |
| dispose() | void | Clear private keys from memory |
Properties: index, path, keyPair (⚠️ sensitive)
| Resource | URL | |----------|-----| | Overview | https://docs.wallet.tether.io/sdk/core-module | | Usage | https://docs.wallet.tether.io/sdk/core-module/usage | | Configuration | https://docs.wallet.tether.io/sdk/core-module/configuration | | API Reference | https://docs.wallet.tether.io/sdk/core-module/api-reference |
| Module | Docs | |--------|------| | Bitcoin | https://docs.wallet.tether.io/sdk/wallet-modules/wallet-btc | | EVM | https://docs.wallet.tether.io/sdk/wallet-modules/wallet-evm | | EVM ERC-4337 | https://docs.wallet.tether.io/sdk/wallet-modules/wallet-evm-erc-4337 | | Solana | https://docs.wallet.tether.io/sdk/wallet-modules/wallet-solana | | Spark | https://docs.wallet.tether.io/sdk/wallet-modules/wallet-spark | | TON | https://docs.wallet.tether.io/sdk/wallet-modules/wallet-ton | | TON Gasless | https://docs.wallet.tether.io/sdk/wallet-modules/wallet-ton-gasless | | TRON | https://docs.wallet.tether.io/sdk/wallet-modules/wallet-tron | | TRON Gasfree | https://docs.wallet.tether.io/sdk/wallet-modules/wallet-tron-gasfree |
Each wallet module has /usage, /configuration, and /api-reference subpages.
| Module | Docs | |--------|------| | Swap (Velora EVM) | https://docs.wallet.tether.io/sdk/swap-modules/swap-velora-evm | | Bridge (USDT0 EVM) | https://docs.wallet.tether.io/sdk/bridge-modules/bridge-usdt0-evm | | Lending (Aave EVM) | https://docs.wallet.tether.io/sdk/lending-modules/lending-aave-evm |
Each protocol module has /usage, /configuration, and /api-reference subpages.
| Resource | URL | |----------|-----| | React Native UI Kit | https://docs.wallet.tether.io/ui-kits/react-native-ui-kit/get-started | | Theming | https://docs.wallet.tether.io/ui-kits/react-native-ui-kit/theming | | UI Kit API Reference | https://docs.wallet.tether.io/ui-kits/react-native-ui-kit/api-reference | | React Native Starter | https://docs.wallet.tether.io/examples-and-starters/react-native-starter |
bc1... addresses)getTokenBalance, transfer throw)getTransfers({direction, limit, skip}) for historym/44'/60'), EIP-1559 fee modeltransfer()normal = base×1.1, fast = base×2.0getPaymasterTokenBalance() for fee balancesendTransaction([tx1, tx2])m/44'/501'), Ed25519transfer()getSingleUseDepositAddress(), claimDeposit(txId)createLightningInvoice({value, memo}), payLightningInvoice({invoice, maxFeeSats})withdraw({to, value}) for L1 withdrawalm/44'/607'), Ed25519transfer()m/44'/195'), secp256k1transfer()tonApiClient, paymasterToken configgasFreeProvider, gasFreeApiKey, serviceProvider, verifyingContractsendTransaction() not supported, use transfer() only// EVM (Velora)
const velora = new VeloraProtocolEvm(evmAccount, { swapMaxFee: 200000000000000n })
await velora.swap({ tokenIn: '0x...', tokenOut: '0x...', tokenInAmount: 1000000n })
const bridge = new Usdt0ProtocolEvm(evmAccount, { bridgeMaxFee: 1000000000000000n })
await bridge.bridge({
targetChain: 'arbitrum',
recipient: '0x...',
token: '0x...', // USDT0
amount: 1000000n
})
const aave = new AaveProtocolEvm(evmAccount)
await aave.supply({ token: '0x...', amount: 1000000n })
await aave.borrow({ token: '0x...', amount: 500000n })
await aave.repay({ token: '0x...', amount: 500000n })
await aave.withdraw({ token: '0x...', amount: 1000000n })
const data = await aave.getAccountData() // healthFactor, ltv, etc.
const quote = await account.quoteSendTransaction({ to, value })
if (quote.fee > maxAcceptableFee) throw new Error('Fee too high')
const result = await account.sendTransaction({ to, value })
try {
// ... wallet operations
} finally {
account.dispose()
wallet.dispose()
}
const readOnly = await account.toReadOnlyAccount()
// Can query balances, estimate fees, but cannot sign
ALWAYS fetch the latest version from npm before adding any package to package.json:
npm view <package-name> version
Example workflow:
# Before writing package.json, check each package you need:
npm view @tetherto/wdk-core version
npm view @tetherto/wdk-wallet-btc version
npm view @tetherto/wdk-wallet-evm version
# ... for every @tetherto package you're using
Never hardcode or guess versions. Always verify against npm first.
WDK uses sodium-universal for secure memory handling which requires Node.js. For browser/React apps:
dispose() errors occur:// sodium-shim.js - No-op for browser
export function sodium_memzero() {}
export default { sodium_memzero }
resolve: {
alias: {
'sodium-universal': './src/sodium-shim.js'
}
}
development
# Tether WDK Multi-chain wallet SDK. All modules share common interfaces from `@tetherto/wdk-wallet`. ## Documentation **Official Docs**: https://docs.wallet.tether.io **GitHub**: https://github.com/tetherto/wdk-core ### URL Fetching Workflow 1. Identify relevant URLs from the reference files in `references/` 2. `web_fetch` the URL directly 3. If fetch fails → `web_search` the exact URL first (unlocks fetching) → then `web_fetch` again Each module doc page has subpages: `/usage`, `/configu
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.