bitmask-core 1.0.5-beta.10 → 1.0.6-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 +101 -101
- package/bitmask_core.js +524 -524
- package/bitmask_core_bg.wasm +0 -0
- package/bitmask_core_bg.wasm.d.ts +53 -53
- package/package.json +1 -1
package/bitmask_core.d.ts
CHANGED
|
@@ -1,36 +1,22 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function
|
|
4
|
-
export function
|
|
5
|
-
export function
|
|
6
|
-
export function
|
|
7
|
-
export function
|
|
8
|
-
export function
|
|
9
|
-
export function
|
|
10
|
-
export function
|
|
11
|
-
export function
|
|
12
|
-
export function
|
|
13
|
-
export function
|
|
14
|
-
export function
|
|
15
|
-
export function
|
|
16
|
-
export function
|
|
17
|
-
export function
|
|
18
|
-
export function
|
|
19
|
-
export function
|
|
20
|
-
export function recover_watcher(nostr_hex_sk: string, request: any): Promise<any>;
|
|
21
|
-
export function destroy_watcher(nostr_hex_sk: string): Promise<any>;
|
|
22
|
-
export function destroy_recover_watcher(nostr_hex_sk: string): Promise<any>;
|
|
23
|
-
export function check_watcher(nostr_hex_sk: string): Promise<any>;
|
|
24
|
-
export function watcher_next_address(nostr_hex_sk: string, request: string): Promise<any>;
|
|
25
|
-
export function watcher_next_utxo(nostr_hex_sk: string, request: string): Promise<any>;
|
|
26
|
-
export function watcher_unspent_utxos(nostr_hex_sk: string, request: string): Promise<any>;
|
|
27
|
-
export function store(secret_key: string, name: string, data: Uint8Array, force: boolean, metadata?: Uint8Array | null): Promise<any>;
|
|
28
|
-
export function retrieve(secret_key: string, name: string): Promise<any>;
|
|
29
|
-
export function retrieve_metadata(secret_key: string, name: string): Promise<any>;
|
|
30
|
-
export function encode_hex(bytes: Uint8Array): string;
|
|
31
|
-
export function encode_base64(bytes: Uint8Array): string;
|
|
32
|
-
export function decode_hex(string: string): Uint8Array;
|
|
33
|
-
export function decode_base64(string: string): Uint8Array;
|
|
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>;
|
|
34
20
|
export function get_rgb_version(): string;
|
|
35
21
|
export function get_rgb_wallet(nostr_hex_sk: string): Promise<any>;
|
|
36
22
|
export function get_contract(nostr_hex_sk: string, request: string): Promise<any>;
|
|
@@ -71,6 +57,20 @@ export function create_airdrop_claim(nostr_hex_sk: string, request: any): Promis
|
|
|
71
57
|
export function close_airdrop(nostr_hex_sk: string, request: any): Promise<any>;
|
|
72
58
|
export function backup_rgb_data(nostr_hex_sk: string): Promise<any>;
|
|
73
59
|
export function restore_rgb_data(nostr_hex_sk: string): Promise<any>;
|
|
60
|
+
export function fund_rgb_vault(sk: string, fee_rate: number, secrets: any, broadcast: boolean, fund_value: bigint | null | undefined, coordinator_fee: boolean): Promise<any>;
|
|
61
|
+
export function transfer_sats(sk: string, address: string, sats: bigint, fee_rate: number, secrets: any): Promise<any>;
|
|
62
|
+
export function get_btc_wallet(sk: string): Promise<any>;
|
|
63
|
+
export function backup_btc_data(nostr_hex_sk: string): Promise<any>;
|
|
64
|
+
export function recover_funds_from_bad_wallets(seed: string, pass_phrase: string, recover_address: string): Promise<any>;
|
|
65
|
+
export function restore_btc_data(nostr_hex_sk: string): Promise<any>;
|
|
66
|
+
export function create_watcher(nostr_hex_sk: string, request: any): Promise<any>;
|
|
67
|
+
export function recover_watcher(nostr_hex_sk: string, request: any): Promise<any>;
|
|
68
|
+
export function destroy_watcher(nostr_hex_sk: string): Promise<any>;
|
|
69
|
+
export function destroy_recover_watcher(nostr_hex_sk: string): Promise<any>;
|
|
70
|
+
export function check_watcher(nostr_hex_sk: string): Promise<any>;
|
|
71
|
+
export function watcher_next_address(nostr_hex_sk: string, request: string): Promise<any>;
|
|
72
|
+
export function watcher_next_utxo(nostr_hex_sk: string, request: string): Promise<any>;
|
|
73
|
+
export function watcher_unspent_utxos(nostr_hex_sk: string, request: string): Promise<any>;
|
|
74
74
|
export function create_wallet(username: string, password: string): Promise<any>;
|
|
75
75
|
export function auth(username: string, password: string): Promise<any>;
|
|
76
76
|
export function ln_create_invoice(description: string, amount: number, token: string): Promise<any>;
|
|
@@ -80,61 +80,47 @@ export function pay_invoice(payment_request: string, token: string): Promise<any
|
|
|
80
80
|
export function check_payment(payment_hash: string): Promise<any>;
|
|
81
81
|
export function swap_btc_ln(token: string, ln_address?: string | null): Promise<any>;
|
|
82
82
|
export function swap_ln_btc(address: string, amount: bigint, token: string): Promise<any>;
|
|
83
|
+
export function store(secret_key: string, name: string, data: Uint8Array, force: boolean, metadata?: Uint8Array | null): Promise<any>;
|
|
84
|
+
export function retrieve(secret_key: string, name: string): Promise<any>;
|
|
85
|
+
export function retrieve_metadata(secret_key: string, name: string): Promise<any>;
|
|
86
|
+
export function encode_hex(bytes: Uint8Array): string;
|
|
87
|
+
export function encode_base64(bytes: Uint8Array): string;
|
|
88
|
+
export function decode_hex(string: string): Uint8Array;
|
|
89
|
+
export function decode_base64(string: string): Uint8Array;
|
|
90
|
+
export function convert_contract_amount_raw(decimal: string, precision: number): string;
|
|
91
|
+
export function convert_contract_amount_string(amount: bigint, precision: number): string;
|
|
92
|
+
export function parse_contract_amount(amount: string): any;
|
|
93
|
+
export function parse_contract_amount_precision(amount: string, precision: number): string;
|
|
94
|
+
export function version(): any;
|
|
95
|
+
export function get_network(): Promise<any>;
|
|
96
|
+
export function switch_network(network_str: string): Promise<any>;
|
|
97
|
+
export function get_env(key: string): Promise<any>;
|
|
98
|
+
export function set_env(key: string, value: string): Promise<any>;
|
|
99
|
+
export function sleep(ms: number): Promise<any>;
|
|
83
100
|
export function new_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
84
101
|
export function update_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
85
|
-
export function hash_password(password: string): string;
|
|
86
|
-
export function new_mnemonic(password: string): Promise<any>;
|
|
87
|
-
export function save_mnemonic(seed: string, password: string): Promise<any>;
|
|
88
|
-
export function decrypt_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
89
|
-
export function upgrade_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
90
|
-
export function new_wallet(hash: string, seed_password: string): Promise<any>;
|
|
91
|
-
export function encrypt_wallet(mnemonic: string, hash: string, seed_password: string): Promise<any>;
|
|
92
|
-
export function get_wallet_data(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
93
|
-
export function sync_wallets(): Promise<any>;
|
|
94
|
-
export function get_new_address(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
95
|
-
export function send_sats(descriptor: string, change_descriptor: string, destination: string, amount: bigint, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
96
|
-
export function fund_vault(descriptor: string, change_descriptor: string, rgb_address: string, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
97
|
-
export function get_assets_vault(rgb_descriptor_xpub: string): Promise<any>;
|
|
98
|
-
export function drain_wallet(destination: string, descriptor: string, change_descriptor?: string | null, fee_rate?: number | null): Promise<any>;
|
|
99
|
-
export function bump_fee(txid: string, fee_rate: number, descriptor: string, change_descriptor: string | null | undefined, broadcast: boolean): Promise<any>;
|
|
100
|
-
export function psbt_sign_and_publish_file(request: any): Promise<any>;
|
|
101
|
-
export function psbt_publish_file(request: any): Promise<any>;
|
|
102
102
|
|
|
103
103
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
104
104
|
|
|
105
105
|
export interface InitOutput {
|
|
106
106
|
readonly memory: WebAssembly.Memory;
|
|
107
|
-
readonly
|
|
108
|
-
readonly
|
|
109
|
-
readonly
|
|
110
|
-
readonly
|
|
111
|
-
readonly
|
|
112
|
-
readonly
|
|
113
|
-
readonly
|
|
114
|
-
readonly
|
|
115
|
-
readonly
|
|
116
|
-
readonly
|
|
117
|
-
readonly
|
|
118
|
-
readonly
|
|
119
|
-
readonly
|
|
120
|
-
readonly
|
|
121
|
-
readonly
|
|
122
|
-
readonly
|
|
123
|
-
readonly
|
|
124
|
-
readonly recover_watcher: (a: number, b: number, c: any) => any;
|
|
125
|
-
readonly destroy_watcher: (a: number, b: number) => any;
|
|
126
|
-
readonly destroy_recover_watcher: (a: number, b: number) => any;
|
|
127
|
-
readonly check_watcher: (a: number, b: number) => any;
|
|
128
|
-
readonly watcher_next_address: (a: number, b: number, c: number, d: number) => any;
|
|
129
|
-
readonly watcher_next_utxo: (a: number, b: number, c: number, d: number) => any;
|
|
130
|
-
readonly watcher_unspent_utxos: (a: number, b: number, c: number, d: number) => any;
|
|
131
|
-
readonly store: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
|
|
132
|
-
readonly retrieve: (a: number, b: number, c: number, d: number) => any;
|
|
133
|
-
readonly retrieve_metadata: (a: number, b: number, c: number, d: number) => any;
|
|
134
|
-
readonly encode_hex: (a: number, b: number) => [number, number];
|
|
135
|
-
readonly encode_base64: (a: number, b: number) => [number, number];
|
|
136
|
-
readonly decode_hex: (a: number, b: number) => [number, number, number, number];
|
|
137
|
-
readonly decode_base64: (a: number, b: number) => [number, number, number, number];
|
|
107
|
+
readonly hash_password: (a: number, b: number) => [number, number];
|
|
108
|
+
readonly new_mnemonic: (a: number, b: number) => any;
|
|
109
|
+
readonly save_mnemonic: (a: number, b: number, c: number, d: number) => any;
|
|
110
|
+
readonly decrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
111
|
+
readonly upgrade_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
112
|
+
readonly new_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
113
|
+
readonly encrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
114
|
+
readonly get_wallet_data: (a: number, b: number, c: number, d: number) => any;
|
|
115
|
+
readonly sync_wallets: () => any;
|
|
116
|
+
readonly get_new_address: (a: number, b: number, c: number, d: number) => any;
|
|
117
|
+
readonly send_sats: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number) => any;
|
|
118
|
+
readonly fund_vault: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
119
|
+
readonly get_assets_vault: (a: number, b: number) => any;
|
|
120
|
+
readonly drain_wallet: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
121
|
+
readonly bump_fee: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
122
|
+
readonly psbt_sign_and_publish_file: (a: any) => any;
|
|
123
|
+
readonly psbt_publish_file: (a: any) => any;
|
|
138
124
|
readonly get_rgb_version: () => [number, number];
|
|
139
125
|
readonly get_rgb_wallet: (a: number, b: number) => any;
|
|
140
126
|
readonly get_contract: (a: number, b: number, c: number, d: number) => any;
|
|
@@ -171,6 +157,20 @@ export interface InitOutput {
|
|
|
171
157
|
readonly close_airdrop: (a: number, b: number, c: any) => any;
|
|
172
158
|
readonly backup_rgb_data: (a: number, b: number) => any;
|
|
173
159
|
readonly restore_rgb_data: (a: number, b: number) => any;
|
|
160
|
+
readonly fund_rgb_vault: (a: number, b: number, c: number, d: any, e: number, f: number, g: bigint, h: number) => any;
|
|
161
|
+
readonly transfer_sats: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: any) => any;
|
|
162
|
+
readonly get_btc_wallet: (a: number, b: number) => any;
|
|
163
|
+
readonly backup_btc_data: (a: number, b: number) => any;
|
|
164
|
+
readonly recover_funds_from_bad_wallets: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
165
|
+
readonly restore_btc_data: (a: number, b: number) => any;
|
|
166
|
+
readonly create_watcher: (a: number, b: number, c: any) => any;
|
|
167
|
+
readonly recover_watcher: (a: number, b: number, c: any) => any;
|
|
168
|
+
readonly destroy_watcher: (a: number, b: number) => any;
|
|
169
|
+
readonly destroy_recover_watcher: (a: number, b: number) => any;
|
|
170
|
+
readonly check_watcher: (a: number, b: number) => any;
|
|
171
|
+
readonly watcher_next_address: (a: number, b: number, c: number, d: number) => any;
|
|
172
|
+
readonly watcher_next_utxo: (a: number, b: number, c: number, d: number) => any;
|
|
173
|
+
readonly watcher_unspent_utxos: (a: number, b: number, c: number, d: number) => any;
|
|
174
174
|
readonly create_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
175
175
|
readonly auth: (a: number, b: number, c: number, d: number) => any;
|
|
176
176
|
readonly ln_create_invoice: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
@@ -180,25 +180,25 @@ export interface InitOutput {
|
|
|
180
180
|
readonly check_payment: (a: number, b: number) => any;
|
|
181
181
|
readonly swap_btc_ln: (a: number, b: number, c: number, d: number) => any;
|
|
182
182
|
readonly swap_ln_btc: (a: number, b: number, c: bigint, d: number, e: number) => any;
|
|
183
|
+
readonly store: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
|
|
184
|
+
readonly retrieve: (a: number, b: number, c: number, d: number) => any;
|
|
185
|
+
readonly retrieve_metadata: (a: number, b: number, c: number, d: number) => any;
|
|
186
|
+
readonly encode_hex: (a: number, b: number) => [number, number];
|
|
187
|
+
readonly encode_base64: (a: number, b: number) => [number, number];
|
|
188
|
+
readonly decode_hex: (a: number, b: number) => [number, number, number, number];
|
|
189
|
+
readonly decode_base64: (a: number, b: number) => [number, number, number, number];
|
|
190
|
+
readonly convert_contract_amount_raw: (a: number, b: number, c: number) => [number, number];
|
|
191
|
+
readonly convert_contract_amount_string: (a: bigint, b: number) => [number, number];
|
|
192
|
+
readonly parse_contract_amount: (a: number, b: number) => any;
|
|
193
|
+
readonly parse_contract_amount_precision: (a: number, b: number, c: number) => [number, number];
|
|
194
|
+
readonly version: () => any;
|
|
195
|
+
readonly get_network: () => any;
|
|
196
|
+
readonly switch_network: (a: number, b: number) => any;
|
|
197
|
+
readonly get_env: (a: number, b: number) => any;
|
|
198
|
+
readonly set_env: (a: number, b: number, c: number, d: number) => any;
|
|
199
|
+
readonly sleep: (a: number) => any;
|
|
183
200
|
readonly new_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
184
201
|
readonly update_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
185
|
-
readonly hash_password: (a: number, b: number) => [number, number];
|
|
186
|
-
readonly new_mnemonic: (a: number, b: number) => any;
|
|
187
|
-
readonly save_mnemonic: (a: number, b: number, c: number, d: number) => any;
|
|
188
|
-
readonly decrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
189
|
-
readonly upgrade_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
190
|
-
readonly new_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
191
|
-
readonly encrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
192
|
-
readonly get_wallet_data: (a: number, b: number, c: number, d: number) => any;
|
|
193
|
-
readonly sync_wallets: () => any;
|
|
194
|
-
readonly get_new_address: (a: number, b: number, c: number, d: number) => any;
|
|
195
|
-
readonly send_sats: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number) => any;
|
|
196
|
-
readonly fund_vault: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
197
|
-
readonly get_assets_vault: (a: number, b: number) => any;
|
|
198
|
-
readonly drain_wallet: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
199
|
-
readonly bump_fee: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
200
|
-
readonly psbt_sign_and_publish_file: (a: any) => any;
|
|
201
|
-
readonly psbt_publish_file: (a: any) => any;
|
|
202
202
|
readonly rustsecp256k1_v0_9_2_context_create: (a: number) => number;
|
|
203
203
|
readonly rustsecp256k1_v0_9_2_context_destroy: (a: number) => void;
|
|
204
204
|
readonly rustsecp256k1_v0_9_2_default_illegal_callback_fn: (a: number, b: number) => void;
|
|
@@ -224,12 +224,12 @@ export interface InitOutput {
|
|
|
224
224
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
225
225
|
readonly __wbindgen_export_7: WebAssembly.Table;
|
|
226
226
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
227
|
-
readonly
|
|
228
|
-
readonly
|
|
229
|
-
readonly
|
|
227
|
+
readonly closure1453_externref_shim: (a: number, b: number, c: any) => void;
|
|
228
|
+
readonly closure2687_externref_shim: (a: number, b: number, c: any) => void;
|
|
229
|
+
readonly closure2718_externref_shim: (a: number, b: number, c: any) => void;
|
|
230
230
|
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7ceba1bc0c075797: (a: number, b: number) => void;
|
|
231
|
-
readonly
|
|
232
|
-
readonly
|
|
231
|
+
readonly closure3898_externref_shim: (a: number, b: number, c: any) => void;
|
|
232
|
+
readonly closure4190_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
233
233
|
readonly __wbindgen_start: () => void;
|
|
234
234
|
}
|
|
235
235
|
|