@bitgo/wasm-utxo 4.8.1 → 4.9.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.
- package/dist/cjs/js/index.d.ts +10 -0
- package/dist/cjs/js/wasm/wasm_utxo.js +52 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +46 -45
- package/dist/esm/js/index.d.ts +10 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.js +52 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +46 -45
- package/package.json +1 -1
package/dist/cjs/js/index.d.ts
CHANGED
|
@@ -22,6 +22,15 @@ export type { AddressFormat } from "./address.js";
|
|
|
22
22
|
export type { TapLeafScript, PreparedInscriptionRevealData } from "./inscriptions.js";
|
|
23
23
|
export type DescriptorPkType = "derivable" | "definite" | "string";
|
|
24
24
|
export type ScriptContext = "tap" | "segwitv0" | "legacy";
|
|
25
|
+
export interface ExtParamsConfig {
|
|
26
|
+
drop?: boolean;
|
|
27
|
+
topUnsafe?: boolean;
|
|
28
|
+
resourceLimitations?: boolean;
|
|
29
|
+
timelockMixing?: boolean;
|
|
30
|
+
malleability?: boolean;
|
|
31
|
+
repeatedPk?: boolean;
|
|
32
|
+
rawPkh?: boolean;
|
|
33
|
+
}
|
|
25
34
|
declare module "./wasm/wasm_utxo.js" {
|
|
26
35
|
interface WrapDescriptor {
|
|
27
36
|
/** These are not the same types of nodes as in the ast module */
|
|
@@ -30,6 +39,7 @@ declare module "./wasm/wasm_utxo.js" {
|
|
|
30
39
|
namespace WrapDescriptor {
|
|
31
40
|
function fromString(descriptor: string, pkType: DescriptorPkType): WrapDescriptor;
|
|
32
41
|
function fromStringDetectType(descriptor: string): WrapDescriptor;
|
|
42
|
+
function fromStringExt(descriptor: string, pkType: "definite", extParams: ExtParamsConfig): WrapDescriptor;
|
|
33
43
|
}
|
|
34
44
|
interface WrapMiniscript {
|
|
35
45
|
/** These are not the same types of nodes as in the ast module */
|
|
@@ -4872,6 +4872,53 @@ class WrapDescriptor {
|
|
|
4872
4872
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4873
4873
|
}
|
|
4874
4874
|
}
|
|
4875
|
+
/**
|
|
4876
|
+
* Parse a descriptor string with custom ExtParams for taproot leaf validation.
|
|
4877
|
+
*
|
|
4878
|
+
* This allows control over which miniscript analysis checks are applied to
|
|
4879
|
+
* taproot leaves. The `drop` flag is always enabled; other flags default to false.
|
|
4880
|
+
*
|
|
4881
|
+
* # Arguments
|
|
4882
|
+
* * `descriptor` - A string containing the descriptor to parse
|
|
4883
|
+
* * `pk_type` - The type of public key ("definite" only for now)
|
|
4884
|
+
* * `ext_params_config` - JavaScript object with optional boolean flags:
|
|
4885
|
+
* - `drop`: Allow drop operations (r: wrapper) — always enabled
|
|
4886
|
+
* - `topUnsafe`: Allow scripts without signatures on all paths
|
|
4887
|
+
* - `resourceLimitations`: Allow scripts exceeding resource limits
|
|
4888
|
+
* - `timelockMixing`: Allow CSV + CLTV mixing
|
|
4889
|
+
* - `malleability`: Allow malleable scripts
|
|
4890
|
+
* - `repeatedPk`: Allow repeated public keys
|
|
4891
|
+
* - `rawPkh`: Allow raw pubkey hash fragments
|
|
4892
|
+
*
|
|
4893
|
+
* # Example
|
|
4894
|
+
* ```javascript
|
|
4895
|
+
* // r:older() is always allowed; add extra flags as needed
|
|
4896
|
+
* Descriptor.fromStringExt(desc, "definite", { malleability: true })
|
|
4897
|
+
* ```
|
|
4898
|
+
* @param {string} descriptor
|
|
4899
|
+
* @param {string} pk_type
|
|
4900
|
+
* @param {any} ext_params_config
|
|
4901
|
+
* @returns {WrapDescriptor}
|
|
4902
|
+
*/
|
|
4903
|
+
static fromStringExt(descriptor, pk_type, ext_params_config) {
|
|
4904
|
+
try {
|
|
4905
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4906
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
4907
|
+
const len0 = WASM_VECTOR_LEN;
|
|
4908
|
+
const ptr1 = passStringToWasm0(pk_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
4909
|
+
const len1 = WASM_VECTOR_LEN;
|
|
4910
|
+
wasm.wrapdescriptor_fromStringExt(retptr, ptr0, len0, ptr1, len1, addHeapObject(ext_params_config));
|
|
4911
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4912
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4913
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
4914
|
+
if (r2) {
|
|
4915
|
+
throw takeObject(r1);
|
|
4916
|
+
}
|
|
4917
|
+
return WrapDescriptor.__wrap(r0);
|
|
4918
|
+
} finally {
|
|
4919
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4920
|
+
}
|
|
4921
|
+
}
|
|
4875
4922
|
/**
|
|
4876
4923
|
* @returns {boolean}
|
|
4877
4924
|
*/
|
|
@@ -6128,6 +6175,11 @@ function __wbg_get_imports() {
|
|
|
6128
6175
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
6129
6176
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
6130
6177
|
},
|
|
6178
|
+
__wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25: function(arg0) {
|
|
6179
|
+
const v = getObject(arg0);
|
|
6180
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
6181
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
6182
|
+
},
|
|
6131
6183
|
__wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(arg0, arg1) {
|
|
6132
6184
|
const ret = debugString(getObject(arg1));
|
|
6133
6185
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
Binary file
|
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
7
|
-
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
8
|
-
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
9
|
-
export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
10
|
-
export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
|
|
11
|
-
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
12
|
-
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
13
|
-
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
14
|
-
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
15
|
-
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
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;
|
|
4
|
+
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
5
|
+
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
23
6
|
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
24
7
|
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
25
8
|
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
@@ -140,40 +123,15 @@ export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
|
140
123
|
export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
|
|
141
124
|
export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
|
|
142
125
|
export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
143
|
-
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
144
|
-
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
145
|
-
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
146
|
-
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
147
|
-
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
148
|
-
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;
|
|
149
|
-
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
150
|
-
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
151
|
-
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
152
|
-
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
153
|
-
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
154
|
-
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
155
|
-
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
156
|
-
export const wasmecpair_private_key: (a: number) => number;
|
|
157
|
-
export const wasmecpair_public_key: (a: number) => number;
|
|
158
|
-
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
159
|
-
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
160
|
-
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
161
|
-
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
162
|
-
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
163
|
-
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
164
|
-
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
165
|
-
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;
|
|
166
126
|
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
167
127
|
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
168
128
|
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
169
129
|
export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
170
130
|
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
171
|
-
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
172
131
|
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
173
132
|
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
174
133
|
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
175
134
|
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
176
|
-
export const isInspectEnabled: () => number;
|
|
177
135
|
export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
178
136
|
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
179
137
|
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
@@ -214,7 +172,6 @@ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c:
|
|
|
214
172
|
export const wasmtransaction_get_txid: (a: number, b: number) => void;
|
|
215
173
|
export const wasmtransaction_get_vsize: (a: number) => number;
|
|
216
174
|
export const wasmtransaction_to_bytes: (a: number, b: number) => void;
|
|
217
|
-
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
218
175
|
export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
219
176
|
export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
|
|
220
177
|
export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
|
|
@@ -264,6 +221,7 @@ export const wasmtransaction_input_count: (a: number) => number;
|
|
|
264
221
|
export const wasmtransaction_output_count: (a: number) => number;
|
|
265
222
|
export const wasmzcashtransaction_input_count: (a: number) => number;
|
|
266
223
|
export const wasmzcashtransaction_output_count: (a: number) => number;
|
|
224
|
+
export const isInspectEnabled: () => number;
|
|
267
225
|
export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
268
226
|
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
269
227
|
export const wasmtransaction_lock_time: (a: number) => number;
|
|
@@ -272,6 +230,49 @@ export const wasmzcashtransaction_lock_time: (a: number) => number;
|
|
|
272
230
|
export const wasmzcashtransaction_version: (a: number) => number;
|
|
273
231
|
export const wrappsbt_lock_time: (a: number) => number;
|
|
274
232
|
export const wrappsbt_version: (a: number) => number;
|
|
233
|
+
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
234
|
+
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
235
|
+
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
236
|
+
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
237
|
+
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
238
|
+
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;
|
|
239
|
+
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
240
|
+
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
241
|
+
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
242
|
+
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
243
|
+
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
244
|
+
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
245
|
+
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
246
|
+
export const wasmecpair_private_key: (a: number) => number;
|
|
247
|
+
export const wasmecpair_public_key: (a: number) => number;
|
|
248
|
+
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
249
|
+
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
250
|
+
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
251
|
+
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
252
|
+
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
253
|
+
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
254
|
+
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
255
|
+
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;
|
|
256
|
+
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
257
|
+
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
258
|
+
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
259
|
+
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
260
|
+
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
261
|
+
export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
262
|
+
export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
|
|
263
|
+
export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
264
|
+
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
265
|
+
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
266
|
+
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
267
|
+
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
268
|
+
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
269
|
+
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
270
|
+
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
271
|
+
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
272
|
+
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
273
|
+
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
274
|
+
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
275
|
+
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
275
276
|
export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
276
277
|
export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
277
278
|
export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|
package/dist/esm/js/index.d.ts
CHANGED
|
@@ -22,6 +22,15 @@ export type { AddressFormat } from "./address.js";
|
|
|
22
22
|
export type { TapLeafScript, PreparedInscriptionRevealData } from "./inscriptions.js";
|
|
23
23
|
export type DescriptorPkType = "derivable" | "definite" | "string";
|
|
24
24
|
export type ScriptContext = "tap" | "segwitv0" | "legacy";
|
|
25
|
+
export interface ExtParamsConfig {
|
|
26
|
+
drop?: boolean;
|
|
27
|
+
topUnsafe?: boolean;
|
|
28
|
+
resourceLimitations?: boolean;
|
|
29
|
+
timelockMixing?: boolean;
|
|
30
|
+
malleability?: boolean;
|
|
31
|
+
repeatedPk?: boolean;
|
|
32
|
+
rawPkh?: boolean;
|
|
33
|
+
}
|
|
25
34
|
declare module "./wasm/wasm_utxo.js" {
|
|
26
35
|
interface WrapDescriptor {
|
|
27
36
|
/** These are not the same types of nodes as in the ast module */
|
|
@@ -30,6 +39,7 @@ declare module "./wasm/wasm_utxo.js" {
|
|
|
30
39
|
namespace WrapDescriptor {
|
|
31
40
|
function fromString(descriptor: string, pkType: DescriptorPkType): WrapDescriptor;
|
|
32
41
|
function fromStringDetectType(descriptor: string): WrapDescriptor;
|
|
42
|
+
function fromStringExt(descriptor: string, pkType: "definite", extParams: ExtParamsConfig): WrapDescriptor;
|
|
33
43
|
}
|
|
34
44
|
interface WrapMiniscript {
|
|
35
45
|
/** These are not the same types of nodes as in the ast module */
|
|
@@ -4854,6 +4854,53 @@ export class WrapDescriptor {
|
|
|
4854
4854
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4855
4855
|
}
|
|
4856
4856
|
}
|
|
4857
|
+
/**
|
|
4858
|
+
* Parse a descriptor string with custom ExtParams for taproot leaf validation.
|
|
4859
|
+
*
|
|
4860
|
+
* This allows control over which miniscript analysis checks are applied to
|
|
4861
|
+
* taproot leaves. The `drop` flag is always enabled; other flags default to false.
|
|
4862
|
+
*
|
|
4863
|
+
* # Arguments
|
|
4864
|
+
* * `descriptor` - A string containing the descriptor to parse
|
|
4865
|
+
* * `pk_type` - The type of public key ("definite" only for now)
|
|
4866
|
+
* * `ext_params_config` - JavaScript object with optional boolean flags:
|
|
4867
|
+
* - `drop`: Allow drop operations (r: wrapper) — always enabled
|
|
4868
|
+
* - `topUnsafe`: Allow scripts without signatures on all paths
|
|
4869
|
+
* - `resourceLimitations`: Allow scripts exceeding resource limits
|
|
4870
|
+
* - `timelockMixing`: Allow CSV + CLTV mixing
|
|
4871
|
+
* - `malleability`: Allow malleable scripts
|
|
4872
|
+
* - `repeatedPk`: Allow repeated public keys
|
|
4873
|
+
* - `rawPkh`: Allow raw pubkey hash fragments
|
|
4874
|
+
*
|
|
4875
|
+
* # Example
|
|
4876
|
+
* ```javascript
|
|
4877
|
+
* // r:older() is always allowed; add extra flags as needed
|
|
4878
|
+
* Descriptor.fromStringExt(desc, "definite", { malleability: true })
|
|
4879
|
+
* ```
|
|
4880
|
+
* @param {string} descriptor
|
|
4881
|
+
* @param {string} pk_type
|
|
4882
|
+
* @param {any} ext_params_config
|
|
4883
|
+
* @returns {WrapDescriptor}
|
|
4884
|
+
*/
|
|
4885
|
+
static fromStringExt(descriptor, pk_type, ext_params_config) {
|
|
4886
|
+
try {
|
|
4887
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4888
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
4889
|
+
const len0 = WASM_VECTOR_LEN;
|
|
4890
|
+
const ptr1 = passStringToWasm0(pk_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
4891
|
+
const len1 = WASM_VECTOR_LEN;
|
|
4892
|
+
wasm.wrapdescriptor_fromStringExt(retptr, ptr0, len0, ptr1, len1, addHeapObject(ext_params_config));
|
|
4893
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4894
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4895
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
4896
|
+
if (r2) {
|
|
4897
|
+
throw takeObject(r1);
|
|
4898
|
+
}
|
|
4899
|
+
return WrapDescriptor.__wrap(r0);
|
|
4900
|
+
} finally {
|
|
4901
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4902
|
+
}
|
|
4903
|
+
}
|
|
4857
4904
|
/**
|
|
4858
4905
|
* @returns {boolean}
|
|
4859
4906
|
*/
|
|
@@ -6099,6 +6146,11 @@ export function __wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2(arg0, arg1)
|
|
|
6099
6146
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
6100
6147
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
6101
6148
|
}
|
|
6149
|
+
export function __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25(arg0) {
|
|
6150
|
+
const v = getObject(arg0);
|
|
6151
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
6152
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
6153
|
+
}
|
|
6102
6154
|
export function __wbg___wbindgen_debug_string_0bc8482c6e3508ae(arg0, arg1) {
|
|
6103
6155
|
const ret = debugString(getObject(arg1));
|
|
6104
6156
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
Binary file
|
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
7
|
-
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
8
|
-
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
9
|
-
export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
10
|
-
export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
|
|
11
|
-
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
12
|
-
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
13
|
-
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
14
|
-
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
15
|
-
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
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;
|
|
4
|
+
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
5
|
+
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
23
6
|
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
24
7
|
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
25
8
|
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
@@ -140,40 +123,15 @@ export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
|
140
123
|
export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
|
|
141
124
|
export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
|
|
142
125
|
export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
143
|
-
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
144
|
-
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
145
|
-
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
146
|
-
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
147
|
-
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
148
|
-
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;
|
|
149
|
-
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
150
|
-
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
151
|
-
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
152
|
-
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
153
|
-
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
154
|
-
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
155
|
-
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
156
|
-
export const wasmecpair_private_key: (a: number) => number;
|
|
157
|
-
export const wasmecpair_public_key: (a: number) => number;
|
|
158
|
-
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
159
|
-
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
160
|
-
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
161
|
-
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
162
|
-
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
163
|
-
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
164
|
-
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
165
|
-
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;
|
|
166
126
|
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
167
127
|
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
168
128
|
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
169
129
|
export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
170
130
|
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
171
|
-
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
172
131
|
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
173
132
|
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
174
133
|
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
175
134
|
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
176
|
-
export const isInspectEnabled: () => number;
|
|
177
135
|
export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
178
136
|
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
179
137
|
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
@@ -214,7 +172,6 @@ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c:
|
|
|
214
172
|
export const wasmtransaction_get_txid: (a: number, b: number) => void;
|
|
215
173
|
export const wasmtransaction_get_vsize: (a: number) => number;
|
|
216
174
|
export const wasmtransaction_to_bytes: (a: number, b: number) => void;
|
|
217
|
-
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
218
175
|
export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
219
176
|
export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
|
|
220
177
|
export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
|
|
@@ -264,6 +221,7 @@ export const wasmtransaction_input_count: (a: number) => number;
|
|
|
264
221
|
export const wasmtransaction_output_count: (a: number) => number;
|
|
265
222
|
export const wasmzcashtransaction_input_count: (a: number) => number;
|
|
266
223
|
export const wasmzcashtransaction_output_count: (a: number) => number;
|
|
224
|
+
export const isInspectEnabled: () => number;
|
|
267
225
|
export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
268
226
|
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
269
227
|
export const wasmtransaction_lock_time: (a: number) => number;
|
|
@@ -272,6 +230,49 @@ export const wasmzcashtransaction_lock_time: (a: number) => number;
|
|
|
272
230
|
export const wasmzcashtransaction_version: (a: number) => number;
|
|
273
231
|
export const wrappsbt_lock_time: (a: number) => number;
|
|
274
232
|
export const wrappsbt_version: (a: number) => number;
|
|
233
|
+
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
234
|
+
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
235
|
+
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
236
|
+
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
237
|
+
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
238
|
+
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;
|
|
239
|
+
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
240
|
+
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
241
|
+
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
242
|
+
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
243
|
+
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
244
|
+
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
245
|
+
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
246
|
+
export const wasmecpair_private_key: (a: number) => number;
|
|
247
|
+
export const wasmecpair_public_key: (a: number) => number;
|
|
248
|
+
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
249
|
+
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
250
|
+
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
251
|
+
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
252
|
+
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
253
|
+
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
254
|
+
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
255
|
+
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;
|
|
256
|
+
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
257
|
+
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
258
|
+
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
259
|
+
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
260
|
+
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
261
|
+
export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
262
|
+
export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
|
|
263
|
+
export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
264
|
+
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
265
|
+
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
266
|
+
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
267
|
+
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
268
|
+
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
269
|
+
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
270
|
+
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
271
|
+
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
272
|
+
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
273
|
+
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
274
|
+
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
275
|
+
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
275
276
|
export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
276
277
|
export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
277
278
|
export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|