@bitgo/wasm-utxo 0.0.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/dist/browser/js/address.d.ts +8 -0
- package/dist/browser/js/address.js +7 -0
- package/dist/browser/js/ast/formatNode.d.ts +88 -0
- package/dist/browser/js/ast/formatNode.js +36 -0
- package/dist/browser/js/ast/fromWasmNode.d.ts +4 -0
- package/dist/browser/js/ast/fromWasmNode.js +120 -0
- package/dist/browser/js/ast/index.d.ts +2 -0
- package/dist/browser/js/ast/index.js +2 -0
- package/dist/browser/js/coinName.d.ts +1 -0
- package/dist/browser/js/coinName.js +1 -0
- package/dist/browser/js/fixedScriptWallet.d.ts +86 -0
- package/dist/browser/js/fixedScriptWallet.js +61 -0
- package/dist/browser/js/index.d.ts +37 -0
- package/dist/browser/js/index.js +11 -0
- package/dist/browser/js/triple.d.ts +1 -0
- package/dist/browser/js/triple.js +1 -0
- package/dist/browser/js/utxolibCompat.d.ts +32 -0
- package/dist/browser/js/utxolibCompat.js +7 -0
- package/dist/browser/js/wasm/wasm_utxo.d.ts +94 -0
- package/dist/browser/js/wasm/wasm_utxo.js +4 -0
- package/dist/browser/js/wasm/wasm_utxo_bg.js +1274 -0
- package/dist/browser/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/browser/js/wasm/wasm_utxo_bg.wasm.d.ts +53 -0
- package/dist/node/js/address.d.ts +8 -0
- package/dist/node/js/address.js +11 -0
- package/dist/node/js/ast/formatNode.d.ts +88 -0
- package/dist/node/js/ast/formatNode.js +39 -0
- package/dist/node/js/ast/fromWasmNode.d.ts +4 -0
- package/dist/node/js/ast/fromWasmNode.js +124 -0
- package/dist/node/js/ast/index.d.ts +2 -0
- package/dist/node/js/ast/index.js +18 -0
- package/dist/node/js/coinName.d.ts +1 -0
- package/dist/node/js/coinName.js +2 -0
- package/dist/node/js/fixedScriptWallet.d.ts +86 -0
- package/dist/node/js/fixedScriptWallet.js +68 -0
- package/dist/node/js/index.d.ts +37 -0
- package/dist/node/js/index.js +50 -0
- package/dist/node/js/triple.d.ts +1 -0
- package/dist/node/js/triple.js +2 -0
- package/dist/node/js/utxolibCompat.d.ts +32 -0
- package/dist/node/js/utxolibCompat.js +11 -0
- package/dist/node/js/wasm/wasm_utxo.d.ts +94 -0
- package/dist/node/js/wasm/wasm_utxo.js +1283 -0
- package/dist/node/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/node/js/wasm/wasm_utxo_bg.wasm.d.ts +53 -0
- package/package.json +52 -5
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export class AddressNamespace {
|
|
4
|
+
private constructor();
|
|
5
|
+
free(): void;
|
|
6
|
+
[Symbol.dispose](): void;
|
|
7
|
+
static to_output_script_with_coin(address: string, coin: string): Uint8Array;
|
|
8
|
+
static from_output_script_with_coin(script: Uint8Array, coin: string, format?: string | null): string;
|
|
9
|
+
}
|
|
10
|
+
export class BitGoPsbt {
|
|
11
|
+
private constructor();
|
|
12
|
+
free(): void;
|
|
13
|
+
[Symbol.dispose](): void;
|
|
14
|
+
/**
|
|
15
|
+
* Deserialize a PSBT from bytes with network-specific logic
|
|
16
|
+
*/
|
|
17
|
+
static from_bytes(bytes: Uint8Array, network: string): BitGoPsbt;
|
|
18
|
+
/**
|
|
19
|
+
* Parse outputs with wallet keys to identify which outputs belong to a wallet
|
|
20
|
+
*
|
|
21
|
+
* Note: This method does NOT validate wallet inputs. It only parses outputs.
|
|
22
|
+
*/
|
|
23
|
+
parse_outputs_with_wallet_keys(wallet_keys: any): any;
|
|
24
|
+
/**
|
|
25
|
+
* Parse transaction with wallet keys to identify wallet inputs/outputs
|
|
26
|
+
*/
|
|
27
|
+
parse_transaction_with_wallet_keys(wallet_keys: any, replay_protection: any): any;
|
|
28
|
+
}
|
|
29
|
+
export class FixedScriptWalletNamespace {
|
|
30
|
+
private constructor();
|
|
31
|
+
free(): void;
|
|
32
|
+
[Symbol.dispose](): void;
|
|
33
|
+
static output_script(keys: any, chain: number, index: number, network: any): Uint8Array;
|
|
34
|
+
static address(keys: any, chain: number, index: number, network: any, address_format?: string | null): string;
|
|
35
|
+
}
|
|
36
|
+
export class UtxolibCompatNamespace {
|
|
37
|
+
private constructor();
|
|
38
|
+
free(): void;
|
|
39
|
+
[Symbol.dispose](): void;
|
|
40
|
+
/**
|
|
41
|
+
* Convert address string to output script
|
|
42
|
+
*
|
|
43
|
+
* # Arguments
|
|
44
|
+
* * `address` - The address string
|
|
45
|
+
* * `network` - The UtxolibNetwork object from JavaScript
|
|
46
|
+
* * `format` - Optional address format (currently unused for decoding as all formats are accepted)
|
|
47
|
+
*/
|
|
48
|
+
static to_output_script(address: string, network: any, format?: string | null): Uint8Array;
|
|
49
|
+
/**
|
|
50
|
+
* Convert output script to address string
|
|
51
|
+
*
|
|
52
|
+
* # Arguments
|
|
53
|
+
* * `script` - The output script as a byte array
|
|
54
|
+
* * `network` - The UtxolibNetwork object from JavaScript
|
|
55
|
+
* * `format` - Optional address format: "default" or "cashaddr" (only applicable for Bitcoin Cash and eCash)
|
|
56
|
+
*/
|
|
57
|
+
static from_output_script(script: Uint8Array, network: any, format?: string | null): string;
|
|
58
|
+
}
|
|
59
|
+
export class WrapDescriptor {
|
|
60
|
+
private constructor();
|
|
61
|
+
free(): void;
|
|
62
|
+
[Symbol.dispose](): void;
|
|
63
|
+
hasWildcard(): boolean;
|
|
64
|
+
scriptPubkey(): Uint8Array;
|
|
65
|
+
toAsmString(): string;
|
|
66
|
+
atDerivationIndex(index: number): WrapDescriptor;
|
|
67
|
+
maxWeightToSatisfy(): number;
|
|
68
|
+
node(): any;
|
|
69
|
+
encode(): Uint8Array;
|
|
70
|
+
descType(): any;
|
|
71
|
+
toString(): string;
|
|
72
|
+
}
|
|
73
|
+
export class WrapMiniscript {
|
|
74
|
+
private constructor();
|
|
75
|
+
free(): void;
|
|
76
|
+
[Symbol.dispose](): void;
|
|
77
|
+
toAsmString(): string;
|
|
78
|
+
node(): any;
|
|
79
|
+
encode(): Uint8Array;
|
|
80
|
+
toString(): string;
|
|
81
|
+
}
|
|
82
|
+
export class WrapPsbt {
|
|
83
|
+
private constructor();
|
|
84
|
+
free(): void;
|
|
85
|
+
[Symbol.dispose](): void;
|
|
86
|
+
static deserialize(psbt: Uint8Array): WrapPsbt;
|
|
87
|
+
finalize(): void;
|
|
88
|
+
signWithPrv(prv: Uint8Array): any;
|
|
89
|
+
signWithXprv(xprv: string): any;
|
|
90
|
+
updateInputWithDescriptor(input_index: number, descriptor: WrapDescriptor): void;
|
|
91
|
+
updateOutputWithDescriptor(output_index: number, descriptor: WrapDescriptor): void;
|
|
92
|
+
clone(): WrapPsbt;
|
|
93
|
+
serialize(): Uint8Array;
|
|
94
|
+
}
|