@bitgo/wasm-utxo 1.39.0 → 1.41.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/fixedScriptWallet/BitGoPsbt.d.ts +49 -2
- package/dist/cjs/js/fixedScriptWallet/BitGoPsbt.js +56 -0
- package/dist/cjs/js/fixedScriptWallet/index.d.ts +1 -0
- package/dist/cjs/js/index.d.ts +1 -1
- package/dist/cjs/js/psbt.d.ts +12 -0
- package/dist/cjs/js/wasm/wasm_utxo.d.ts +29 -0
- package/dist/cjs/js/wasm/wasm_utxo.js +82 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +125 -120
- package/dist/esm/js/fixedScriptWallet/BitGoPsbt.d.ts +49 -2
- package/dist/esm/js/fixedScriptWallet/BitGoPsbt.js +57 -1
- package/dist/esm/js/fixedScriptWallet/index.d.ts +1 -0
- package/dist/esm/js/index.d.ts +1 -1
- package/dist/esm/js/index.js +1 -1
- package/dist/esm/js/psbt.d.ts +12 -0
- package/dist/esm/js/wasm/wasm_utxo.d.ts +29 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.js +82 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +125 -120
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { BitGoPsbt as WasmBitGoPsbt } from "../wasm/wasm_utxo.js";
|
|
1
|
+
import { BitGoPsbt as WasmBitGoPsbt, type PsbtInputData, type PsbtOutputData, type PsbtOutputDataWithAddress } from "../wasm/wasm_utxo.js";
|
|
2
|
+
import type { IPsbtIntrospectionWithAddress } from "../psbt.js";
|
|
2
3
|
import { type WalletKeysArg } from "./RootWalletKeys.js";
|
|
3
4
|
import { type ReplayProtectionArg } from "./ReplayProtection.js";
|
|
4
5
|
import { type BIP32Arg } from "../bip32.js";
|
|
@@ -90,7 +91,7 @@ export type AddWalletOutputOptions = {
|
|
|
90
91
|
/** Value in satoshis */
|
|
91
92
|
value: bigint;
|
|
92
93
|
};
|
|
93
|
-
export declare class BitGoPsbt {
|
|
94
|
+
export declare class BitGoPsbt implements IPsbtIntrospectionWithAddress {
|
|
94
95
|
protected _wasm: WasmBitGoPsbt;
|
|
95
96
|
protected constructor(_wasm: WasmBitGoPsbt);
|
|
96
97
|
/**
|
|
@@ -570,4 +571,50 @@ export declare class BitGoPsbt {
|
|
|
570
571
|
* ```
|
|
571
572
|
*/
|
|
572
573
|
getHalfSignedLegacyFormat(): Uint8Array;
|
|
574
|
+
/**
|
|
575
|
+
* Get the number of inputs in the PSBT
|
|
576
|
+
* @returns The number of inputs
|
|
577
|
+
*/
|
|
578
|
+
get inputCount(): number;
|
|
579
|
+
/**
|
|
580
|
+
* Get the number of outputs in the PSBT
|
|
581
|
+
* @returns The number of outputs
|
|
582
|
+
*/
|
|
583
|
+
get outputCount(): number;
|
|
584
|
+
/**
|
|
585
|
+
* Get all PSBT inputs as an array
|
|
586
|
+
*
|
|
587
|
+
* Returns raw PSBT input data including witness_utxo and derivation info.
|
|
588
|
+
* For parsed transaction data with address identification, use
|
|
589
|
+
* parseTransactionWithWalletKeys() instead.
|
|
590
|
+
*
|
|
591
|
+
* @returns Array of PsbtInputData objects
|
|
592
|
+
*/
|
|
593
|
+
getInputs(): PsbtInputData[];
|
|
594
|
+
/**
|
|
595
|
+
* Get all PSBT outputs as an array
|
|
596
|
+
*
|
|
597
|
+
* Returns raw PSBT output data without address resolution.
|
|
598
|
+
* For output data with addresses, use getOutputsWithAddress().
|
|
599
|
+
*
|
|
600
|
+
* @returns Array of PsbtOutputData objects
|
|
601
|
+
*/
|
|
602
|
+
getOutputs(): PsbtOutputData[];
|
|
603
|
+
/**
|
|
604
|
+
* Get all PSBT outputs with resolved address strings
|
|
605
|
+
*
|
|
606
|
+
* Unlike the generic Psbt class which requires a coin parameter,
|
|
607
|
+
* BitGoPsbt automatically uses the network it was created with to resolve addresses.
|
|
608
|
+
*
|
|
609
|
+
* @returns Array of PsbtOutputDataWithAddress objects
|
|
610
|
+
*
|
|
611
|
+
* @example
|
|
612
|
+
* ```typescript
|
|
613
|
+
* const outputs = psbt.getOutputsWithAddress();
|
|
614
|
+
* for (const output of outputs) {
|
|
615
|
+
* console.log(`${output.address}: ${output.value} satoshis`);
|
|
616
|
+
* }
|
|
617
|
+
* ```
|
|
618
|
+
*/
|
|
619
|
+
getOutputsWithAddress(): PsbtOutputDataWithAddress[];
|
|
573
620
|
}
|
|
@@ -535,5 +535,61 @@ class BitGoPsbt {
|
|
|
535
535
|
getHalfSignedLegacyFormat() {
|
|
536
536
|
return this._wasm.extract_half_signed_legacy_tx();
|
|
537
537
|
}
|
|
538
|
+
/**
|
|
539
|
+
* Get the number of inputs in the PSBT
|
|
540
|
+
* @returns The number of inputs
|
|
541
|
+
*/
|
|
542
|
+
get inputCount() {
|
|
543
|
+
return this._wasm.input_count();
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* Get the number of outputs in the PSBT
|
|
547
|
+
* @returns The number of outputs
|
|
548
|
+
*/
|
|
549
|
+
get outputCount() {
|
|
550
|
+
return this._wasm.output_count();
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Get all PSBT inputs as an array
|
|
554
|
+
*
|
|
555
|
+
* Returns raw PSBT input data including witness_utxo and derivation info.
|
|
556
|
+
* For parsed transaction data with address identification, use
|
|
557
|
+
* parseTransactionWithWalletKeys() instead.
|
|
558
|
+
*
|
|
559
|
+
* @returns Array of PsbtInputData objects
|
|
560
|
+
*/
|
|
561
|
+
getInputs() {
|
|
562
|
+
return this._wasm.get_inputs();
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Get all PSBT outputs as an array
|
|
566
|
+
*
|
|
567
|
+
* Returns raw PSBT output data without address resolution.
|
|
568
|
+
* For output data with addresses, use getOutputsWithAddress().
|
|
569
|
+
*
|
|
570
|
+
* @returns Array of PsbtOutputData objects
|
|
571
|
+
*/
|
|
572
|
+
getOutputs() {
|
|
573
|
+
return this._wasm.get_outputs();
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* Get all PSBT outputs with resolved address strings
|
|
577
|
+
*
|
|
578
|
+
* Unlike the generic Psbt class which requires a coin parameter,
|
|
579
|
+
* BitGoPsbt automatically uses the network it was created with to resolve addresses.
|
|
580
|
+
*
|
|
581
|
+
* @returns Array of PsbtOutputDataWithAddress objects
|
|
582
|
+
*
|
|
583
|
+
* @example
|
|
584
|
+
* ```typescript
|
|
585
|
+
* const outputs = psbt.getOutputsWithAddress();
|
|
586
|
+
* for (const output of outputs) {
|
|
587
|
+
* console.log(`${output.address}: ${output.value} satoshis`);
|
|
588
|
+
* }
|
|
589
|
+
* ```
|
|
590
|
+
*/
|
|
591
|
+
getOutputsWithAddress() {
|
|
592
|
+
return this._wasm.get_outputs_with_address();
|
|
593
|
+
}
|
|
538
594
|
}
|
|
539
595
|
exports.BitGoPsbt = BitGoPsbt;
|
|
@@ -7,6 +7,7 @@ export { outputScriptTypes, inputScriptTypes, type OutputScriptType, type InputS
|
|
|
7
7
|
export { ChainCode, chainCodes, assertChainCode, type Scope } from "./chains.js";
|
|
8
8
|
export { BitGoPsbt, type NetworkName, type ScriptId, type ParsedInput, type ParsedOutput, type ParsedTransaction, type SignPath, type CreateEmptyOptions, type AddInputOptions, type AddOutputOptions, type AddWalletInputOptions, type AddWalletOutputOptions, } from "./BitGoPsbt.js";
|
|
9
9
|
export { ZcashBitGoPsbt, type ZcashNetworkName, type CreateEmptyZcashOptions, } from "./ZcashBitGoPsbt.js";
|
|
10
|
+
export type { PsbtBip32Derivation, PsbtInputData, PsbtOutputData, PsbtOutputDataWithAddress, PsbtWitnessUtxo, } from "../wasm/wasm_utxo.js";
|
|
10
11
|
import type { ScriptType } from "./scriptType.js";
|
|
11
12
|
/**
|
|
12
13
|
* Check if a network supports a given fixed-script wallet script type
|
package/dist/cjs/js/index.d.ts
CHANGED
|
@@ -91,4 +91,4 @@ export { WrapDescriptor as Descriptor } from "./wasm/wasm_utxo.js";
|
|
|
91
91
|
export { WrapMiniscript as Miniscript } from "./wasm/wasm_utxo.js";
|
|
92
92
|
export { WrapPsbt as Psbt } from "./wasm/wasm_utxo.js";
|
|
93
93
|
export { DashTransaction, Transaction, ZcashTransaction } from "./transaction.js";
|
|
94
|
-
export { hasPsbtMagic } from "./psbt.js";
|
|
94
|
+
export { hasPsbtMagic, type IPsbtIntrospection, type IPsbtIntrospectionWithAddress, } from "./psbt.js";
|
package/dist/cjs/js/psbt.d.ts
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
import type { PsbtInputData, PsbtOutputData, PsbtOutputDataWithAddress } from "./wasm/wasm_utxo.js";
|
|
2
|
+
/** Common interface for PSBT introspection methods */
|
|
3
|
+
export interface IPsbtIntrospection {
|
|
4
|
+
readonly inputCount: number;
|
|
5
|
+
readonly outputCount: number;
|
|
6
|
+
getInputs(): PsbtInputData[];
|
|
7
|
+
getOutputs(): PsbtOutputData[];
|
|
8
|
+
}
|
|
9
|
+
/** Extended introspection with address resolution (no coin parameter needed) */
|
|
10
|
+
export interface IPsbtIntrospectionWithAddress extends IPsbtIntrospection {
|
|
11
|
+
getOutputsWithAddress(): PsbtOutputDataWithAddress[];
|
|
12
|
+
}
|
|
1
13
|
/**
|
|
2
14
|
* Check if a byte array has the PSBT magic bytes
|
|
3
15
|
*
|
|
@@ -384,6 +384,13 @@ export class BitGoPsbt {
|
|
|
384
384
|
* generated for security. Custom session_id is only allowed on testnets for testing purposes.
|
|
385
385
|
*/
|
|
386
386
|
generate_musig2_nonces(xpriv: WasmBIP32, session_id_bytes?: Uint8Array | null): void;
|
|
387
|
+
/**
|
|
388
|
+
* Get all PSBT inputs as an array of PsbtInputData
|
|
389
|
+
*
|
|
390
|
+
* Returns an array with witness_utxo, bip32_derivation, and tap_bip32_derivation
|
|
391
|
+
* for each input.
|
|
392
|
+
*/
|
|
393
|
+
get_inputs(): any;
|
|
387
394
|
/**
|
|
388
395
|
* Get the network type for transaction extraction
|
|
389
396
|
*
|
|
@@ -391,6 +398,24 @@ export class BitGoPsbt {
|
|
|
391
398
|
* wrapper class should be used in TypeScript.
|
|
392
399
|
*/
|
|
393
400
|
get_network_type(): string;
|
|
401
|
+
/**
|
|
402
|
+
* Get all PSBT outputs as an array of PsbtOutputData
|
|
403
|
+
*
|
|
404
|
+
* Returns an array with script, value, bip32_derivation, and tap_bip32_derivation
|
|
405
|
+
* for each output.
|
|
406
|
+
*/
|
|
407
|
+
get_outputs(): any;
|
|
408
|
+
/**
|
|
409
|
+
* Get all PSBT outputs with resolved address strings.
|
|
410
|
+
*
|
|
411
|
+
* Unlike the generic WrapPsbt which requires a coin parameter, BitGoPsbt
|
|
412
|
+
* uses the network it was created/deserialized with to resolve addresses.
|
|
413
|
+
*/
|
|
414
|
+
get_outputs_with_address(): any;
|
|
415
|
+
/**
|
|
416
|
+
* Get the number of inputs in the PSBT
|
|
417
|
+
*/
|
|
418
|
+
input_count(): number;
|
|
394
419
|
/**
|
|
395
420
|
* Check if an input is a MuSig2 keypath input.
|
|
396
421
|
*
|
|
@@ -413,6 +438,10 @@ export class BitGoPsbt {
|
|
|
413
438
|
* Get the network of the PSBT
|
|
414
439
|
*/
|
|
415
440
|
network(): string;
|
|
441
|
+
/**
|
|
442
|
+
* Get the number of outputs in the PSBT
|
|
443
|
+
*/
|
|
444
|
+
output_count(): number;
|
|
416
445
|
/**
|
|
417
446
|
* Parse outputs with wallet keys to identify which outputs belong to a wallet
|
|
418
447
|
*
|
|
@@ -1015,6 +1015,28 @@ class BitGoPsbt {
|
|
|
1015
1015
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
|
+
/**
|
|
1019
|
+
* Get all PSBT inputs as an array of PsbtInputData
|
|
1020
|
+
*
|
|
1021
|
+
* Returns an array with witness_utxo, bip32_derivation, and tap_bip32_derivation
|
|
1022
|
+
* for each input.
|
|
1023
|
+
* @returns {any}
|
|
1024
|
+
*/
|
|
1025
|
+
get_inputs() {
|
|
1026
|
+
try {
|
|
1027
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1028
|
+
wasm.bitgopsbt_get_inputs(retptr, this.__wbg_ptr);
|
|
1029
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1030
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1031
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1032
|
+
if (r2) {
|
|
1033
|
+
throw takeObject(r1);
|
|
1034
|
+
}
|
|
1035
|
+
return takeObject(r0);
|
|
1036
|
+
} finally {
|
|
1037
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1018
1040
|
/**
|
|
1019
1041
|
* Get the network type for transaction extraction
|
|
1020
1042
|
*
|
|
@@ -1038,6 +1060,58 @@ class BitGoPsbt {
|
|
|
1038
1060
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1039
1061
|
}
|
|
1040
1062
|
}
|
|
1063
|
+
/**
|
|
1064
|
+
* Get all PSBT outputs as an array of PsbtOutputData
|
|
1065
|
+
*
|
|
1066
|
+
* Returns an array with script, value, bip32_derivation, and tap_bip32_derivation
|
|
1067
|
+
* for each output.
|
|
1068
|
+
* @returns {any}
|
|
1069
|
+
*/
|
|
1070
|
+
get_outputs() {
|
|
1071
|
+
try {
|
|
1072
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1073
|
+
wasm.bitgopsbt_get_outputs(retptr, this.__wbg_ptr);
|
|
1074
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1075
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1076
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1077
|
+
if (r2) {
|
|
1078
|
+
throw takeObject(r1);
|
|
1079
|
+
}
|
|
1080
|
+
return takeObject(r0);
|
|
1081
|
+
} finally {
|
|
1082
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Get all PSBT outputs with resolved address strings.
|
|
1087
|
+
*
|
|
1088
|
+
* Unlike the generic WrapPsbt which requires a coin parameter, BitGoPsbt
|
|
1089
|
+
* uses the network it was created/deserialized with to resolve addresses.
|
|
1090
|
+
* @returns {any}
|
|
1091
|
+
*/
|
|
1092
|
+
get_outputs_with_address() {
|
|
1093
|
+
try {
|
|
1094
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1095
|
+
wasm.bitgopsbt_get_outputs_with_address(retptr, this.__wbg_ptr);
|
|
1096
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1097
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1098
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1099
|
+
if (r2) {
|
|
1100
|
+
throw takeObject(r1);
|
|
1101
|
+
}
|
|
1102
|
+
return takeObject(r0);
|
|
1103
|
+
} finally {
|
|
1104
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
/**
|
|
1108
|
+
* Get the number of inputs in the PSBT
|
|
1109
|
+
* @returns {number}
|
|
1110
|
+
*/
|
|
1111
|
+
input_count() {
|
|
1112
|
+
const ret = wasm.bitgopsbt_input_count(this.__wbg_ptr);
|
|
1113
|
+
return ret >>> 0;
|
|
1114
|
+
}
|
|
1041
1115
|
/**
|
|
1042
1116
|
* Check if an input is a MuSig2 keypath input.
|
|
1043
1117
|
*
|
|
@@ -1085,6 +1159,14 @@ class BitGoPsbt {
|
|
|
1085
1159
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1086
1160
|
}
|
|
1087
1161
|
}
|
|
1162
|
+
/**
|
|
1163
|
+
* Get the number of outputs in the PSBT
|
|
1164
|
+
* @returns {number}
|
|
1165
|
+
*/
|
|
1166
|
+
output_count() {
|
|
1167
|
+
const ret = wasm.bitgopsbt_output_count(this.__wbg_ptr);
|
|
1168
|
+
return ret >>> 0;
|
|
1169
|
+
}
|
|
1088
1170
|
/**
|
|
1089
1171
|
* Parse outputs with wallet keys to identify which outputs belong to a wallet
|
|
1090
1172
|
*
|
|
Binary file
|
|
@@ -1,91 +1,27 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
7
|
-
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
8
|
-
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
9
|
-
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
10
|
-
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
11
|
-
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
12
|
-
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
13
|
-
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
14
|
-
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
15
|
-
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
16
|
-
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
17
|
-
export const wasmecpair_private_key: (a: number) => number;
|
|
18
|
-
export const wasmecpair_public_key: (a: number) => number;
|
|
19
|
-
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
20
|
-
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
21
|
-
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
22
|
-
export const wrappsbt_addInput: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
|
|
23
|
-
export const wrappsbt_addOutput: (a: number, b: number, c: number, d: bigint) => number;
|
|
24
|
-
export const wrappsbt_clone: (a: number) => number;
|
|
25
|
-
export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
|
|
26
|
-
export const wrappsbt_extractTransaction: (a: number, b: number) => void;
|
|
27
|
-
export const wrappsbt_finalize: (a: number, b: number) => void;
|
|
28
|
-
export const wrappsbt_getInputs: (a: number, b: number) => void;
|
|
29
|
-
export const wrappsbt_getOutputs: (a: number, b: number) => void;
|
|
30
|
-
export const wrappsbt_getOutputsWithAddress: (a: number, b: number, c: number, d: number) => void;
|
|
31
|
-
export const wrappsbt_getPartialSignatures: (a: number, b: number, c: number) => void;
|
|
32
|
-
export const wrappsbt_getUnsignedTx: (a: number, b: number) => void;
|
|
33
|
-
export const wrappsbt_hasPartialSignatures: (a: number, b: number, c: number) => void;
|
|
34
|
-
export const wrappsbt_inputCount: (a: number) => number;
|
|
35
|
-
export const wrappsbt_lockTime: (a: number) => number;
|
|
36
|
-
export const wrappsbt_new: (a: number, b: number) => number;
|
|
37
|
-
export const wrappsbt_outputCount: (a: number) => number;
|
|
38
|
-
export const wrappsbt_serialize: (a: number, b: number) => void;
|
|
39
|
-
export const wrappsbt_signAll: (a: number, b: number, c: number) => void;
|
|
40
|
-
export const wrappsbt_signAllWithEcpair: (a: number, b: number, c: number) => void;
|
|
41
|
-
export const wrappsbt_signWithPrv: (a: number, b: number, c: number, d: number) => void;
|
|
42
|
-
export const wrappsbt_signWithXprv: (a: number, b: number, c: number, d: number) => void;
|
|
43
|
-
export const wrappsbt_unsignedTxId: (a: number, b: number) => void;
|
|
44
|
-
export const wrappsbt_updateInputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
45
|
-
export const wrappsbt_updateOutputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
46
|
-
export const wrappsbt_validateSignatureAtInput: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
47
|
-
export const wrappsbt_verifySignatureWithKey: (a: number, b: number, c: number, d: number) => void;
|
|
48
|
-
export const wrappsbt_version: (a: number) => number;
|
|
49
|
-
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
50
|
-
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
51
|
-
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
52
|
-
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
53
|
-
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
54
|
-
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
55
|
-
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
56
|
-
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
57
|
-
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
58
|
-
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;
|
|
59
|
-
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
60
|
-
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
4
|
+
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
5
|
+
export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
61
6
|
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
62
7
|
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
63
|
-
export const
|
|
64
|
-
export const
|
|
65
|
-
export const
|
|
66
|
-
export const
|
|
67
|
-
export const
|
|
68
|
-
export const
|
|
69
|
-
export const
|
|
70
|
-
export const
|
|
71
|
-
export const
|
|
72
|
-
export const
|
|
73
|
-
export const
|
|
74
|
-
export const
|
|
75
|
-
export const
|
|
76
|
-
export const
|
|
77
|
-
export const
|
|
78
|
-
export const
|
|
79
|
-
export const
|
|
80
|
-
export const wasmbip32_identifier: (a: number) => number;
|
|
81
|
-
export const wasmbip32_index: (a: number) => number;
|
|
82
|
-
export const wasmbip32_is_neutered: (a: number) => number;
|
|
83
|
-
export const wasmbip32_neutered: (a: number) => number;
|
|
84
|
-
export const wasmbip32_parent_fingerprint: (a: number) => number;
|
|
85
|
-
export const wasmbip32_private_key: (a: number) => number;
|
|
86
|
-
export const wasmbip32_public_key: (a: number) => number;
|
|
87
|
-
export const wasmbip32_to_base58: (a: number, b: number) => void;
|
|
88
|
-
export const wasmbip32_to_wif: (a: number, b: number) => void;
|
|
8
|
+
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
9
|
+
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
10
|
+
export const wasmdimensions_empty: () => number;
|
|
11
|
+
export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
12
|
+
export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
|
|
13
|
+
export const wasmdimensions_from_output_script_length: (a: number) => number;
|
|
14
|
+
export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
|
|
15
|
+
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
16
|
+
export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
|
|
17
|
+
export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
|
|
18
|
+
export const wasmdimensions_get_output_vsize: (a: number) => number;
|
|
19
|
+
export const wasmdimensions_get_output_weight: (a: number) => number;
|
|
20
|
+
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
21
|
+
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
22
|
+
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
23
|
+
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
24
|
+
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
89
25
|
export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
90
26
|
export const wasmtransaction_get_txid: (a: number, b: number) => void;
|
|
91
27
|
export const wasmtransaction_get_vsize: (a: number) => number;
|
|
@@ -93,30 +29,22 @@ export const wasmtransaction_to_bytes: (a: number, b: number) => void;
|
|
|
93
29
|
export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
94
30
|
export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
|
|
95
31
|
export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
|
|
96
|
-
export const
|
|
97
|
-
export const
|
|
98
|
-
export const
|
|
99
|
-
export const
|
|
100
|
-
export const
|
|
101
|
-
export const
|
|
102
|
-
export const
|
|
103
|
-
export const
|
|
104
|
-
export const
|
|
105
|
-
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
106
|
-
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
107
|
-
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
108
|
-
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
109
|
-
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
110
|
-
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
111
|
-
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
112
|
-
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
113
|
-
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
32
|
+
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
33
|
+
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
34
|
+
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
35
|
+
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
36
|
+
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
37
|
+
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
38
|
+
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
39
|
+
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
40
|
+
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;
|
|
114
41
|
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
115
42
|
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
116
43
|
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
117
|
-
export const
|
|
44
|
+
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
45
|
+
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
118
46
|
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
119
|
-
export const
|
|
47
|
+
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
120
48
|
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;
|
|
121
49
|
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;
|
|
122
50
|
export const bip322namespace_verify_bip322_psbt_input_with_pubkeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
@@ -142,10 +70,15 @@ export const bitgopsbt_extract_zcash_transaction: (a: number, b: number) => void
|
|
|
142
70
|
export const bitgopsbt_finalize_all_inputs: (a: number, b: number) => void;
|
|
143
71
|
export const bitgopsbt_from_bytes: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
144
72
|
export const bitgopsbt_generate_musig2_nonces: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
73
|
+
export const bitgopsbt_get_inputs: (a: number, b: number) => void;
|
|
145
74
|
export const bitgopsbt_get_network_type: (a: number, b: number) => void;
|
|
75
|
+
export const bitgopsbt_get_outputs: (a: number, b: number) => void;
|
|
76
|
+
export const bitgopsbt_get_outputs_with_address: (a: number, b: number) => void;
|
|
77
|
+
export const bitgopsbt_input_count: (a: number) => number;
|
|
146
78
|
export const bitgopsbt_is_musig2_input: (a: number, b: number) => number;
|
|
147
79
|
export const bitgopsbt_lock_time: (a: number) => number;
|
|
148
80
|
export const bitgopsbt_network: (a: number, b: number) => void;
|
|
81
|
+
export const bitgopsbt_output_count: (a: number) => number;
|
|
149
82
|
export const bitgopsbt_parse_outputs_with_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
150
83
|
export const bitgopsbt_parse_transaction_with_wallet_keys: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
151
84
|
export const bitgopsbt_serialize: (a: number, b: number) => void;
|
|
@@ -170,29 +103,101 @@ export const fixedscriptwalletnamespace_create_op_return_script: (a: number, b:
|
|
|
170
103
|
export const fixedscriptwalletnamespace_output_script: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
171
104
|
export const fixedscriptwalletnamespace_output_script_with_network_str: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
172
105
|
export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
173
|
-
export const
|
|
174
|
-
export const
|
|
106
|
+
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
107
|
+
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;
|
|
108
|
+
export const wasmbip32_chain_code: (a: number) => number;
|
|
109
|
+
export const wasmbip32_depth: (a: number) => number;
|
|
110
|
+
export const wasmbip32_derive: (a: number, b: number, c: number) => void;
|
|
111
|
+
export const wasmbip32_derive_hardened: (a: number, b: number, c: number) => void;
|
|
112
|
+
export const wasmbip32_derive_path: (a: number, b: number, c: number, d: number) => void;
|
|
113
|
+
export const wasmbip32_equals: (a: number, b: number) => number;
|
|
114
|
+
export const wasmbip32_fingerprint: (a: number) => number;
|
|
115
|
+
export const wasmbip32_from_base58: (a: number, b: number, c: number) => void;
|
|
116
|
+
export const wasmbip32_from_bip32_interface: (a: number, b: number) => void;
|
|
117
|
+
export const wasmbip32_from_seed: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
118
|
+
export const wasmbip32_from_seed_sha256: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
119
|
+
export const wasmbip32_from_xprv: (a: number, b: number, c: number) => void;
|
|
120
|
+
export const wasmbip32_from_xpub: (a: number, b: number, c: number) => void;
|
|
121
|
+
export const wasmbip32_identifier: (a: number) => number;
|
|
122
|
+
export const wasmbip32_index: (a: number) => number;
|
|
123
|
+
export const wasmbip32_is_neutered: (a: number) => number;
|
|
124
|
+
export const wasmbip32_neutered: (a: number) => number;
|
|
125
|
+
export const wasmbip32_parent_fingerprint: (a: number) => number;
|
|
126
|
+
export const wasmbip32_private_key: (a: number) => number;
|
|
127
|
+
export const wasmbip32_public_key: (a: number) => number;
|
|
128
|
+
export const wasmbip32_to_base58: (a: number, b: number) => void;
|
|
129
|
+
export const wasmbip32_to_wif: (a: number, b: number) => void;
|
|
175
130
|
export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
176
131
|
export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
|
|
177
132
|
export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
|
|
178
|
-
export const
|
|
179
|
-
export const
|
|
180
|
-
export const
|
|
181
|
-
export const
|
|
182
|
-
export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
|
|
183
|
-
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
184
|
-
export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
|
|
185
|
-
export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
|
|
186
|
-
export const wasmdimensions_get_output_vsize: (a: number) => number;
|
|
187
|
-
export const wasmdimensions_get_output_weight: (a: number) => number;
|
|
188
|
-
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
189
|
-
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
190
|
-
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
191
|
-
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
192
|
-
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
133
|
+
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
134
|
+
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
135
|
+
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
136
|
+
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
193
137
|
export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
|
|
194
138
|
export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
|
|
195
139
|
export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
140
|
+
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
141
|
+
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
142
|
+
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
143
|
+
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
144
|
+
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
145
|
+
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
146
|
+
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
147
|
+
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
148
|
+
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
149
|
+
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
150
|
+
export const wasmecpair_private_key: (a: number) => number;
|
|
151
|
+
export const wasmecpair_public_key: (a: number) => number;
|
|
152
|
+
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
153
|
+
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
154
|
+
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
155
|
+
export const wrappsbt_addInput: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
|
|
156
|
+
export const wrappsbt_addOutput: (a: number, b: number, c: number, d: bigint) => number;
|
|
157
|
+
export const wrappsbt_clone: (a: number) => number;
|
|
158
|
+
export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
|
|
159
|
+
export const wrappsbt_extractTransaction: (a: number, b: number) => void;
|
|
160
|
+
export const wrappsbt_finalize: (a: number, b: number) => void;
|
|
161
|
+
export const wrappsbt_getInputs: (a: number, b: number) => void;
|
|
162
|
+
export const wrappsbt_getOutputs: (a: number, b: number) => void;
|
|
163
|
+
export const wrappsbt_getOutputsWithAddress: (a: number, b: number, c: number, d: number) => void;
|
|
164
|
+
export const wrappsbt_getPartialSignatures: (a: number, b: number, c: number) => void;
|
|
165
|
+
export const wrappsbt_getUnsignedTx: (a: number, b: number) => void;
|
|
166
|
+
export const wrappsbt_hasPartialSignatures: (a: number, b: number, c: number) => void;
|
|
167
|
+
export const wrappsbt_inputCount: (a: number) => number;
|
|
168
|
+
export const wrappsbt_lockTime: (a: number) => number;
|
|
169
|
+
export const wrappsbt_new: (a: number, b: number) => number;
|
|
170
|
+
export const wrappsbt_outputCount: (a: number) => number;
|
|
171
|
+
export const wrappsbt_serialize: (a: number, b: number) => void;
|
|
172
|
+
export const wrappsbt_signAll: (a: number, b: number, c: number) => void;
|
|
173
|
+
export const wrappsbt_signAllWithEcpair: (a: number, b: number, c: number) => void;
|
|
174
|
+
export const wrappsbt_signWithPrv: (a: number, b: number, c: number, d: number) => void;
|
|
175
|
+
export const wrappsbt_signWithXprv: (a: number, b: number, c: number, d: number) => void;
|
|
176
|
+
export const wrappsbt_unsignedTxId: (a: number, b: number) => void;
|
|
177
|
+
export const wrappsbt_updateInputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
178
|
+
export const wrappsbt_updateOutputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
179
|
+
export const wrappsbt_validateSignatureAtInput: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
180
|
+
export const wrappsbt_verifySignatureWithKey: (a: number, b: number, c: number, d: number) => void;
|
|
181
|
+
export const wrappsbt_version: (a: number) => number;
|
|
182
|
+
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
183
|
+
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
184
|
+
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
185
|
+
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
186
|
+
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
187
|
+
export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
188
|
+
export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
|
|
189
|
+
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
190
|
+
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
191
|
+
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
192
|
+
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
193
|
+
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
194
|
+
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
195
|
+
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
196
|
+
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
197
|
+
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
198
|
+
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
199
|
+
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
200
|
+
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
196
201
|
export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
197
202
|
export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
198
203
|
export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { BitGoPsbt as WasmBitGoPsbt } from "../wasm/wasm_utxo.js";
|
|
1
|
+
import { BitGoPsbt as WasmBitGoPsbt, type PsbtInputData, type PsbtOutputData, type PsbtOutputDataWithAddress } from "../wasm/wasm_utxo.js";
|
|
2
|
+
import type { IPsbtIntrospectionWithAddress } from "../psbt.js";
|
|
2
3
|
import { type WalletKeysArg } from "./RootWalletKeys.js";
|
|
3
4
|
import { type ReplayProtectionArg } from "./ReplayProtection.js";
|
|
4
5
|
import { type BIP32Arg } from "../bip32.js";
|
|
@@ -90,7 +91,7 @@ export type AddWalletOutputOptions = {
|
|
|
90
91
|
/** Value in satoshis */
|
|
91
92
|
value: bigint;
|
|
92
93
|
};
|
|
93
|
-
export declare class BitGoPsbt {
|
|
94
|
+
export declare class BitGoPsbt implements IPsbtIntrospectionWithAddress {
|
|
94
95
|
protected _wasm: WasmBitGoPsbt;
|
|
95
96
|
protected constructor(_wasm: WasmBitGoPsbt);
|
|
96
97
|
/**
|
|
@@ -570,4 +571,50 @@ export declare class BitGoPsbt {
|
|
|
570
571
|
* ```
|
|
571
572
|
*/
|
|
572
573
|
getHalfSignedLegacyFormat(): Uint8Array;
|
|
574
|
+
/**
|
|
575
|
+
* Get the number of inputs in the PSBT
|
|
576
|
+
* @returns The number of inputs
|
|
577
|
+
*/
|
|
578
|
+
get inputCount(): number;
|
|
579
|
+
/**
|
|
580
|
+
* Get the number of outputs in the PSBT
|
|
581
|
+
* @returns The number of outputs
|
|
582
|
+
*/
|
|
583
|
+
get outputCount(): number;
|
|
584
|
+
/**
|
|
585
|
+
* Get all PSBT inputs as an array
|
|
586
|
+
*
|
|
587
|
+
* Returns raw PSBT input data including witness_utxo and derivation info.
|
|
588
|
+
* For parsed transaction data with address identification, use
|
|
589
|
+
* parseTransactionWithWalletKeys() instead.
|
|
590
|
+
*
|
|
591
|
+
* @returns Array of PsbtInputData objects
|
|
592
|
+
*/
|
|
593
|
+
getInputs(): PsbtInputData[];
|
|
594
|
+
/**
|
|
595
|
+
* Get all PSBT outputs as an array
|
|
596
|
+
*
|
|
597
|
+
* Returns raw PSBT output data without address resolution.
|
|
598
|
+
* For output data with addresses, use getOutputsWithAddress().
|
|
599
|
+
*
|
|
600
|
+
* @returns Array of PsbtOutputData objects
|
|
601
|
+
*/
|
|
602
|
+
getOutputs(): PsbtOutputData[];
|
|
603
|
+
/**
|
|
604
|
+
* Get all PSBT outputs with resolved address strings
|
|
605
|
+
*
|
|
606
|
+
* Unlike the generic Psbt class which requires a coin parameter,
|
|
607
|
+
* BitGoPsbt automatically uses the network it was created with to resolve addresses.
|
|
608
|
+
*
|
|
609
|
+
* @returns Array of PsbtOutputDataWithAddress objects
|
|
610
|
+
*
|
|
611
|
+
* @example
|
|
612
|
+
* ```typescript
|
|
613
|
+
* const outputs = psbt.getOutputsWithAddress();
|
|
614
|
+
* for (const output of outputs) {
|
|
615
|
+
* console.log(`${output.address}: ${output.value} satoshis`);
|
|
616
|
+
* }
|
|
617
|
+
* ```
|
|
618
|
+
*/
|
|
619
|
+
getOutputsWithAddress(): PsbtOutputDataWithAddress[];
|
|
573
620
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BitGoPsbt as WasmBitGoPsbt } from "../wasm/wasm_utxo.js";
|
|
1
|
+
import { BitGoPsbt as WasmBitGoPsbt, } from "../wasm/wasm_utxo.js";
|
|
2
2
|
import { RootWalletKeys } from "./RootWalletKeys.js";
|
|
3
3
|
import { ReplayProtection } from "./ReplayProtection.js";
|
|
4
4
|
import { BIP32, isBIP32Arg } from "../bip32.js";
|
|
@@ -532,4 +532,60 @@ export class BitGoPsbt {
|
|
|
532
532
|
getHalfSignedLegacyFormat() {
|
|
533
533
|
return this._wasm.extract_half_signed_legacy_tx();
|
|
534
534
|
}
|
|
535
|
+
/**
|
|
536
|
+
* Get the number of inputs in the PSBT
|
|
537
|
+
* @returns The number of inputs
|
|
538
|
+
*/
|
|
539
|
+
get inputCount() {
|
|
540
|
+
return this._wasm.input_count();
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Get the number of outputs in the PSBT
|
|
544
|
+
* @returns The number of outputs
|
|
545
|
+
*/
|
|
546
|
+
get outputCount() {
|
|
547
|
+
return this._wasm.output_count();
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* Get all PSBT inputs as an array
|
|
551
|
+
*
|
|
552
|
+
* Returns raw PSBT input data including witness_utxo and derivation info.
|
|
553
|
+
* For parsed transaction data with address identification, use
|
|
554
|
+
* parseTransactionWithWalletKeys() instead.
|
|
555
|
+
*
|
|
556
|
+
* @returns Array of PsbtInputData objects
|
|
557
|
+
*/
|
|
558
|
+
getInputs() {
|
|
559
|
+
return this._wasm.get_inputs();
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Get all PSBT outputs as an array
|
|
563
|
+
*
|
|
564
|
+
* Returns raw PSBT output data without address resolution.
|
|
565
|
+
* For output data with addresses, use getOutputsWithAddress().
|
|
566
|
+
*
|
|
567
|
+
* @returns Array of PsbtOutputData objects
|
|
568
|
+
*/
|
|
569
|
+
getOutputs() {
|
|
570
|
+
return this._wasm.get_outputs();
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* Get all PSBT outputs with resolved address strings
|
|
574
|
+
*
|
|
575
|
+
* Unlike the generic Psbt class which requires a coin parameter,
|
|
576
|
+
* BitGoPsbt automatically uses the network it was created with to resolve addresses.
|
|
577
|
+
*
|
|
578
|
+
* @returns Array of PsbtOutputDataWithAddress objects
|
|
579
|
+
*
|
|
580
|
+
* @example
|
|
581
|
+
* ```typescript
|
|
582
|
+
* const outputs = psbt.getOutputsWithAddress();
|
|
583
|
+
* for (const output of outputs) {
|
|
584
|
+
* console.log(`${output.address}: ${output.value} satoshis`);
|
|
585
|
+
* }
|
|
586
|
+
* ```
|
|
587
|
+
*/
|
|
588
|
+
getOutputsWithAddress() {
|
|
589
|
+
return this._wasm.get_outputs_with_address();
|
|
590
|
+
}
|
|
535
591
|
}
|
|
@@ -7,6 +7,7 @@ export { outputScriptTypes, inputScriptTypes, type OutputScriptType, type InputS
|
|
|
7
7
|
export { ChainCode, chainCodes, assertChainCode, type Scope } from "./chains.js";
|
|
8
8
|
export { BitGoPsbt, type NetworkName, type ScriptId, type ParsedInput, type ParsedOutput, type ParsedTransaction, type SignPath, type CreateEmptyOptions, type AddInputOptions, type AddOutputOptions, type AddWalletInputOptions, type AddWalletOutputOptions, } from "./BitGoPsbt.js";
|
|
9
9
|
export { ZcashBitGoPsbt, type ZcashNetworkName, type CreateEmptyZcashOptions, } from "./ZcashBitGoPsbt.js";
|
|
10
|
+
export type { PsbtBip32Derivation, PsbtInputData, PsbtOutputData, PsbtOutputDataWithAddress, PsbtWitnessUtxo, } from "../wasm/wasm_utxo.js";
|
|
10
11
|
import type { ScriptType } from "./scriptType.js";
|
|
11
12
|
/**
|
|
12
13
|
* Check if a network supports a given fixed-script wallet script type
|
package/dist/esm/js/index.d.ts
CHANGED
|
@@ -91,4 +91,4 @@ export { WrapDescriptor as Descriptor } from "./wasm/wasm_utxo.js";
|
|
|
91
91
|
export { WrapMiniscript as Miniscript } from "./wasm/wasm_utxo.js";
|
|
92
92
|
export { WrapPsbt as Psbt } from "./wasm/wasm_utxo.js";
|
|
93
93
|
export { DashTransaction, Transaction, ZcashTransaction } from "./transaction.js";
|
|
94
|
-
export { hasPsbtMagic } from "./psbt.js";
|
|
94
|
+
export { hasPsbtMagic, type IPsbtIntrospection, type IPsbtIntrospectionWithAddress, } from "./psbt.js";
|
package/dist/esm/js/index.js
CHANGED
|
@@ -23,4 +23,4 @@ export { WrapDescriptor as Descriptor } from "./wasm/wasm_utxo.js";
|
|
|
23
23
|
export { WrapMiniscript as Miniscript } from "./wasm/wasm_utxo.js";
|
|
24
24
|
export { WrapPsbt as Psbt } from "./wasm/wasm_utxo.js";
|
|
25
25
|
export { DashTransaction, Transaction, ZcashTransaction } from "./transaction.js";
|
|
26
|
-
export { hasPsbtMagic } from "./psbt.js";
|
|
26
|
+
export { hasPsbtMagic, } from "./psbt.js";
|
package/dist/esm/js/psbt.d.ts
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
import type { PsbtInputData, PsbtOutputData, PsbtOutputDataWithAddress } from "./wasm/wasm_utxo.js";
|
|
2
|
+
/** Common interface for PSBT introspection methods */
|
|
3
|
+
export interface IPsbtIntrospection {
|
|
4
|
+
readonly inputCount: number;
|
|
5
|
+
readonly outputCount: number;
|
|
6
|
+
getInputs(): PsbtInputData[];
|
|
7
|
+
getOutputs(): PsbtOutputData[];
|
|
8
|
+
}
|
|
9
|
+
/** Extended introspection with address resolution (no coin parameter needed) */
|
|
10
|
+
export interface IPsbtIntrospectionWithAddress extends IPsbtIntrospection {
|
|
11
|
+
getOutputsWithAddress(): PsbtOutputDataWithAddress[];
|
|
12
|
+
}
|
|
1
13
|
/**
|
|
2
14
|
* Check if a byte array has the PSBT magic bytes
|
|
3
15
|
*
|
|
@@ -384,6 +384,13 @@ export class BitGoPsbt {
|
|
|
384
384
|
* generated for security. Custom session_id is only allowed on testnets for testing purposes.
|
|
385
385
|
*/
|
|
386
386
|
generate_musig2_nonces(xpriv: WasmBIP32, session_id_bytes?: Uint8Array | null): void;
|
|
387
|
+
/**
|
|
388
|
+
* Get all PSBT inputs as an array of PsbtInputData
|
|
389
|
+
*
|
|
390
|
+
* Returns an array with witness_utxo, bip32_derivation, and tap_bip32_derivation
|
|
391
|
+
* for each input.
|
|
392
|
+
*/
|
|
393
|
+
get_inputs(): any;
|
|
387
394
|
/**
|
|
388
395
|
* Get the network type for transaction extraction
|
|
389
396
|
*
|
|
@@ -391,6 +398,24 @@ export class BitGoPsbt {
|
|
|
391
398
|
* wrapper class should be used in TypeScript.
|
|
392
399
|
*/
|
|
393
400
|
get_network_type(): string;
|
|
401
|
+
/**
|
|
402
|
+
* Get all PSBT outputs as an array of PsbtOutputData
|
|
403
|
+
*
|
|
404
|
+
* Returns an array with script, value, bip32_derivation, and tap_bip32_derivation
|
|
405
|
+
* for each output.
|
|
406
|
+
*/
|
|
407
|
+
get_outputs(): any;
|
|
408
|
+
/**
|
|
409
|
+
* Get all PSBT outputs with resolved address strings.
|
|
410
|
+
*
|
|
411
|
+
* Unlike the generic WrapPsbt which requires a coin parameter, BitGoPsbt
|
|
412
|
+
* uses the network it was created/deserialized with to resolve addresses.
|
|
413
|
+
*/
|
|
414
|
+
get_outputs_with_address(): any;
|
|
415
|
+
/**
|
|
416
|
+
* Get the number of inputs in the PSBT
|
|
417
|
+
*/
|
|
418
|
+
input_count(): number;
|
|
394
419
|
/**
|
|
395
420
|
* Check if an input is a MuSig2 keypath input.
|
|
396
421
|
*
|
|
@@ -413,6 +438,10 @@ export class BitGoPsbt {
|
|
|
413
438
|
* Get the network of the PSBT
|
|
414
439
|
*/
|
|
415
440
|
network(): string;
|
|
441
|
+
/**
|
|
442
|
+
* Get the number of outputs in the PSBT
|
|
443
|
+
*/
|
|
444
|
+
output_count(): number;
|
|
416
445
|
/**
|
|
417
446
|
* Parse outputs with wallet keys to identify which outputs belong to a wallet
|
|
418
447
|
*
|
|
@@ -1011,6 +1011,28 @@ export class BitGoPsbt {
|
|
|
1011
1011
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1012
1012
|
}
|
|
1013
1013
|
}
|
|
1014
|
+
/**
|
|
1015
|
+
* Get all PSBT inputs as an array of PsbtInputData
|
|
1016
|
+
*
|
|
1017
|
+
* Returns an array with witness_utxo, bip32_derivation, and tap_bip32_derivation
|
|
1018
|
+
* for each input.
|
|
1019
|
+
* @returns {any}
|
|
1020
|
+
*/
|
|
1021
|
+
get_inputs() {
|
|
1022
|
+
try {
|
|
1023
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1024
|
+
wasm.bitgopsbt_get_inputs(retptr, this.__wbg_ptr);
|
|
1025
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1026
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1027
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1028
|
+
if (r2) {
|
|
1029
|
+
throw takeObject(r1);
|
|
1030
|
+
}
|
|
1031
|
+
return takeObject(r0);
|
|
1032
|
+
} finally {
|
|
1033
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1014
1036
|
/**
|
|
1015
1037
|
* Get the network type for transaction extraction
|
|
1016
1038
|
*
|
|
@@ -1034,6 +1056,58 @@ export class BitGoPsbt {
|
|
|
1034
1056
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1035
1057
|
}
|
|
1036
1058
|
}
|
|
1059
|
+
/**
|
|
1060
|
+
* Get all PSBT outputs as an array of PsbtOutputData
|
|
1061
|
+
*
|
|
1062
|
+
* Returns an array with script, value, bip32_derivation, and tap_bip32_derivation
|
|
1063
|
+
* for each output.
|
|
1064
|
+
* @returns {any}
|
|
1065
|
+
*/
|
|
1066
|
+
get_outputs() {
|
|
1067
|
+
try {
|
|
1068
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1069
|
+
wasm.bitgopsbt_get_outputs(retptr, this.__wbg_ptr);
|
|
1070
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1071
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1072
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1073
|
+
if (r2) {
|
|
1074
|
+
throw takeObject(r1);
|
|
1075
|
+
}
|
|
1076
|
+
return takeObject(r0);
|
|
1077
|
+
} finally {
|
|
1078
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
/**
|
|
1082
|
+
* Get all PSBT outputs with resolved address strings.
|
|
1083
|
+
*
|
|
1084
|
+
* Unlike the generic WrapPsbt which requires a coin parameter, BitGoPsbt
|
|
1085
|
+
* uses the network it was created/deserialized with to resolve addresses.
|
|
1086
|
+
* @returns {any}
|
|
1087
|
+
*/
|
|
1088
|
+
get_outputs_with_address() {
|
|
1089
|
+
try {
|
|
1090
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1091
|
+
wasm.bitgopsbt_get_outputs_with_address(retptr, this.__wbg_ptr);
|
|
1092
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1093
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1094
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1095
|
+
if (r2) {
|
|
1096
|
+
throw takeObject(r1);
|
|
1097
|
+
}
|
|
1098
|
+
return takeObject(r0);
|
|
1099
|
+
} finally {
|
|
1100
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* Get the number of inputs in the PSBT
|
|
1105
|
+
* @returns {number}
|
|
1106
|
+
*/
|
|
1107
|
+
input_count() {
|
|
1108
|
+
const ret = wasm.bitgopsbt_input_count(this.__wbg_ptr);
|
|
1109
|
+
return ret >>> 0;
|
|
1110
|
+
}
|
|
1037
1111
|
/**
|
|
1038
1112
|
* Check if an input is a MuSig2 keypath input.
|
|
1039
1113
|
*
|
|
@@ -1081,6 +1155,14 @@ export class BitGoPsbt {
|
|
|
1081
1155
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1082
1156
|
}
|
|
1083
1157
|
}
|
|
1158
|
+
/**
|
|
1159
|
+
* Get the number of outputs in the PSBT
|
|
1160
|
+
* @returns {number}
|
|
1161
|
+
*/
|
|
1162
|
+
output_count() {
|
|
1163
|
+
const ret = wasm.bitgopsbt_output_count(this.__wbg_ptr);
|
|
1164
|
+
return ret >>> 0;
|
|
1165
|
+
}
|
|
1084
1166
|
/**
|
|
1085
1167
|
* Parse outputs with wallet keys to identify which outputs belong to a wallet
|
|
1086
1168
|
*
|
|
Binary file
|
|
@@ -1,91 +1,27 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
7
|
-
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
8
|
-
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
9
|
-
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
10
|
-
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
11
|
-
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
12
|
-
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
13
|
-
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
14
|
-
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
15
|
-
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
16
|
-
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
17
|
-
export const wasmecpair_private_key: (a: number) => number;
|
|
18
|
-
export const wasmecpair_public_key: (a: number) => number;
|
|
19
|
-
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
20
|
-
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
21
|
-
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
22
|
-
export const wrappsbt_addInput: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
|
|
23
|
-
export const wrappsbt_addOutput: (a: number, b: number, c: number, d: bigint) => number;
|
|
24
|
-
export const wrappsbt_clone: (a: number) => number;
|
|
25
|
-
export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
|
|
26
|
-
export const wrappsbt_extractTransaction: (a: number, b: number) => void;
|
|
27
|
-
export const wrappsbt_finalize: (a: number, b: number) => void;
|
|
28
|
-
export const wrappsbt_getInputs: (a: number, b: number) => void;
|
|
29
|
-
export const wrappsbt_getOutputs: (a: number, b: number) => void;
|
|
30
|
-
export const wrappsbt_getOutputsWithAddress: (a: number, b: number, c: number, d: number) => void;
|
|
31
|
-
export const wrappsbt_getPartialSignatures: (a: number, b: number, c: number) => void;
|
|
32
|
-
export const wrappsbt_getUnsignedTx: (a: number, b: number) => void;
|
|
33
|
-
export const wrappsbt_hasPartialSignatures: (a: number, b: number, c: number) => void;
|
|
34
|
-
export const wrappsbt_inputCount: (a: number) => number;
|
|
35
|
-
export const wrappsbt_lockTime: (a: number) => number;
|
|
36
|
-
export const wrappsbt_new: (a: number, b: number) => number;
|
|
37
|
-
export const wrappsbt_outputCount: (a: number) => number;
|
|
38
|
-
export const wrappsbt_serialize: (a: number, b: number) => void;
|
|
39
|
-
export const wrappsbt_signAll: (a: number, b: number, c: number) => void;
|
|
40
|
-
export const wrappsbt_signAllWithEcpair: (a: number, b: number, c: number) => void;
|
|
41
|
-
export const wrappsbt_signWithPrv: (a: number, b: number, c: number, d: number) => void;
|
|
42
|
-
export const wrappsbt_signWithXprv: (a: number, b: number, c: number, d: number) => void;
|
|
43
|
-
export const wrappsbt_unsignedTxId: (a: number, b: number) => void;
|
|
44
|
-
export const wrappsbt_updateInputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
45
|
-
export const wrappsbt_updateOutputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
46
|
-
export const wrappsbt_validateSignatureAtInput: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
47
|
-
export const wrappsbt_verifySignatureWithKey: (a: number, b: number, c: number, d: number) => void;
|
|
48
|
-
export const wrappsbt_version: (a: number) => number;
|
|
49
|
-
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
50
|
-
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
51
|
-
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
52
|
-
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
53
|
-
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
54
|
-
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
55
|
-
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
56
|
-
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
57
|
-
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
58
|
-
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;
|
|
59
|
-
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
60
|
-
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
4
|
+
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
5
|
+
export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
61
6
|
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
62
7
|
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
63
|
-
export const
|
|
64
|
-
export const
|
|
65
|
-
export const
|
|
66
|
-
export const
|
|
67
|
-
export const
|
|
68
|
-
export const
|
|
69
|
-
export const
|
|
70
|
-
export const
|
|
71
|
-
export const
|
|
72
|
-
export const
|
|
73
|
-
export const
|
|
74
|
-
export const
|
|
75
|
-
export const
|
|
76
|
-
export const
|
|
77
|
-
export const
|
|
78
|
-
export const
|
|
79
|
-
export const
|
|
80
|
-
export const wasmbip32_identifier: (a: number) => number;
|
|
81
|
-
export const wasmbip32_index: (a: number) => number;
|
|
82
|
-
export const wasmbip32_is_neutered: (a: number) => number;
|
|
83
|
-
export const wasmbip32_neutered: (a: number) => number;
|
|
84
|
-
export const wasmbip32_parent_fingerprint: (a: number) => number;
|
|
85
|
-
export const wasmbip32_private_key: (a: number) => number;
|
|
86
|
-
export const wasmbip32_public_key: (a: number) => number;
|
|
87
|
-
export const wasmbip32_to_base58: (a: number, b: number) => void;
|
|
88
|
-
export const wasmbip32_to_wif: (a: number, b: number) => void;
|
|
8
|
+
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
9
|
+
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
10
|
+
export const wasmdimensions_empty: () => number;
|
|
11
|
+
export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
12
|
+
export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
|
|
13
|
+
export const wasmdimensions_from_output_script_length: (a: number) => number;
|
|
14
|
+
export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
|
|
15
|
+
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
16
|
+
export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
|
|
17
|
+
export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
|
|
18
|
+
export const wasmdimensions_get_output_vsize: (a: number) => number;
|
|
19
|
+
export const wasmdimensions_get_output_weight: (a: number) => number;
|
|
20
|
+
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
21
|
+
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
22
|
+
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
23
|
+
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
24
|
+
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
89
25
|
export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
90
26
|
export const wasmtransaction_get_txid: (a: number, b: number) => void;
|
|
91
27
|
export const wasmtransaction_get_vsize: (a: number) => number;
|
|
@@ -93,30 +29,22 @@ export const wasmtransaction_to_bytes: (a: number, b: number) => void;
|
|
|
93
29
|
export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
94
30
|
export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
|
|
95
31
|
export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
|
|
96
|
-
export const
|
|
97
|
-
export const
|
|
98
|
-
export const
|
|
99
|
-
export const
|
|
100
|
-
export const
|
|
101
|
-
export const
|
|
102
|
-
export const
|
|
103
|
-
export const
|
|
104
|
-
export const
|
|
105
|
-
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
106
|
-
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
107
|
-
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
108
|
-
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
109
|
-
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
110
|
-
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
111
|
-
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
112
|
-
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
113
|
-
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
32
|
+
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
33
|
+
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
34
|
+
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
35
|
+
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
36
|
+
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
37
|
+
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
38
|
+
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
39
|
+
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
40
|
+
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;
|
|
114
41
|
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
115
42
|
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
116
43
|
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
117
|
-
export const
|
|
44
|
+
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
45
|
+
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
118
46
|
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
119
|
-
export const
|
|
47
|
+
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
120
48
|
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;
|
|
121
49
|
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;
|
|
122
50
|
export const bip322namespace_verify_bip322_psbt_input_with_pubkeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
@@ -142,10 +70,15 @@ export const bitgopsbt_extract_zcash_transaction: (a: number, b: number) => void
|
|
|
142
70
|
export const bitgopsbt_finalize_all_inputs: (a: number, b: number) => void;
|
|
143
71
|
export const bitgopsbt_from_bytes: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
144
72
|
export const bitgopsbt_generate_musig2_nonces: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
73
|
+
export const bitgopsbt_get_inputs: (a: number, b: number) => void;
|
|
145
74
|
export const bitgopsbt_get_network_type: (a: number, b: number) => void;
|
|
75
|
+
export const bitgopsbt_get_outputs: (a: number, b: number) => void;
|
|
76
|
+
export const bitgopsbt_get_outputs_with_address: (a: number, b: number) => void;
|
|
77
|
+
export const bitgopsbt_input_count: (a: number) => number;
|
|
146
78
|
export const bitgopsbt_is_musig2_input: (a: number, b: number) => number;
|
|
147
79
|
export const bitgopsbt_lock_time: (a: number) => number;
|
|
148
80
|
export const bitgopsbt_network: (a: number, b: number) => void;
|
|
81
|
+
export const bitgopsbt_output_count: (a: number) => number;
|
|
149
82
|
export const bitgopsbt_parse_outputs_with_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
150
83
|
export const bitgopsbt_parse_transaction_with_wallet_keys: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
151
84
|
export const bitgopsbt_serialize: (a: number, b: number) => void;
|
|
@@ -170,29 +103,101 @@ export const fixedscriptwalletnamespace_create_op_return_script: (a: number, b:
|
|
|
170
103
|
export const fixedscriptwalletnamespace_output_script: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
171
104
|
export const fixedscriptwalletnamespace_output_script_with_network_str: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
172
105
|
export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
173
|
-
export const
|
|
174
|
-
export const
|
|
106
|
+
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
107
|
+
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;
|
|
108
|
+
export const wasmbip32_chain_code: (a: number) => number;
|
|
109
|
+
export const wasmbip32_depth: (a: number) => number;
|
|
110
|
+
export const wasmbip32_derive: (a: number, b: number, c: number) => void;
|
|
111
|
+
export const wasmbip32_derive_hardened: (a: number, b: number, c: number) => void;
|
|
112
|
+
export const wasmbip32_derive_path: (a: number, b: number, c: number, d: number) => void;
|
|
113
|
+
export const wasmbip32_equals: (a: number, b: number) => number;
|
|
114
|
+
export const wasmbip32_fingerprint: (a: number) => number;
|
|
115
|
+
export const wasmbip32_from_base58: (a: number, b: number, c: number) => void;
|
|
116
|
+
export const wasmbip32_from_bip32_interface: (a: number, b: number) => void;
|
|
117
|
+
export const wasmbip32_from_seed: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
118
|
+
export const wasmbip32_from_seed_sha256: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
119
|
+
export const wasmbip32_from_xprv: (a: number, b: number, c: number) => void;
|
|
120
|
+
export const wasmbip32_from_xpub: (a: number, b: number, c: number) => void;
|
|
121
|
+
export const wasmbip32_identifier: (a: number) => number;
|
|
122
|
+
export const wasmbip32_index: (a: number) => number;
|
|
123
|
+
export const wasmbip32_is_neutered: (a: number) => number;
|
|
124
|
+
export const wasmbip32_neutered: (a: number) => number;
|
|
125
|
+
export const wasmbip32_parent_fingerprint: (a: number) => number;
|
|
126
|
+
export const wasmbip32_private_key: (a: number) => number;
|
|
127
|
+
export const wasmbip32_public_key: (a: number) => number;
|
|
128
|
+
export const wasmbip32_to_base58: (a: number, b: number) => void;
|
|
129
|
+
export const wasmbip32_to_wif: (a: number, b: number) => void;
|
|
175
130
|
export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
176
131
|
export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
|
|
177
132
|
export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
|
|
178
|
-
export const
|
|
179
|
-
export const
|
|
180
|
-
export const
|
|
181
|
-
export const
|
|
182
|
-
export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
|
|
183
|
-
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
184
|
-
export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
|
|
185
|
-
export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
|
|
186
|
-
export const wasmdimensions_get_output_vsize: (a: number) => number;
|
|
187
|
-
export const wasmdimensions_get_output_weight: (a: number) => number;
|
|
188
|
-
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
189
|
-
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
190
|
-
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
191
|
-
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
192
|
-
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
133
|
+
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
134
|
+
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
135
|
+
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
136
|
+
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
193
137
|
export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
|
|
194
138
|
export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
|
|
195
139
|
export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
140
|
+
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
141
|
+
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
142
|
+
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
143
|
+
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
144
|
+
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
145
|
+
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
146
|
+
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
147
|
+
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
148
|
+
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
149
|
+
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
150
|
+
export const wasmecpair_private_key: (a: number) => number;
|
|
151
|
+
export const wasmecpair_public_key: (a: number) => number;
|
|
152
|
+
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
153
|
+
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
154
|
+
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
155
|
+
export const wrappsbt_addInput: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
|
|
156
|
+
export const wrappsbt_addOutput: (a: number, b: number, c: number, d: bigint) => number;
|
|
157
|
+
export const wrappsbt_clone: (a: number) => number;
|
|
158
|
+
export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
|
|
159
|
+
export const wrappsbt_extractTransaction: (a: number, b: number) => void;
|
|
160
|
+
export const wrappsbt_finalize: (a: number, b: number) => void;
|
|
161
|
+
export const wrappsbt_getInputs: (a: number, b: number) => void;
|
|
162
|
+
export const wrappsbt_getOutputs: (a: number, b: number) => void;
|
|
163
|
+
export const wrappsbt_getOutputsWithAddress: (a: number, b: number, c: number, d: number) => void;
|
|
164
|
+
export const wrappsbt_getPartialSignatures: (a: number, b: number, c: number) => void;
|
|
165
|
+
export const wrappsbt_getUnsignedTx: (a: number, b: number) => void;
|
|
166
|
+
export const wrappsbt_hasPartialSignatures: (a: number, b: number, c: number) => void;
|
|
167
|
+
export const wrappsbt_inputCount: (a: number) => number;
|
|
168
|
+
export const wrappsbt_lockTime: (a: number) => number;
|
|
169
|
+
export const wrappsbt_new: (a: number, b: number) => number;
|
|
170
|
+
export const wrappsbt_outputCount: (a: number) => number;
|
|
171
|
+
export const wrappsbt_serialize: (a: number, b: number) => void;
|
|
172
|
+
export const wrappsbt_signAll: (a: number, b: number, c: number) => void;
|
|
173
|
+
export const wrappsbt_signAllWithEcpair: (a: number, b: number, c: number) => void;
|
|
174
|
+
export const wrappsbt_signWithPrv: (a: number, b: number, c: number, d: number) => void;
|
|
175
|
+
export const wrappsbt_signWithXprv: (a: number, b: number, c: number, d: number) => void;
|
|
176
|
+
export const wrappsbt_unsignedTxId: (a: number, b: number) => void;
|
|
177
|
+
export const wrappsbt_updateInputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
178
|
+
export const wrappsbt_updateOutputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
179
|
+
export const wrappsbt_validateSignatureAtInput: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
180
|
+
export const wrappsbt_verifySignatureWithKey: (a: number, b: number, c: number, d: number) => void;
|
|
181
|
+
export const wrappsbt_version: (a: number) => number;
|
|
182
|
+
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
183
|
+
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
184
|
+
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
185
|
+
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
186
|
+
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
187
|
+
export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
188
|
+
export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
|
|
189
|
+
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
190
|
+
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
191
|
+
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
192
|
+
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
193
|
+
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
194
|
+
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
195
|
+
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
196
|
+
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
197
|
+
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
198
|
+
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
199
|
+
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
200
|
+
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
196
201
|
export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
197
202
|
export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
198
203
|
export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|