bitmask-core 1.0.2-beta.10 → 1.0.3-beta.10
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/bitmask_core.d.ts +76 -75
- package/bitmask_core.js +578 -555
- package/bitmask_core_bg.js +486 -472
- package/bitmask_core_bg.wasm +0 -0
- package/bitmask_core_bg.wasm.d.ts +41 -40
- package/constants.js +0 -1
- package/package.json +1 -1
- package/rgb.d.ts +5 -1
- package/rgb.js +3 -1
package/bitmask_core.d.ts
CHANGED
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function hash_password(password: string): string;
|
|
4
|
-
export function new_mnemonic(password: string): Promise<any>;
|
|
5
|
-
export function save_mnemonic(seed: string, password: string): Promise<any>;
|
|
6
|
-
export function decrypt_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
7
|
-
export function upgrade_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
8
|
-
export function new_wallet(hash: string, seed_password: string): Promise<any>;
|
|
9
|
-
export function encrypt_wallet(mnemonic: string, hash: string, seed_password: string): Promise<any>;
|
|
10
|
-
export function get_wallet_data(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
11
|
-
export function sync_wallets(): Promise<any>;
|
|
12
|
-
export function get_new_address(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
13
|
-
export function send_sats(descriptor: string, change_descriptor: string, destination: string, amount: bigint, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
14
|
-
export function fund_vault(descriptor: string, change_descriptor: string, rgb_address: string, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
15
|
-
export function get_assets_vault(rgb_descriptor_xpub: string): Promise<any>;
|
|
16
|
-
export function drain_wallet(destination: string, descriptor: string, change_descriptor?: string | null, fee_rate?: number | null): Promise<any>;
|
|
17
|
-
export function bump_fee(txid: string, fee_rate: number, descriptor: string, change_descriptor: string | null | undefined, broadcast: boolean): Promise<any>;
|
|
18
|
-
export function psbt_sign_and_publish_file(request: any): Promise<any>;
|
|
19
|
-
export function psbt_publish_file(request: any): Promise<any>;
|
|
20
3
|
export function store(secret_key: string, name: string, data: Uint8Array, force: boolean, metadata?: Uint8Array | null): Promise<any>;
|
|
21
4
|
export function retrieve(secret_key: string, name: string): Promise<any>;
|
|
22
5
|
export function retrieve_metadata(secret_key: string, name: string): Promise<any>;
|
|
@@ -24,12 +7,6 @@ export function encode_hex(bytes: Uint8Array): string;
|
|
|
24
7
|
export function encode_base64(bytes: Uint8Array): string;
|
|
25
8
|
export function decode_hex(string: string): Uint8Array;
|
|
26
9
|
export function decode_base64(string: string): Uint8Array;
|
|
27
|
-
export function fund_rgb_vault(sk: string, fee_rate: number, secrets: any, broadcast: boolean, fund_value: bigint | null | undefined, coordinator_fee: boolean): Promise<any>;
|
|
28
|
-
export function transfer_sats(sk: string, address: string, sats: bigint, fee_rate: number, secrets: any): Promise<any>;
|
|
29
|
-
export function get_btc_wallet(sk: string): Promise<any>;
|
|
30
|
-
export function backup_btc_data(nostr_hex_sk: string): Promise<any>;
|
|
31
|
-
export function recover_funds_from_bad_wallets(seed: string, pass_phrase: string, recover_address: string): Promise<any>;
|
|
32
|
-
export function restore_btc_data(nostr_hex_sk: string): Promise<any>;
|
|
33
10
|
export function get_rgb_version(): string;
|
|
34
11
|
export function get_rgb_wallet(nostr_hex_sk: string): Promise<any>;
|
|
35
12
|
export function get_contract(nostr_hex_sk: string, request: string): Promise<any>;
|
|
@@ -65,6 +42,41 @@ export function create_airdrop_claim(nostr_hex_sk: string, request: any): Promis
|
|
|
65
42
|
export function close_airdrop(nostr_hex_sk: string, request: any): Promise<any>;
|
|
66
43
|
export function backup_rgb_data(nostr_hex_sk: string): Promise<any>;
|
|
67
44
|
export function restore_rgb_data(nostr_hex_sk: string): Promise<any>;
|
|
45
|
+
export function fund_rgb_vault(sk: string, fee_rate: number, secrets: any, broadcast: boolean, fund_value: bigint | null | undefined, coordinator_fee: boolean): Promise<any>;
|
|
46
|
+
export function transfer_sats(sk: string, address: string, sats: bigint, fee_rate: number, secrets: any): Promise<any>;
|
|
47
|
+
export function get_btc_wallet(sk: string): Promise<any>;
|
|
48
|
+
export function backup_btc_data(nostr_hex_sk: string): Promise<any>;
|
|
49
|
+
export function recover_funds_from_bad_wallets(seed: string, pass_phrase: string, recover_address: string): Promise<any>;
|
|
50
|
+
export function restore_btc_data(nostr_hex_sk: string): Promise<any>;
|
|
51
|
+
export function hash_password(password: string): string;
|
|
52
|
+
export function new_mnemonic(password: string): Promise<any>;
|
|
53
|
+
export function save_mnemonic(seed: string, password: string): Promise<any>;
|
|
54
|
+
export function decrypt_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
55
|
+
export function upgrade_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
56
|
+
export function new_wallet(hash: string, seed_password: string): Promise<any>;
|
|
57
|
+
export function encrypt_wallet(mnemonic: string, hash: string, seed_password: string): Promise<any>;
|
|
58
|
+
export function get_wallet_data(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
59
|
+
export function sync_wallets(): Promise<any>;
|
|
60
|
+
export function get_new_address(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
61
|
+
export function send_sats(descriptor: string, change_descriptor: string, destination: string, amount: bigint, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
62
|
+
export function fund_vault(descriptor: string, change_descriptor: string, rgb_address: string, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
63
|
+
export function get_assets_vault(rgb_descriptor_xpub: string): Promise<any>;
|
|
64
|
+
export function drain_wallet(destination: string, descriptor: string, change_descriptor?: string | null, fee_rate?: number | null): Promise<any>;
|
|
65
|
+
export function bump_fee(txid: string, fee_rate: number, descriptor: string, change_descriptor: string | null | undefined, broadcast: boolean): Promise<any>;
|
|
66
|
+
export function psbt_sign_and_publish_file(request: any): Promise<any>;
|
|
67
|
+
export function psbt_publish_file(request: any): Promise<any>;
|
|
68
|
+
export function convert_contract_amount_raw(decimal: string, precision: number): string;
|
|
69
|
+
export function convert_contract_amount_string(amount: bigint, precision: number): string;
|
|
70
|
+
export function parse_contract_amount(amount: string): any;
|
|
71
|
+
export function parse_contract_amount_precision(amount: string, precision: number): string;
|
|
72
|
+
export function version(): any;
|
|
73
|
+
export function new_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
74
|
+
export function update_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
75
|
+
export function get_network(): Promise<any>;
|
|
76
|
+
export function switch_network(network_str: string): Promise<any>;
|
|
77
|
+
export function get_env(key: string): Promise<any>;
|
|
78
|
+
export function set_env(key: string, value: string): Promise<any>;
|
|
79
|
+
export function sleep(ms: number): Promise<any>;
|
|
68
80
|
export function create_watcher(nostr_hex_sk: string, request: any): Promise<any>;
|
|
69
81
|
export function recover_watcher(nostr_hex_sk: string, request: any): Promise<any>;
|
|
70
82
|
export function destroy_watcher(nostr_hex_sk: string): Promise<any>;
|
|
@@ -73,11 +85,6 @@ export function check_watcher(nostr_hex_sk: string): Promise<any>;
|
|
|
73
85
|
export function watcher_next_address(nostr_hex_sk: string, request: string): Promise<any>;
|
|
74
86
|
export function watcher_next_utxo(nostr_hex_sk: string, request: string): Promise<any>;
|
|
75
87
|
export function watcher_unspent_utxos(nostr_hex_sk: string, request: string): Promise<any>;
|
|
76
|
-
export function get_network(): Promise<any>;
|
|
77
|
-
export function switch_network(network_str: string): Promise<any>;
|
|
78
|
-
export function get_env(key: string): Promise<any>;
|
|
79
|
-
export function set_env(key: string, value: string): Promise<any>;
|
|
80
|
-
export function sleep(ms: number): Promise<any>;
|
|
81
88
|
export function create_wallet(username: string, password: string): Promise<any>;
|
|
82
89
|
export function auth(username: string, password: string): Promise<any>;
|
|
83
90
|
export function ln_create_invoice(description: string, amount: number, token: string): Promise<any>;
|
|
@@ -87,35 +94,11 @@ export function pay_invoice(payment_request: string, token: string): Promise<any
|
|
|
87
94
|
export function check_payment(payment_hash: string): Promise<any>;
|
|
88
95
|
export function swap_btc_ln(token: string, ln_address?: string | null): Promise<any>;
|
|
89
96
|
export function swap_ln_btc(address: string, amount: bigint, token: string): Promise<any>;
|
|
90
|
-
export function new_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
91
|
-
export function update_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
92
|
-
export function convert_contract_amount_raw(decimal: string, precision: number): string;
|
|
93
|
-
export function convert_contract_amount_string(amount: bigint, precision: number): string;
|
|
94
|
-
export function parse_contract_amount(amount: string): any;
|
|
95
|
-
export function parse_contract_amount_precision(amount: string, precision: number): string;
|
|
96
|
-
export function version(): any;
|
|
97
97
|
|
|
98
98
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
99
99
|
|
|
100
100
|
export interface InitOutput {
|
|
101
101
|
readonly memory: WebAssembly.Memory;
|
|
102
|
-
readonly hash_password: (a: number, b: number) => [number, number];
|
|
103
|
-
readonly new_mnemonic: (a: number, b: number) => any;
|
|
104
|
-
readonly save_mnemonic: (a: number, b: number, c: number, d: number) => any;
|
|
105
|
-
readonly decrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
106
|
-
readonly upgrade_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
107
|
-
readonly new_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
108
|
-
readonly encrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
109
|
-
readonly get_wallet_data: (a: number, b: number, c: number, d: number) => any;
|
|
110
|
-
readonly sync_wallets: () => any;
|
|
111
|
-
readonly get_new_address: (a: number, b: number, c: number, d: number) => any;
|
|
112
|
-
readonly send_sats: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number) => any;
|
|
113
|
-
readonly fund_vault: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
114
|
-
readonly get_assets_vault: (a: number, b: number) => any;
|
|
115
|
-
readonly drain_wallet: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
116
|
-
readonly bump_fee: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
117
|
-
readonly psbt_sign_and_publish_file: (a: any) => any;
|
|
118
|
-
readonly psbt_publish_file: (a: any) => any;
|
|
119
102
|
readonly store: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
|
|
120
103
|
readonly retrieve: (a: number, b: number, c: number, d: number) => any;
|
|
121
104
|
readonly retrieve_metadata: (a: number, b: number, c: number, d: number) => any;
|
|
@@ -123,12 +106,6 @@ export interface InitOutput {
|
|
|
123
106
|
readonly encode_base64: (a: number, b: number) => [number, number];
|
|
124
107
|
readonly decode_hex: (a: number, b: number) => [number, number, number, number];
|
|
125
108
|
readonly decode_base64: (a: number, b: number) => [number, number, number, number];
|
|
126
|
-
readonly fund_rgb_vault: (a: number, b: number, c: number, d: any, e: number, f: number, g: bigint, h: number) => any;
|
|
127
|
-
readonly transfer_sats: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: any) => any;
|
|
128
|
-
readonly get_btc_wallet: (a: number, b: number) => any;
|
|
129
|
-
readonly backup_btc_data: (a: number, b: number) => any;
|
|
130
|
-
readonly recover_funds_from_bad_wallets: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
131
|
-
readonly restore_btc_data: (a: number, b: number) => any;
|
|
132
109
|
readonly get_rgb_version: () => [number, number];
|
|
133
110
|
readonly get_rgb_wallet: (a: number, b: number) => any;
|
|
134
111
|
readonly get_contract: (a: number, b: number, c: number, d: number) => any;
|
|
@@ -164,6 +141,41 @@ export interface InitOutput {
|
|
|
164
141
|
readonly close_airdrop: (a: number, b: number, c: any) => any;
|
|
165
142
|
readonly backup_rgb_data: (a: number, b: number) => any;
|
|
166
143
|
readonly restore_rgb_data: (a: number, b: number) => any;
|
|
144
|
+
readonly fund_rgb_vault: (a: number, b: number, c: number, d: any, e: number, f: number, g: bigint, h: number) => any;
|
|
145
|
+
readonly transfer_sats: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: any) => any;
|
|
146
|
+
readonly get_btc_wallet: (a: number, b: number) => any;
|
|
147
|
+
readonly backup_btc_data: (a: number, b: number) => any;
|
|
148
|
+
readonly recover_funds_from_bad_wallets: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
149
|
+
readonly restore_btc_data: (a: number, b: number) => any;
|
|
150
|
+
readonly hash_password: (a: number, b: number) => [number, number];
|
|
151
|
+
readonly new_mnemonic: (a: number, b: number) => any;
|
|
152
|
+
readonly save_mnemonic: (a: number, b: number, c: number, d: number) => any;
|
|
153
|
+
readonly decrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
154
|
+
readonly upgrade_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
155
|
+
readonly new_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
156
|
+
readonly encrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
157
|
+
readonly get_wallet_data: (a: number, b: number, c: number, d: number) => any;
|
|
158
|
+
readonly sync_wallets: () => any;
|
|
159
|
+
readonly get_new_address: (a: number, b: number, c: number, d: number) => any;
|
|
160
|
+
readonly send_sats: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number) => any;
|
|
161
|
+
readonly fund_vault: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
162
|
+
readonly get_assets_vault: (a: number, b: number) => any;
|
|
163
|
+
readonly drain_wallet: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
164
|
+
readonly bump_fee: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
165
|
+
readonly psbt_sign_and_publish_file: (a: any) => any;
|
|
166
|
+
readonly psbt_publish_file: (a: any) => any;
|
|
167
|
+
readonly convert_contract_amount_raw: (a: number, b: number, c: number) => [number, number];
|
|
168
|
+
readonly convert_contract_amount_string: (a: bigint, b: number) => [number, number];
|
|
169
|
+
readonly parse_contract_amount: (a: number, b: number) => any;
|
|
170
|
+
readonly parse_contract_amount_precision: (a: number, b: number, c: number) => [number, number];
|
|
171
|
+
readonly version: () => any;
|
|
172
|
+
readonly new_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
173
|
+
readonly update_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
174
|
+
readonly get_network: () => any;
|
|
175
|
+
readonly switch_network: (a: number, b: number) => any;
|
|
176
|
+
readonly get_env: (a: number, b: number) => any;
|
|
177
|
+
readonly set_env: (a: number, b: number, c: number, d: number) => any;
|
|
178
|
+
readonly sleep: (a: number) => any;
|
|
167
179
|
readonly create_watcher: (a: number, b: number, c: any) => any;
|
|
168
180
|
readonly recover_watcher: (a: number, b: number, c: any) => any;
|
|
169
181
|
readonly destroy_watcher: (a: number, b: number) => any;
|
|
@@ -172,11 +184,6 @@ export interface InitOutput {
|
|
|
172
184
|
readonly watcher_next_address: (a: number, b: number, c: number, d: number) => any;
|
|
173
185
|
readonly watcher_next_utxo: (a: number, b: number, c: number, d: number) => any;
|
|
174
186
|
readonly watcher_unspent_utxos: (a: number, b: number, c: number, d: number) => any;
|
|
175
|
-
readonly get_network: () => any;
|
|
176
|
-
readonly switch_network: (a: number, b: number) => any;
|
|
177
|
-
readonly get_env: (a: number, b: number) => any;
|
|
178
|
-
readonly set_env: (a: number, b: number, c: number, d: number) => any;
|
|
179
|
-
readonly sleep: (a: number) => any;
|
|
180
187
|
readonly create_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
181
188
|
readonly auth: (a: number, b: number, c: number, d: number) => any;
|
|
182
189
|
readonly ln_create_invoice: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
@@ -186,13 +193,6 @@ export interface InitOutput {
|
|
|
186
193
|
readonly check_payment: (a: number, b: number) => any;
|
|
187
194
|
readonly swap_btc_ln: (a: number, b: number, c: number, d: number) => any;
|
|
188
195
|
readonly swap_ln_btc: (a: number, b: number, c: bigint, d: number, e: number) => any;
|
|
189
|
-
readonly new_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
190
|
-
readonly update_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
191
|
-
readonly convert_contract_amount_raw: (a: number, b: number, c: number) => [number, number];
|
|
192
|
-
readonly convert_contract_amount_string: (a: bigint, b: number) => [number, number];
|
|
193
|
-
readonly parse_contract_amount: (a: number, b: number) => any;
|
|
194
|
-
readonly parse_contract_amount_precision: (a: number, b: number, c: number) => [number, number];
|
|
195
|
-
readonly version: () => any;
|
|
196
196
|
readonly rustsecp256k1_v0_9_2_context_create: (a: number) => number;
|
|
197
197
|
readonly rustsecp256k1_v0_9_2_context_destroy: (a: number) => void;
|
|
198
198
|
readonly rustsecp256k1_v0_9_2_default_illegal_callback_fn: (a: number, b: number) => void;
|
|
@@ -218,11 +218,12 @@ export interface InitOutput {
|
|
|
218
218
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
219
219
|
readonly __wbindgen_export_7: WebAssembly.Table;
|
|
220
220
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
221
|
-
readonly
|
|
222
|
-
readonly
|
|
223
|
-
readonly
|
|
224
|
-
readonly
|
|
225
|
-
readonly
|
|
221
|
+
readonly closure586_externref_shim: (a: number, b: number, c: any) => void;
|
|
222
|
+
readonly closure2679_externref_shim: (a: number, b: number, c: any) => void;
|
|
223
|
+
readonly closure2707_externref_shim: (a: number, b: number, c: any) => void;
|
|
224
|
+
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7ceba1bc0c075797: (a: number, b: number) => void;
|
|
225
|
+
readonly closure3887_externref_shim: (a: number, b: number, c: any) => void;
|
|
226
|
+
readonly closure4179_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
226
227
|
readonly __wbindgen_start: () => void;
|
|
227
228
|
}
|
|
228
229
|
|