Skip to content

Commit 3be05b1

Browse files
committed
feat: add wasm-dot package for Polkadot transaction building and decoding
WASM-based Polkadot/Substrate transaction builder, parser, and explainer for use by sdk-coin-dot (tdot). Supports transfers, staking operations, proxy management, and batched calls. Key capabilities: - Build unsigned extrinsics from high-level intents (transfer, stake, batch, proxy) - Parse signed/unsigned extrinsics with metadata-aware signed extension decoding - Explain transactions: derive type, extract outputs/inputs, attach DOT-specific metadata - Proxy type resolution from chain metadata (works across Polkadot, Kusama, Westend) - parseTransaction returns DotTransaction with .parse() method (PSBT pattern) BTC-0
1 parent fac868d commit 3be05b1

35 files changed

Lines changed: 6735 additions & 3 deletions

package-lock.json

Lines changed: 344 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/wasm-dot/.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
target/
2+
node_modules/
3+
# we actually only track the .ts files
4+
dist/
5+
test/*.js
6+
test/*.d.ts
7+
js/*.js
8+
js/*.d.ts
9+
js/wasm
10+
.vscode
11+
pkg/

packages/wasm-dot/.mocharc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extensions": ["ts", "tsx", "js", "jsx"],
3+
"spec": ["test/**/*.ts"],
4+
"node-option": ["import=tsx/esm", "experimental-wasm-modules"]
5+
}

packages/wasm-dot/.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
js/wasm
2+
test/fixtures/
3+
target/
4+
bips/

0 commit comments

Comments
 (0)