Commit 872b33a
committed
refactor: move explain logic out of wasm-dot, accept metadata as hex string
- remove explainTransaction and explain.ts from wasm-dot (moved to BitGoJS)
- narrow parseTransaction to accept only DotTransaction (not raw bytes/hex)
- add fromHex, toHex, toBroadcastFormat to DotTransaction TS wrapper
- pass material at deserialization time (fromHex/fromBytes) so metadata-
aware signed extension parsing can determine call_data boundaries
- revert Material.metadata from Uint8Array back to string (0x-prefixed hex)
to match the Substrate RPC wire format and avoid forcing callers to convert
- consolidate decode_metadata into a single pub(crate) function in
transaction.rs, remove duplicates from parser.rs and builder/mod.rs
BTC-30931 parent fb3f392 commit 872b33a
15 files changed
Lines changed: 199 additions & 904 deletions
File tree
- packages/wasm-dot
- js
- src
- builder
- wasm
- test
- resources
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 14 | | |
20 | 15 | | |
21 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 23 | + | |
28 | 24 | | |
29 | 25 | | |
30 | 26 | | |
31 | 27 | | |
32 | 28 | | |
33 | | - | |
| 29 | + | |
34 | 30 | | |
35 | | - | |
| 31 | + | |
| 32 | + | |
36 | 33 | | |
37 | 34 | | |
38 | 35 | | |
39 | 36 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 37 | + | |
44 | 38 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 39 | + | |
56 | 40 | | |
57 | 41 | | |
58 | 42 | | |
| |||
0 commit comments