Commit 7d326d0
committed
feat: add @bitgo/wasm-ton package
Rust/WASM package for TON (The Open Network) transaction building,
parsing, and signing. Uses toner v0.7.3 (pure Rust TON SDK) compiled
to wasm32-unknown-unknown.
Supports all wallet-platform intent types:
- payment (native TON + jetton token transfers)
- fillNonce (nonce hole filling via self-send)
- consolidate (native + token, 7-day expiry)
- delegate (TonWhales, SingleNominator, MultiNominator)
- undelegate (TonWhales, SingleNominator, MultiNominator)
- vesting contract variants for Whales deposit/withdraw
Architecture follows wasm-solana/wasm-dot patterns:
- Two-layer rule: core Rust logic in src/, thin WASM bindings in src/wasm/
- TypeScript wrappers in js/ with bigint for all monetary amounts
- Transaction signing via signablePayload() + addSignature()
- Standalone parseTransaction() for all 7 transaction shapes
- Intent-based buildTransaction() with BuildContext for offline building
32 TypeScript tests + Rust unit tests.
BTC-32111 parent 7d48d0a commit 7d326d0
35 files changed
Lines changed: 3899 additions & 0 deletions
File tree
- packages/wasm-ton
- js
- src
- builder
- wasm
- test
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments