Commit f4575be
feat(wasm-utxo): add utxolibCompat option for consistent size estimates
Adds compatibility mode to make input size estimates match @bitgo/unspents.
This allows wasm-utxo to produce the same transaction size estimates as
utxo-lib when needed, while still supporting accurate min/max bounds.
The key change is using 72-byte signatures for ECDSA inputs in compat mode
instead of 73-byte for the max calculation, which matches @bitgo/unspents
behavior. The implementation also replicates specific encoding choices
used in utxo-lib.
Issue: BTC-2908
Co-authored-by: llm-git <llm-git@ttll.de>1 parent de6894d commit f4575be
5 files changed
Lines changed: 852 additions & 29 deletions
File tree
- packages/wasm-utxo
- js/fixedScriptWallet
- src/wasm/fixed_script_wallet
- 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 | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
9 | 20 | | |
10 | 21 | | |
11 | 22 | | |
| |||
39 | 50 | | |
40 | 51 | | |
41 | 52 | | |
| 53 | + | |
42 | 54 | | |
43 | | - | |
| 55 | + | |
| 56 | + | |
44 | 57 | | |
45 | | - | |
| 58 | + | |
46 | 59 | | |
47 | 60 | | |
48 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
49 | 67 | | |
50 | 68 | | |
51 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
0 commit comments