Skip to content

feat: wire @bitgo/wasm-ton into sdk-coin-ton#8361

Draft
lcovar wants to merge 1 commit intomasterfrom
wasm-ton
Draft

feat: wire @bitgo/wasm-ton into sdk-coin-ton#8361
lcovar wants to merge 1 commit intomasterfrom
wasm-ton

Conversation

@lcovar
Copy link
Copy Markdown
Contributor

@lcovar lcovar commented Mar 27, 2026

Summary

  • Add WASM-based paths for address validation (shadow mode), signable payload extraction, and transaction explanation
  • Shadow mode: WASM validates/encodes addresses alongside legacy TonWeb, logs mismatches without blocking
  • getSignablePayload uses WASM Transaction.fromBase64() with fallback to legacy TransactionBuilder
  • New explainTransactionWasm.ts maps WASM parseTransaction output to BitGoJS TransactionExplanation format
  • All WASM paths are try/catch wrapped, falling back to existing behavior if WASM is unavailable

Depends on BitGo/BitGoWASM#235

Ticket: BTC-3216

@lcovar lcovar force-pushed the wasm-ton branch 7 times, most recently from 94a66af to ca80521 Compare April 1, 2026 19:57
@lcovar lcovar force-pushed the wasm-ton branch 3 times, most recently from 58078ff to 413a549 Compare April 3, 2026 21:07
Add WASM-based paths for address validation (shadow mode), signable
payload extraction, and transaction explanation. The WASM paths are
try/catch wrapped with fallback to legacy TransactionBuilder, so
existing behavior is preserved if WASM fails.

- Address: shadow-mode WASM validation and encoding in utils.ts
- getSignablePayload: WASM Transaction.fromBase64 -> signablePayload()
- explainTransaction: new explainTransactionWasm.ts using parseTransaction
- Add @bitgo/wasm-ton dependency to package.json

Ticket: BTC-3216

feat: wire @bitgo/wasm-ton into sdk-coin-ton

- Add @bitgo/wasm-ton dependency (local tarball from BTC-3246 branch)
- explainTransactionWasm.ts: WASM-based explain using parseTransaction,
  supports toAddressBounceable param, exposes withdrawAmount from body
- ton.ts: tton uses WASM exclusively for getSignablePayload and
  explainTransaction (no legacy fallback for testnet)
- Update tests to reflect correct WASM output

BTC-3216
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant