WDK logoWDK documentation

Build with AI

Connect AI assistants to WDK docs, project rules, and wallet tools for faster app development.

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.

Use this page as the starting point for building WDK apps with AI assistance.

There are two practical ways to provide WDK context to your AI:

  1. Connect via Markdown - Works with any AI tool. Feed documentation directly into the context window.
  2. Add WDK project rules - Give your AI assistant persistent context about package names, architecture, and coding patterns.

Want to give AI agents wallet access? The MCP Toolkit creates an MCP server that exposes WDK wallets as tools, letting AI agents check balances, send transactions, swap tokens, bridge assets, and more.


Connect WDK Docs via Markdown

If your AI tool does not support a docs-specific connector, you can feed WDK documentation directly into the context window using these endpoints:

EndpointURLDescription
Page indexdocs.wdk.tether.io/llms.txtIndex of all page URLs and titles
Full docsdocs.wdk.tether.io/llms-full.txtComplete documentation in one file

You can also append .md to any documentation page URL to get raw Markdown, ready to paste into a chat context window.


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

# 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-<chain>`.
  - 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-<type>-<name>-<chain>`.
  - 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: use the React Native provider package for convenience, or use WDK packages directly in the Hermes runtime.

## Architecture
- WDK is modular: each blockchain and protocol is a separate npm package.
- Wallet modules expose `WalletManager`, `WalletAccount`, and `WalletAccountReadOnly` classes.
- `WalletAccount` extends `WalletAccountReadOnly`, so it has all read-only methods plus write methods such as sign and send.
- All modules follow a consistent pattern: configuration, initialization, usage.

## Documentation
- Official docs: [docs.wdk.tether.io](/)
- 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 AssistantFile PathNotes
Cursor.cursor/rules/wdk.mdcProject-level, auto-attached
Claude CodeCLAUDE.mdPlace in project root
Windsurf.windsurf/rules/wdk.mdProject-level rules
GitHub Copilot.github/copilot-instructions.mdProject-level instructions
Cline.clinerulesPlace in project root
Continue.continuerulesPlace in project root

Agent Guidelines in WDK Repos

Each WDK package repository can include an AGENTS.md file in its root. This file gives AI agents context about project structure, coding conventions, testing patterns, and linting rules.

If your AI tool has access to WDK source repositories through a local clone, it can use AGENTS.md for additional context beyond the documentation.


Example Prompt

Use a prompt like this to generate a multi-chain wallet with WDK. Include /llms-full.txt or the relevant quickstart pages in context for best results:

Create a Node.js app using WDK (@tetherto/wdk) that:
1. Creates a multi-chain wallet supporting Bitcoin and Polygon.
2. Uses @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. Uses 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 are targeting, such as "I am building on Ethereum using @tetherto/wdk-wallet-evm."
  • 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 make it use the docs context instead of older training data.
  • Start with a quickstart. Point the AI at the Node.js & Bare Quickstart or 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.

Need Help?

On this page