@bitgo/wasm-utxo 3.1.0 → 4.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.
@@ -1104,6 +1104,40 @@ export class BitGoPsbt {
1104
1104
  wasm.__wbindgen_add_to_stack_pointer(16);
1105
1105
  }
1106
1106
  }
1107
+ /**
1108
+ * Convert a half-signed legacy transaction to a psbt-lite.
1109
+ *
1110
+ * # Arguments
1111
+ * * `tx_bytes` - The serialized half-signed legacy transaction
1112
+ * * `network` - Network name (utxolib or coin name)
1113
+ * * `wallet_keys` - The wallet's root keys
1114
+ * * `unspents` - Array of `{ chain: number, index: number, value: bigint }` for each input
1115
+ * @param {Uint8Array} tx_bytes
1116
+ * @param {string} network
1117
+ * @param {WasmRootWalletKeys} wallet_keys
1118
+ * @param {any} unspents
1119
+ * @returns {BitGoPsbt}
1120
+ */
1121
+ static from_half_signed_legacy_transaction(tx_bytes, network, wallet_keys, unspents) {
1122
+ try {
1123
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1124
+ const ptr0 = passArray8ToWasm0(tx_bytes, wasm.__wbindgen_export);
1125
+ const len0 = WASM_VECTOR_LEN;
1126
+ const ptr1 = passStringToWasm0(network, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1127
+ const len1 = WASM_VECTOR_LEN;
1128
+ _assertClass(wallet_keys, WasmRootWalletKeys);
1129
+ wasm.bitgopsbt_from_half_signed_legacy_transaction(retptr, ptr0, len0, ptr1, len1, wallet_keys.__wbg_ptr, addHeapObject(unspents));
1130
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1131
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1132
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1133
+ if (r2) {
1134
+ throw takeObject(r1);
1135
+ }
1136
+ return BitGoPsbt.__wrap(r0);
1137
+ } finally {
1138
+ wasm.__wbindgen_add_to_stack_pointer(16);
1139
+ }
1140
+ }
1107
1141
  /**
1108
1142
  * Generate and store MuSig2 nonces for all MuSig2 inputs
1109
1143
  *
@@ -2900,6 +2934,63 @@ export class WasmDashTransaction {
2900
2934
  wasm.__wbindgen_add_to_stack_pointer(16);
2901
2935
  }
2902
2936
  }
2937
+ /**
2938
+ * @returns {any}
2939
+ */
2940
+ get_inputs() {
2941
+ try {
2942
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2943
+ wasm.wasmdashtransaction_get_inputs(retptr, this.__wbg_ptr);
2944
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2945
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2946
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2947
+ if (r2) {
2948
+ throw takeObject(r1);
2949
+ }
2950
+ return takeObject(r0);
2951
+ } finally {
2952
+ wasm.__wbindgen_add_to_stack_pointer(16);
2953
+ }
2954
+ }
2955
+ /**
2956
+ * @returns {any}
2957
+ */
2958
+ get_outputs() {
2959
+ try {
2960
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2961
+ wasm.wasmdashtransaction_get_outputs(retptr, this.__wbg_ptr);
2962
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2963
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2964
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2965
+ if (r2) {
2966
+ throw takeObject(r1);
2967
+ }
2968
+ return takeObject(r0);
2969
+ } finally {
2970
+ wasm.__wbindgen_add_to_stack_pointer(16);
2971
+ }
2972
+ }
2973
+ /**
2974
+ * @param {string} coin
2975
+ * @returns {any}
2976
+ */
2977
+ get_outputs_with_address(coin) {
2978
+ try {
2979
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2980
+ const ptr0 = passStringToWasm0(coin, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2981
+ const len0 = WASM_VECTOR_LEN;
2982
+ wasm.wasmdashtransaction_get_outputs_with_address(retptr, this.__wbg_ptr, ptr0, len0);
2983
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2984
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2985
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2986
+ if (r2) {
2987
+ throw takeObject(r1);
2988
+ }
2989
+ return takeObject(r0);
2990
+ } finally {
2991
+ wasm.__wbindgen_add_to_stack_pointer(16);
2992
+ }
2993
+ }
2903
2994
  /**
2904
2995
  * Get the transaction ID (txid)
2905
2996
  *
@@ -2937,6 +3028,27 @@ export class WasmDashTransaction {
2937
3028
  wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
2938
3029
  }
2939
3030
  }
3031
+ /**
3032
+ * @returns {number}
3033
+ */
3034
+ input_count() {
3035
+ const ret = wasm.wasmdashtransaction_input_count(this.__wbg_ptr);
3036
+ return ret >>> 0;
3037
+ }
3038
+ /**
3039
+ * @returns {number}
3040
+ */
3041
+ lock_time() {
3042
+ const ret = wasm.wasmdashtransaction_lock_time(this.__wbg_ptr);
3043
+ return ret >>> 0;
3044
+ }
3045
+ /**
3046
+ * @returns {number}
3047
+ */
3048
+ output_count() {
3049
+ const ret = wasm.wasmdashtransaction_output_count(this.__wbg_ptr);
3050
+ return ret >>> 0;
3051
+ }
2940
3052
  /**
2941
3053
  * Serialize the Dash transaction to bytes (preserving tx_type and extra payload).
2942
3054
  * @returns {Uint8Array}
@@ -2959,6 +3071,13 @@ export class WasmDashTransaction {
2959
3071
  wasm.__wbindgen_add_to_stack_pointer(16);
2960
3072
  }
2961
3073
  }
3074
+ /**
3075
+ * @returns {number}
3076
+ */
3077
+ version() {
3078
+ const ret = wasm.wasmdashtransaction_version(this.__wbg_ptr);
3079
+ return ret;
3080
+ }
2962
3081
  }
2963
3082
  if (Symbol.dispose) WasmDashTransaction.prototype[Symbol.dispose] = WasmDashTransaction.prototype.free;
2964
3083
 
@@ -3814,6 +3933,63 @@ export class WasmTransaction {
3814
3933
  wasm.__wbindgen_add_to_stack_pointer(16);
3815
3934
  }
3816
3935
  }
3936
+ /**
3937
+ * @returns {any}
3938
+ */
3939
+ get_inputs() {
3940
+ try {
3941
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3942
+ wasm.wasmtransaction_get_inputs(retptr, this.__wbg_ptr);
3943
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3944
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3945
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3946
+ if (r2) {
3947
+ throw takeObject(r1);
3948
+ }
3949
+ return takeObject(r0);
3950
+ } finally {
3951
+ wasm.__wbindgen_add_to_stack_pointer(16);
3952
+ }
3953
+ }
3954
+ /**
3955
+ * @returns {any}
3956
+ */
3957
+ get_outputs() {
3958
+ try {
3959
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3960
+ wasm.wasmtransaction_get_outputs(retptr, this.__wbg_ptr);
3961
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3962
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3963
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3964
+ if (r2) {
3965
+ throw takeObject(r1);
3966
+ }
3967
+ return takeObject(r0);
3968
+ } finally {
3969
+ wasm.__wbindgen_add_to_stack_pointer(16);
3970
+ }
3971
+ }
3972
+ /**
3973
+ * @param {string} coin
3974
+ * @returns {any}
3975
+ */
3976
+ get_outputs_with_address(coin) {
3977
+ try {
3978
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3979
+ const ptr0 = passStringToWasm0(coin, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3980
+ const len0 = WASM_VECTOR_LEN;
3981
+ wasm.wasmtransaction_get_outputs_with_address(retptr, this.__wbg_ptr, ptr0, len0);
3982
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3983
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3984
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3985
+ if (r2) {
3986
+ throw takeObject(r1);
3987
+ }
3988
+ return takeObject(r0);
3989
+ } finally {
3990
+ wasm.__wbindgen_add_to_stack_pointer(16);
3991
+ }
3992
+ }
3817
3993
  /**
3818
3994
  * Get the transaction ID (txid)
3819
3995
  *
@@ -3855,6 +4031,27 @@ export class WasmTransaction {
3855
4031
  const ret = wasm.wasmtransaction_get_vsize(this.__wbg_ptr);
3856
4032
  return ret >>> 0;
3857
4033
  }
4034
+ /**
4035
+ * @returns {number}
4036
+ */
4037
+ input_count() {
4038
+ const ret = wasm.wasmtransaction_input_count(this.__wbg_ptr);
4039
+ return ret >>> 0;
4040
+ }
4041
+ /**
4042
+ * @returns {number}
4043
+ */
4044
+ lock_time() {
4045
+ const ret = wasm.wasmtransaction_lock_time(this.__wbg_ptr);
4046
+ return ret >>> 0;
4047
+ }
4048
+ /**
4049
+ * @returns {number}
4050
+ */
4051
+ output_count() {
4052
+ const ret = wasm.wasmtransaction_output_count(this.__wbg_ptr);
4053
+ return ret >>> 0;
4054
+ }
3858
4055
  /**
3859
4056
  * Serialize the transaction to bytes
3860
4057
  *
@@ -3875,6 +4072,13 @@ export class WasmTransaction {
3875
4072
  wasm.__wbindgen_add_to_stack_pointer(16);
3876
4073
  }
3877
4074
  }
4075
+ /**
4076
+ * @returns {number}
4077
+ */
4078
+ version() {
4079
+ const ret = wasm.wasmtransaction_version(this.__wbg_ptr);
4080
+ return ret;
4081
+ }
3878
4082
  }
3879
4083
  if (Symbol.dispose) WasmTransaction.prototype[Symbol.dispose] = WasmTransaction.prototype.free;
3880
4084
 
@@ -3933,6 +4137,63 @@ export class WasmZcashTransaction {
3933
4137
  wasm.__wbindgen_add_to_stack_pointer(16);
3934
4138
  }
3935
4139
  }
4140
+ /**
4141
+ * @returns {any}
4142
+ */
4143
+ get_inputs() {
4144
+ try {
4145
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4146
+ wasm.wasmzcashtransaction_get_inputs(retptr, this.__wbg_ptr);
4147
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4148
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4149
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4150
+ if (r2) {
4151
+ throw takeObject(r1);
4152
+ }
4153
+ return takeObject(r0);
4154
+ } finally {
4155
+ wasm.__wbindgen_add_to_stack_pointer(16);
4156
+ }
4157
+ }
4158
+ /**
4159
+ * @returns {any}
4160
+ */
4161
+ get_outputs() {
4162
+ try {
4163
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4164
+ wasm.wasmzcashtransaction_get_outputs(retptr, this.__wbg_ptr);
4165
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4166
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4167
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4168
+ if (r2) {
4169
+ throw takeObject(r1);
4170
+ }
4171
+ return takeObject(r0);
4172
+ } finally {
4173
+ wasm.__wbindgen_add_to_stack_pointer(16);
4174
+ }
4175
+ }
4176
+ /**
4177
+ * @param {string} coin
4178
+ * @returns {any}
4179
+ */
4180
+ get_outputs_with_address(coin) {
4181
+ try {
4182
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4183
+ const ptr0 = passStringToWasm0(coin, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4184
+ const len0 = WASM_VECTOR_LEN;
4185
+ wasm.wasmzcashtransaction_get_outputs_with_address(retptr, this.__wbg_ptr, ptr0, len0);
4186
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4187
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4188
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4189
+ if (r2) {
4190
+ throw takeObject(r1);
4191
+ }
4192
+ return takeObject(r0);
4193
+ } finally {
4194
+ wasm.__wbindgen_add_to_stack_pointer(16);
4195
+ }
4196
+ }
3936
4197
  /**
3937
4198
  * Get the transaction ID (txid)
3938
4199
  *
@@ -3970,6 +4231,27 @@ export class WasmZcashTransaction {
3970
4231
  wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
3971
4232
  }
3972
4233
  }
4234
+ /**
4235
+ * @returns {number}
4236
+ */
4237
+ input_count() {
4238
+ const ret = wasm.wasmtransaction_input_count(this.__wbg_ptr);
4239
+ return ret >>> 0;
4240
+ }
4241
+ /**
4242
+ * @returns {number}
4243
+ */
4244
+ lock_time() {
4245
+ const ret = wasm.wasmtransaction_lock_time(this.__wbg_ptr);
4246
+ return ret >>> 0;
4247
+ }
4248
+ /**
4249
+ * @returns {number}
4250
+ */
4251
+ output_count() {
4252
+ const ret = wasm.wasmtransaction_output_count(this.__wbg_ptr);
4253
+ return ret >>> 0;
4254
+ }
3973
4255
  /**
3974
4256
  * Serialize the transaction to bytes
3975
4257
  *
@@ -3995,6 +4277,13 @@ export class WasmZcashTransaction {
3995
4277
  wasm.__wbindgen_add_to_stack_pointer(16);
3996
4278
  }
3997
4279
  }
4280
+ /**
4281
+ * @returns {number}
4282
+ */
4283
+ version() {
4284
+ const ret = wasm.wasmtransaction_version(this.__wbg_ptr);
4285
+ return ret;
4286
+ }
3998
4287
  }
3999
4288
  if (Symbol.dispose) WasmZcashTransaction.prototype[Symbol.dispose] = WasmZcashTransaction.prototype.free;
4000
4289
 
@@ -5275,9 +5564,17 @@ export function __wbg_crypto_574e78ad8b13b65f(arg0) {
5275
5564
  const ret = getObject(arg0).crypto;
5276
5565
  return addHeapObject(ret);
5277
5566
  }
5567
+ export function __wbg_from_bddd64e7d5ff6941(arg0) {
5568
+ const ret = Array.from(getObject(arg0));
5569
+ return addHeapObject(ret);
5570
+ }
5278
5571
  export function __wbg_getRandomValues_b8f5dbd5f3995a9e() { return handleError(function (arg0, arg1) {
5279
5572
  getObject(arg0).getRandomValues(getObject(arg1));
5280
5573
  }, arguments); }
5574
+ export function __wbg_get_9b94d73e6221f75c(arg0, arg1) {
5575
+ const ret = getObject(arg0)[arg1 >>> 0];
5576
+ return addHeapObject(ret);
5577
+ }
5281
5578
  export function __wbg_get_b3ed3ad4be2bc8ac() { return handleError(function (arg0, arg1) {
5282
5579
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
5283
5580
  return addHeapObject(ret);
@@ -5286,6 +5583,10 @@ export function __wbg_length_32ed9a279acd054c(arg0) {
5286
5583
  const ret = getObject(arg0).length;
5287
5584
  return ret;
5288
5585
  }
5586
+ export function __wbg_length_35a7bace40f36eac(arg0) {
5587
+ const ret = getObject(arg0).length;
5588
+ return ret;
5589
+ }
5289
5590
  export function __wbg_msCrypto_a61aeb35a24c1329(arg0) {
5290
5591
  const ret = getObject(arg0).msCrypto;
5291
5592
  return addHeapObject(ret);
Binary file
@@ -1,25 +1,8 @@
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
4
  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;
5
+ export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
23
6
  export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
24
7
  export const wrapdescriptor_descType: (a: number, b: number) => void;
25
8
  export const wrapdescriptor_encode: (a: number, b: number) => void;
@@ -31,12 +14,18 @@ export const wrapdescriptor_node: (a: number, b: number) => void;
31
14
  export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
32
15
  export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
33
16
  export const wrapdescriptor_toString: (a: number, b: number) => void;
17
+ export const wrapminiscript_encode: (a: number, b: number) => void;
18
+ export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
19
+ export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
20
+ export const wrapminiscript_node: (a: number, b: number) => void;
21
+ export const wrapminiscript_toAsmString: (a: number, b: number) => void;
22
+ export const wrapminiscript_toString: (a: number, b: number) => void;
34
23
  export const __wbg_bip322namespace_free: (a: number, b: number) => void;
35
24
  export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
36
25
  export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
37
26
  export const __wbg_messagenamespace_free: (a: number, b: number) => void;
38
27
  export const __wbg_wasmbip32_free: (a: number, b: number) => void;
39
- export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
28
+ export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
40
29
  export const bip322namespace_add_bip322_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
41
30
  export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
42
31
  export const bip322namespace_verify_bip322_psbt_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
@@ -68,6 +57,7 @@ export const bitgopsbt_extract_transaction: (a: number, b: number) => void;
68
57
  export const bitgopsbt_extract_zcash_transaction: (a: number, b: number) => void;
69
58
  export const bitgopsbt_finalize_all_inputs: (a: number, b: number) => void;
70
59
  export const bitgopsbt_from_bytes: (a: number, b: number, c: number, d: number, e: number) => void;
60
+ export const bitgopsbt_from_half_signed_legacy_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
71
61
  export const bitgopsbt_generate_musig2_nonces: (a: number, b: number, c: number, d: number, e: number) => void;
72
62
  export const bitgopsbt_get_global_xpubs: (a: number) => number;
73
63
  export const bitgopsbt_get_inputs: (a: number, b: number) => void;
@@ -107,6 +97,7 @@ export const fixedscriptwalletnamespace_output_script_with_network_str: (a: numb
107
97
  export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
108
98
  export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
109
99
  export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
100
+ export const isInspectEnabled: () => number;
110
101
  export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
111
102
  export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
112
103
  export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
@@ -132,35 +123,32 @@ export const wasmbip32_private_key: (a: number) => number;
132
123
  export const wasmbip32_public_key: (a: number) => number;
133
124
  export const wasmbip32_to_base58: (a: number, b: number) => void;
134
125
  export const wasmbip32_to_wif: (a: number, b: number) => void;
135
- export const wasmdimensions_empty: () => number;
136
- export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
137
- export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
138
- export const wasmdimensions_from_output_script_length: (a: number) => number;
139
- export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
140
- export const wasmdimensions_from_psbt: (a: number, b: number) => void;
141
- export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
142
- export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
143
- export const wasmdimensions_get_output_vsize: (a: number) => number;
144
- export const wasmdimensions_get_output_weight: (a: number) => number;
145
- export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
146
- export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
147
- export const wasmdimensions_has_segwit: (a: number) => number;
148
- export const wasmdimensions_plus: (a: number, b: number) => number;
149
- export const wasmdimensions_times: (a: number, b: number) => number;
126
+ export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
127
+ export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
128
+ export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
129
+ export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
130
+ export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
131
+ export const wasmdashtransaction_input_count: (a: number) => number;
132
+ export const wasmdashtransaction_lock_time: (a: number) => number;
133
+ export const wasmdashtransaction_output_count: (a: number) => number;
134
+ export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
135
+ export const wasmdashtransaction_version: (a: number) => number;
150
136
  export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
151
137
  export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
152
- export const isInspectEnabled: () => number;
153
138
  export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
154
139
  export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
155
140
  export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
156
141
  export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
157
142
  export const __wbg_addressnamespace_free: (a: number, b: number) => void;
143
+ export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
158
144
  export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
159
145
  export const __wbg_wasmecpair_free: (a: number, b: number) => void;
160
- export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
146
+ export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
161
147
  export const __wbg_wrappsbt_free: (a: number, b: number) => void;
162
148
  export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
163
149
  export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
150
+ export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
151
+ 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;
164
152
  export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
165
153
  export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
166
154
  export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
@@ -173,12 +161,9 @@ export const wasmecpair_public_key: (a: number) => number;
173
161
  export const wasmecpair_to_wif: (a: number, b: number) => void;
174
162
  export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
175
163
  export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
176
- export const wrapminiscript_encode: (a: number, b: number) => void;
177
- export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
178
- export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
179
- export const wrapminiscript_node: (a: number, b: number) => void;
180
- export const wrapminiscript_toAsmString: (a: number, b: number) => void;
181
- export const wrapminiscript_toString: (a: number, b: number) => void;
164
+ export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
165
+ export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
166
+ export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
182
167
  export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
183
168
  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;
184
169
  export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
@@ -211,19 +196,56 @@ export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: n
211
196
  export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
212
197
  export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
213
198
  export const wrappsbt_version: (a: number) => number;
214
- export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
215
- export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
199
+ export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
216
200
  export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
217
- export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
218
- 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;
219
- export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
220
- export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
221
- export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
201
+ export const wasmdimensions_empty: () => number;
202
+ export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
203
+ export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
204
+ export const wasmdimensions_from_output_script_length: (a: number) => number;
205
+ export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
206
+ export const wasmdimensions_from_psbt: (a: number, b: number) => void;
207
+ export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
208
+ export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
209
+ export const wasmdimensions_get_output_vsize: (a: number) => number;
210
+ export const wasmdimensions_get_output_weight: (a: number) => number;
211
+ export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
212
+ export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
213
+ export const wasmdimensions_has_segwit: (a: number) => number;
214
+ export const wasmdimensions_plus: (a: number, b: number) => number;
215
+ export const wasmdimensions_times: (a: number, b: number) => number;
222
216
  export const wasmrootwalletkeys_backup_key: (a: number) => number;
223
217
  export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
224
218
  export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
225
219
  export const wasmrootwalletkeys_user_key: (a: number) => number;
226
220
  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;
221
+ export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
222
+ export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
223
+ export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
224
+ export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
225
+ export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
226
+ export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
227
+ export const wasmtransaction_create: () => number;
228
+ export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
229
+ export const wasmtransaction_get_inputs: (a: number, b: number) => void;
230
+ export const wasmtransaction_get_outputs: (a: number, b: number) => void;
231
+ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
232
+ export const wasmtransaction_get_txid: (a: number, b: number) => void;
233
+ export const wasmtransaction_get_vsize: (a: number) => number;
234
+ export const wasmtransaction_input_count: (a: number) => number;
235
+ export const wasmtransaction_lock_time: (a: number) => number;
236
+ export const wasmtransaction_output_count: (a: number) => number;
237
+ export const wasmtransaction_to_bytes: (a: number, b: number) => void;
238
+ export const wasmtransaction_version: (a: number) => number;
239
+ export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
240
+ export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
241
+ export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
242
+ export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
243
+ export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
244
+ export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
245
+ export const wasmzcashtransaction_input_count: (a: number) => number;
246
+ export const wasmzcashtransaction_output_count: (a: number) => number;
247
+ export const wasmzcashtransaction_lock_time: (a: number) => number;
248
+ export const wasmzcashtransaction_version: (a: number) => number;
227
249
  export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
228
250
  export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
229
251
  export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: 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": "3.1.0",
4
+ "version": "4.0.0",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",