@bitgo/wasm-utxo 4.1.0 → 4.3.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/descriptorWallet/Psbt.d.ts +3 -22
- package/dist/cjs/js/descriptorWallet/Psbt.js +3 -59
- package/dist/cjs/js/fixedScriptWallet/BitGoPsbt.d.ts +7 -65
- package/dist/cjs/js/fixedScriptWallet/BitGoPsbt.js +4 -99
- package/dist/cjs/js/psbtBase.d.ts +44 -0
- package/dist/cjs/js/psbtBase.js +62 -0
- package/dist/cjs/js/transaction.d.ts +6 -58
- package/dist/cjs/js/transaction.js +10 -117
- package/dist/cjs/js/transactionBase.d.ts +28 -0
- package/dist/cjs/js/transactionBase.js +37 -0
- package/dist/cjs/js/wasm/wasm_utxo.d.ts +1 -25
- package/dist/cjs/js/wasm/wasm_utxo.js +2 -12
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +78 -78
- package/dist/esm/js/descriptorWallet/Psbt.d.ts +3 -22
- package/dist/esm/js/descriptorWallet/Psbt.js +3 -59
- package/dist/esm/js/fixedScriptWallet/BitGoPsbt.d.ts +7 -65
- package/dist/esm/js/fixedScriptWallet/BitGoPsbt.js +4 -99
- package/dist/esm/js/psbtBase.d.ts +44 -0
- package/dist/esm/js/psbtBase.js +58 -0
- package/dist/esm/js/transaction.d.ts +6 -58
- package/dist/esm/js/transaction.js +11 -118
- package/dist/esm/js/transactionBase.d.ts +28 -0
- package/dist/esm/js/transactionBase.js +33 -0
- package/dist/esm/js/wasm/wasm_utxo.d.ts +1 -25
- package/dist/esm/js/wasm/wasm_utxo_bg.js +2 -12
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +78 -78
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { WasmDashTransaction, WasmTransaction, WasmZcashTransaction
|
|
1
|
+
import { WasmDashTransaction, WasmTransaction, WasmZcashTransaction } from "./wasm/wasm_utxo.js";
|
|
2
|
+
import { TransactionBase } from "./transactionBase.js";
|
|
2
3
|
/**
|
|
3
4
|
* Transaction wrapper (Bitcoin-like networks)
|
|
4
5
|
*
|
|
5
6
|
* Provides a camelCase, strongly-typed API over the snake_case WASM bindings.
|
|
6
7
|
*/
|
|
7
|
-
export class Transaction {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
this._wasm = _wasm;
|
|
8
|
+
export class Transaction extends TransactionBase {
|
|
9
|
+
constructor(wasm) {
|
|
10
|
+
super(wasm);
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Create an empty transaction (version 1, locktime 0)
|
|
@@ -41,20 +41,6 @@ export class Transaction {
|
|
|
41
41
|
addOutput(script, value) {
|
|
42
42
|
return this._wasm.add_output(script, value);
|
|
43
43
|
}
|
|
44
|
-
toBytes() {
|
|
45
|
-
return this._wasm.to_bytes();
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Get the transaction ID (txid)
|
|
49
|
-
*
|
|
50
|
-
* The txid is the double SHA256 of the transaction bytes (excluding witness
|
|
51
|
-
* data for segwit transactions), displayed in reverse byte order as is standard.
|
|
52
|
-
*
|
|
53
|
-
* @returns The transaction ID as a hex string
|
|
54
|
-
*/
|
|
55
|
-
getId() {
|
|
56
|
-
return this._wasm.get_txid();
|
|
57
|
-
}
|
|
58
44
|
/**
|
|
59
45
|
* Get the virtual size of the transaction
|
|
60
46
|
*
|
|
@@ -65,27 +51,6 @@ export class Transaction {
|
|
|
65
51
|
getVSize() {
|
|
66
52
|
return this._wasm.get_vsize();
|
|
67
53
|
}
|
|
68
|
-
inputCount() {
|
|
69
|
-
return this._wasm.input_count();
|
|
70
|
-
}
|
|
71
|
-
outputCount() {
|
|
72
|
-
return this._wasm.output_count();
|
|
73
|
-
}
|
|
74
|
-
version() {
|
|
75
|
-
return this._wasm.version();
|
|
76
|
-
}
|
|
77
|
-
lockTime() {
|
|
78
|
-
return this._wasm.lock_time();
|
|
79
|
-
}
|
|
80
|
-
getInputs() {
|
|
81
|
-
return this._wasm.get_inputs();
|
|
82
|
-
}
|
|
83
|
-
getOutputs() {
|
|
84
|
-
return this._wasm.get_outputs();
|
|
85
|
-
}
|
|
86
|
-
getOutputsWithAddress(coin) {
|
|
87
|
-
return this._wasm.get_outputs_with_address(coin);
|
|
88
|
-
}
|
|
89
54
|
/** @internal */
|
|
90
55
|
get wasm() {
|
|
91
56
|
return this._wasm;
|
|
@@ -96,10 +61,9 @@ export class Transaction {
|
|
|
96
61
|
*
|
|
97
62
|
* Provides a camelCase, strongly-typed API over the snake_case WASM bindings.
|
|
98
63
|
*/
|
|
99
|
-
export class ZcashTransaction {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
this._wasm = _wasm;
|
|
64
|
+
export class ZcashTransaction extends TransactionBase {
|
|
65
|
+
constructor(wasm) {
|
|
66
|
+
super(wasm);
|
|
103
67
|
}
|
|
104
68
|
static fromBytes(bytes) {
|
|
105
69
|
return new ZcashTransaction(WasmZcashTransaction.from_bytes(bytes));
|
|
@@ -108,41 +72,6 @@ export class ZcashTransaction {
|
|
|
108
72
|
static fromWasm(wasm) {
|
|
109
73
|
return new ZcashTransaction(wasm);
|
|
110
74
|
}
|
|
111
|
-
toBytes() {
|
|
112
|
-
return this._wasm.to_bytes();
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Get the transaction ID (txid)
|
|
116
|
-
*
|
|
117
|
-
* The txid is the double SHA256 of the full Zcash transaction bytes,
|
|
118
|
-
* displayed in reverse byte order as is standard.
|
|
119
|
-
*
|
|
120
|
-
* @returns The transaction ID as a hex string
|
|
121
|
-
*/
|
|
122
|
-
getId() {
|
|
123
|
-
return this._wasm.get_txid();
|
|
124
|
-
}
|
|
125
|
-
inputCount() {
|
|
126
|
-
return this._wasm.input_count();
|
|
127
|
-
}
|
|
128
|
-
outputCount() {
|
|
129
|
-
return this._wasm.output_count();
|
|
130
|
-
}
|
|
131
|
-
version() {
|
|
132
|
-
return this._wasm.version();
|
|
133
|
-
}
|
|
134
|
-
lockTime() {
|
|
135
|
-
return this._wasm.lock_time();
|
|
136
|
-
}
|
|
137
|
-
getInputs() {
|
|
138
|
-
return this._wasm.get_inputs();
|
|
139
|
-
}
|
|
140
|
-
getOutputs() {
|
|
141
|
-
return this._wasm.get_outputs();
|
|
142
|
-
}
|
|
143
|
-
getOutputsWithAddress(coin) {
|
|
144
|
-
return this._wasm.get_outputs_with_address(coin);
|
|
145
|
-
}
|
|
146
75
|
/** @internal */
|
|
147
76
|
get wasm() {
|
|
148
77
|
return this._wasm;
|
|
@@ -153,10 +82,9 @@ export class ZcashTransaction {
|
|
|
153
82
|
*
|
|
154
83
|
* Round-trip only: bytes -> parse -> bytes.
|
|
155
84
|
*/
|
|
156
|
-
export class DashTransaction {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
this._wasm = _wasm;
|
|
85
|
+
export class DashTransaction extends TransactionBase {
|
|
86
|
+
constructor(wasm) {
|
|
87
|
+
super(wasm);
|
|
160
88
|
}
|
|
161
89
|
static fromBytes(bytes) {
|
|
162
90
|
return new DashTransaction(WasmDashTransaction.from_bytes(bytes));
|
|
@@ -165,41 +93,6 @@ export class DashTransaction {
|
|
|
165
93
|
static fromWasm(wasm) {
|
|
166
94
|
return new DashTransaction(wasm);
|
|
167
95
|
}
|
|
168
|
-
toBytes() {
|
|
169
|
-
return this._wasm.to_bytes();
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Get the transaction ID (txid)
|
|
173
|
-
*
|
|
174
|
-
* The txid is the double SHA256 of the full Dash transaction bytes,
|
|
175
|
-
* displayed in reverse byte order as is standard.
|
|
176
|
-
*
|
|
177
|
-
* @returns The transaction ID as a hex string
|
|
178
|
-
*/
|
|
179
|
-
getId() {
|
|
180
|
-
return this._wasm.get_txid();
|
|
181
|
-
}
|
|
182
|
-
inputCount() {
|
|
183
|
-
return this._wasm.input_count();
|
|
184
|
-
}
|
|
185
|
-
outputCount() {
|
|
186
|
-
return this._wasm.output_count();
|
|
187
|
-
}
|
|
188
|
-
version() {
|
|
189
|
-
return this._wasm.version();
|
|
190
|
-
}
|
|
191
|
-
lockTime() {
|
|
192
|
-
return this._wasm.lock_time();
|
|
193
|
-
}
|
|
194
|
-
getInputs() {
|
|
195
|
-
return this._wasm.get_inputs();
|
|
196
|
-
}
|
|
197
|
-
getOutputs() {
|
|
198
|
-
return this._wasm.get_outputs();
|
|
199
|
-
}
|
|
200
|
-
getOutputsWithAddress(coin) {
|
|
201
|
-
return this._wasm.get_outputs_with_address(coin);
|
|
202
|
-
}
|
|
203
96
|
/** @internal */
|
|
204
97
|
get wasm() {
|
|
205
98
|
return this._wasm;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { TxInputData, TxOutputData, TxOutputDataWithAddress } from "./wasm/wasm_utxo.js";
|
|
2
|
+
import type { CoinName } from "./coinName.js";
|
|
3
|
+
import type { ITransaction } from "./transaction.js";
|
|
4
|
+
interface WasmTransactionLike {
|
|
5
|
+
input_count(): number;
|
|
6
|
+
output_count(): number;
|
|
7
|
+
version(): number;
|
|
8
|
+
lock_time(): number;
|
|
9
|
+
to_bytes(): Uint8Array;
|
|
10
|
+
get_txid(): string;
|
|
11
|
+
get_inputs(): unknown;
|
|
12
|
+
get_outputs(): unknown;
|
|
13
|
+
get_outputs_with_address(coin: string): unknown;
|
|
14
|
+
}
|
|
15
|
+
export declare abstract class TransactionBase<W extends WasmTransactionLike> implements ITransaction {
|
|
16
|
+
protected _wasm: W;
|
|
17
|
+
constructor(wasm: W);
|
|
18
|
+
inputCount(): number;
|
|
19
|
+
outputCount(): number;
|
|
20
|
+
version(): number;
|
|
21
|
+
lockTime(): number;
|
|
22
|
+
toBytes(): Uint8Array;
|
|
23
|
+
getId(): string;
|
|
24
|
+
getInputs(): TxInputData[];
|
|
25
|
+
getOutputs(): TxOutputData[];
|
|
26
|
+
getOutputsWithAddress(coin: CoinName): TxOutputDataWithAddress[];
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export class TransactionBase {
|
|
2
|
+
_wasm;
|
|
3
|
+
constructor(wasm) {
|
|
4
|
+
this._wasm = wasm;
|
|
5
|
+
}
|
|
6
|
+
inputCount() {
|
|
7
|
+
return this._wasm.input_count();
|
|
8
|
+
}
|
|
9
|
+
outputCount() {
|
|
10
|
+
return this._wasm.output_count();
|
|
11
|
+
}
|
|
12
|
+
version() {
|
|
13
|
+
return this._wasm.version();
|
|
14
|
+
}
|
|
15
|
+
lockTime() {
|
|
16
|
+
return this._wasm.lock_time();
|
|
17
|
+
}
|
|
18
|
+
toBytes() {
|
|
19
|
+
return this._wasm.to_bytes();
|
|
20
|
+
}
|
|
21
|
+
getId() {
|
|
22
|
+
return this._wasm.get_txid();
|
|
23
|
+
}
|
|
24
|
+
getInputs() {
|
|
25
|
+
return this._wasm.get_inputs();
|
|
26
|
+
}
|
|
27
|
+
getOutputs() {
|
|
28
|
+
return this._wasm.get_outputs();
|
|
29
|
+
}
|
|
30
|
+
getOutputsWithAddress(coin) {
|
|
31
|
+
return this._wasm.get_outputs_with_address(coin);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -334,14 +334,8 @@ export class BitGoPsbt {
|
|
|
334
334
|
*/
|
|
335
335
|
generate_musig2_nonces(xpriv: WasmBIP32, session_id_bytes?: Uint8Array | null): void;
|
|
336
336
|
get_global_xpubs(): any;
|
|
337
|
-
/**
|
|
338
|
-
* Get a KV value from a specific PSBT input. Returns `undefined` if not present.
|
|
339
|
-
*/
|
|
340
337
|
get_input_kv(index: number, key: any): Uint8Array | undefined;
|
|
341
338
|
get_inputs(): any;
|
|
342
|
-
/**
|
|
343
|
-
* Get a KV value from the PSBT global map. Returns `undefined` if not present.
|
|
344
|
-
*/
|
|
345
339
|
get_kv(key: any): Uint8Array | undefined;
|
|
346
340
|
/**
|
|
347
341
|
* Get the network type for transaction extraction
|
|
@@ -350,9 +344,6 @@ export class BitGoPsbt {
|
|
|
350
344
|
* wrapper class should be used in TypeScript.
|
|
351
345
|
*/
|
|
352
346
|
get_network_type(): string;
|
|
353
|
-
/**
|
|
354
|
-
* Get a KV value from a specific PSBT output. Returns `undefined` if not present.
|
|
355
|
-
*/
|
|
356
347
|
get_output_kv(index: number, key: any): Uint8Array | undefined;
|
|
357
348
|
get_outputs(): any;
|
|
358
349
|
get_outputs_with_address(): any;
|
|
@@ -396,20 +387,8 @@ export class BitGoPsbt {
|
|
|
396
387
|
* The serialized PSBT as a byte array
|
|
397
388
|
*/
|
|
398
389
|
serialize(): Uint8Array;
|
|
399
|
-
/**
|
|
400
|
-
* Set an arbitrary KV pair on a specific PSBT input.
|
|
401
|
-
*/
|
|
402
390
|
set_input_kv(index: number, key: any, value: Uint8Array): void;
|
|
403
|
-
/**
|
|
404
|
-
* Set an arbitrary KV pair on the PSBT global map.
|
|
405
|
-
* `key` must be `{ type: "unknown", keyType: number, data?: Uint8Array }` or
|
|
406
|
-
* `{ type: "proprietary", prefix: Uint8Array, subtype: number, key?: Uint8Array }` or
|
|
407
|
-
* `{ type: "bitgo", subtype: number, key?: Uint8Array }`.
|
|
408
|
-
*/
|
|
409
391
|
set_kv(key: any, value: Uint8Array): void;
|
|
410
|
-
/**
|
|
411
|
-
* Set an arbitrary KV pair on a specific PSBT output.
|
|
412
|
-
*/
|
|
413
392
|
set_output_kv(index: number, key: any, value: Uint8Array): void;
|
|
414
393
|
/**
|
|
415
394
|
* Sign all MuSig2 keypath inputs in a single pass with optimized sighash computation.
|
|
@@ -610,10 +589,7 @@ export class BitGoPsbt {
|
|
|
610
589
|
* - `Err(WasmUtxoError)` if signing fails
|
|
611
590
|
*/
|
|
612
591
|
sign_with_xpriv(input_index: number, xpriv: WasmBIP32): void;
|
|
613
|
-
|
|
614
|
-
* Get the unsigned transaction ID
|
|
615
|
-
*/
|
|
616
|
-
unsigned_txid(): string;
|
|
592
|
+
unsigned_tx_id(): string;
|
|
617
593
|
/**
|
|
618
594
|
* Verify if a replay protection input has a valid signature
|
|
619
595
|
*
|
|
@@ -1192,7 +1192,6 @@ export class BitGoPsbt {
|
|
|
1192
1192
|
return takeObject(ret);
|
|
1193
1193
|
}
|
|
1194
1194
|
/**
|
|
1195
|
-
* Get a KV value from a specific PSBT input. Returns `undefined` if not present.
|
|
1196
1195
|
* @param {number} index
|
|
1197
1196
|
* @param {any} key
|
|
1198
1197
|
* @returns {Uint8Array | undefined}
|
|
@@ -1237,7 +1236,6 @@ export class BitGoPsbt {
|
|
|
1237
1236
|
}
|
|
1238
1237
|
}
|
|
1239
1238
|
/**
|
|
1240
|
-
* Get a KV value from the PSBT global map. Returns `undefined` if not present.
|
|
1241
1239
|
* @param {any} key
|
|
1242
1240
|
* @returns {Uint8Array | undefined}
|
|
1243
1241
|
*/
|
|
@@ -1286,7 +1284,6 @@ export class BitGoPsbt {
|
|
|
1286
1284
|
}
|
|
1287
1285
|
}
|
|
1288
1286
|
/**
|
|
1289
|
-
* Get a KV value from a specific PSBT output. Returns `undefined` if not present.
|
|
1290
1287
|
* @param {number} index
|
|
1291
1288
|
* @param {any} key
|
|
1292
1289
|
* @returns {Uint8Array | undefined}
|
|
@@ -1518,7 +1515,6 @@ export class BitGoPsbt {
|
|
|
1518
1515
|
}
|
|
1519
1516
|
}
|
|
1520
1517
|
/**
|
|
1521
|
-
* Set an arbitrary KV pair on a specific PSBT input.
|
|
1522
1518
|
* @param {number} index
|
|
1523
1519
|
* @param {any} key
|
|
1524
1520
|
* @param {Uint8Array} value
|
|
@@ -1539,10 +1535,6 @@ export class BitGoPsbt {
|
|
|
1539
1535
|
}
|
|
1540
1536
|
}
|
|
1541
1537
|
/**
|
|
1542
|
-
* Set an arbitrary KV pair on the PSBT global map.
|
|
1543
|
-
* `key` must be `{ type: "unknown", keyType: number, data?: Uint8Array }` or
|
|
1544
|
-
* `{ type: "proprietary", prefix: Uint8Array, subtype: number, key?: Uint8Array }` or
|
|
1545
|
-
* `{ type: "bitgo", subtype: number, key?: Uint8Array }`.
|
|
1546
1538
|
* @param {any} key
|
|
1547
1539
|
* @param {Uint8Array} value
|
|
1548
1540
|
*/
|
|
@@ -1562,7 +1554,6 @@ export class BitGoPsbt {
|
|
|
1562
1554
|
}
|
|
1563
1555
|
}
|
|
1564
1556
|
/**
|
|
1565
|
-
* Set an arbitrary KV pair on a specific PSBT output.
|
|
1566
1557
|
* @param {number} index
|
|
1567
1558
|
* @param {any} key
|
|
1568
1559
|
* @param {Uint8Array} value
|
|
@@ -1957,15 +1948,14 @@ export class BitGoPsbt {
|
|
|
1957
1948
|
}
|
|
1958
1949
|
}
|
|
1959
1950
|
/**
|
|
1960
|
-
* Get the unsigned transaction ID
|
|
1961
1951
|
* @returns {string}
|
|
1962
1952
|
*/
|
|
1963
|
-
|
|
1953
|
+
unsigned_tx_id() {
|
|
1964
1954
|
let deferred1_0;
|
|
1965
1955
|
let deferred1_1;
|
|
1966
1956
|
try {
|
|
1967
1957
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1968
|
-
wasm.
|
|
1958
|
+
wasm.bitgopsbt_unsigned_tx_id(retptr, this.__wbg_ptr);
|
|
1969
1959
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1970
1960
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1971
1961
|
deferred1_0 = r0;
|
|
Binary file
|
|
@@ -2,16 +2,42 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
5
|
-
export const
|
|
5
|
+
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
6
|
+
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
6
7
|
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
7
|
-
export const
|
|
8
|
+
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
8
9
|
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
10
|
+
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
9
11
|
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
10
12
|
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
11
13
|
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
12
14
|
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
15
|
+
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
16
|
+
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;
|
|
17
|
+
export const isInspectEnabled: () => number;
|
|
18
|
+
export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
19
|
+
export const wasmbip32_chain_code: (a: number) => number;
|
|
20
|
+
export const wasmbip32_depth: (a: number) => number;
|
|
21
|
+
export const wasmbip32_derive: (a: number, b: number, c: number) => void;
|
|
22
|
+
export const wasmbip32_derive_hardened: (a: number, b: number, c: number) => void;
|
|
23
|
+
export const wasmbip32_derive_path: (a: number, b: number, c: number, d: number) => void;
|
|
24
|
+
export const wasmbip32_equals: (a: number, b: number) => number;
|
|
25
|
+
export const wasmbip32_fingerprint: (a: number) => number;
|
|
26
|
+
export const wasmbip32_from_base58: (a: number, b: number, c: number) => void;
|
|
27
|
+
export const wasmbip32_from_bip32_interface: (a: number, b: number) => void;
|
|
28
|
+
export const wasmbip32_from_seed: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
29
|
+
export const wasmbip32_from_seed_sha256: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
30
|
+
export const wasmbip32_from_xprv: (a: number, b: number, c: number) => void;
|
|
31
|
+
export const wasmbip32_from_xpub: (a: number, b: number, c: number) => void;
|
|
32
|
+
export const wasmbip32_identifier: (a: number) => number;
|
|
33
|
+
export const wasmbip32_index: (a: number) => number;
|
|
34
|
+
export const wasmbip32_is_neutered: (a: number) => number;
|
|
35
|
+
export const wasmbip32_neutered: (a: number) => number;
|
|
36
|
+
export const wasmbip32_parent_fingerprint: (a: number) => number;
|
|
37
|
+
export const wasmbip32_private_key: (a: number) => number;
|
|
38
|
+
export const wasmbip32_public_key: (a: number) => number;
|
|
39
|
+
export const wasmbip32_to_base58: (a: number, b: number) => void;
|
|
40
|
+
export const wasmbip32_to_wif: (a: number, b: number) => void;
|
|
15
41
|
export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
16
42
|
export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
|
|
17
43
|
export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
|
|
@@ -22,21 +48,16 @@ export const wasmdashtransaction_lock_time: (a: number) => number;
|
|
|
22
48
|
export const wasmdashtransaction_output_count: (a: number) => number;
|
|
23
49
|
export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
|
|
24
50
|
export const wasmdashtransaction_version: (a: number) => number;
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
29
|
-
export const
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
33
|
-
export const
|
|
34
|
-
export const
|
|
35
|
-
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
36
|
-
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
37
|
-
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
38
|
-
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
39
|
-
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
51
|
+
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
52
|
+
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
53
|
+
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
54
|
+
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
55
|
+
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
56
|
+
export const wasmecpair_private_key: (a: number) => number;
|
|
57
|
+
export const wasmecpair_public_key: (a: number) => number;
|
|
58
|
+
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
59
|
+
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
60
|
+
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
40
61
|
export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
41
62
|
export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
42
63
|
export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
|
|
@@ -49,6 +70,7 @@ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c:
|
|
|
49
70
|
export const wasmtransaction_get_txid: (a: number, b: number) => void;
|
|
50
71
|
export const wasmtransaction_get_vsize: (a: number) => number;
|
|
51
72
|
export const wasmtransaction_to_bytes: (a: number, b: number) => void;
|
|
73
|
+
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
52
74
|
export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
53
75
|
export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
|
|
54
76
|
export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
|
|
@@ -91,47 +113,25 @@ export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: nu
|
|
|
91
113
|
export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
|
|
92
114
|
export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
93
115
|
export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
|
|
116
|
+
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
94
117
|
export const wasmtransaction_input_count: (a: number) => number;
|
|
95
118
|
export const wasmtransaction_output_count: (a: number) => number;
|
|
96
119
|
export const wasmzcashtransaction_input_count: (a: number) => number;
|
|
97
120
|
export const wasmzcashtransaction_output_count: (a: number) => number;
|
|
121
|
+
export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
122
|
+
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
98
123
|
export const wasmtransaction_lock_time: (a: number) => number;
|
|
99
124
|
export const wasmtransaction_version: (a: number) => number;
|
|
100
125
|
export const wasmzcashtransaction_lock_time: (a: number) => number;
|
|
101
126
|
export const wasmzcashtransaction_version: (a: number) => number;
|
|
102
127
|
export const wrappsbt_lock_time: (a: number) => number;
|
|
103
128
|
export const wrappsbt_version: (a: number) => number;
|
|
104
|
-
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
105
|
-
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
106
|
-
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
107
|
-
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
108
|
-
export const isInspectEnabled: () => number;
|
|
109
|
-
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
110
|
-
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
111
|
-
export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
112
|
-
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
113
|
-
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
114
|
-
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
115
|
-
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
116
|
-
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
117
|
-
export const wasmecpair_private_key: (a: number) => number;
|
|
118
|
-
export const wasmecpair_public_key: (a: number) => number;
|
|
119
|
-
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
120
|
-
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
121
|
-
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
122
|
-
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
123
|
-
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
124
|
-
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
125
|
-
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
126
|
-
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;
|
|
127
|
-
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
128
|
-
export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
129
|
-
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
130
129
|
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
131
130
|
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
132
131
|
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
133
|
-
export const
|
|
134
|
-
export const
|
|
132
|
+
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
133
|
+
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
134
|
+
export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
135
135
|
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;
|
|
136
136
|
export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
|
|
137
137
|
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;
|
|
@@ -194,7 +194,7 @@ export const bitgopsbt_sign_single_input_with_privkey: (a: number, b: number, c:
|
|
|
194
194
|
export const bitgopsbt_sign_single_input_with_xpriv: (a: number, b: number, c: number, d: number) => void;
|
|
195
195
|
export const bitgopsbt_sign_with_privkey: (a: number, b: number, c: number, d: number) => void;
|
|
196
196
|
export const bitgopsbt_sign_with_xpriv: (a: number, b: number, c: number, d: number) => void;
|
|
197
|
-
export const
|
|
197
|
+
export const bitgopsbt_unsigned_tx_id: (a: number, b: number) => void;
|
|
198
198
|
export const bitgopsbt_verify_replay_protection_signature: (a: number, b: number, c: number, d: number) => void;
|
|
199
199
|
export const bitgopsbt_verify_signature_with_pub: (a: number, b: number, c: number, d: number) => void;
|
|
200
200
|
export const bitgopsbt_verify_signature_with_xpub: (a: number, b: number, c: number, d: number) => void;
|
|
@@ -210,40 +210,30 @@ export const fixedscriptwalletnamespace_output_script_with_network_str: (a: numb
|
|
|
210
210
|
export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
|
|
211
211
|
export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
212
212
|
export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
213
|
-
export const
|
|
214
|
-
export const
|
|
215
|
-
export const
|
|
216
|
-
export const
|
|
217
|
-
export const
|
|
218
|
-
export const
|
|
219
|
-
export const
|
|
220
|
-
export const
|
|
221
|
-
export const
|
|
222
|
-
export const
|
|
223
|
-
export const
|
|
224
|
-
export const
|
|
225
|
-
export const
|
|
226
|
-
export const
|
|
227
|
-
export const
|
|
228
|
-
export const
|
|
229
|
-
export const
|
|
230
|
-
export const
|
|
231
|
-
export const
|
|
232
|
-
export const wasmbip32_public_key: (a: number) => number;
|
|
233
|
-
export const wasmbip32_to_base58: (a: number, b: number) => void;
|
|
234
|
-
export const wasmbip32_to_wif: (a: number, b: number) => void;
|
|
235
|
-
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
236
|
-
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
237
|
-
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
238
|
-
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
213
|
+
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
214
|
+
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
215
|
+
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
216
|
+
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
217
|
+
export const wasmdimensions_empty: () => number;
|
|
218
|
+
export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
219
|
+
export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
|
|
220
|
+
export const wasmdimensions_from_output_script_length: (a: number) => number;
|
|
221
|
+
export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
|
|
222
|
+
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
223
|
+
export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
|
|
224
|
+
export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
|
|
225
|
+
export const wasmdimensions_get_output_vsize: (a: number) => number;
|
|
226
|
+
export const wasmdimensions_get_output_weight: (a: number) => number;
|
|
227
|
+
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
228
|
+
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
229
|
+
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
230
|
+
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
231
|
+
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
239
232
|
export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
|
|
240
|
-
export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
|
|
241
233
|
export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
242
|
-
export const
|
|
234
|
+
export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
|
|
243
235
|
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
244
236
|
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
245
|
-
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
246
|
-
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;
|
|
247
237
|
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
248
238
|
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
249
239
|
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
@@ -261,6 +251,16 @@ export const wrapminiscript_fromString: (a: number, b: number, c: number, d: num
|
|
|
261
251
|
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
262
252
|
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
263
253
|
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
254
|
+
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
255
|
+
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
256
|
+
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
257
|
+
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
258
|
+
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
259
|
+
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
260
|
+
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
261
|
+
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
262
|
+
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
263
|
+
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;
|
|
264
264
|
export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
265
265
|
export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
266
266
|
export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|