SDKsTypeScriptOverview

TypeScript SDK

The T402 TypeScript SDK provides comprehensive support for HTTP-native stablecoin payments.

Packages

PackageDescriptionnpm
@t402/coreProtocol types and HTTP utilitiesnpm
@t402/evmEVM chains (Ethereum, Arbitrum, Base, etc.)npm
@t402/tonTON blockchain supportnpm
@t402/tronTRON blockchain supportnpm
@t402/wdkTether WDK integrationnpm
@t402/wdk-gaslessGasless payments (WDK + ERC-4337)npm
@t402/wdk-bridgeCross-chain bridge (WDK + LayerZero)npm
@t402/mcpMCP server for AI agentsnpm

Quick Install

# Core + EVM (most common)
pnpm add @t402/core @t402/evm
 
# All packages
pnpm add @t402/core @t402/evm @t402/ton @t402/tron @t402/wdk @t402/wdk-gasless @t402/wdk-bridge @t402/mcp

Architecture

@t402/core          Base types, HTTP utilities

    ├── @t402/evm   EVM mechanism (EIP-3009, ERC-4337, LayerZero)

    ├── @t402/ton   TON mechanism (Jettons)

    ├── @t402/tron  TRON mechanism (TRC-20)

    └── @t402/wdk   Tether WDK integration

        ├── @t402/wdk-gasless  ERC-4337 gasless

        └── @t402/wdk-bridge   LayerZero bridge

HTTP Framework Integrations

FrameworkPackageInstall
Express.js@t402/expresspnpm add @t402/express
Next.js@t402/nextpnpm add @t402/next
Hono@t402/honopnpm add @t402/hono

Client Wrappers

ClientPackageInstall
Fetch@t402/fetchpnpm add @t402/fetch
Axios@t402/axiospnpm add @t402/axios

Requirements

  • Node.js 18+ or Bun 1.0+
  • TypeScript 5.0+ (recommended)
  • ESM or CommonJS supported