@bitgo/wasm-utxo 4.14.1 → 4.16.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 +4 -0
- package/dist/cjs/js/index.js +7 -0
- package/dist/cjs/js/wasm/wasm_utxo.js +4 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +24 -24
- package/dist/esm/js/index.d.ts +4 -0
- package/dist/esm/js/index.js +6 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.js +4 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +24 -24
- package/package.json +1 -1
package/dist/cjs/js/index.d.ts
CHANGED
|
@@ -100,6 +100,10 @@ declare module "./wasm/wasm_utxo.js" {
|
|
|
100
100
|
address: string;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
+
export interface WasmUtxoError extends Error {
|
|
104
|
+
code: string;
|
|
105
|
+
}
|
|
106
|
+
export declare function isWasmUtxoError(e: unknown): e is WasmUtxoError;
|
|
103
107
|
export { WrapDescriptor as Descriptor } from "./wasm/wasm_utxo.js";
|
|
104
108
|
export { WrapMiniscript as Miniscript } from "./wasm/wasm_utxo.js";
|
|
105
109
|
export { Psbt } from "./descriptorWallet/Psbt.js";
|
package/dist/cjs/js/index.js
CHANGED
|
@@ -35,6 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.hasPsbtMagic = exports.ZcashTransaction = exports.Transaction = exports.DashTransaction = exports.Psbt = exports.Miniscript = exports.Descriptor = exports.isCoinName = exports.isTestnet = exports.isMainnet = exports.getMainnet = exports.Dimensions = exports.BIP32 = exports.ECPair = exports.ecpair = exports.bip32 = exports.descriptorWallet = exports.fixedScriptWallet = exports.utxolibCompat = exports.message = exports.inscriptions = exports.bip322 = exports.ast = exports.address = void 0;
|
|
37
37
|
exports.getWasmUtxoVersion = getWasmUtxoVersion;
|
|
38
|
+
exports.isWasmUtxoError = isWasmUtxoError;
|
|
38
39
|
const wasm = __importStar(require("./wasm/wasm_utxo.js"));
|
|
39
40
|
const wasm_utxo_js_1 = require("./wasm/wasm_utxo.js");
|
|
40
41
|
// we need to access the wasm module here, otherwise webpack gets all weird
|
|
@@ -67,6 +68,12 @@ Object.defineProperty(exports, "getMainnet", { enumerable: true, get: function (
|
|
|
67
68
|
Object.defineProperty(exports, "isMainnet", { enumerable: true, get: function () { return coinName_js_1.isMainnet; } });
|
|
68
69
|
Object.defineProperty(exports, "isTestnet", { enumerable: true, get: function () { return coinName_js_1.isTestnet; } });
|
|
69
70
|
Object.defineProperty(exports, "isCoinName", { enumerable: true, get: function () { return coinName_js_1.isCoinName; } });
|
|
71
|
+
const WASM_UTXO_ERROR_SYMBOL = Symbol.for("@bitgo/wasm-utxo/error");
|
|
72
|
+
function isWasmUtxoError(e) {
|
|
73
|
+
return (e instanceof Error &&
|
|
74
|
+
typeof e.code === "string" &&
|
|
75
|
+
e[WASM_UTXO_ERROR_SYMBOL] === true);
|
|
76
|
+
}
|
|
70
77
|
var wasm_utxo_js_2 = require("./wasm/wasm_utxo.js");
|
|
71
78
|
Object.defineProperty(exports, "Descriptor", { enumerable: true, get: function () { return wasm_utxo_js_2.WrapDescriptor; } });
|
|
72
79
|
var wasm_utxo_js_3 = require("./wasm/wasm_utxo.js");
|
|
@@ -6310,6 +6310,10 @@ function __wbg_get_imports() {
|
|
|
6310
6310
|
const ret = getObject(arg0).crypto;
|
|
6311
6311
|
return addHeapObject(ret);
|
|
6312
6312
|
},
|
|
6313
|
+
__wbg_for_c3adefd268cb6f1c: function(arg0, arg1) {
|
|
6314
|
+
const ret = Symbol.for(getStringFromWasm0(arg0, arg1));
|
|
6315
|
+
return addHeapObject(ret);
|
|
6316
|
+
},
|
|
6313
6317
|
__wbg_from_bddd64e7d5ff6941: function(arg0) {
|
|
6314
6318
|
const ret = Array.from(getObject(arg0));
|
|
6315
6319
|
return addHeapObject(ret);
|
|
Binary file
|
|
@@ -1,28 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
5
|
-
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
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_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
12
|
-
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
13
|
-
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
14
|
-
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
15
|
-
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
16
|
-
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
17
|
-
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
18
|
-
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
19
|
-
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
20
|
-
export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
21
|
-
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
22
|
-
export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
23
|
-
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
24
|
-
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
25
|
-
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
26
4
|
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
27
5
|
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
28
6
|
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
@@ -30,7 +8,6 @@ export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
|
30
8
|
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
31
9
|
export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
32
10
|
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
33
|
-
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
34
11
|
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
35
12
|
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
36
13
|
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
@@ -78,7 +55,6 @@ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c:
|
|
|
78
55
|
export const wasmtransaction_get_txid: (a: number, b: number) => void;
|
|
79
56
|
export const wasmtransaction_get_vsize: (a: number) => number;
|
|
80
57
|
export const wasmtransaction_to_bytes: (a: number, b: number) => void;
|
|
81
|
-
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
82
58
|
export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
83
59
|
export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
|
|
84
60
|
export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
|
|
@@ -134,6 +110,30 @@ export const wasmzcashtransaction_lock_time: (a: number) => number;
|
|
|
134
110
|
export const wasmzcashtransaction_version: (a: number) => number;
|
|
135
111
|
export const wrappsbt_lock_time: (a: number) => number;
|
|
136
112
|
export const wrappsbt_version: (a: number) => number;
|
|
113
|
+
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
114
|
+
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
115
|
+
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
116
|
+
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
117
|
+
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
118
|
+
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
119
|
+
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
120
|
+
export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
121
|
+
export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
|
|
122
|
+
export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
123
|
+
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
124
|
+
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
125
|
+
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
126
|
+
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
127
|
+
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
128
|
+
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
129
|
+
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
130
|
+
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
131
|
+
export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
132
|
+
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
133
|
+
export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
134
|
+
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
135
|
+
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
136
|
+
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
137
137
|
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
138
138
|
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
139
139
|
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
package/dist/esm/js/index.d.ts
CHANGED
|
@@ -100,6 +100,10 @@ declare module "./wasm/wasm_utxo.js" {
|
|
|
100
100
|
address: string;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
+
export interface WasmUtxoError extends Error {
|
|
104
|
+
code: string;
|
|
105
|
+
}
|
|
106
|
+
export declare function isWasmUtxoError(e: unknown): e is WasmUtxoError;
|
|
103
107
|
export { WrapDescriptor as Descriptor } from "./wasm/wasm_utxo.js";
|
|
104
108
|
export { WrapMiniscript as Miniscript } from "./wasm/wasm_utxo.js";
|
|
105
109
|
export { Psbt } from "./descriptorWallet/Psbt.js";
|
package/dist/esm/js/index.js
CHANGED
|
@@ -23,6 +23,12 @@ export function getWasmUtxoVersion() {
|
|
|
23
23
|
return WasmUtxoNamespace.get_wasm_utxo_version();
|
|
24
24
|
}
|
|
25
25
|
export { getMainnet, isMainnet, isTestnet, isCoinName } from "./coinName.js";
|
|
26
|
+
const WASM_UTXO_ERROR_SYMBOL = Symbol.for("@bitgo/wasm-utxo/error");
|
|
27
|
+
export function isWasmUtxoError(e) {
|
|
28
|
+
return (e instanceof Error &&
|
|
29
|
+
typeof e.code === "string" &&
|
|
30
|
+
e[WASM_UTXO_ERROR_SYMBOL] === true);
|
|
31
|
+
}
|
|
26
32
|
export { WrapDescriptor as Descriptor } from "./wasm/wasm_utxo.js";
|
|
27
33
|
export { WrapMiniscript as Miniscript } from "./wasm/wasm_utxo.js";
|
|
28
34
|
export { Psbt } from "./descriptorWallet/Psbt.js";
|
|
@@ -6281,6 +6281,10 @@ export function __wbg_crypto_574e78ad8b13b65f(arg0) {
|
|
|
6281
6281
|
const ret = getObject(arg0).crypto;
|
|
6282
6282
|
return addHeapObject(ret);
|
|
6283
6283
|
}
|
|
6284
|
+
export function __wbg_for_c3adefd268cb6f1c(arg0, arg1) {
|
|
6285
|
+
const ret = Symbol.for(getStringFromWasm0(arg0, arg1));
|
|
6286
|
+
return addHeapObject(ret);
|
|
6287
|
+
}
|
|
6284
6288
|
export function __wbg_from_bddd64e7d5ff6941(arg0) {
|
|
6285
6289
|
const ret = Array.from(getObject(arg0));
|
|
6286
6290
|
return addHeapObject(ret);
|
|
Binary file
|
|
@@ -1,28 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
5
|
-
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
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_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
12
|
-
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
13
|
-
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
14
|
-
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
15
|
-
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
16
|
-
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
17
|
-
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
18
|
-
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
19
|
-
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
20
|
-
export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
21
|
-
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
22
|
-
export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
23
|
-
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
24
|
-
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
25
|
-
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
26
4
|
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
27
5
|
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
28
6
|
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
@@ -30,7 +8,6 @@ export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
|
30
8
|
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
31
9
|
export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
32
10
|
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
33
|
-
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
34
11
|
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
35
12
|
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
36
13
|
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
@@ -78,7 +55,6 @@ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c:
|
|
|
78
55
|
export const wasmtransaction_get_txid: (a: number, b: number) => void;
|
|
79
56
|
export const wasmtransaction_get_vsize: (a: number) => number;
|
|
80
57
|
export const wasmtransaction_to_bytes: (a: number, b: number) => void;
|
|
81
|
-
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
82
58
|
export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
83
59
|
export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
|
|
84
60
|
export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
|
|
@@ -134,6 +110,30 @@ export const wasmzcashtransaction_lock_time: (a: number) => number;
|
|
|
134
110
|
export const wasmzcashtransaction_version: (a: number) => number;
|
|
135
111
|
export const wrappsbt_lock_time: (a: number) => number;
|
|
136
112
|
export const wrappsbt_version: (a: number) => number;
|
|
113
|
+
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
114
|
+
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
115
|
+
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
116
|
+
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
117
|
+
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
118
|
+
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
119
|
+
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
120
|
+
export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
121
|
+
export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
|
|
122
|
+
export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
123
|
+
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
124
|
+
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
125
|
+
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
126
|
+
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
127
|
+
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
128
|
+
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
129
|
+
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
130
|
+
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
131
|
+
export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
132
|
+
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
133
|
+
export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
134
|
+
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
135
|
+
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
136
|
+
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
137
137
|
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
138
138
|
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
139
139
|
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|