WDK logoWDK documentation

Create WDK Module

CLI scaffolding tool to generate new WDK wallet and protocol modules with a single command.

Scaffold new WDK modules with a single command. The CLI generates a fully configured project with source files, tests, TypeScript type definitions, and CI workflows — ready for you to add your blockchain or protocol integration logic.

Powered by create-wdk-module.


Quick Start

Run the scaffolding command

Scaffold a new module
npx @tetherto/create-wdk-module@latest

You can also pass arguments directly to skip the interactive prompts:

Scaffold with arguments
npx @tetherto/create-wdk-module@latest wallet stellar

Install and run tests

Set up the generated project
cd wdk-wallet-stellar
npm install
npm test

Module Types

The CLI supports all five WDK module categories. The generated package name follows WDK naming conventions automatically.

TypeDescriptionGenerated Package Example
walletBlockchain wallet integrationwdk-wallet-stellar
swapDEX/token swap protocolwdk-protocol-swap-jupiter-solana
bridgeCross-chain bridge protocolwdk-protocol-bridge-wormhole-evm
lendingDeFi lending protocolwdk-protocol-lending-compound-evm
fiatFiat on/off-ramp providerwdk-protocol-fiat-moonpay

CLI Options

OptionAliasDescriptionDefault
[type]Module type (wallet, swap, bridge, lending, fiat)(interactive prompt)
[name]Module or protocol name(interactive prompt)
[blockchain]Target blockchain(interactive prompt)
--scope <scope>-snpm scope (e.g., @myorg)none
--gitInitialize a git repositorytrue
--no-gitSkip git initialization
--yes-ySkip prompts, use defaultsfalse
--version-vShow version
--help-hShow help

Examples

Common CLI usage patterns
# Create a wallet module with an npm scope
npx @tetherto/create-wdk-module@latest wallet stellar --scope @myorg

# Create a swap protocol module
npx @tetherto/create-wdk-module@latest swap jupiter solana

# Create with all defaults, no prompts
npx @tetherto/create-wdk-module@latest wallet stellar --yes

Interactive Mode

When run without arguments, the CLI guides you through module setup step by step:

Interactive session
$ npx @tetherto/create-wdk-module@latest

  Create WDK Module

? What type of module do you want to create?
  > Wallet Module (blockchain wallet integration)
    Swap Module (DEX/token swap integration)
    Bridge Module (cross-chain bridging)
    Lending Module (DeFi lending protocol)
    Fiat Module (fiat on/off-ramp)

? What is the blockchain name? (e.g., "stellar", "solana")
  > stellar

? npm scope (leave empty for none, e.g., @myorg):
  >

? Initialize git repository?
  > Yes

Creating wdk-wallet-stellar...

 Template files copied
 Initialized git repository

Success! Created wdk-wallet-stellar at ./wdk-wallet-stellar

Next steps:
  cd wdk-wallet-stellar
  npm install
  npm test

Generated Project Structure

The scaffolded project includes source files, tests, TypeScript definitions, and GitHub CI workflows out of the box.


Next Steps

Reference implementation: The wdk-wallet-solana module is a good reference for understanding how a production wallet module implements the WDK interfaces. The wdk-wallet package defines the base classes your module must extend.


Need Help?

On this page