npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

@tetherto/create-wdk-module

1.0.0-beta.1

@subash.77

npmHomeRepoSnykSocket
Downloads:130
$ npm install @tetherto/create-wdk-module
DailyWeeklyMonthlyYearly

create-wdk-module

Create WDK (Wallet Development Kit) modules with a single command.

https://github.com/user-attachments/assets/e342eeef-1e45-4ac0-bd16-bb5cdd63d501

Quick Start

npx create-wdk-module@latest

Or with specific options:

# Create a wallet module
npx create-wdk-module@latest wallet stellar

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

# Create with npm scope
npx create-wdk-module@latest wallet stellar --scope @myorg

Module Types

TypeDescriptionExample
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(prompt)
[name]Module/protocol name(prompt)
[blockchain]Target blockchain(prompt)
--scope <scope>-snpm scope (e.g., @myorg)none
--gitInitialize git repositorytrue
--no-gitSkip git initialization
--yes-ySkip prompts, use defaultsfalse
--version-vShow version
--help-hShow help

Interactive Mode

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

$ npx 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

Documentation: https://docs.wallet.tether.io/sdk/wallet-modules

Generated Project Structure

Wallet Module

wdk-wallet-stellar/
├── .github/
│   └── workflows/
│       └── build.yml
│       └── publish.yml
│   └── ISSUE_TEMPLATE/
│       └── general.md
│   └── PULL_REQUEST_TEMPLATE.md
├── src/
│   ├── wallet-manager-stellar.js
│   ├── wallet-account-stellar.js
│   └── wallet-account-read-only-stellar.js
├── tests/
│   └── wallet-manager-stellar.test.js
│   └── wallet-account-stellar.test.js
│   └── wallet-account-read-only-stellar.test.js
├── types/
│   └── index.d.ts
│   └── src/
│       └── wallet-manager-stellar.d.ts
│       └── wallet-account-stellar.d.ts
│       └── wallet-account-read-only-stellar.d.ts
├── .editorconfig
├── .gitignore
├── .npmignore
├── bare.js
├── index.js
├── LICENSE
├── package.json
├── README.md
└── tsconfig.json

Protocol Modules

Protocol modules (swap, bridge, lending, fiat) follow a similar structure with a single provider file:

wdk-protocol-swap-jupiter-solana/
├── src/
│   └── jupiter-protocol-solana.js
├── tests/
│   └── jupiter-protocol-solana.test.js
├── types/
│   └── index.d.ts
│   └── src/
│       └── jupiter-protocol-solana.d.ts
├── ...

Development

# Clone the repository
git clone https://github.com/tetherto/create-wdk-module.git
cd create-wdk-module

# Install dependencies
npm install

# Run locally
npm start

# Run tests
npm test

Resources

  • WDK Documentation
  • wdk-wallet - Base interfaces
  • wdk-wallet-solana - Reference implementation

License

Apache-2.0