githubEdit

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-modulearrow-up-right.


Quick Start

1

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
2

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.

Type
Description
Generated Package Example

wallet

Blockchain wallet integration

wdk-wallet-stellar

swap

DEX/token swap protocol

wdk-protocol-swap-jupiter-solana

bridge

Cross-chain bridge protocol

wdk-protocol-bridge-wormhole-evm

lending

DeFi lending protocol

wdk-protocol-lending-compound-evm

fiat

Fiat on/off-ramp provider

wdk-protocol-fiat-moonpay


CLI Options

Option
Alias
Description
Default

[type]

Module type (wallet, swap, bridge, lending, fiat)

(interactive prompt)

[name]

Module or protocol name

(interactive prompt)

[blockchain]

Target blockchain

(interactive prompt)

--scope <scope>

-s

npm scope (e.g., @myorg)

none

--git

Initialize a git repository

true

--no-git

Skip git initialization

--yes

-y

Skip prompts, use defaults

false

--version

-v

Show version

--help

-h

Show help

Examples


Interactive Mode

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


Generated Project Structure

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

chevron-rightWallet Module structurehashtag

Wallet modules generate three core files that correspond to the WDK wallet architecture:

File
Purpose

wallet-manager-*.js

Module entry point, handles wallet registration and account derivation

wallet-account-*.js

Full account with signing capabilities (transactions, messages)

wallet-account-read-only-*.js

Read-only account for balance checks and transaction history

chevron-rightProtocol Module structure (swap, bridge, lending, fiat)hashtag

Protocol modules generate a single provider file rather than the three-file wallet pattern, since protocols interact with external services through a unified interface.


Next Steps

circle-info

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


Need Help?