@bitgo/wasm-utxo 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/cjs/js/coinName.d.ts +3 -0
  2. package/dist/cjs/js/coinName.js +49 -0
  3. package/dist/cjs/js/descriptorWallet/Psbt.d.ts +49 -0
  4. package/dist/cjs/js/descriptorWallet/Psbt.js +126 -0
  5. package/dist/cjs/js/descriptorWallet/index.d.ts +1 -0
  6. package/dist/cjs/js/descriptorWallet/index.js +4 -0
  7. package/dist/cjs/js/fixedScriptWallet/BitGoPsbt.d.ts +17 -2
  8. package/dist/cjs/js/fixedScriptWallet/BitGoPsbt.js +22 -0
  9. package/dist/cjs/js/fixedScriptWallet/RootWalletKeys.d.ts +5 -0
  10. package/dist/cjs/js/fixedScriptWallet/RootWalletKeys.js +7 -0
  11. package/dist/cjs/js/fixedScriptWallet/index.d.ts +1 -1
  12. package/dist/cjs/js/fixedScriptWallet/index.js +2 -1
  13. package/dist/cjs/js/index.d.ts +1 -30
  14. package/dist/cjs/js/index.js +2 -2
  15. package/dist/cjs/js/psbt.d.ts +2 -0
  16. package/dist/cjs/js/testutils/AcidTest.d.ts +3 -3
  17. package/dist/cjs/js/testutils/AcidTest.js +79 -80
  18. package/dist/cjs/js/wasm/wasm_utxo.d.ts +34 -103
  19. package/dist/cjs/js/wasm/wasm_utxo.js +99 -93
  20. package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
  21. package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +73 -70
  22. package/dist/esm/js/coinName.d.ts +3 -0
  23. package/dist/esm/js/coinName.js +48 -0
  24. package/dist/esm/js/descriptorWallet/Psbt.d.ts +49 -0
  25. package/dist/esm/js/descriptorWallet/Psbt.js +122 -0
  26. package/dist/esm/js/descriptorWallet/index.d.ts +1 -0
  27. package/dist/esm/js/descriptorWallet/index.js +2 -0
  28. package/dist/esm/js/fixedScriptWallet/BitGoPsbt.d.ts +17 -2
  29. package/dist/esm/js/fixedScriptWallet/BitGoPsbt.js +22 -1
  30. package/dist/esm/js/fixedScriptWallet/RootWalletKeys.d.ts +5 -0
  31. package/dist/esm/js/fixedScriptWallet/RootWalletKeys.js +7 -0
  32. package/dist/esm/js/fixedScriptWallet/index.d.ts +1 -1
  33. package/dist/esm/js/fixedScriptWallet/index.js +1 -1
  34. package/dist/esm/js/index.d.ts +1 -30
  35. package/dist/esm/js/index.js +1 -1
  36. package/dist/esm/js/psbt.d.ts +2 -0
  37. package/dist/esm/js/testutils/AcidTest.d.ts +3 -3
  38. package/dist/esm/js/testutils/AcidTest.js +80 -81
  39. package/dist/esm/js/wasm/wasm_utxo.d.ts +34 -103
  40. package/dist/esm/js/wasm/wasm_utxo_bg.js +99 -93
  41. package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
  42. package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +73 -70
  43. package/package.json +1 -1
@@ -1,36 +1,19 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
5
- export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
6
- export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
7
- export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
8
- export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
9
- export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
10
- export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
11
- export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
12
- export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
13
- export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
14
- export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
15
- export const wasmtransaction_create: () => number;
16
- export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
17
- export const wasmtransaction_get_txid: (a: number, b: number) => void;
18
- export const wasmtransaction_get_vsize: (a: number) => number;
19
- export const wasmtransaction_to_bytes: (a: number, b: number) => void;
20
- export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
21
- export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
22
- export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
23
- export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
24
- export const wrapdescriptor_descType: (a: number, b: number) => void;
25
- export const wrapdescriptor_encode: (a: number, b: number) => void;
26
- export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
27
- export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
28
- export const wrapdescriptor_hasWildcard: (a: number) => number;
29
- export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
30
- export const wrapdescriptor_node: (a: number, b: number) => void;
31
- export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
32
- export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
33
- export const wrapdescriptor_toString: (a: number, b: number) => void;
4
+ export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
5
+ export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
6
+ export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
7
+ export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
8
+ export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
9
+ export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
10
+ export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
11
+ export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
12
+ export const wasmrootwalletkeys_backup_key: (a: number) => number;
13
+ export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
14
+ export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
15
+ export const wasmrootwalletkeys_user_key: (a: number) => number;
16
+ export const wasmrootwalletkeys_with_derivation_prefixes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
34
17
  export const __wbg_addressnamespace_free: (a: number, b: number) => void;
35
18
  export const __wbg_messagenamespace_free: (a: number, b: number) => void;
36
19
  export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
@@ -59,50 +42,68 @@ export const wrapminiscript_fromString: (a: number, b: number, c: number, d: num
59
42
  export const wrapminiscript_node: (a: number, b: number) => void;
60
43
  export const wrapminiscript_toAsmString: (a: number, b: number) => void;
61
44
  export const wrapminiscript_toString: (a: number, b: number) => void;
62
- export const wrappsbt_addInput: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
63
- export const wrappsbt_addInputAtIndex: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number) => void;
64
- export const wrappsbt_addOutput: (a: number, b: number, c: number, d: bigint) => number;
65
- export const wrappsbt_addOutputAtIndex: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
45
+ export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
46
+ export const wrappsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number) => void;
47
+ export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
48
+ export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
66
49
  export const wrappsbt_clone: (a: number) => number;
67
50
  export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
68
- export const wrappsbt_extractTransaction: (a: number, b: number) => void;
69
- export const wrappsbt_finalize: (a: number, b: number) => void;
70
- export const wrappsbt_getInputs: (a: number, b: number) => void;
71
- export const wrappsbt_getOutputs: (a: number, b: number) => void;
72
- export const wrappsbt_getOutputsWithAddress: (a: number, b: number, c: number, d: number) => void;
73
- export const wrappsbt_getPartialSignatures: (a: number, b: number, c: number) => void;
74
- export const wrappsbt_getUnsignedTx: (a: number, b: number) => void;
75
- export const wrappsbt_hasPartialSignatures: (a: number, b: number, c: number) => void;
76
- export const wrappsbt_inputCount: (a: number) => number;
77
- export const wrappsbt_lockTime: (a: number) => number;
51
+ export const wrappsbt_extract_transaction: (a: number, b: number) => void;
52
+ export const wrappsbt_finalize_mut: (a: number, b: number) => void;
53
+ export const wrappsbt_get_global_xpubs: (a: number) => number;
54
+ export const wrappsbt_get_inputs: (a: number, b: number) => void;
55
+ export const wrappsbt_get_outputs: (a: number, b: number) => void;
56
+ export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
57
+ export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
58
+ export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
59
+ export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
60
+ export const wrappsbt_input_count: (a: number) => number;
61
+ export const wrappsbt_lock_time: (a: number) => number;
78
62
  export const wrappsbt_new: (a: number, b: number) => number;
79
- export const wrappsbt_outputCount: (a: number) => number;
80
- export const wrappsbt_removeInput: (a: number, b: number, c: number) => void;
81
- export const wrappsbt_removeOutput: (a: number, b: number, c: number) => void;
63
+ export const wrappsbt_output_count: (a: number) => number;
64
+ export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
65
+ export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
82
66
  export const wrappsbt_serialize: (a: number, b: number) => void;
83
- export const wrappsbt_signAll: (a: number, b: number, c: number) => void;
84
- export const wrappsbt_signAllWithEcpair: (a: number, b: number, c: number) => void;
85
- export const wrappsbt_signWithPrv: (a: number, b: number, c: number, d: number) => void;
86
- export const wrappsbt_signWithXprv: (a: number, b: number, c: number, d: number) => void;
87
- export const wrappsbt_unsignedTxId: (a: number, b: number) => void;
88
- export const wrappsbt_updateInputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
89
- export const wrappsbt_updateOutputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
90
- export const wrappsbt_validateSignatureAtInput: (a: number, b: number, c: number, d: number, e: number) => void;
91
- export const wrappsbt_verifySignatureWithKey: (a: number, b: number, c: number, d: number) => void;
67
+ export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
68
+ export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
69
+ export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
70
+ export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
71
+ export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
72
+ export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
73
+ export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
74
+ export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
75
+ export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
92
76
  export const wrappsbt_version: (a: number) => number;
93
- export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
94
- export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
95
- export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
96
- export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
97
- export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
98
- export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
99
- export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
100
- export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
101
- export const wasmrootwalletkeys_backup_key: (a: number) => number;
102
- export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
103
- export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
104
- export const wasmrootwalletkeys_user_key: (a: number) => number;
105
- export const wasmrootwalletkeys_with_derivation_prefixes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
77
+ export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
78
+ export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
79
+ export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
80
+ export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
81
+ export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
82
+ export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
83
+ export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
84
+ export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
85
+ export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
86
+ export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
87
+ export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
88
+ export const wasmtransaction_create: () => number;
89
+ export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
90
+ export const wasmtransaction_get_txid: (a: number, b: number) => void;
91
+ export const wasmtransaction_get_vsize: (a: number) => number;
92
+ export const wasmtransaction_to_bytes: (a: number, b: number) => void;
93
+ export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
94
+ export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
95
+ export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
96
+ export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
97
+ export const wrapdescriptor_descType: (a: number, b: number) => void;
98
+ export const wrapdescriptor_encode: (a: number, b: number) => void;
99
+ export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
100
+ export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
101
+ export const wrapdescriptor_hasWildcard: (a: number) => number;
102
+ export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
103
+ export const wrapdescriptor_node: (a: number, b: number) => void;
104
+ export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
105
+ export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
106
+ export const wrapdescriptor_toString: (a: number, b: number) => void;
106
107
  export const __wbg_bip322namespace_free: (a: number, b: number) => void;
107
108
  export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
108
109
  export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
@@ -139,6 +140,7 @@ export const bitgopsbt_extract_zcash_transaction: (a: number, b: number) => void
139
140
  export const bitgopsbt_finalize_all_inputs: (a: number, b: number) => void;
140
141
  export const bitgopsbt_from_bytes: (a: number, b: number, c: number, d: number, e: number) => void;
141
142
  export const bitgopsbt_generate_musig2_nonces: (a: number, b: number, c: number, d: number, e: number) => void;
143
+ export const bitgopsbt_get_global_xpubs: (a: number) => number;
142
144
  export const bitgopsbt_get_inputs: (a: number, b: number) => void;
143
145
  export const bitgopsbt_get_network_type: (a: number, b: number) => void;
144
146
  export const bitgopsbt_get_outputs: (a: number, b: number) => void;
@@ -175,7 +177,7 @@ export const fixedscriptwalletnamespace_output_script: (a: number, b: number, c:
175
177
  export const fixedscriptwalletnamespace_output_script_with_network_str: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
176
178
  export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
177
179
  export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
178
- export const isInspectEnabled: () => number;
180
+ export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
179
181
  export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
180
182
  export const wasmbip32_chain_code: (a: number) => number;
181
183
  export const wasmbip32_depth: (a: number) => number;
@@ -215,6 +217,7 @@ export const wasmdimensions_has_segwit: (a: number) => number;
215
217
  export const wasmdimensions_plus: (a: number, b: number) => number;
216
218
  export const wasmdimensions_times: (a: number, b: number) => number;
217
219
  export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
220
+ export const isInspectEnabled: () => number;
218
221
  export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
219
222
  export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
220
223
  export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitgo/wasm-utxo",
3
3
  "description": "WebAssembly wrapper for rust-bitcoin (beta)",
4
- "version": "2.0.0",
4
+ "version": "3.0.0",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",