# Welcome to WDK (/)
The **Wallet Development Kit *by Tether* (WDK)** is Tether's open-source toolkit that empowers humans, machines and AI agents alike to build, deploy and use secure, multi-chain, self-custodial wallets that can be integrated anywhere from the smallest embedded device to any mobile, desktop and server operating system. WDK enables trillions of self-custodial wallets.
WDK provides a set of core libraries that give you the highest level of control and a wide range of user-interface templates and widgets to maximize your development and deployment speed.
***
### Discover WDK
Understand WDK core features and design principles
Discover our philosophy and idea for the future wallets
Learn foundational concepts and terminology
***
### Start Building
Get started with WDK in a Node.js environment
Build mobile wallets with React Native Expo
Deploy WDK in lightweight environments
Explore our React Native UI Kit with pre-built components
***
### Get Involved
# Agent Skills (/ai/agent-skills)
WDK provides agent skills: structured instruction sets that teach AI agents how to create wallets, send transactions, swap tokens, bridge assets, and interact with DeFi protocols across 20+ blockchains. All operations are self-custodial. Keys stay on your machine, with no third-party custody dependency.
**Skill vs MCP Toolkit**: Use an **agent skill** when your agent platform works with file-based instructions (e.g., OpenClaw, Cursor). Use the [MCP Toolkit](mcp-toolkit/) when your agent supports the Model Context Protocol natively (e.g., Claude, Cursor). Use both for maximum coverage.
## What Are Agent Skills?
An agent skill is a structured set of instructions and reference documentation that teaches an AI agent to use a specific tool or SDK. Skills follow the [AgentSkills specification](https://agentskills.io/specification). Each skill is a `SKILL.md` file with frontmatter metadata and detailed instructions that any compatible agent can load and execute.
WDK publishes a skill that covers the full SDK surface: wallet modules, swap, bridge, lending, fiat on/off-ramps, and the indexer. When an agent loads the skill, it learns WDK's APIs so you don't need blockchain expertise to get started. You can view the full skill file on [GitHub](https://github.com/tetherto/wdk-docs/blob/main/skills/wdk/SKILL.md).
## Capabilities
Once an agent loads the WDK skill, it can:
| Category | Operations |
| ---------------- | ------------------------------------------------------------------------------------------------------------------ |
| **Wallets** | Create and recover wallets across EVM chains, Bitcoin, Solana, Spark, TON, and Tron |
| **Transactions** | Send native tokens and token transfers (ERC-20, SPL, Jetton, TRC-20) |
| **Swaps** | DEX swaps via Velora (EVM) and StonFi (TON) |
| **Bridges** | Cross-chain bridges with USDT0 via LayerZero |
| **Lending** | Supply, borrow, repay, and withdraw via Aave V3 |
| **Fiat** | Buy and sell crypto via MoonPay on/off-ramps |
| **Gasless** | Fee-free transfers on TON (via paymaster) and Tron (via gas-free service), and ERC-4337 account abstraction on EVM |
All write operations require explicit human confirmation. The skill instructs agents to estimate fees before sending and includes prompt injection protection guidance.
## How It Works
1. **Install the skill** by cloning the skill repository or installing from a skill registry like [ClawHub](https://clawhub.ai/HumanRupert/tether-wallet-development-kit)
2. **Agent loads the skill** and reads `SKILL.md` along with per-module reference files to learn WDK's API surface
3. **Agent executes operations** when you ask it to create a wallet or send a transaction, generating the correct WDK code
4. **You confirm** before any write operation (transactions, swaps, bridges) goes through
The skill includes security guidance: pre-transaction validation checklists, prompt injection detection rules, and mandatory key cleanup patterns.
## Self-Custodial vs Hosted
WDK's agent skills use a self-custodial model where your agent controls its own keys locally. This differs from hosted solutions where a third party manages your keys.
| Feature | WDK | Coinbase Agentic Wallet | Privy Server Wallets |
| ---------------- | ----------------------------------------------------------------------------------- | ----------------------------- | ----------------------------- |
| Custody model | Self-custodial | Coinbase-hosted | Privy-hosted (server) |
| Multi-chain | Yes (EVM, Bitcoin, Solana, TON, Tron, Spark + more) | EVM + Solana | EVM + Solana + Bitcoin + more |
| Open source | Yes (SDK + skills) | CLI/skills open, infra closed | Skills open, API closed |
| MCP support | Yes ([MCP Toolkit](mcp-toolkit/)) | Via skills | Via skills |
| OpenClaw support | Yes ([ClawHub skill](https://clawhub.ai/HumanRupert/tether-wallet-development-kit)) | Yes (npx skills) | Yes (ClawHub skill) |
| x402 payments | Via [community extensions](#community-projects) | Yes (native) | No |
| Key management | Local / self-managed | Coinbase infrastructure | Privy infrastructure |
## Use With Agent Platforms
| Platform | How to Use |
| ---------------------------- | -------------------------------------------------------------------------------------------- |
| **OpenClaw** | Install from [ClawHub](openclaw) or clone to workspace. See [OpenClaw Integration](openclaw) |
| **Claude** | Upload `SKILL.md` as project knowledge, or paste into conversation |
| **Cursor / Windsurf** | Clone to `.cursor/skills/wdk` or `.windsurf/skills/wdk` |
| **Any MCP-compatible agent** | Use the [MCP Toolkit](mcp-toolkit/) for structured tool calling |
| **Any other agent** | Copy `SKILL.md` into system prompt or conversation context |
## Community Projects
Community-built projects using WDK's agentic capabilities:
| Project | Description |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| [wdk-wallet-evm-x402-facilitator](https://github.com/SemanticPay/wdk-wallet-evm-x402-facilitator) | Agent-to-agent payments using the x402 HTTP payment protocol |
| [x402-usdt0](https://github.com/baghdadgherras/x402-usdt0) | Reference implementation of x402 on Plasma with USDT0 |
| [Novanet zkML Guardrails](https://github.com/hshadab/tether) | Zero-knowledge ML safety checks for wallet operations |
## Resources
* [WDK SKILL.md on GitHub](https://github.com/tetherto/wdk-docs/blob/main/skills/wdk/SKILL.md) - The full skill file agents consume
* [WDK Skill on ClawHub](https://clawhub.ai/HumanRupert/tether-wallet-development-kit) - Install the skill
* [AgentSkills Specification](https://agentskills.io/specification) - The skill format standard
* [WDK MCP Toolkit](https://github.com/tetherto/wdk-mcp-toolkit) - MCP server for structured tool calling
* [WDK Core](https://github.com/tetherto/wdk-core) - The core SDK
***
## Need Help?
# OpenClaw (Community Skill) (/ai/openclaw)
The WDK skill for OpenClaw is a community skill, developed and maintained independently by a third-party contributor.
Tether and the WDK Team do not endorse or assume responsibility for its code, security, or maintenance. Use your own judgment and proceed at your own risk. Artificial intelligence has inherent risks and limitations. You assume full responsibility for any reliance and use of artificial intelligence and agree that any such reliance and use is entirely at your own risk.
[OpenClaw](https://openclaw.ai) is an open-source AI agent platform. With the WDK community skill, your OpenClaw agent can create wallets, send transactions, swap tokens, bridge assets, and interact with DeFi protocols. Everything stays self-custodial.
The WDK community skill follows the [AgentSkills specification](https://agentskills.io/specification), so it works with any compatible agent platform. This page covers the OpenClaw-specific setup.
## Install the WDK Community Skill
Install from [ClawHub](https://clawhub.ai/HumanRupert/tether-wallet-development-kit):
```bash
npx clawhub install tether-wallet-development-kit
```
This installs the skill into your workspace's `skills/` directory. OpenClaw picks it up automatically on the next session.
You might see a VirusTotal warning during installation. It flags the skill as suspicious because it handles crypto keys and calls external APIs. This is normal for any wallet SDK skill, nevertheless review the skill's source code on [ClawHub](https://clawhub.ai/HumanRupert/tether-wallet-development-kit) before proceeding.
We plan to publish the official WDK skill to its own GitHub repository. Once that's live, you'll also be able to install via `git clone`.
## Configuration
The WDK community skill does not require environment variables. Your agent will ask for a seed phrase in conversation when it needs to create or recover a wallet. The skill passes the seed phrase as a constructor parameter in code rather than reading it from configuration.
Your seed phrase controls real funds. Never share it, commit it to version control, or expose it in logs. The skill instructs agents to never log or expose seed phrases or private keys.
## Verify It Works
Start a new OpenClaw session and try a simple prompt:
```
Create a multi-chain wallet with Ethereum and Bitcoin support, then show me the addresses.
```
The agent should use the WDK community skill to create wallet accounts and return the generated addresses. All write operations (transactions, swaps, bridges) require your explicit confirmation before executing.
*Example output from the WDK skill creating a multi-chain wallet*
## What Your Agent Can Do
Once the skill is loaded, your agent can:
* **Create wallets** across 20+ blockchains (EVM, Bitcoin, Solana, TON, Tron, Spark)
* **Send transactions** and token transfers
* **Swap tokens** via DEX aggregators (Velora, StonFi)
* **Bridge assets** cross-chain with USDT0
* **Lend and borrow** through Aave V3
* **Buy and sell crypto** via MoonPay fiat on/off-ramps
For the full list of capabilities and how skills work, see [Agent Skills](agent-skills).
## Security Risks and Safety Precautions
OpenClaw is powerful because it runs on your system and can take real actions like creating files, fetching data from the web, and executing transactions. That same power can become a security risk if you're not careful about how and where you run it.
This isn't a flaw in OpenClaw. It's what happens when you give any AI agent direct system access. Knowing these risks lets you use OpenClaw safely.
### Why running OpenClaw locally requires caution
When you run OpenClaw on your own computer or a virtual server, you're allowing a chat interface to trigger actions on that system. This is a concern if your bot:
* Has access to sensitive directories
* Runs with elevated privileges
* Is connected to a publicly accessible chat
* Receives poorly scoped instructions
It can unintentionally modify files, overwrite data, or expose information you didn't intend to share. The risk isn't that OpenClaw is malicious. The risk is that it will do exactly what it's told, even when the instruction is vague or unsafe.
### How to use OpenClaw safely
To reduce risk, here are some practical safety measures:
* Run OpenClaw as a non-privileged user
* Keep its working files in a dedicated directory
* Avoid connecting it to public or shared chats initially
* Be explicit when asking it to read or write files
* Test new capabilities on a disposable system or VM
Think of OpenClaw the same way you'd think about running scripts on your system: powerful and useful, but something you need to be careful with.
### Inherent Limitations of Artificial Intelligence
OpenClaw makes use of artificial intelligence and machine learning technologies. While the use of artificial intelligence and machine learning enables capabilities, it also involves inherent limitations and risks. These include:
1. The potential for inaccurate, incomplete, unexpected or misleading outputs or actions (including so-called hallucinations)
2. The risk that outputs or actions may contain biases
3. The possibility of errors related to document quality or text recognition of inputs
4. The possibility that the outputs may suggest specific immediate or near term actions that should not be relied upon
5. The risk that OpenClaw may take unexpected actions (including the sending of assets)
## Next Steps
* [Agent Skills](agent-skills) - Full capabilities, how skills work, and a comparison with other agentic wallet solutions
* [MCP Toolkit](mcp-toolkit/) - Programmatic wallet access for MCP-compatible agents
* [OpenClaw Skills Documentation](https://docs.openclaw.ai/tools/skills) - How OpenClaw discovers and loads skills
***
## Need Help?
# x402 (/ai/x402)
## What Is x402?
[x402](https://www.x402.org) is an open payment protocol, [originally developed by Coinbase](https://docs.x402.org/), that gives the long-reserved [HTTP 402 Payment Required](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/402) status code a concrete, blockchain-native meaning: if you want this resource, pay for it. No accounts, API keys, or checkout flows. Just plain HTTP.
This matters for AI agents because they need to pay for resources programmatically. x402 makes payment a first-class part of the web stack, so an agent can discover a price, sign a payment, and receive a resource in a single request-response cycle.
### The Three Roles
| Role | Description |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **Client (Buyer)** | The entity requesting a paid resource. Can be a human application, an AI agent, or any service with a wallet. |
| **Resource Server (Seller)** | The API or service providing the paid resource. Defines payment requirements and returns `402` for unpaid requests. |
| **Facilitator** | An intermediary that verifies payment signatures and submits transactions on-chain. Never holds funds, only executes signed authorizations. |
### How the Protocol Works
#### Client requests a resource
A standard HTTP request. `GET`, `POST`, whatever your API expects.
#### Server responds with 402 Payment Required
The response body describes what to pay: amount, token, network, and recipient address.
```json
{
"x402Version": 1,
"accepts": [{
"scheme": "exact",
"network": "eip155:9745",
"maxAmountRequired": "1000000",
"asset": "0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb",
"resource": "https://api.example.com/data",
"payTo": "0x1234...abcd"
}]
}
```
#### Client signs a payment
The client constructs an [EIP-3009](https://eips.ethereum.org/EIPS/eip-3009) `transferWithAuthorization` and signs it with their wallet. No tokens leave the wallet yet. It's a signed intent, not a transfer.
#### Client retries with payment header
The signed payload goes in the `X-PAYMENT` header on the same request.
#### Facilitator verifies
The server forwards the payload to the facilitator's `/verify` endpoint. The facilitator checks that the signature is valid, the amount is sufficient, and the payer has funds. No money moves yet.
#### Server performs the work
Inference, database query, generation, whatever the resource requires. This only happens after verification succeeds.
#### Facilitator settles on-chain
The server calls the facilitator's `/settle` endpoint. The facilitator submits the signed authorization on-chain, transferring tokens from buyer to seller.
#### Server returns the resource
`200 OK` with the result in the body and a settlement receipt in the `X-PAYMENT-RESPONSE` header.
For the full protocol specification, see [x402.org](https://www.x402.org) and the [x402 GitHub repository](https://github.com/coinbase/x402).
## How to Use x402 With WDK
WDK wallets work as drop-in signers for x402. `WalletAccountEvm` satisfies the client x402 signer interface directly. Self-custodial x402 payments on any EVM chain.
This guide walks through three things:
1. **Client (Buyer)** - Pay for x402-protected resources using a WDK wallet
2. **Server with Hosted Facilitator** - Accept x402 payments by delegating verification and settlement to a third-party facilitator
3. **Server with Self-Hosted Facilitator** - Run verification and settlement in-process using a WDK wallet, with no external dependencies
The x402 integration described on this page uses community-developed modules and third-party facilitator services. Tether does not endorse, operate, or assume legal or financial responsibility for any third-party facilitator. You are solely responsible for using any service.
Artificial intelligence and blockchain transactions carry inherent risks and limitations.
### Recommended Chains
x402 with WDK works on any EVM chain where USD₮0 is deployed (see full list at [docs.usdt0.to](https://docs.usdt0.to/technical-documentation/deployments)). However, we recommend **Plasma** and **Stable** for x402 payments. Both chains are purpose-built for USD₮ transfers with near-instant finality and near-zero fees. Agents only need to hold USD₮.
| Chain | CAIP-2 | RPC | USD₮0 Contract | Explorer |
| ---------- | ------------- | ------------------------ | -------------------------------------------- | ------------------------------------------------------------------------------------------- |
| **Plasma** | `eip155:9745` | `https://rpc.plasma.to` | `0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb` | [plasmascan.to](https://plasmascan.to/address/0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb) |
| **Stable** | `eip155:988` | `https://rpc.stable.xyz` | `0x779Ded0c9e1022225f8E0630b35a9b54bE713736` | [stablescan.xyz](https://stablescan.xyz/address/0x779Ded0c9e1022225f8E0630b35a9b54bE713736) |
***
## Client: Paying for Resources
See the full working client example at [`x402/client.js`](https://github.com/SemanticPay/x402-usdt0-demo/blob/main/x402/client.js).
```bash
npm install @tetherto/wdk-wallet-evm @x402/fetch @x402/evm
```
#### Create a wallet
```javascript
import WalletManagerEvm from "@tetherto/wdk-wallet-evm";
const account = await new WalletManagerEvm(process.env.SEED_PHRASE, {
provider: "https://rpc.plasma.to", // or "https://rpc.stable.xyz"
}).getAccount();
```
#### Register with x402
`WalletAccountEvm` satisfies the `ClientEvmSigner` interface directly. No adapter needed.
```javascript
import { x402Client, wrapFetchWithPayment } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
const client = new x402Client();
registerExactEvmScheme(client, { signer: account });
const fetchWithPayment = wrapFetchWithPayment(fetch, client);
```
#### Make a paid request
`fetchWithPayment` intercepts any `402` response, signs an EIP-3009 authorization with your WDK wallet, and retries automatically.
```javascript
const response = await fetchWithPayment("https://api.example.com/weather", {
method: "GET",
});
const data = await response.json();
console.log("Response:", data);
```
Your seed phrase controls your funds. Never commit it to version control. Use environment variables or a secrets manager.
### Getting USD₮0 on Plasma or Stable
Before you can make x402 payments, your wallet needs USD₮0 on the target chain. If you hold USD₮ on Ethereum (or any supported EVM chain), bridge it using `@tetherto/wdk-protocol-bridge-usdt0-evm`.
The bridge uses [LayerZero](https://layerzero.network) for secure cross-chain transfers. USD₮ on Ethereum is automatically converted to USD₮0 on the destination chain.
```bash
npm install @tetherto/wdk-wallet-evm @tetherto/wdk-protocol-bridge-usdt0-evm
```
#### Bridge USD₮ from Ethereum to Plasma / Stable
#### Create wallet and bridge protocol
```javascript
import WalletManagerEvm from "@tetherto/wdk-wallet-evm";
import Usdt0ProtocolEvm from "@tetherto/wdk-protocol-bridge-usdt0-evm";
const account = await new WalletManagerEvm(process.env.SEED_PHRASE, {
provider: "https://eth.drpc.org",
}).getAccount();
const bridge = new Usdt0ProtocolEvm(account, {
bridgeMaxFee: 100000000000000n, // Max 0.0001 ETH in bridge fees
});
```
#### Get a quote (recommended)
```javascript
const USDT_ETHEREUM = "0xdAC17F958D2ee523a2206206994597C13D831ec7";
const quote = await bridge.quoteBridge({
targetChain: "plasma", // or "stable"
recipient: await account.getAddress(),
token: USDT_ETHEREUM,
amount: 10000000n, // 10 USD₮ (6 decimals)
});
console.log("Total cost:", Number(quote.fee + quote.bridgeFee) / 1e18, "ETH");
```
#### Execute the bridge
```javascript
const result = await bridge.bridge({
targetChain: "plasma", // or "stable"
recipient: await account.getAddress(),
token: USDT_ETHEREUM,
amount: 10000000n,
});
console.log("Bridge tx:", result.hash);
```
USD₮0 arrives on the destination chain within a few minutes.
You can bridge from any of 25+ supported EVM chains, not just Ethereum. Point your wallet at the source chain's RPC and use the [USD₮ token address](https://tether.to/es/supported-protocols/) on that chain. See the full [bridge module documentation](../sdk/bridge-modules/bridge-usdt0-evm/).
***
## Server: Accepting Payments (Hosted Facilitator)
Your server delegates verification and settlement to a hosted facilitator. You never interact with the chain directly.
**About the Semantic facilitator:** [Semantic](https://docs.semanticpay.io) operates a public USD₮-enabled x402 facilitator at `https://x402.semanticpay.io`. This is a third-party service not operated, endorsed, or guaranteed by Tether.
The x402 protocol is an open standard. Anyone can build a facilitator or use one of their choice.
See the full working server example at [`x402/server.js`](https://github.com/SemanticPay/x402-usdt0-demo/blob/main/x402/server.js).
```bash
npm install @tetherto/wdk-wallet-evm @x402/express @x402/evm @x402/core express dotenv
```
#### Create the seller wallet
```javascript
import WalletManagerEvm from "@tetherto/wdk-wallet-evm";
const sellerAccount = await new WalletManagerEvm(process.env.SEED_PHRASE, {
provider: "https://rpc.plasma.to",
}).getAccount();
const sellerAddress = await sellerAccount.getAddress();
```
#### Create the facilitator client
```javascript
import { HTTPFacilitatorClient } from "@x402/core";
const facilitatorClient = new HTTPFacilitatorClient({
url: "https://x402.semanticpay.io/",
});
```
#### Configure payment middleware
```javascript
import express from "express";
import { paymentMiddleware, x402ResourceServer } from "@x402/express";
import { ExactEvmScheme } from "@x402/evm/exact/server";
const PLASMA_NETWORK = "eip155:9745";
const USDT0_PLASMA = "0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb";
const app = express();
app.use(
paymentMiddleware(
{
"GET /weather": {
accepts: [
{
scheme: "exact",
network: PLASMA_NETWORK,
price: {
amount: "1000", // $0.001 (6 decimals)
asset: USDT0_PLASMA,
extra: { name: "USDT0", version: "1", decimals: 6 },
},
payTo: sellerAddress,
},
],
description: "Weather data",
mimeType: "application/json",
},
},
new x402ResourceServer(facilitatorClient).register(
PLASMA_NETWORK,
new ExactEvmScheme(),
),
),
);
```
The `extra` fields are passed to the buyer for EIP-712 signature construction. `name` and `version` must match what the on-chain USD₮0 contract expects.
#### Add your routes
```javascript
// Gated - requires payment
app.get("/weather", (req, res) => {
res.json({ weather: "sunny", temperature: 70 });
});
// Not gated - no payment config
app.get("/health", (req, res) => {
res.json({ status: "ok" });
});
app.listen(4021);
```
Routes not listed in the middleware config behave like normal Express routes.
### Multi-Chain (Plasma + Stable)
To accept payments on both chains, add both networks to the `accepts` array and register both with the resource server. The buyer's client picks whichever network it has funds on.
```javascript
const NETWORKS = {
plasma: { network: "eip155:9745", usdt0: "0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb" },
stable: { network: "eip155:988", usdt0: "0x779Ded0c9e1022225f8E0630b35a9b54bE713736" },
};
const resourceServer = new x402ResourceServer(facilitatorClient)
.register(NETWORKS.plasma.network, new ExactEvmScheme())
.register(NETWORKS.stable.network, new ExactEvmScheme());
```
### Lifecycle Events
The Semantic facilitator supports an optional `X-Event-Callback` header. When provided, the facilitator POSTs real-time events to your callback URL during verification and settlement.
| Type | When | Key Fields |
| ------------------ | --------------------------------- | ----------------------------------- |
| `verify_started` | Facilitator begins verifying | `details.network`, `details.checks` |
| `verify_completed` | Verification finished | `details.isValid` |
| `verify_failed` | Verification error | `details.error` |
| `settle_started` | Broadcasting on-chain transaction | `details.network` |
| `settle_completed` | Transaction confirmed | `details.transactionHash` |
| `settle_failed` | Settlement error | `details.error` |
```javascript
const facilitatorClient = new HTTPFacilitatorClient({
url: "https://x402.semanticpay.io/",
fetch: (url, init) =>
fetch(url, {
...init,
headers: { ...init?.headers, "X-Event-Callback": "http://localhost:4021/payment-events" },
}),
});
```
Events are fire-and-forget. If the callback URL is unreachable, events are silently dropped.
***
## Server: Self-Hosted Facilitator (In-Process)
Instead of relying on a hosted facilitator, you can run verification and settlement in-process using the `@semanticio/wdk-wallet-evm-x402-facilitator` community module. This wraps a WDK wallet as an x402 `FacilitatorEvmSigner`. Your server handles the entire payment lifecycle locally.
Unlike the hosted Semantic facilitator (Plasma and Stable only), a self-hosted facilitator works with **any EVM chain where USD₮0 is deployed**. See the full deployment list at [docs.usdt0.to](https://docs.usdt0.to/technical-documentation/deployments).
`@semanticio/wdk-wallet-evm-x402-facilitator` is a community module developed and maintained by [Semantic Pay](https://www.semanticpay.io). Tether does not endorse, audit, or assume responsibility for this module. It is currently in beta. Test thoroughly before using in production.
See the full working self-hosted server example at [`x402/server-inprocess.js`](https://github.com/SemanticPay/x402-usdt0-demo/blob/main/x402/server-inprocess.js).
```bash
npm install @semanticio/wdk-wallet-evm-x402-facilitator @tetherto/wdk-wallet-evm @x402/core @x402/evm @x402/express express dotenv
```
#### Create the facilitator signer
The facilitator wallet submits settlement transactions on-chain. It needs gas tokens on the target chain.
```javascript
import WalletManagerEvm from "@tetherto/wdk-wallet-evm";
import WalletAccountEvmX402Facilitator from "@semanticio/wdk-wallet-evm-x402-facilitator";
const walletAccount = await new WalletManagerEvm(process.env.FACILITATOR_MNEMONIC, {
provider: process.env.RPC_URL, // Any EVM chain with USD₮0
}).getAccount();
const evmSigner = new WalletAccountEvmX402Facilitator(walletAccount);
```
The facilitator wallet and the seller wallet can use different seed phrases. The facilitator pays gas; the seller receives USD₮. The facilitator wallet must have enough native token to pay gas.
#### Initialize the facilitator
```javascript
import { x402Facilitator } from "@x402/core/facilitator";
import { registerExactEvmScheme } from "@x402/evm/exact/facilitator";
const facilitator = new x402Facilitator()
.onAfterVerify(async (ctx) => {
console.log("[verify]", ctx.result?.isValid ? "valid" : "invalid");
})
.onAfterSettle(async (ctx) => {
console.log("[settle] tx:", ctx.result?.transaction);
});
registerExactEvmScheme(facilitator, {
signer: evmSigner,
networks: process.env.NETWORK_ID, // e.g. "eip155:9745"
});
```
Available hooks: `onBeforeVerify`, `onAfterVerify`, `onBeforeSettle`, `onAfterSettle`. All are `async` and receive a context object with the payment payload and result.
#### Wire into Express
Same `paymentMiddleware` pattern, but pass the in-process `facilitator` directly instead of an `HTTPFacilitatorClient`.
```javascript
import { paymentMiddleware, x402ResourceServer } from "@x402/express";
import { ExactEvmScheme } from "@x402/evm/exact/server";
const NETWORK = process.env.NETWORK_ID || "eip155:9745";
const USDT0 = process.env.USDT0_ADDRESS || "0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb";
const resourceServer = new x402ResourceServer(facilitator).register(
NETWORK,
new ExactEvmScheme(),
);
app.use(
paymentMiddleware(
{
"GET /weather": {
accepts: [{
scheme: "exact",
network: NETWORK,
price: { amount: "1000", asset: USDT0, extra: { name: "USDT0", version: "1", decimals: 6 } },
payTo: process.env.PAY_TO_ADDRESS,
}],
description: "Weather data",
mimeType: "application/json",
},
},
resourceServer,
),
);
```
***
## Summary
| Role | Packages | Notes |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| **Buyer (Client)** | `@tetherto/wdk-wallet-evm`, `@x402/fetch`, `@x402/evm` | `WalletAccountEvm` satisfies `ClientEvmSigner` directly. |
| **Seller (Hosted)** | `@tetherto/wdk-wallet-evm`, `@x402/express`, `@x402/evm`, `@x402/core` | Delegates to a hosted facilitator. Semantic supports Plasma and Stable. |
| **Seller (Self-Hosted)** | `@tetherto/wdk-wallet-evm`, `@semanticio/wdk-wallet-evm-x402-facilitator`, `@x402/core`, `@x402/evm`, `@x402/express` | In-process facilitator. Any USD₮0 chain. |
***
## Resources
* [x402 Protocol Spec](https://www.x402.org) - The open standard specification
* [x402 GitHub](https://github.com/coinbase/x402) - Reference implementations and examples
* [Semantic Facilitator Docs](https://docs.semanticpay.io) - API Reference for the hosted facilitator
* [Self-Hosted Facilitator Module](https://www.npmjs.com/package/@semanticio/wdk-wallet-evm-x402-facilitator) - Community in-process facilitator
* [x402-usdt0 Demo](https://github.com/SemanticPay/x402-usdt0-demo) - Full working buyer + seller demo
* [WDK EVM Wallet Module](../sdk/wallet-modules/wallet-evm/) - WDK EVM wallet documentation
* [USD₮0 Deployments](https://docs.usdt0.to/technical-documentation/deployments) - Contract addresses on all chains
* [EIP-3009 Specification](https://eips.ethereum.org/EIPS/eip-3009) - The authorization standard enabling gasless USD₮ transfers
# React Native Starter (Alpha) (/examples-and-starters/react-native-starter)
The React Native Starter Alpha is an Expo + React Native app showing how to build a multi-chain wallet using WDK via BareKit worklets and secure secret management. This starter includes wallet creation/import flows, balances, transactions, and a modular service layer.
***
**Prerequisites:** Node.js 22+, and either Xcode (iOS) or Android SDK API 29+ (Android). See the [React Native Quickstart](../start-building/react-native-quickstart#prerequisites) for details.
### Quickstart
Get your React Native wallet running in minutes with these simple steps:
#### Clone and Install
```bash
git clone https://github.com/tetherto/wdk-starter-react-native.git && cd wdk-starter-react-native && npm install
```
#### Configure Environment
```bash
cp .env.example .env
```
Get your free WDK Indexer API key [here](../tools/indexer-api/get-started) and add it to your `.env` file:
```bash
EXPO_PUBLIC_WDK_INDEXER_BASE_URL=https://wdk-api.tether.io
EXPO_PUBLIC_WDK_INDEXER_API_KEY=your_actual_api_key_here
# Optional: For Tron network support
EXPO_PUBLIC_TRON_API_KEY=your_tron_api_key
EXPO_PUBLIC_TRON_API_SECRET=your_tron_api_secret
```
#### Run Your App
For first-time setup, generate native project files:
```bash
npx expo prebuild
```
Then run the app:
```bash
npm run ios # iOS Simulator
npm run android # Android Emulator
```
***
**Need detailed instructions?** Check out the complete [React Native Quickstart](../start-building/react-native-quickstart) guide for step-by-step setup, configuration, and troubleshooting.
### Features
**Multi-Token & Chain Support**
* **BTC**: Native SegWit transfers on Bitcoin network
* **USD₮**: Gasless transactions on EVM (Ethereum, Polygon, Arbitrum), native transfers on TON and Tron
* **XAU₮**: Gasless transactions on Ethereum network
**Wallet Management**
* **Secure Seed Generation**: Cryptographically secure entropy generation
* **Seed Import**: Import existing 12-word mnemonic phrases
* **Encrypted Storage**: Secure key storage via [`@tetherto/wdk-secret-manager`](https://github.com/tetherto/wdk-secret-manager)
* **Multi-Account Support**: Derive multiple accounts from single seed
**Asset Management**
* **Real-Time Balances**: Live balance updates via [WDK Indexer](../tools/indexer-api/)
* **Transaction History**: Complete transaction tracking and history via [WDK Indexer](../tools/indexer-api/)
* **Price Conversion**: Real-time fiat pricing via [Pricing Provider](../tools/price-rates/)
**User Experience**
* **QR Code Scanner**: Scan addresses and payment requests via camera
* **Send/Receive Flows**: Intuitive transfer interfaces
* **Network Selection**: Choose optimal network for each transaction
* **Token Selection**: Multi-token transfer support
* **Activity Feed**: Real-time transaction monitoring
***
### Project Structure
The starter includes a modular architecture designed for scalability and maintainability:
```text title="Project Structure"
src/
├── app/ # Expo Router screens (file-based routing)
│ ├── onboarding/ # First-time user flows
│ ├── wallet-setup/ # Create/import wallet screens
│ ├── send/ & receive/ # Transaction flows
│ ├── settings.tsx # Configuration & preferences
│ └── token-details.tsx # Individual asset views
├── components/ # Reusable UI components
├── config/ # Network, asset, and chain settings
├── services/ # Business logic (pricing integration)
├── hooks/ # Custom React hooks
└── utils/ # Formatting & helper functions
```
Detailed project structure can be found in the [Github Repository](https://github.com/tetherto/wdk-starter-react-native/tree/main?tab=readme-ov-file#-project-structure).
***
### Available Scripts
| Script | Description |
| ------------------------ | --------------------------------------------- |
| `npm start` | Start Expo development server with dev client |
| `npm run android` | Run on Android emulator/device |
| `npm run ios` | Run on iOS simulator |
| `npm run web` | Start web development server |
| `npm run prebuild` | Generate native project files |
| `npm run prebuild:clean` | Clean and regenerate native project files |
| `npm run lint` | Run ESLint |
| `npm run lint:fix` | Fix ESLint errors |
| `npm run format` | Format code with Prettier |
| `npm run format:check` | Check code formatting |
| `npm run typecheck` | Run TypeScript type checking |
***
### Technology Stack
#### Core Technologies
* **Expo**: \~54.0.8 with development client
* **React Native**: 0.81.4
* **React**: 19.1.0
* **TypeScript**: \~5.9.2
* **Reanimated**: \~4.1.0
* **New Architecture**: Enabled
#### Build Configuration
* **Android**: minSdkVersion 29
* **iOS**: Latest Xcode toolchain
* **Build Properties**: Configured via `expo-build-properties`
***
### Next Steps
**Customizing the UI**
This starter uses components from the [WDK React Native UI Kit](../ui-kits/react-native-ui-kit/). To customize the look and feel:
* [**Theming Guide**](../ui-kits/react-native-ui-kit/theming) - Deep dive into theming capabilities
* [**Component Reference**](../ui-kits/react-native-ui-kit/api-reference) - Complete component documentation
**Add new functionality**
This starter provides a solid foundation that you can extend with additional functionality:
* **Add support for other tokens** using wallet modules in the [WDK SDK](../sdk/get-started)
* **Add DeFi protocols** like swaps, bridges, and lending using [protocol modules](../sdk/get-started)
**Or explore documentation**
* [**WDK SDK Documentation**](../sdk/get-started) - Learn about the underlying SDK
* [**UI Kit Documentation**](../ui-kits/react-native-ui-kit/get-started) - Customize the interface
* [**WDK Indexer**](../tools/indexer-api/) - Understand data fetching
* [**Secret Manager**](../tools/secret-manager/) - Learn about secure key management
***
## Need Help?
# About WDK (/overview/about)
The **Wallet Development Kit *by Tether* (WDK)** is Tether's open-source toolkit that empowers humans, machines and AI agents alike to build, deploy and use secure, multi-chain, self-custodial wallets that can be integrated anywhere from the smallest embedded device to any mobile, desktop and server operating system.
A developer-first framework designed for maximum flexibility and scalability, powering anything from consumer wallets to wallet-enabled apps, DeFi integrations (lending, swaps, ...), IoT use cases, and AI agents.
Unlike closed solutions or SaaS-based wallet infrastructure providers, WDK offers zero lock-in and is designed for maximum flexibility and extensibility. It is modular, runs on Bare, Node.js and React-Native, thus can be embedded in a wide variety of environments.
***
## What Problems Does WDK Solve?
The current blockchain ecosystem is highly fragmented, with each blockchain requiring different SDKs, APIs, and integration approaches. This fragmentation creates significant barriers for developers who want to build truly seamless user-experiences that span across any blockchain, environment and use-case.
Traditional wallet development requires months of integration work. Developers must learn different standards, implement contrasting security practices, or rely on closed-source paid solutions which act as gatekeepers.
### **The Missing AI Foundation**
As we move toward a world where humans, machines and AI Agents need to manage digital assets safely, existing solutions fall short. AI agents will require wallets to interact in the financial infrastructure, and WDK wants to lay secure foundation that works for human, AI and IoT use cases. WDK enables trillions of self-custodial wallets.
***
## Why WDK is Different
Works with Node.js, Bare runtime, mobile (React Native), and future embedded environments
Pick only the modules you need; extend functionality with custom modules
Clear SDK design, strong TypeScript typing, extensive docs, and ready-to-use starters
Stateless and self-custodial architecture ensures keys never leave user control
Transparent, community-driven, and free to adopt with no vendor lock-in
Maintained and supported by Tether with strong community involvement
***
## What WDK Provides
WDK combines four core components to deliver a complete wallet development solution:
Unified APIs for wallet and protocol operations across multiple blockchains
Reliable blockchain data access for balances, transactions, and historical data
Reusable React Native components for building wallet interfaces
Production-ready wallet templates and reference implementations
***
## Supported Blockchains & Protocols
WDK natively supports a broad set of blockchains and standards out of the box:
| Blockchain/Module | Support |
| --------------------------------------------------------------- | ------- |
| [Bitcoin](../sdk/wallet-modules/wallet-btc/) | ✅ |
| [Ethereum & EVM](../sdk/wallet-modules/wallet-evm/) | ✅ |
| [Ethereum ERC-4337](../sdk/wallet-modules/wallet-evm-erc-4337/) | ✅ |
| [TON](../sdk/wallet-modules/wallet-ton/) | ✅ |
| [TON Gasless](../sdk/wallet-modules/wallet-ton-gasless/) | ✅ |
| [TRON](../sdk/wallet-modules/wallet-tron/) | ✅ |
| [TRON Gasfree](../sdk/wallet-modules/wallet-tron-gasfree/) | ✅ |
| [Solana](../sdk/wallet-modules/wallet-solana/) | ✅ |
| [Spark/Lightning](../sdk/wallet-modules/wallet-spark/) | ✅ |
| Protocol/Module | Support |
| -------------------------------------------------------------- | ----------- |
| [velora (EVM)](../sdk/swap-modules/swap-velora-evm/) | ✅ |
| StonFi (TON) | In progress |
| [USD₮0 Bridge (EVM)](../sdk/bridge-modules/bridge-usdt0-evm/) | ✅ |
| [Aave Lending (EVM)](../sdk/lending-modules/lending-aave-evm/) | ✅ |
The modular architecture allows new chains, tokens, or protocols to be added by implementing dedicated modules.
Ready to start building? Explore our [getting started guide](../start-building/nodejs-bare-quickstart) or dive into our [SDK documentation](../sdk/get-started).
# Changelog (/overview/changelog)
Stay up to date with the latest improvements, new features, and bug fixes across all WDK modules.
***
### April 22, 2026
**Fixes**
* **wdk-core** ([v1.0.0-beta.8](https://github.com/tetherto/wdk/releases/tag/v1.0.0-beta.8)): Fix `WDK.getRandomSeedPhrase(wordCount?)` so client code can generate 24-word BIP-39 seed phrases instead of always receiving the default 12-word mnemonic.
***
### April 19, 2026
**Changes**
* **lending-aave-evm** ([v1.0.0-beta.4](https://www.npmjs.com/package/@tetherto/wdk-protocol-lending-aave-evm/v/1.0.0-beta.4)): Expand per-operation ERC‑4337 config overrides from `paymasterToken`-only to the wallet module's paymaster-token, sponsorship-policy, and native-coin gas modes.
**Fixes**
* **failover-provider** ([v1.0.0-beta.2](https://www.npmjs.com/package/@tetherto/wdk-failover-provider/v/1.0.0-beta.2)): Remove unnecessary published type definitions without changing the runtime failover behavior.
* **wallet-solana** ([v1.0.0-beta.7](https://www.npmjs.com/package/@tetherto/wdk-wallet-solana/v/1.0.0-beta.7)): Fix `SolanaWalletConfig.rpcUrl` typings to accept ordered `string[]` failover endpoints and align the published TypeScript definitions with the beta.6 runtime behavior.
***
### April 15, 2026
**Changes**
* **wallet-solana** ([v1.0.0-beta.6](https://www.npmjs.com/package/@tetherto/wdk-wallet-solana/v/1.0.0-beta.6)): Add runtime RPC failover support for ordered `rpcUrl` lists plus `retries`, and tighten custom `TransactionMessage` and derivation-path validation for durable nonce lifetimes, fee payer matching, and hardened SLIP-0010 child paths.
***
### April 14, 2026
**What's New**
* **failover-provider** ([v1.0.0-beta.1](https://github.com/tetherto/wdk-failover-provider/releases/tag/v1.0.0-beta.1)): Initial release of a generic `FailoverProvider\` that chains provider candidates and retries sync or async failures with configurable `retries` and `shouldRetryOn(error)` logic.
**Changes**
* **fiat-moonpay** ([v1.0.0-beta.2](https://github.com/tetherto/wdk-protocol-fiat-moonpay/releases/tag/v1.0.0-beta.2)): \[Breaking] Replace `secretKey` signing with optional backend `signUrl`, add `environment` selection for production or sandbox widget URLs, and return unsigned widget URLs when no signer is configured.
***
### April 13, 2026
**What's New**
* **wdk-utils** ([v1.0.0-beta.2](https://github.com/tetherto/wdk-utils/releases/tag/v1.0.0-beta.2)): Add EIP-681 request parsing utilities for transfer deeplinks, including request detection and structured parse results.
* **wdk-core** ([v1.0.0-beta.7](https://github.com/tetherto/wdk/releases/tag/v1.0.0-beta.7)): Added `dispose(blockchains?)`, so you can dispose one or more registered wallets without tearing down every wallet in the WDK instance.
* **pear-wrk-wdk** ([v1.0.0-beta.8](../tools/pear-wrk-wdk)): Adds `resetWdkWallets({ config })` so custom Bare hosts can selectively dispose and re-register wallet modules from a new `networks` config.
**Changes**
* **wallet-spark** ([v1.0.0-beta.13](https://github.com/tetherto/wdk-wallet-spark/releases/tag/v1.0.0-beta.13)): Refresh `@buildonspark/bare` and `@buildonspark/spark-sdk` dependencies.
* **wallet-spark** ([v1.0.0-beta.14](https://github.com/tetherto/wdk-wallet-spark/releases/tag/v1.0.0-beta.14)): Add SparkScan-backed balance polling for `getBalance()`.
* **wallet-spark** ([v1.0.0-beta.15](https://github.com/tetherto/wdk-wallet-spark/releases/tag/v1.0.0-beta.15)): Refresh `@buildonspark/bare`, `@buildonspark/spark-sdk`, and `bare-node-runtime` dependencies.
* **wallet-spark** ([v1.0.0-beta.16](https://github.com/tetherto/wdk-wallet-spark/releases/tag/v1.0.0-beta.16)): Add `syncAndRetry` and `syncWalletBalance()` for retrying failed `sendTransaction()` and `payLightningInvoice()` calls once after syncing wallet state.
**Fixes**
* **worklet-bundler** ([v1.0.0-beta.3](https://github.com/tetherto/wdk-worklet-bundler/releases/tag/v1.0.0-beta.3)): Generated worklet entrypoints now suspend and resume both HTTP and HTTPS global agents with Bare thread lifecycle events.
* **wallet-btc** ([v1.0.0-beta.8](https://github.com/tetherto/wdk-wallet-btc/releases/tag/v1.0.0-beta.8)): `getBalance()` now includes unconfirmed funds when present, and `sendTransaction()` accepts an optional `timeoutMs` to keep polling after broadcast until spent inputs disappear from unspent outputs.
* **wallet-evm** ([v1.0.0-beta.11](https://github.com/tetherto/wdk-wallet-evm/releases/tag/v1.0.0-beta.11)): Pin string-backed RPC providers to a static network during EVM account setup.
* **wallet-evm-erc-4337** ([v1.0.0-beta.6](https://github.com/tetherto/wdk-wallet-evm-erc-4337/releases/tag/v1.0.0-beta.6)): Reuse the internal EVM read-only helper during ERC-4337 method calls instead of recreating it on each call.
***
### April 3, 2026
**Changes**
* **wallet-spark** ([v1.0.0-beta.12](https://github.com/tetherto/wdk-wallet-spark/releases/tag/v1.0.0-beta.12)): [`WalletAccountReadOnlySpark`](../sdk/wallet-modules/wallet-spark/api-reference) gained [`getTransfers()`](../sdk/wallet-modules/wallet-spark/api-reference), [`getUnusedDepositAddresses()`](../sdk/wallet-modules/wallet-spark/api-reference) (paginated return type), [`getStaticDepositAddresses()`](../sdk/wallet-modules/wallet-spark/api-reference), [`getUtxosForDepositAddress()`](../sdk/wallet-modules/wallet-spark/api-reference), and [`getSparkInvoices()`](../sdk/wallet-modules/wallet-spark/api-reference) (new parameter type). Removed `sparkScanApiKey` config option and `SparkTransactionReceipt` type after dropping the `@sparkscan/api-node-sdk-client` dependency. [`getTransactionReceipt()`](../sdk/wallet-modules/wallet-spark/api-reference) now returns `SparkTransfer` instead. Added [`getAccountByPath()`](../sdk/wallet-modules/wallet-spark/api-reference) to [`WalletManagerSpark`](../sdk/wallet-modules/wallet-spark/api-reference). SIGNET network support documented. Dependency upgrades: `@buildonspark/spark-sdk` 0.7.3, `@buildonspark/bare` 0.0.53.
***
### April 2, 2026
**Changes**
* **react-native-core** ([v1.0.0-beta.7](https://www.npmjs.com/package/@tetherto/wdk-react-native-core/v/1.0.0-beta.7)): Added missing type exports: `WdkAppState`, `TransactionParams`, `TransactionResult`, `UseAccountResponse`, `AddressInfo`, `AddressInfoResult`, `BalanceQueryOptions`, `UseWdkAppResult`. Removed `indexer` as a top-level config prop.
***
### March 24, 2026
**What's New**
* **[React Native Core](../tools/react-native-core/)**: Added documentation for `@tetherto/wdk-react-native-core` ([v1.0.0-beta.6](https://github.com/tetherto/wdk-core-react-native/releases/tag/v1.0.0-beta.6)), the hooks-based React Native integration layer for WDK. Includes [API Reference](../tools/react-native-core/api-reference) covering `WdkAppProvider`, `useWdkApp`, `useWalletManager`, `useAccount`, `useBalance`, and more. Updated [React Native Quickstart](../start-building/react-native-quickstart) with step-by-step integration guide.
***
### March 12, 2026
**Changes**
* **wallet-btc** ([v1.0.0-beta.6](https://github.com/tetherto/wdk-wallet-btc/releases/tag/v1.0.0-beta.6)): Added `dispose()` method to [`WalletAccountReadOnlyBtc`](../sdk/wallet-modules/wallet-btc/api-reference) for closing internal Electrum connections. Security dependency updates.
***
### March 6, 2026
**Changes**
* **wallet-tron**: Fixed case-sensitive address check in `verify`, upgraded TonWeb to v6.2.0 (`v1.0.0-beta.5`)
* **lending-aave-evm**: Security dependency updates ([v1.0.0-beta.4](https://github.com/tetherto/wdk-protocol-lending-aave-evm/releases/tag/v1.0.0-beta.4))
* **wdk**: Security dependency updates ([v1.0.0-beta.6](https://github.com/tetherto/wdk/releases/tag/v1.0.0-beta.6))
***
### March 5, 2026
**What's New**
* **create-wdk-module**: Added documentation for the [`create-wdk-module`](../tools/create-wdk-module) CLI scaffolding tool. Updated [Community Modules](../sdk/community-modules/) and [SDK Get Started](../sdk/get-started) pages with references to the new tool.
***
### February 26, 2026
**Changes**
* **wdk-protocol-bridge-usdt0-evm** ([v1.0.0-beta.3](https://github.com/tetherto/wdk-protocol-bridge-usdt0-evm/releases/tag/v1.0.0-beta.3)): Added per-call `BridgeOptions` overrides (`oftContractAddress`, `dstEid`) and expanded routing from EVM source chains to EVM plus non-EVM destinations (Solana, TON, TRON).
***
### February 25, 2026
**Changes**
* **wallet-evm** ([v1.0.0-beta.8](https://github.com/tetherto/wdk-wallet-evm/releases/tag/v1.0.0-beta.8)): Added [`getTokenBalances(tokenAddresses)`](../sdk/wallet-modules/wallet-evm/api-reference) to [`WalletAccountReadOnlyEvm`](../sdk/wallet-modules/wallet-evm/api-reference), also available on [`WalletAccountEvm`](../sdk/wallet-modules/wallet-evm/api-reference) through inheritance.
* **wallet-evm-erc-4337** ([v1.0.0-beta.5](https://github.com/tetherto/wdk-wallet-evm-erc-4337/releases/tag/v1.0.0-beta.5)): Added EIP-712 typed data methods [`signTypedData(typedData)`](../sdk/wallet-modules/wallet-evm-erc-4337/api-reference) and [`verifyTypedData(typedData, signature)`](../sdk/wallet-modules/wallet-evm-erc-4337/api-reference), plus multicall token balance method [`getTokenBalances(tokenAddresses)`](../sdk/wallet-modules/wallet-evm-erc-4337/api-reference).
***
### February 24, 2026
**Changes**
* **wallet-spark** ([v1.0.0-beta.11](https://github.com/tetherto/wdk-wallet-spark/releases/tag/v1.0.0-beta.11)): Added Pear runtime entrypoint support (`pear.js`), removed static import causing runtime issues, and bumped spark bare SDK (`@buildonspark/bare`) to `0.0.47`.
***
### February 20, 2026
**What's New**
* **[Showcase](../overview/showcase)**: More visibility for our showcase page, we value contributions! Added 4 featured community projects: [wdk-mcp](https://github.com/dieselftw/wdk-mcp), [wdk-starter-browser-extension](https://github.com/base58-io/wdk-starter-browser-extension), [wdk-wallet-evm-x402-facilitator](https://github.com/SemanticPay/wdk-wallet-evm-x402-facilitator), and [x402-usdt0](https://github.com/baghdadgherras/x402-usdt0).
* **[Community Modules](../sdk/community-modules)**: Added [`@base58-io/wdk-wallet-cosmos`](https://github.com/base58-io/wdk-wallet-cosmos) — wallet module for Cosmos-compatible blockchains by [Base58](https://base58.io/).
***
### February 18, 2026
**What's New**
* **[x402 Payments](../ai/x402)**: New guide for accepting and making instant USD₮ payments over HTTP using WDK self-custodial wallets. Covers the x402 protocol, buyer integration with `@tetherto/wdk-wallet-evm`, seller setup with hosted and self-hosted facilitators, and bridging USD₮ to Plasma and Stable chains.
***
### February 15, 2026
**Changes**
* **wallet-spark**: Added [`getIdentityKey()`](../sdk/wallet-modules/wallet-spark/api-reference) method to [`WalletAccountReadOnlySpark`](../sdk/wallet-modules/wallet-spark/api-reference) for retrieving the account's identity public key ([v1.0.0-beta.10](https://github.com/tetherto/wdk-wallet-spark/releases/tag/v1.0.0-beta.10))
***
### February 14, 2026
**Changes**
* **wallet-spark**: Upgrade spark-sdk from `0.6.1` to `0.6.4` and spark bare SDK to `0.0.43` ([v1.0.0-beta.9](https://github.com/tetherto/wdk-wallet-spark/releases/tag/v1.0.0-beta.9))
***
### February 12, 2026
**What's New**
* **[Agent Skills](../ai/agent-skills)**: New page covering WDK's agent skill capabilities, self-custodial vs hosted comparison, and platform compatibility with OpenClaw, Claude, Cursor, and other agent platforms.
* **[OpenClaw Integration](../ai/openclaw)**: New page for installing and configuring the WDK skill in OpenClaw via ClawHub, including security precautions for running agents locally.
**Changes**
* **wallet-evm** ([v1.0.0-beta.7](https://github.com/tetherto/wdk-wallet-evm/releases/tag/v1.0.0-beta.7)): Added [EIP-712](https://eips.ethereum.org/EIPS/eip-712) typed data support:
* Added [`signTypedData(typedData)`](../sdk/wallet-modules/wallet-evm/api-reference) method to [`WalletAccountEvm`](../sdk/wallet-modules/wallet-evm/api-reference) for signing structured data
* Added [`verifyTypedData(typedData, signature)`](../sdk/wallet-modules/wallet-evm/api-reference) method to [`WalletAccountEvm`](../sdk/wallet-modules/wallet-evm/api-reference) and [`WalletAccountReadOnlyEvm`](../sdk/wallet-modules/wallet-evm/api-reference) for verifying typed data signatures
* **wallet-evm-erc-4337** ([v1.0.0-beta.4](https://github.com/tetherto/wdk-wallet-evm-erc-4337/releases/tag/v1.0.0-beta.4)):
* Added 2 new gas payment modes: [Sponsorship Policy](../sdk/wallet-modules/wallet-evm-erc-4337/configuration#gas-payment-mode-flags) and [Native Coins](../sdk/wallet-modules/wallet-evm-erc-4337/configuration#gas-payment-mode-flags), alongside the existing Paymaster Token mode
* Added per-call [config override](../sdk/wallet-modules/wallet-evm-erc-4337/api-reference) parameter to `sendTransaction`, `transfer`, `quoteSendTransaction`, and `quoteTransfer`
* Added [`getUserOperationReceipt(hash)`](../sdk/wallet-modules/wallet-evm-erc-4337/api-reference) method for retrieving ERC-4337 UserOperation receipts
* Added [`ConfigurationError`](../sdk/wallet-modules/wallet-evm-erc-4337/api-reference) error type for invalid configuration validation
***
### February 10, 2026
**What's New**
* **[Build with AI](../start-building/build-with-ai)**: New guide for using AI coding assistants with WDK. Includes MCP server setup, Markdown context endpoints, project rules, and example prompts. Supports Cursor, Claude Code, GitHub Copilot, Windsurf, Cline, and Continue.
* **[MCP Toolkit](../ai/mcp-toolkit)**: New documentation for `@tetherto/wdk-mcp-toolkit` (`v1.0.0-beta.1`). Covers the `WdkMcpServer` class, 35 built-in MCP tools across 7 categories (wallet, pricing, indexer, swap, bridge, lending, fiat), setup wizard, multi-tool configuration, and full API Reference.
***
### February 08, 2026
**Changes**
* **wallet-spark**: Fixed import causing wallet init failure. Upgrade spark-sdk from `0.5.7` to `0.6.1` ([v1.0.0-beta.8](https://github.com/tetherto/wdk-wallet-spark/releases/tag/v1.0.0-beta.8))
***
### February 02, 2026
**Changes**
* **wallet-ton-gasless**: Added `verify` method to [`WalletAccountReadOnlyTonGasless`](../sdk/wallet-modules/wallet-ton-gasless/api-reference#walletaccountreadonlytongasless) ([v1.0.0-beta.4](https://github.com/tetherto/wdk-wallet-ton-gasless/releases/tag/v1.0.0-beta.4))
* **wallet-tron-gasfree**: Added `verify` method to [`WalletAccountReadOnlyTronGasfree`](../sdk/wallet-modules/wallet-tron-gasfree/api-reference#walletaccountreadonlytrongasfree) ([v1.0.0-beta.4](https://github.com/tetherto/wdk-wallet-tron-gasfree/releases/tag/v1.0.0-beta.4))
### January 29, 2026
**What's New**
* **wdk-indexer**
* Updated Ethereum indexer supported tokens list to add USA₮.
**Changes**
* **wdk-indexer docs**
* Fixed the USD₮, XAU₮ token names.
***
### January 26, 2026
**Changes**
* **wallet-btc** ([v1.0.0-beta.5](https://github.com/tetherto/wdk-wallet-btc/releases/tag/v1.0.0-beta.5)):
* Added `verify` method to [`WalletAccountReadOnlyBtc`](../sdk/wallet-modules/wallet-btc/api-reference)
* Added Pluggable Transport classes: [`ElectrumTcp`](../sdk/wallet-modules/wallet-btc/api-reference), [`ElectrumTls`](../sdk/wallet-modules/wallet-btc/api-reference), [`ElectrumSsl`](../sdk/wallet-modules/wallet-btc/api-reference), [`ElectrumWs`](../sdk/wallet-modules/wallet-btc/api-reference)
* **wallet-evm**: Added `verify` method to [`WalletAccountReadOnlyEvm`](../sdk/wallet-modules/wallet-evm/api-reference) ([v1.0.0-beta.5](https://github.com/tetherto/wdk-wallet-evm/releases/tag/v1.0.0-beta.5))
* **wallet-solana**: Added `verify` method to [`WalletAccountReadOnlySolana`](../sdk/wallet-modules/wallet-solana/api-reference) ([v1.0.0-beta.5](https://github.com/tetherto/wdk-wallet-solana/releases/tag/v1.0.0-beta.5))
* **wallet-ton**: Added `verify` method to [`WalletAccountReadOnlyTon`](../sdk/wallet-modules/wallet-ton/api-reference) ([v1.0.0-beta.7](https://github.com/tetherto/wdk-wallet-ton/releases/tag/v1.0.0-beta.7))
* **wallet-tron**: Added `verify` method to [`WalletAccountReadOnlyTron`](../sdk/wallet-modules/wallet-tron/api-reference) ([v1.0.0-beta.4](https://github.com/tetherto/wdk-wallet-tron/releases/tag/v1.0.0-beta.4))
* **wallet-spark**: Added `verify` method to [`WalletAccountReadOnlySpark`](../sdk/wallet-modules/wallet-spark/api-reference) ([v1.0.0-beta.7](https://github.com/tetherto/wdk-wallet-spark/releases/tag/v1.0.0-beta.7))
***
### January 23, 2026
**What's New**
* **wdk-core docs**: Added comprehensive [Core Module Guides](../sdk/core-module/guides/getting-started) covering:
* [Getting Started](../sdk/core-module/guides/getting-started) - Installation and instantiation
* [Wallet Registration](../sdk/core-module/guides/wallet-registration) - Registering wallet modules for different blockchains
* [Account Management](../sdk/core-module/guides/account-management) - Working with accounts and addresses
* [Transactions](../sdk/core-module/guides/transactions) - Sending native tokens
* [Protocol Integration](../sdk/core-module/guides/protocol-integration) - Using swaps, bridges, and lending protocols
* [Middleware](../sdk/core-module/guides/middleware) - Configuring logging and failover protection
* [Error Handling](../sdk/core-module/guides/error-handling) - Best practices and memory management
* **wdk-core**: Added support for 24-word seed phrases via `WDK.getRandomSeedPhrase(24)`
* **indexer-api**:
* Added new `/api/v1/chains` endpoint to list supported blockchains and tokens
* Added XAU₮ support for Plasma network
**Changes**
* **wallet-btc docs**:
* Updated documentation with BIP-84 (Native SegWit) and BIP-44 (Legacy) support
* Improved API Reference and configuration documentation
* **wallet-spark docs**:
* Removed testnet support (now only mainnet and regtest)
* Added [Lightspark Regtest Faucet](https://app.lightspark.com/regtest-faucet) link for test funds
* **wallet-tron-gasfree docs**:
* Updated testnet from Shasta to Nile
* Updated GasFree service URLs and configuration examples
* **wallet-evm-erc-4337 docs**: Added paymaster token configuration documentation
* **docs**:
* Updated token symbols to USD₮ and XAU₮ throughout documentation
* Various documentation improvements with better cross-linking and examples
**Fixes**
* **wallet-tron-gasfree docs**: Fixed typo "Gras-Free" to "Gas-Free"
* Fixed GitBook callout syntax and formatting issues across documentation
***
### December 23, 2025
**What's New**
* Added [MoonPay Fiat Module](../sdk/fiat-modules/fiat-moonpay/) for on-ramp and off-ramp functionality
* Added [Community Modules](../sdk/community-modules/) section to highlight community-built modules
**Changes**
* Added this changelog page in the docs!
* **wallet-spark**: Updated Spark SDK to latest version ([v1.0.0-beta.6](https://github.com/tetherto/wdk-wallet-spark/releases/tag/v1.0.0-beta.6))
* Introduced [All Modules](../sdk/all-modules) page in docs for comprehensive module listings
* Reorganized documentation structure for better navigation
***
### December 17, 2025
**What's New**
* **wdk-core**: Added fiat protocol support for on-ramp integrations ([v1.0.0-beta.5](https://github.com/tetherto/wdk-core/releases/tag/v1.0.0-beta.5))
* **wdk-wallet**: Added fiat protocol integration ([v1.0.0-beta.6](https://github.com/tetherto/wdk-wallet/releases/tag/v1.0.0-beta.6))
***
### December 3, 2025
**What's New**
* **wallet-ton**: Added integration tests ([v1.0.0-beta.6](https://github.com/tetherto/wdk-wallet-ton/releases/tag/v1.0.0-beta.6))
* **wallet-btc**: Added support for custom `feeRate` and `confirmationTarget` parameters ([v1.0.0-beta.4](https://github.com/tetherto/wdk-wallet-btc/releases/tag/v1.0.0-beta.4))
**Changes**
* **wallet-ton**: Updated default derivation path, fixed transaction receipt LT and from address
* **wallet-solana**: Updated default derivation path for better compatibility ([v1.0.0-beta.4](https://github.com/tetherto/wdk-wallet-solana/releases/tag/v1.0.0-beta.4))
* **wallet-btc**: Multiple improvements:
* Automatic dust limit inference based on wallet type
* Performance improvements with bounded concurrency and caching for `getTransfers`
* Switched to `bitcoinjs-message` for standard message signing
* Updated default BIP to 84 (Native SegWit)
* Fixed testnet derivation path (now uses `1'`)
***
### November 14, 2025
**Changes**
* **wdk-wallet**: Runtime updates and dependency synchronization ([v1.0.0-beta.5](https://github.com/tetherto/wdk-wallet/releases/tag/v1.0.0-beta.5))
***
### November 12, 2025
**What's New**
* **wallet-solana**: Added `sendTransaction` support with unit tests ([v1.0.0-beta.3](https://github.com/tetherto/wdk-wallet-solana/releases/tag/v1.0.0-beta.3))
**Changes**
* **wallet-solana**: Fixed `punycode` module resolution issue
* **lending-aave-evm**: Runtime compatibility updates ([v1.0.0-beta.3](https://github.com/tetherto/wdk-protocol-lending-aave-evm/releases/tag/v1.0.0-beta.3))
***
### November 11, 2025
**Changes**
* **swap-velora-evm**: Runtime compatibility updates ([v1.0.0-beta.4](https://github.com/tetherto/wdk-protocol-swap-velora-evm/releases/tag/v1.0.0-beta.4))
***
### November 9-10, 2025
**What's New**
* **wallet-ton-gasless**: Added unit tests ([v1.0.0-beta.3](https://github.com/tetherto/wdk-wallet-ton-gasless/releases/tag/v1.0.0-beta.3))
* **pear-wrk-wdk**: Added seed buffer support in `workletStart` ([v1.0.0-beta.5](../tools/pear-wrk-wdk))
**Changes**
* **wallet-tron-gasfree**: Fixed bug interacting with Gasfree API ([v1.0.0-beta.3](https://github.com/tetherto/wdk-wallet-tron-gasfree/releases/tag/v1.0.0-beta.3))
* **wallet-ton-gasless**: Updated TON query-id and transaction hash handling
* **wallet-evm**: Runtime updates ([v1.0.0-beta.4](https://github.com/tetherto/wdk-wallet-evm/releases/tag/v1.0.0-beta.4))
* **wallet-tron**: Dependency and runtime updates ([v1.0.0-beta.3](https://github.com/tetherto/wdk-wallet-tron/releases/tag/v1.0.0-beta.3))
***
### November 8, 2025
**Changes**
* **wdk-core**: Updated `bare-node-runtime` for improved compatibility ([v1.0.0-beta.4](https://github.com/tetherto/wdk-core/releases/tag/v1.0.0-beta.4))
* **wallet-spark**: Updated Spark dependencies and improved `dispose` method ([v1.0.0-beta.5](https://github.com/tetherto/wdk-wallet-spark/releases/tag/v1.0.0-beta.5))
***
### November 7, 2025
**Changes**
* **wallet-evm-erc-4337**: Fixed destructuring of user operation in `getTransactionReceipt()` ([v1.0.0-beta.3](https://github.com/tetherto/wdk-wallet-evm-erc-4337/releases/tag/v1.0.0-beta.3))
* **wallet-ton**: Replaced UUID-based message body with seqno/queryId for TON transfers, downgraded `@ton/ton` to 15.1.0 for stability ([v1.0.0-beta.5](https://github.com/tetherto/wdk-wallet-ton/releases/tag/v1.0.0-beta.5))
***
## How to Stay Updated
* Check this page for the latest updates
* Join our [Discord community](https://discord.gg/arYXDhHB2w) for real-time announcements
* Star and follow the [GitHub repositories](https://github.com/orgs/tetherto/repositories?q=wdk) for detailed release notes
# Partner with WDK (/overview/partner-program)
Build with WDK alongside Tether. Whether you're integrating WDK into your product or extending the ecosystem with new capabilities, we have a partnership track designed for you.
WDK is built to be open and extensible, but we know that building great products often takes more than just great documentation. We offer a selected group of partners a direct connection with Tether's engineering and product teams so you can ship faster, with confidence. We offer 3 partnership tracks depending on how you plan to work with WDK.
* [Project Partners](#project-partners)
* [WDK Tech Contributors](#wdk-tech-contributors)
* [Consulting & Implementation Partners (Alpha)](#consulting--implementation-partners-alpha)
***
## Project Partners
Integrate WDK more confidently, with direct access to Tether's engineering team and WDK solutions architects. Project Partners approved for Tether-supported implementations will benefit from:
* Access to a WDK Solutions Architect to discuss product-specific implementation strategies
* Custom integration assistance
* Privileged support channel
* WDK roadmap visibility
* Early access to APIs and SDKs
* Direct access to WDK product and engineering core team
### Is it for you?
Project Partners are companies and teams building end-user products powered by WDK. You're a good fit for this track if you are:
* A **fintech or neobank** building a wallet, payments app, or asset management platform and looking to leverage WDK as your underlying wallet infrastructure.
* An **exchange or trading platform** adding self-custodial wallet features for your users.
* A **messaging or social platform** integrating peer-to-peer payments or tipping functionality.
* A **remittance or cross-border payments provider** looking to use stablecoins and multi-chain support to serve your customers.
* An **enterprise or institutional player** that needs WDK integrated into internal treasury, compliance, or operations tooling.
* Any team that plans to **ship a product to end users** where WDK handles key management, transaction signing, or blockchain interactions under the hood.
As a Project Partner, you get hands-on integration support from the team that builds WDK. We'll help you navigate architecture decisions, troubleshoot implementation challenges, and make sure your product launches on solid foundations.
[Become a Project Partner](https://forms.monday.com/forms/6d484c4b34949e3a238988c47bf0a1b6?r=euc1)
***
## WDK Tech Contributors
Tap into the network of WDK adopters by developing modules and extensions for the WDK ecosystem. Technology partners approved as WDK Tech Contributors will benefit from:
* Build and publish WDK modules
* Visibility across WDK community and in WDK documentation
* Co-marketing opportunities
* Early access to APIs and SDKs
* Technical documentation collaboration
### Is it for you?
Tech Contributors are protocol teams, service providers, and developer organizations building modules, plugins, or integrations that extend what WDK can do. You're a good fit for this track if you are:
* A **swap or DEX protocol** looking to provide liquidity and trading capabilities to WDK-powered wallets.
* A **bridge protocol** enabling cross-chain asset transfers that WDK wallets can access natively.
* An **on/off-ramp provider** connecting fiat currencies to the WDK ecosystem.
* A **lending or DeFi protocol** looking to make your services available directly within WDK wallets.
* A **hardware wallet or signing solution provider** building signer integrations for WDK.
* A **blockchain or L2 network** that wants first-class WDK wallet support for your chain.
* An **open-source developer or team** contributing new wallet modules, protocol integrations, or developer tooling to the WDK ecosystem.
As a Tech Contributor, you'll work closely with our SDK team to build, test, and publish modules that reach every WDK-powered wallet. You'll get early access to unreleased APIs, architecture guidance, co-marketing exposure through our documentation and community channels, and the opportunity to shape how your protocol integrates across the ecosystem.
[Become a Technology Partner](https://tether.to/en/partner-with-us/)
***
## Consulting & Implementation Partners (Alpha)
Consulting companies, agencies, and systems integrators building wallet solutions with WDK for their clients. Approved Consulting & Implementation Partners will benefit from:
* **Being part of Tether's partner ecosystem**
* Access to a WDK Solutions Architect to discuss product-specific implementation strategies for your clients
* Custom integration assistance
* Direct access to WDK product and engineering core team
* Privileged support channel
* WDK roadmap visibility
* Early access to APIs and SDKs
* Co-marketing support
### Is it for you?
Consulting & Implementation Partners are agencies, system integrators, and software houses that would like to deliver WDK-powered solutions on behalf of their clients. You're a good fit for this track if you are:
* A **system integrator** helping enterprise clients adopt blockchain and digital asset infrastructure.
* A **software development agency** building custom wallet or payment applications.
* A **blockchain consultancy** advising companies on self-custodial wallet strategy and architecture.
* A **digital transformation firm** integrating stablecoin payments into existing client platforms.
* A **managed services provider** offering ongoing support and maintenance for WDK-based deployments.
As a Consulting & Implementation Partner, you'll gain access to Tether's referral network, dedicated technical support for your client engagements. We'll equip your team with the training, documentation, and direct engineering access needed to deliver successful WDK implementations at scale.
**Alpha Program** - This partnership track is currently in alpha. We're onboarding a limited number of partners as we shape the program and cannot guarantee acceptance, specific benefits, or program terms at this stage. Apply to express your interest and help shape the program as it evolves.
[Become a Consulting & Implementation Partner](https://tether.to/en/partner-with-us/)
# Showcase (/overview/showcase)
Showcase projects are developed and maintained independently by third-party contributors.
Tether and the WDK Team do not endorse or assume responsibility for their code, security, or maintenance. Use your own judgment and proceed at your own risk.
Looking for community-built WDK modules you can install and use in your project? Check out the [Community Modules](../sdk/community-modules/) page instead.
## Featured Projects
***
### wdk-starter-browser-extension
> Self-custodial browser extension wallet starter built on WDK.
**Author:** Base58 ([Website](https://base58.io/), [GitHub](https://github.com/base58-io)) / alexszolowicz ([GitHub](https://github.com/alexszolowicz-blockether))
**Repository:** [github.com/base58-io/wdk-starter-browser-extension](https://github.com/base58-io/wdk-starter-browser-extension)
A browser extension starter kit that demonstrates how to build a self-custodial wallet using WDK. Provides a ready-made template for creating Chrome-compatible extension wallets with secure key management and transaction signing.
***
### wdk-wallet-evm-x402-facilitator
> x402 payment facilitator adapter for WDK EVM wallets.
**Author:** SemanticPay ([Website](https://www.semanticpay.io/), [GitHub](https://github.com/SemanticPay))
**Repository:** [github.com/SemanticPay/wdk-wallet-evm-x402-facilitator](https://github.com/SemanticPay/wdk-wallet-evm-x402-facilitator)
An adapter that enables WDK EVM wallets to act as x402 payment facilitators. Bridges the WDK wallet interface with the x402 HTTP payment protocol, allowing servers to charge for API access using on-chain payments.
***
### x402-usdt0
> End-to-end x402 reference implementation on Plasma with USDT0 and WDK.
**Author:** baghdadgherras ([GitHub](https://github.com/baghdadgherras))
**Repository:** [github.com/baghdadgherras/x402-usdt0](https://github.com/baghdadgherras/x402-usdt0)
A complete reference implementation demonstrating the x402 HTTP payment protocol using USDT0 on the Plasma network. Includes both client and server components, showcasing how WDK wallets can facilitate machine-to-machine payments in a real-world setup.
***
### wdk-mcp
> AI-powered blockchain operations via Model Context Protocol.
**Author:** Seven ([GitHub](https://github.com/rezerov))
**Repository:** [github.com/rezerov/wdk-mcp](https://github.com/rezerov/wdk-mcp)
Integrates WDK capabilities within the MCP (Model Context Protocol) ecosystem, allowing AI Agents to perform blockchain operations such as signing, transactions, and wallet interactions securely and locally. This project expands the reach of WDK to autonomous systems and AI-driven workflows.
***
## Submit Your Project
If you've built something using WDK, we'd love to showcase it.
Projects listed here should:
* Use one or more WDK modules or SDKs
* Be open source or publicly accessible
* Include a clear README and installation instructions
Your work may be featured in future updates, social posts, or documentation spotlights.
Share it with us through the community form or the showcase channel below.
# Get Support (/overview/support)
We're here to help you succeed with WDK. Don't hesitate to reach out.
# Our Vision (/overview/vision)
Imagine a world where humans, machines, and AI agents have the freedom to control their own finances. WDK is a fully open-source, self-custodial toolkit designed to be modular, independent, resilient and infinitely scalable, enabling trillions of wallets.
***
### **Universal Unstoppable Access**
Anyone should be able to build, deploy or use a wallet and manage assets without friction or gatekeepers. Whether you're an independent developer, a startup, a corporation, an AI, or even a nation-state, WDK provides the open technology to create hyper-secure self-custodial wallets without barriers.
### **Ubiquitous Deployment**
Wallets need to run everywhere. Through Bare runtime compatibility, WDK can live and evolve on any embedded device, mobile apps, desktop applications, IoT devices, servers, and even autonomous systems. From smartphones to smart fridges, from trading bots to spaceships — WDK enables financial sovereignty across all environments.
### **AI-Native Architecture**
In a world where AI agents and robots are becoming autonomous and will permeate every single part of our lives, the machines need to have access and self-manage their own resources. WDK is the preferred choice for the digital entities of tomorrow, ensuring direct custody of funds, highly scalable transactions, and empowering the infinite AI economy of the future.
***
## A world of opportunities
WDK enables a future with millions of wallets built on top of it, each tailored to specific needs and use cases
WDK enables trillions of AI agents to have their own wallet, managing resources autonomously in the digital economy
Any developer, company, organization, or country can build their own white-label wallet and manage their assets independently
From IoT devices to autonomous vehicles, every connected device can have its own wallet and financial identity
***
## Let's build this future together
WDK is more than a development kit—it's the foundation for a new era of financial sovereignty. By making wallet technology accessible, ubiquitous, and AI-native, we're enabling a world where:
* **Developers** can focus on innovation rather than infrastructure
* **Users** maintain complete control over their digital assets
* **AI Agents** can operate autonomously in the digital economy
* **Organizations** can build custom financial solutions without compromise
* **Society** benefits from more secure, efficient, and accessible financial infrastructure
Join us in building this future. The tools are open-source, the vision is clear, and the possibilities are limitless.
***
Ready to start building? Explore our [getting started guide](../start-building/nodejs-bare-quickstart) or dive into our [SDK documentation](../sdk/get-started).
# Concepts & Definitions (/resources/concepts)
## Account Abstraction
Account Abstraction is a blockchain technology that separates the concept of a user account from the mechanism of transaction validation and fee payment. In traditional blockchain systems, users must pay transaction fees in the native token of the blockchain (like ETH on Ethereum). Account Abstraction allows users to pay fees in other tokens or have fees sponsored by third parties, enabling gasless transactions and enhanced user experiences.
### WDK Implementation
WDK provides Account Abstraction support through specialized wallet modules:
* `@tetherto/wdk-wallet-evm-erc4337` - EVM chains with ERC-4337 standard
* `@tetherto/wdk-wallet-ton-gasless` - TON blockchain with gasless transactions
* `@tetherto/wdk-wallet-tron-gasfree` - TRON blockchain with gas-free transactions
These modules allow developers to implement gasless transaction flows where users can pay fees in tokens like USD₮ or XAU₮ instead of native blockchain tokens.
## ERC-4337
ERC-4337 is an Ethereum standard that enables Account Abstraction without requiring changes to the Ethereum protocol itself. It introduces a new transaction type called "UserOperation" that allows smart contract wallets to handle transaction validation and fee payment logic through components like EntryPoint contracts, Bundlers, and Paymasters.
## Gasless Transactions
Gasless transactions allow users to perform blockchain operations without holding native tokens for gas fees. Instead, transaction fees are paid by third-party services or in alternative tokens, enabling new user onboarding, cross-chain operations, and corporate applications where companies can sponsor employee transactions.
## Paymaster Services
Paymaster services are third-party providers that sponsor transaction fees on behalf of users. They accept payment in various tokens and handle the conversion and payment of gas fees to the blockchain network, providing fee estimation, gas optimization, and high transaction success rates.
## Safe Accounts
Safe Accounts are smart contract wallets built on the Safe protocol that provide enhanced security features and multi-signature capabilities. In the context of ERC-4337, Safe Accounts can be used as the underlying wallet implementation, combining the security benefits of multi-signature with the flexibility of Account Abstraction for enterprise, family, and institutional use cases.
## BIP Standards
BIP (Bitcoin Improvement Proposal) standards define common practices for Bitcoin and other blockchain wallets. WDK modules implement several key BIP standards for consistent wallet behavior across different blockchains.
### BIP-39 (Mnemonic Seed Phrases)
BIP-39 defines a standard for generating mnemonic seed phrases from random entropy. These phrases are human-readable and can be used to recover wallet private keys. WDK modules use BIP-39 for secure seed phrase generation and validation.
### BIP-44 (Multi-Account Hierarchy)
BIP-44 defines a hierarchical deterministic wallet structure that allows creating multiple accounts from a single seed phrase. The derivation path format is `m/purpose'/coin_type'/account'/change/address_index`, where each module uses its specific coin type (e.g., 60 for Ethereum, 998 for Spark).
### BIP-84 (Native SegWit)
BIP-84 defines the derivation path for native SegWit addresses (P2WPKH) in Bitcoin wallets. This standard provides better security and lower transaction fees compared to legacy Bitcoin addresses.
## Lightning Network
The Lightning Network is a second-layer payment protocol built on top of Bitcoin that enables instant, low-fee transactions. It works by creating payment channels between parties, allowing them to transact without broadcasting every transaction to the Bitcoin blockchain.
### Key Features
* **Instant Payments**: Transactions settle immediately within payment channels
* **Low Fees**: Minimal fees compared to on-chain Bitcoin transactions
* **Scalability**: Can handle millions of transactions per second
* **BOLT11 Invoices**: Standard format for Lightning payment requests
### WDK Integration
The Spark wallet module integrates Lightning Network functionality, allowing users to create and pay Lightning invoices directly from their Spark wallets.
## Layer 2 Solutions
Layer 2 solutions are protocols built on top of existing blockchains to improve scalability, reduce fees, and enhance transaction speed. They process transactions off the main blockchain and periodically settle to the base layer.
### Types of Layer 2
* **Rollups**: Bundle multiple transactions and submit them as a single transaction to the main chain
* **State Channels**: Allow parties to transact off-chain and settle periodically
* **Sidechains**: Independent blockchains that connect to the main chain via bridges
### WDK Support
WDK modules support various Layer 2 solutions:
* **Spark**: Bitcoin Layer 2 with Lightning Network integration
* **EVM Rollups**: Support for Arbitrum, Optimism, and other EVM-compatible rollups
## EVM (Ethereum Virtual Machine)
The Ethereum Virtual Machine is a runtime environment that executes smart contracts on Ethereum and other EVM-compatible blockchains. It provides a standardized way to run decentralized applications across different networks.
### EVM-Compatible Chains
Many blockchains are EVM-compatible, meaning they can run the same smart contracts and use the same tools as Ethereum:
* **Polygon**: Layer 2 scaling solution for Ethereum
* **BSC**: Binance Smart Chain
* **Arbitrum**: Optimistic rollup for Ethereum
* **Optimism**: Layer 2 scaling solution
### WDK EVM Support
The `@tetherto/wdk-wallet-evm` module works with any EVM-compatible blockchain, providing unified access to multiple networks through a single API.
## UTXO (Unspent Transaction Output)
UTXO is a fundamental concept in Bitcoin and other UTXO-based blockchains. Each transaction consumes previous UTXOs and creates new ones, forming a chain of ownership.
### How UTXOs Work
1. **Inputs**: References to previous UTXOs that are being spent
2. **Outputs**: New UTXOs created by the transaction
3. **Change**: Remaining value returned to the sender as a new UTXO
### WDK UTXO Management
The Bitcoin wallet module automatically handles UTXO selection and change address management, ensuring optimal transaction construction and fee calculation.
## Seed Phrases and Private Keys
Seed phrases and private keys are the foundation of wallet security in blockchain systems.
### Seed Phrases (BIP-39)
* **12-24 words**: Human-readable representation of wallet entropy
* **Deterministic**: Same seed phrase always generates the same keys
* **Recovery**: Can recover entire wallet from seed phrase
* **Security**: Must be kept secure and never shared
### Private Keys
* **256-bit numbers**: Cryptographic keys that control wallet funds
* **Derived from seed**: Generated deterministically from seed phrase
* **Signing**: Used to sign transactions and prove ownership
* **Memory safety**: WDK modules handle private keys securely with automatic cleanup
## Network Types
Blockchain networks come in different types for different use cases.
### Mainnet
Production networks where real value is transacted:
* **Ethereum Mainnet**: Production Ethereum network
* **Bitcoin Mainnet**: Production Bitcoin network
* **Spark Mainnet**: Production Spark network
### Testnet
Development networks for testing without real value:
* **Goerli/Sepolia**: Ethereum test networks
* **Bitcoin Testnet**: Bitcoin test network
* **Spark Testnet**: Spark test network
### Regtest
Local networks for development and testing:
* **Local Ethereum**: Private Ethereum network
* **Bitcoin Regtest**: Local Bitcoin network
* **Spark Regtest**: Local Spark network
### Testnet Funds & Faucets
To test transactions without spending real assets, developers use "Testnets"—networks that mimic the main blockchain but use tokens with no monetary value. You can obtain these tokens for free from different publicly available "Faucets". Links to common "Faucets" are below.
The below faucets are for testnets. The USD₮ tokens and other tokens available at the links below are not real and do not entitle the holder to anything. In particular, they cannot be redeemed with Tether International, S.A. de C.V. ("Tether International") and are not Tether Tokens as described in [Tether International's Terms of Service](https://tether.to/en/legal). The USD₮ tokens available at the links below on various testnets are intended for testing WDK on the applicable testnet. The links below are links to third-party websites and are Third-Party Information as described in Tether Operations, S.A. de [C.V.'s Website Terms](https://tether.io/terms/).
#### Common Faucets
* **USD₮ Test Tokens (Sepolia)**: [Pimlico Faucet](https://dashboard.pimlico.io/test-erc20-faucet)
* **USD₮ Test Tokens (Sepolia)**: [Candide Faucet](https://dashboard.candide.dev/faucet)
* **Ethereum (Sepolia)**: [Google Cloud Web3 Faucet](https://cloud.google.com/application/web3/faucet/ethereum/sepolia)
* **Aave Test Tokens (Sepolia)**: [Aave Faucet](https://app.aave.com/faucet/) — get test USD₮, DAI and other tokens for DeFi testing
* **TON Testnet**: [Testgiver Bot](https://t.me/testgiver_ton_bot)
* **Bitcoin Testnet**: [CoinFaucet](https://coinfaucet.eu/en/btc-testnet/)
# All Modules (/sdk/all-modules)
A comprehensive list of all available WDK modules. Each module is designed to be modular and can be used independently or combined with others.
## Core Module
The orchestrator that manages all WDK modules.
| Module | Description | Documentation |
| ------------------------------------------------------------ | ---------------------------------------- | ---------------------- |
| [`@tetherto/wdk-core`](https://github.com/tetherto/wdk-core) | Central orchestrator for all WDK modules | [Docs](./core-module/) |
## Wallet Modules
Wallet modules provide blockchain-specific wallet functionality for managing addresses, balances, and transactions.
| Module | Blockchain | Description | Documentation |
| ------------------------------------------------------------------------------------------ | ---------- | ------------------------------------------------ | --------------------------------------------- |
| [`@tetherto/wdk-wallet-btc`](https://github.com/tetherto/wdk-wallet-btc) | Bitcoin | Bitcoin SegWit wallet with BIP-39/BIP-44 support | [Docs](./wallet-modules/wallet-btc/) |
| [`@tetherto/wdk-wallet-evm`](https://github.com/tetherto/wdk-wallet-evm) | EVM | Ethereum and EVM-compatible chains wallet | [Docs](./wallet-modules/wallet-evm/) |
| [`@tetherto/wdk-wallet-evm-erc4337`](https://github.com/tetherto/wdk-wallet-evm-erc-4337) | EVM | ERC-4337 Account Abstraction for EVM chains | [Docs](./wallet-modules/wallet-evm-erc-4337/) |
| [`@tetherto/wdk-wallet-ton`](https://github.com/tetherto/wdk-wallet-ton) | TON | TON blockchain wallet | [Docs](./wallet-modules/wallet-ton/) |
| [`@tetherto/wdk-wallet-ton-gasless`](https://github.com/tetherto/wdk-wallet-ton-gasless) | TON | Gasless transactions on TON | [Docs](./wallet-modules/wallet-ton-gasless/) |
| [`@tetherto/wdk-wallet-tron`](https://github.com/tetherto/wdk-wallet-tron) | TRON | TRON blockchain wallet | [Docs](./wallet-modules/wallet-tron/) |
| [`@tetherto/wdk-wallet-tron-gasfree`](https://github.com/tetherto/wdk-wallet-tron-gasfree) | TRON | Gas-free transactions on TRON | [Docs](./wallet-modules/wallet-tron-gasfree/) |
| [`@tetherto/wdk-wallet-solana`](https://github.com/tetherto/wdk-wallet-solana) | Solana | Solana blockchain wallet | [Docs](./wallet-modules/wallet-solana/) |
| [`@tetherto/wdk-wallet-spark`](https://github.com/tetherto/wdk-wallet-spark) | Spark | Spark/Lightning Bitcoin L2 wallet | [Docs](./wallet-modules/wallet-spark/) |
## Swap Modules
DEX swap functionality for token exchanges.
| Module | Blockchain | Description | Documentation |
| ---------------------------------------------------------------------------------------------------- | ---------- | --------------------------------- | --------------------------------------- |
| [`@tetherto/wdk-protocol-swap-velora-evm`](https://github.com/tetherto/wdk-protocol-swap-velora-evm) | EVM | DEX aggregator swap on EVM chains | [Docs](./swap-modules/swap-velora-evm/) |
## Bridge Modules
Cross-chain bridge functionality for token transfers between blockchains.
| Module | Route | Description | Documentation |
| ------------------------------------------------------------------------------------------------------ | ------------------- | --------------------------------------------------------------------- | ------------------------------------------ |
| [`@tetherto/wdk-protocol-bridge-usdt0-evm`](https://github.com/tetherto/wdk-protocol-bridge-usdt0-evm) | EVM → EVM + Non-EVM | USD₮0 bridging from EVM source chains to EVM and non-EVM destinations | [Docs](./bridge-modules/bridge-usdt0-evm/) |
## Lending Modules
DeFi lending and borrowing functionality.
| Module | Blockchain | Description | Documentation |
| ------------------------------------------------------------------------------------------------------ | ---------- | --------------------------------- | ------------------------------------------- |
| [`@tetherto/wdk-protocol-lending-aave-evm`](https://github.com/tetherto/wdk-protocol-lending-aave-evm) | EVM | Aave protocol integration for EVM | [Docs](./lending-modules/lending-aave-evm/) |
## Fiat Modules
On-ramp and off-ramp functionality for fiat currency integration.
| Module | Provider | Description | Documentation |
| ---------------------------------------------------------------------------------------------- | -------- | ------------------------------------ | ------------------------------------ |
| [`@tetherto/wdk-protocol-fiat-moonpay`](https://github.com/tetherto/wdk-protocol-fiat-moonpay) | MoonPay | MoonPay integration for fiat on-ramp | [Docs](./fiat-modules/fiat-moonpay/) |
## Community Modules
Modules built by the WDK community. See the [Community Modules](./community-modules/) page for more details.
| Module | Blockchain | Description | Documentation |
| --------------------------------------------------------------------------- | ------------- | ------------------------------- | ---------------------------------------------------------- |
| [`@utexo/wdk-wallet-rgb`](https://github.com/UTEXO-Protocol/wdk-wallet-rgb) | Bitcoin (RGB) | RGB protocol wallet integration | [GitHub](https://github.com/UTEXO-Protocol/wdk-wallet-rgb) |
# Get Started (/sdk/get-started)
The SDK is a comprehensive, modular plug-in framework designed to simplify multi-chain wallet development.
It is built on some core principles: **self-custodial and stateless** (private keys never leave your app and no data is stored by WDK), **unified interface** (consistent API across all blockchains), and **cross-platform compatibility** (works seamlessly from Node.js to React Native to embedded systems).
#### Capabilities
* **Multi-Chain Support**: Bitcoin, Ethereum, TON, TRON, Solana, Spark, and more
* **Account Abstraction**: Gasless transactions on supported chains
* **DeFi Integration**: Plug-in support for swaps, bridges, and lending protocols
* **Extensible Design**: Add custom modules for new blockchains or protocols
***
### Modular Architecture
WDK's architecture is built around the concept of composable modules. Each module is a specialized component that handles specific functionality, allowing you to build exactly what you need without unnecessary complexity.
Each module has a single responsibility. Wallet modules handle blockchain operations, protocol modules manage DeFi interactions, and the core module orchestrates everything.
New functionality is added through modules rather than modifying core code. Also, modules are configured through simple objects, making them easy to customize for different environments and use cases.
***
#### Module Types
WDK modules are organized into five main categories, each serving a specific purpose in the blockchain application stack:
Main orchestrator and shared utilities
Blockchain-specific wallet operations
Token swapping across DEXs
Cross-chain asset transfers
DeFi lending and borrowing
***
### How to use the SDK
The WDK SDK uses a registration-based system where modules are added to a central orchestrator. This creates a unified interface while maintaining module independence.
#### Registration Flow
**1. Core Module Initialization**
```typescript title="Initialize WDK"
import WDK from '@tetherto/wdk'
// Generate 24-word seed phrase for higher security
const seedPhrase = WDK.getRandomSeedPhrase(24)
// Or use 12-word seed phrase (default)
// const seedPhrase = WDK.getRandomSeedPhrase()
const wdk = new WDK(seedPhrase)
```
**2. Wallet Module Registration**
```typescript title="Register Wallets"
import WalletManagerEvm from '@tetherto/wdk-wallet-evm'
import WalletManagerBtc from '@tetherto/wdk-wallet-btc'
const wdkWithWallets = wdk
.registerWallet('ethereum', WalletManagerEvm, {
provider: 'https://eth.drpc.org'
})
.registerWallet('bitcoin', WalletManagerBtc, {
provider: 'https://blockstream.info/api'
})
```
**3. Protocol Module Registration**
```typescript title="Register Protocols"
import SwapveloraEvm from '@tetherto/wdk-protocol-swap-velora-evm'
const wdkWithProtocols = wdkWithWallets
.registerProtocol('swap-velora-evm', SwapveloraEvm)
```
#### Unified Operations
Once registered, all modules work through the same interface:
```typescript title="Unified Operations"
// Get accounts from different blockchains using the same method
const ethAccount = await wdkWithProtocols.getAccount('ethereum', 0)
const btcAccount = await wdkWithProtocols.getAccount('bitcoin', 0)
// Check balances using unified interface
const ethBalance = await ethAccount.getBalance()
const btcBalance = await btcAccount.getBalance()
// Send transactions with consistent API
const ethTx = await ethAccount.sendTransaction({
to: '0x...',
value: '1000000000000000000'
})
const btcTx = await btcAccount.sendTransaction({
to: '1A1z...',
value: 100000000
})
// Use DeFi protocols through the same interface
const swapResult = await wdkWithProtocols.executeProtocol('swap-velora-evm', {
fromToken: 'ETH',
toToken: 'USDT',
amount: '1000000000000000000'
})
```
***
### Creating Custom Modules
WDK's modular architecture makes it straightforward to add support for new blockchains or protocols. Each module type has a specific interface that must be implemented.
#### Wallet Module Interface
```typescript title="Custom Wallet Module Setup"
interface WalletModule {
// Account management
getAccount(index: number): Promise
getAddress(index: number): Promise
getBalance(index: number): Promise
// Transaction operations
sendTransaction(params: TransactionParams): Promise
estimateTransaction(params: TransactionParams): Promise
// Key management
signMessage(message: string, index: number): Promise
verifySignature(message: string, signature: string, address: string): Promise
// Blockchain-specific operations
getTransactionHistory(index: number, limit?: number): Promise
getTokenBalance(index: number, tokenAddress: string): Promise
}
```
#### Protocol Module Interface
```typescript title="Custom Protocol Module Setup"
interface ProtocolModule {
// Protocol execution
execute(params: ProtocolParams): Promise
estimate(params: ProtocolParams): Promise
// Supported operations
getSupportedTokens(): Promise
getSupportedChains(): Promise
getOperationTypes(): Promise
// Protocol-specific methods
getLiquidityPools?(): Promise
getLendingRates?(): Promise
getBridgeRoutes?(): Promise
}
```
#### Module Implementation Example
```typescript title="Custom Wallet Module Implementation"
class CustomWalletModule implements WalletModule {
private provider: string
private chainId: number
constructor(config: { provider: string; chainId: number }) {
this.provider = config.provider
this.chainId = config.chainId
}
async getAccount(index: number): Promise {
// Implement account derivation logic
const privateKey = await this.derivePrivateKey(index)
return new CustomAccount(privateKey, this.provider)
}
async getAddress(index: number): Promise {
const account = await this.getAccount(index)
return account.getAddress()
}
async getBalance(index: number): Promise {
const address = await this.getAddress(index)
// Implement balance fetching logic
const balance = await this.fetchBalance(address)
return new BigNumber(balance)
}
async sendTransaction(params: TransactionParams): Promise {
// Implement transaction sending logic
const account = await this.getAccount(params.accountIndex)
const tx = await account.sendTransaction(params)
return tx
}
// Additional methods...
}
```
#### Module Registration
```typescript title="Custom Wallet Module Registration"
// Register your custom module
const wdkWithCustom = wdk.registerWallet('custom-chain', CustomWalletModule, {
provider: 'https://custom-rpc-endpoint.com',
chainId: 12345
})
// Use it like any other module
const customAccount = await wdkWithCustom.getAccount('custom-chain', 0)
const balance = await customAccount.getBalance()
```
***
### Quickstart Paths
Ready to start building? Choose your development environment:
Get started with WDK in a Node.js environment
Build mobile wallets with React Native Expo
***
## Need Help?
# Build with AI (/start-building/build-with-ai)
WDK documentation is optimized for AI coding assistants. Give your AI tool context about WDK to get accurate code generation, architecture guidance, and debugging help.
There are two ways to provide WDK context to your AI:
1. **[Connect via MCP Server](#connect-wdk-docs-via-mcp-server)** - Native support for the `.su` docs environment is still rolling out.
2. **[Connect via Markdown](#connect-wdk-docs-via-markdown)** - Works with any AI tool. Feed documentation directly into the context window.
**Want to give AI agents wallet access?** The [MCP Toolkit](../ai/mcp-toolkit/) creates an MCP server that exposes WDK wallets as tools - letting AI agents check balances, send transactions, swap tokens, and more.
***
## Connect WDK Docs via MCP Server
The dedicated MCP endpoint for `docs.wdk.tether.su` is still being finalized. If you need environment-matched context on this preview site today, use the Markdown endpoints below instead.
The `.su` docs environment does not publish its own MCP server yet. Use `/llms.txt`, `/llms-full.txt`, or the raw `.md` page URLs from this environment until the endpoint is available.
**No MCP support?** You can feed WDK documentation directly into any AI tool as Markdown. See [Connect WDK Docs via Markdown](#connect-wdk-docs-via-markdown) below.
### Add WDK Project Rules (Optional)
Project rules give your AI assistant persistent context about WDK conventions, package naming, and common patterns. This is optional but recommended for teams working extensively with WDK.
Copy the rules content below and save it at the file path for your tool.
#### Rules Content
```markdown
# WDK Development Rules
## Package Structure
- All WDK packages are published under the `@tetherto` scope on npm
- Core module: `@tetherto/wdk`
- Wallet modules follow the pattern: `@tetherto/wdk-wallet-\`
- Examples: `@tetherto/wdk-wallet-evm`, `@tetherto/wdk-wallet-btc`, `@tetherto/wdk-wallet-solana`, `@tetherto/wdk-wallet-ton`, `@tetherto/wdk-wallet-tron`, `@tetherto/wdk-wallet-spark`
- Specialized wallet modules: `@tetherto/wdk-wallet-evm-erc4337`, `@tetherto/wdk-wallet-ton-gasless`, `@tetherto/wdk-wallet-tron-gasfree`
- Protocol modules follow the pattern: `@tetherto/wdk-protocol-\-\-\`
- Examples: `@tetherto/wdk-protocol-swap-velora-evm`, `@tetherto/wdk-protocol-bridge-usdt0-evm`, `@tetherto/wdk-protocol-lending-aave-evm`
## Platform Notes
- For Node.js or Bare runtime: Use `@tetherto/wdk` as the orchestrator, then register individual wallet modules
- For React Native: You have two options:
- Use the React Native provider package for convenience (provides hooks and managed lifecycle)
- Or use WDK packages directly in the Hermes runtime - this works the same as Node.js integration
## Architecture
- WDK is modular - each blockchain and protocol is a separate npm package
- Wallet modules expose `WalletManager`, `WalletAccount`, and `WalletAccountReadOnly` classes
- `WalletAccount` extends `WalletAccountReadOnly` - it has all read-only methods plus write methods (sign, send)
- All modules follow a consistent pattern: configuration → initialization → usage
## Documentation
- Official docs: [docs.wdk.tether.su](/)
- For any WDK question, consult the official documentation before making assumptions
- API References, configuration guides, and usage examples are available for every module
```
#### Where to Save
| AI Coding Assistant | File Path | Notes |
| ------------------- | --------------------------------- | ---------------------------- |
| Cursor | `.cursor/rules/wdk.mdc` | Project-level, auto-attached |
| Claude Code | `CLAUDE.md` | Place in project root |
| Windsurf | `.windsurf/rules/wdk.md` | Project-level rules |
| GitHub Copilot | `.github/copilot-instructions.md` | Project-level instructions |
| Cline | `.clinerules` | Place in project root |
| Continue | `.continuerules` | Place in project root |
***
## Connect WDK Docs via Markdown
If your AI tool doesn't support MCP, you can feed WDK documentation directly into the context window using these endpoints:
| Endpoint | URL | Description |
| ---------- | -------------------------------------------------- | ---------------------------------- |
| Page index | [docs.wdk.tether.su/llms.txt](/llms.txt) | Index of all page URLs and titles |
| Full docs | [docs.wdk.tether.su/llms-full.txt](/llms-full.txt) | Complete documentation in one file |
You can also append `.md` to any documentation page URL to get the raw Markdown, ready to paste into a chat context window.
***
## Agent Guidelines in WDK Repos
Each WDK package repository includes an `AGENTS.md` file in its root. This file provides AI agents with context about the project structure, coding conventions, testing patterns, and linting rules.
If your AI tool has access to the WDK source repositories (e.g., via a local clone), it will automatically ingest `AGENTS.md` for additional context beyond the documentation.
***
## Example Prompt
Here's an example prompt you can use to generate a multi-chain wallet with WDK. Try it with MCP connected or paste the relevant quickstart docs for best results:
```
Create a Node.js app using WDK (@tetherto/wdk) that:
1. Creates a multi-chain wallet supporting Bitcoin and Polygon
2. Use @tetherto/wdk-wallet-btc for Bitcoin and @tetherto/wdk-wallet-evm for Polygon
3. Generates wallet addresses for both chains
4. Retrieves the balance for each address
5. Use a mnemonic from environment variables
Check the WDK documentation for the correct configuration and initialization pattern.
```
***
## Tips for Effective AI-Assisted Development
* **Be specific about the chain.** Tell the AI which blockchain you're targeting (e.g., "I'm building on Ethereum using `@tetherto/wdk-wallet-evm`") so it picks the right module.
* **Reference the exact package name.** Mention the full `@tetherto/wdk-*` package name in your prompt for more accurate code generation.
* **Ask the AI to check docs first.** Prompt with "Check the WDK documentation before answering" to ensure it uses the MCP-connected docs rather than outdated training data.
* **Start with a quickstart.** Point the AI at the [Node.js Quickstart](nodejs-bare-quickstart) or [React Native Quickstart](react-native-quickstart) as a working reference before building custom features.
* **Iterate in steps.** Use the AI to scaffold your WDK integration first, then refine module configuration and error handling in follow-up prompts.
# Node.js & Bare Runtime Quickstart (/start-building/nodejs-bare-quickstart)
## What You'll Build
In this quickstart, you'll create a simple application that:
* [ ] Sets up WDK with multiple blockchain wallets (EVM, Bitcoin, TRON)
* [ ] Generates a new secret phrase (seed phrase)
* [ ] Resolves addresses across different chains
* [ ] Checks balances and estimates transaction costs
* [ ] Sends transactions on multiple blockchains
**Want to build faster?** Connect your AI coding assistant to WDK docs for context-aware help. [Learn how →](build-with-ai)
***
## Prerequisites
Before we start, make sure you have:
| Tool | Version | Why You Need It |
| --------------- | ------- | ---------------------- |
| **Node.js** | 20+ | To run JavaScript code |
| **npm** | Latest | To install packages |
| **Code Editor** | Any | To write code |
| Tool | Version | Why You Need It |
| ---------------- | --------- | ------------------- |
| **Bare Runtime** | >= 1.23.5 | To run JavaScript |
| **npm** | Latest | To install packages |
| **Code Editor** | Any | To write code |
To install Bare runtime first include to the `package.json`:
```
"type": "module"
```
and run the command `npm i -g bare`
You can try all features without real funds required. You can use the Pimlico or Candide faucets to get some Sepolia USD₮.
[Get mock/test USD₮ on Pimlico](https://dashboard.pimlico.io/test-erc20-faucet)
[Get mock/test USD₮ on Candide](https://dashboard.candide.dev/faucet)
See the [configuration](../sdk/wallet-modules/wallet-evm-erc-4337/configuration) for quick setup and Sepolia testnet configuration.
***
## Step 1: Set Up Your Project
First, we need to create a folder and initialize the project
```bash
mkdir wdk-quickstart && cd wdk-quickstart && npm init -y && npm pkg set type=module
```
Then install necessary WDK modules
```bash
npm install @tetherto/wdk @tetherto/wdk-wallet-evm @tetherto/wdk-wallet-tron @tetherto/wdk-wallet-btc
```
Learn more about WDK modules:
* [**@tetherto/wdk**](../sdk/core-module/) - The main SDK module
* [**@tetherto/wdk-wallet-evm**](../sdk/wallet-modules/wallet-evm/) - Ethereum and EVM-compatible chains support
* [**@tetherto/wdk-wallet-tron**](../sdk/wallet-modules/wallet-tron/) - TRON blockchain support
* [**@tetherto/wdk-wallet-btc**](../sdk/wallet-modules/wallet-btc/) - Bitcoin blockchain support
***
## Step 2: Create Your First Wallet
Create a file called `app.js`:
```javascript title="app.js"
import WDK from '@tetherto/wdk'
import WalletManagerEvm from '@tetherto/wdk-wallet-evm'
import WalletManagerTron from '@tetherto/wdk-wallet-tron'
import WalletManagerBtc from '@tetherto/wdk-wallet-btc'
console.log('Starting WDK App...')
try {
// Your code will go here
} catch (error) {
console.error('Application error:', error.message)
process.exit(1)
}
```
Now, add the following code to generate a seed phrase:
```typescript title="app.js"
try {
const seedPhrase = WDK.getRandomSeedPhrase()
console.log('Generated seed phrase:', seedPhrase)
} catch (error) {
console.error('Application error:', error.message)
process.exit(1)
}
```
Now, let's register wallets for different blockchains:
```typescript title="app.js"
// Add this code after the seed phrase generation
console.log('Registering wallets...')
const wdkWithWallets = new WDK(seedPhrase)
.registerWallet('ethereum', WalletManagerEvm, {
provider: 'https://eth.drpc.org'
})
.registerWallet('tron', WalletManagerTron, {
provider: 'https://api.trongrid.io'
})
.registerWallet('bitcoin', WalletManagerBtc, {
network: 'mainnet',
host: 'electrum.blockstream.info',
port: 50001
})
console.log('Wallets registered for Ethereum, TRON, and Bitcoin')
```
To learn more about configuring the wallet modules:
* [Configuring @tetherto/wdk-wallet-evm](../sdk/wallet-modules/wallet-evm/configuration)
* [Configuring @tetherto/wdk-wallet-tron](../sdk/wallet-modules/wallet-tron/configuration)
* [Configuring @tetherto/wdk-wallet-btc](../sdk/wallet-modules/wallet-btc/configuration)
***
## Step 3: Check Balances
To check balances, we first need to get accounts and addresses. Let's get accounts and addresses for all blockchains:
```typescript title="app.js"
// Add this code after the wallet registration
console.log('Retrieving accounts...')
const accounts = {
ethereum: await wdkWithWallets.getAccount('ethereum', 0),
tron: await wdkWithWallets.getAccount('tron', 0),
bitcoin: await wdkWithWallets.getAccount('bitcoin', 0)
}
console.log('Resolving addresses:')
for (const [chain, account] of Object.entries(accounts)) {
const address = await account.getAddress()
console.log(` ${chain.toUpperCase()}: ${address}`)
}
```
Now, let's check balances across all chains:
```typescript
// Add this code after the address resolution
console.log('Checking balances...')
for (const [chain, account] of Object.entries(accounts)) {
const balance = await account.getBalance()
console.log(` ${chain.toUpperCase()}: ${balance.toString()} units`)
}
```
Here is the complete `app.js` file:
```javascript title="app.js"
import WDK from '@tetherto/wdk'
import WalletManagerEvm from '@tetherto/wdk-wallet-evm'
import WalletManagerTron from '@tetherto/wdk-wallet-tron'
import WalletManagerBtc from '@tetherto/wdk-wallet-btc'
console.log('Starting WDK App...')
try {
const seedPhrase = WDK.getRandomSeedPhrase()
console.log('Generated seed phrase:', seedPhrase)
console.log('Registering wallets...')
const wdkWithWallets = new WDK(seedPhrase)
.registerWallet('ethereum', WalletManagerEvm, {
provider: 'https://eth.drpc.org'
})
.registerWallet('tron', WalletManagerTron, {
provider: 'https://api.trongrid.io'
})
.registerWallet('bitcoin', WalletManagerBtc, {
network: 'mainnet',
host: 'electrum.blockstream.info',
port: 50001
})
console.log('Wallets registered for Ethereum, TRON, and Bitcoin')
const accounts = {
ethereum: await wdkWithWallets.getAccount('ethereum', 0),
tron: await wdkWithWallets.getAccount('tron', 0),
bitcoin: await wdkWithWallets.getAccount('bitcoin', 0)
}
console.log('Resolving addresses:')
for (const [chain, account] of Object.entries(accounts)) {
const address = await account.getAddress()
console.log(` ${chain.toUpperCase()}: ${address}`)
}
console.log('Checking balances...')
for (const [chain, account] of Object.entries(accounts)) {
const balance = await account.getBalance()
console.log(` ${chain.toUpperCase()}: ${balance.toString()} units`)
}
console.log('Application completed successfully!')
process.exit(0)
} catch (error) {
console.error('Application error:', error.message)
process.exit(1)
}
```
***
## Step 4: Run Your App
Execute your app:
```bash
node app.js
```
```bash
bare app.js
```
You should see an output similar to this:
```
Starting WDK App...
Generated seed phrase: abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about
Registering wallets...
Wallets registered for Ethereum, TRON, and Bitcoin
Resolving addresses:
ETHEREUM: 0x742d35Cc6634C0532925a3b8D9C5c8b7b6e5f6e5
TRON: TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH
BITCOIN: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
Checking balances...
ETHEREUM: 0 units
TRON: 0 units
BITCOIN: 0 units
Application completed successfully!
```
***
## What Just Happened?
**Congratulations!** You've successfully created your first multi-chain WDK application that works in both Node.js and Bare runtime environments. Here's what happened:
* [x] You generated a single seed phrase that works across all blockchains
* [x] You registered wallets for Ethereum, TRON, and Bitcoin
* [x] You created accounts derived from the same seed phrase using BIP-44
* [x] You used the same API to interact with different blockchains
* [x] You checked balances across multiple chains with consistent methods
***
## Next Steps
Now that you have a basic multi-chain wallet running, here's what you can explore:
### Add More Blockchains
For example, to add Solana support:
```bash
npm install @tetherto/wdk-wallet-solana
```
```typescript
import WalletManagerSolana from '@tetherto/wdk-wallet-solana'
// New or existing WDK instance
const wdk = new WDK(seedPhrase)
wdk.registerWallet('solana', WalletManagerSolana, {
rpcUrl: 'https://api.mainnet-beta.solana.com',
wsUrl: 'wss://api.mainnet-beta.solana.com'
})
```
### Estimate Transaction Costs
```typescript
for (const [chain, account] of Object.entries(accounts)) {
try {
const quote = await account.quoteSendTransaction({
to: await account.getAddress(),
value: chain === 'bitcoin' ? 100000000n : chain === 'tron' ? 1000000n : 1000000000000000000n
})
console.log(` ${chain.toUpperCase()}: ${quote.fee.toString()} units`)
} catch (error) {
console.log(` ${chain.toUpperCase()}: Unable to estimate`)
}
}
```
### **Send Transactions**
```typescript
const result = await ethAccount.sendTransaction({
to: '0x742d35Cc6634C05...a3b8D9C5c8b7b6e5f6e5',
value: 1000000000000000000n // 1 ETH
})
console.log('Transaction hash:', result.hash)
```
### **Use DeFi Protocols**
```bash
npm install @tetherto/wdk-protocol-swap-velora-evm
```
```typescript
import VeloraProtocolEvm from '@tetherto/wdk-protocol-swap-velora-evm'
wdk.registerProtocol('ethereum', 'swap-velora-evm', VeloraProtocolEvm, {
provider: 'https://eth.drpc.org'
})
```
***
## Troubleshooting
### **Common Issues**
**"Provider not connected"**
* Check your API keys and network connections
* Ensure you're using the correct provider URLs
**"Insufficient balance"**
* This is normal for new addresses
* Use testnet faucets to get test tokens
**"Module not found"**
* Make sure you've installed all required packages
* Check your import statements
## Need Help?
# React Native Quickstart (/start-building/react-native-quickstart)
## What You'll Build
In this quickstart, you'll integrate WDK into a React Native app to create a multi-chain wallet that:
* [ ] Supports multiple blockchains (Bitcoin, Ethereum, Polygon, Arbitrum, TON, Tron)
* [ ] Manages multiple tokens (BTC, USD₮, XAU₮, and more)
* [ ] Provides secure seed generation and encrypted storage
* [ ] Shows real-time balances and transaction history
* [ ] Includes wallet creation, import, and unlock flows
You can try all features without real funds required. You can use the Pimlico or Candide faucets to get some Sepolia USD₮.
* [Get mock/test USD₮ on Pimlico](https://dashboard.pimlico.io/test-erc20-faucet)
* [Get mock/test USD₮ on Candide](https://dashboard.candide.dev/faucet)
See the [ERC-4337 configuration](../sdk/wallet-modules/wallet-evm-erc-4337/configuration) for quick setup and Sepolia testnet configuration.
**Want to build faster?** Connect your AI coding assistant to WDK docs for context-aware help. [Learn how →](build-with-ai)
## Prerequisites
Before we start, make sure you have:
| Tool | Version | Why You Need It |
| ---------------- | ------- | --------------------------- |
| **Node.js** | 22+ | To run JavaScript code |
| **npm** | Latest | To install packages |
| **React Native** | 0.81.0+ | Framework version |
| **Android SDK** | API 29+ | Android minimum SDK version |
| **iOS** | 15.1+ | iOS deployment target |
***
## Quickstart Paths
You have 2 options for using WDK in a React Native. Choose your preferred starting point:
Get up and running in 3 minutes with our pre-configured starter template.
[**→ Jump to Starter Template Setup**](#option-1-starter-template)
Integrate WDK into your existing React Native or Expo app.
[**→ Jump to Library Integration**](#option-2-add-to-existing-app)
***
## Option 1: Starter Template
The fastest way to get started is with our starter template. Note: this is still in alpha, and may be subject to breaking changes.
### Step 1: Clone the Starter
```bash
git clone https://github.com/tetherto/wdk-starter-react-native.git
cd wdk-starter-react-native
```
### Step 2: Install Dependencies
```bash
npm install
```
### Step 3: Configure Environment
Create an environment file for the WDK Indexer API:
```bash
cp .env.example .env
```
Edit `.env` and add your WDK Indexer API key:
```bash
EXPO_PUBLIC_WDK_INDEXER_BASE_URL=https://wdk-api.tether.io
EXPO_PUBLIC_WDK_INDEXER_API_KEY=your_actual_api_key_here
# Optional: For Tron network support
EXPO_PUBLIC_TRON_API_KEY=your_tron_api_key
EXPO_PUBLIC_TRON_API_SECRET=your_tron_api_secret
```
**Where do I get an Indexer API key?** The WDK Indexer is required for transaction history and balance indexing. Get your free API key from the [Indexer API setup guide](../tools/indexer-api/get-started).
### Step 4: Run Your App
```bash
npm run ios
```
```bash
npm run android
```
**Congratulations!** You now have a multi-chain wallet running.
[**→ Skip to What's Next**](#whats-next)
***
## Option 2: Add to Existing App
Integrate WDK into your existing React Native or Expo project using `@tetherto/wdk-react-native-core`.
### Step 1: Install
```bash
npm install @tetherto/wdk-react-native-core
```
### Step 2: Configure Android minSdkVersion
The library requires **Android API 29** or higher to support `react-native-bare-kit`.
Add to your `app.json` or `app.config.js`:
```json
{
"expo": {
"plugins": [
[
"expo-build-properties",
{
"android": {
"minSdkVersion": 29
}
}
]
]
}
}
```
If you haven't installed `expo-build-properties`:
```bash
npx expo install expo-build-properties
```
Update `android/build.gradle`:
```groovy
buildscript {
ext {
minSdkVersion = 29
// ... other config
}
}
```
### Step 3: Configure the Bundle
The WDK engine runs inside a Bare worklet. You need to provide a bundle - choose one of two approaches:
Use the `@tetherto/wdk-worklet-bundler` CLI to generate a bundle with only the modules you need:
```bash
# 1. Install the bundler CLI
npm install -g @tetherto/wdk-worklet-bundler
# 2. Initialize configuration in your React Native project
wdk-worklet-bundler init
# 3. Edit wdk.config.js to configure your networks (see example below)
# 4. Install required WDK modules (pick the ones you need)
npm install @tetherto/wdk @tetherto/wdk-wallet-evm-erc-4337
# 5. Generate the bundle
wdk-worklet-bundler generate
```
This generates a `.wdk/` directory in your project. Import it:
```typescript
import { bundle } from './.wdk'
```
**Which WDK modules do I need?** Each blockchain requires its own wallet module (e.g., `wdk-wallet-evm-erc-4337` for Ethereum/Polygon, `wdk-wallet-btc` for Bitcoin). See the full list of available modules in the [wdk-worklet-bundler documentation](https://github.com/tetherto/wdk-worklet-bundler).
For quick prototyping, install and import the ready-made bundle from `@tetherto/pear-wrk-wdk`:
```bash
npm install @tetherto/pear-wrk-wdk
```
```typescript
import { bundle } from '@tetherto/pear-wrk-wdk'
```
The pre-built bundle includes all blockchain modules, resulting in a larger bundle size. For production apps, generate a custom bundle with only the modules you need.
### Step 4: Configure WDK Settings
Create a configuration file for your WDK setup (e.g., `src/config/wdk.ts`):
```typescript
// src/config/wdk.ts
import type { WdkConfigs } from '@tetherto/wdk-react-native-core'
export const wdkConfigs: WdkConfigs = {
networks: {
ethereum: {
blockchain: 'ethereum',
config: {
chainId: 11155111, // Sepolia testnet
provider: 'https://rpc.sepolia.org',
bundlerUrl: 'https://api.candide.dev/public/v3/sepolia',
paymasterUrl: 'https://api.candide.dev/public/v3/sepolia',
paymasterAddress: '0x8b1f6cb5d062aa2ce8d581942bbb960420d875ba',
entrypointAddress: '0x0000000071727De22E5E9d8BAf0edAc6f37da032',
transferMaxFee: 5000000,
paymasterToken: {
address: '0xaA8E23Fb1079EA71e0a56F48a2aA51851D8433D0', // USDT on Sepolia
},
},
},
// Add more networks as needed
},
}
```
This example uses **Sepolia testnet** with a free public RPC so you can start immediately without API keys. For production or mainnet configuration, see the [Chain Configuration Guide](../sdk/core-module/configuration).
### Step 5: Add WdkAppProvider
Wrap your app with `WdkAppProvider` to enable wallet functionality throughout your app.
Add to your `app/_layout.tsx`:
```tsx
// app/_layout.tsx
import { WdkAppProvider } from '@tetherto/wdk-react-native-core'
import { bundle } from './.wdk'
import { Stack } from 'expo-router'
import { wdkConfigs } from '../config/wdk'
export default function RootLayout() {
return (
)
}
```
Update your `App.tsx`:
```tsx
// App.tsx
import React from 'react'
import { WdkAppProvider } from '@tetherto/wdk-react-native-core'
import { bundle } from './.wdk'
import { NavigationContainer } from '@react-navigation/native'
import { MainNavigator } from './src/navigation'
import { wdkConfigs } from './src/config/wdk'
export default function App() {
return (
)
}
```
### Step 6: Use Hooks
Now you can use the WDK hooks in any component inside `WdkAppProvider`:
```tsx
import { useWdkApp, useWalletManager, useAccount } from '@tetherto/wdk-react-native-core'
function WalletScreen() {
const { state } = useWdkApp()
const { createWallet, unlock } = useWalletManager()
const { address } = useAccount({ network: 'ethereum', accountIndex: 0 })
switch (state.status) {
case 'INITIALIZING':
return Loading...
case 'NO_WALLET':
return