bitmask-core 1.0.7-beta.12 → 1.0.7-beta.14
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 +81 -79
- package/bitmask_core.js +547 -536
- package/bitmask_core_bg.wasm +0 -0
- package/bitmask_core_bg.wasm.d.ts +43 -42
- package/index.d.ts +6 -1
- package/index.js +11 -1
- package/package.json +1 -1
- package/rgb.d.ts +12 -0
- package/rgb.js +3 -1
package/bitmask_core.d.ts
CHANGED
|
@@ -5,6 +5,12 @@ export function convert_contract_amount_string(amount: bigint, precision: number
|
|
|
5
5
|
export function parse_contract_amount(amount: string): any;
|
|
6
6
|
export function parse_contract_amount_precision(amount: string, precision: number): string;
|
|
7
7
|
export function version(): any;
|
|
8
|
+
export function fund_rgb_vault(sk: string, fee_rate: number, secrets: any, broadcast: boolean, fund_value: bigint | null | undefined, coordinator_fee: boolean): Promise<any>;
|
|
9
|
+
export function transfer_sats(sk: string, address: string, sats: bigint, fee_rate: number, secrets: any): Promise<any>;
|
|
10
|
+
export function get_btc_wallet(sk: string): Promise<any>;
|
|
11
|
+
export function backup_btc_data(nostr_hex_sk: string): Promise<any>;
|
|
12
|
+
export function recover_funds_from_bad_wallets(seed: string, pass_phrase: string, recover_address: string): Promise<any>;
|
|
13
|
+
export function restore_btc_data(nostr_hex_sk: string): Promise<any>;
|
|
8
14
|
export function store(secret_key: string, name: string, data: Uint8Array, force: boolean, metadata?: Uint8Array | null): Promise<any>;
|
|
9
15
|
export function retrieve(secret_key: string, name: string): Promise<any>;
|
|
10
16
|
export function retrieve_metadata(secret_key: string, name: string): Promise<any>;
|
|
@@ -12,6 +18,28 @@ export function encode_hex(bytes: Uint8Array): string;
|
|
|
12
18
|
export function encode_base64(bytes: Uint8Array): string;
|
|
13
19
|
export function decode_hex(string: string): Uint8Array;
|
|
14
20
|
export function decode_base64(string: string): Uint8Array;
|
|
21
|
+
export function get_network(): Promise<any>;
|
|
22
|
+
export function switch_network(network_str: string): Promise<any>;
|
|
23
|
+
export function get_env(key: string): Promise<any>;
|
|
24
|
+
export function set_env(key: string, value: string): Promise<any>;
|
|
25
|
+
export function sleep(ms: number): Promise<any>;
|
|
26
|
+
export function hash_password(password: string): string;
|
|
27
|
+
export function new_mnemonic(password: string): Promise<any>;
|
|
28
|
+
export function save_mnemonic(seed: string, password: string): Promise<any>;
|
|
29
|
+
export function decrypt_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
30
|
+
export function upgrade_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
31
|
+
export function new_wallet(hash: string, seed_password: string): Promise<any>;
|
|
32
|
+
export function encrypt_wallet(mnemonic: string, hash: string, seed_password: string): Promise<any>;
|
|
33
|
+
export function get_wallet_data(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
34
|
+
export function sync_wallets(): Promise<any>;
|
|
35
|
+
export function get_new_address(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
36
|
+
export function send_sats(descriptor: string, change_descriptor: string, destination: string, amount: bigint, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
37
|
+
export function fund_vault(descriptor: string, change_descriptor: string, rgb_address: string, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
38
|
+
export function get_assets_vault(rgb_descriptor_xpub: string): Promise<any>;
|
|
39
|
+
export function drain_wallet(destination: string, descriptor: string, change_descriptor?: string | null, fee_rate?: number | null): Promise<any>;
|
|
40
|
+
export function bump_fee(txid: string, fee_rate: number, descriptor: string, change_descriptor: string | null | undefined, broadcast: boolean): Promise<any>;
|
|
41
|
+
export function psbt_sign_and_publish_file(request: any): Promise<any>;
|
|
42
|
+
export function psbt_publish_file(request: any): Promise<any>;
|
|
15
43
|
export function create_watcher(nostr_hex_sk: string, request: any): Promise<any>;
|
|
16
44
|
export function recover_watcher(nostr_hex_sk: string, request: any): Promise<any>;
|
|
17
45
|
export function destroy_watcher(nostr_hex_sk: string): Promise<any>;
|
|
@@ -20,6 +48,15 @@ export function check_watcher(nostr_hex_sk: string): Promise<any>;
|
|
|
20
48
|
export function watcher_next_address(nostr_hex_sk: string, request: string): Promise<any>;
|
|
21
49
|
export function watcher_next_utxo(nostr_hex_sk: string, request: string): Promise<any>;
|
|
22
50
|
export function watcher_unspent_utxos(nostr_hex_sk: string, request: string): Promise<any>;
|
|
51
|
+
export function create_wallet(username: string, password: string): Promise<any>;
|
|
52
|
+
export function auth(username: string, password: string): Promise<any>;
|
|
53
|
+
export function ln_create_invoice(description: string, amount: number, token: string): Promise<any>;
|
|
54
|
+
export function get_balance(token: string): Promise<any>;
|
|
55
|
+
export function get_txs(token: string): Promise<any>;
|
|
56
|
+
export function pay_invoice(payment_request: string, token: string): Promise<any>;
|
|
57
|
+
export function check_payment(payment_hash: string): Promise<any>;
|
|
58
|
+
export function swap_btc_ln(token: string, ln_address?: string | null): Promise<any>;
|
|
59
|
+
export function swap_ln_btc(address: string, amount: bigint, token: string): Promise<any>;
|
|
23
60
|
export function get_rgb_version(): string;
|
|
24
61
|
export function get_rgb_wallet(nostr_hex_sk: string): Promise<any>;
|
|
25
62
|
export function get_btc_wallet_data(nostr_hex_sk: string): Promise<any>;
|
|
@@ -40,6 +77,7 @@ export function accept_transfer(nostr_hex_sk: string, request: any): Promise<any
|
|
|
40
77
|
export function save_transfer(nostr_hex_sk: string, request: any): Promise<any>;
|
|
41
78
|
export function list_transfers(nostr_hex_sk: string): Promise<any>;
|
|
42
79
|
export function verify_transfers(nostr_hex_sk: string): Promise<any>;
|
|
80
|
+
export function verify_transfers_force(nostr_hex_sk: string): Promise<any>;
|
|
43
81
|
export function list_offers(nostr_hex_sk: string): Promise<any>;
|
|
44
82
|
/**
|
|
45
83
|
* Cache-bypassing variant of `list_offers`. Fetches marketplace data
|
|
@@ -61,45 +99,8 @@ export function create_airdrop_claim(nostr_hex_sk: string, request: any): Promis
|
|
|
61
99
|
export function close_airdrop(nostr_hex_sk: string, request: any): Promise<any>;
|
|
62
100
|
export function backup_rgb_data(nostr_hex_sk: string): Promise<any>;
|
|
63
101
|
export function restore_rgb_data(nostr_hex_sk: string): Promise<any>;
|
|
64
|
-
export function create_wallet(username: string, password: string): Promise<any>;
|
|
65
|
-
export function auth(username: string, password: string): Promise<any>;
|
|
66
|
-
export function ln_create_invoice(description: string, amount: number, token: string): Promise<any>;
|
|
67
|
-
export function get_balance(token: string): Promise<any>;
|
|
68
|
-
export function get_txs(token: string): Promise<any>;
|
|
69
|
-
export function pay_invoice(payment_request: string, token: string): Promise<any>;
|
|
70
|
-
export function check_payment(payment_hash: string): Promise<any>;
|
|
71
|
-
export function swap_btc_ln(token: string, ln_address?: string | null): Promise<any>;
|
|
72
|
-
export function swap_ln_btc(address: string, amount: bigint, token: string): Promise<any>;
|
|
73
102
|
export function new_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
74
103
|
export function update_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
75
|
-
export function hash_password(password: string): string;
|
|
76
|
-
export function new_mnemonic(password: string): Promise<any>;
|
|
77
|
-
export function save_mnemonic(seed: string, password: string): Promise<any>;
|
|
78
|
-
export function decrypt_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
79
|
-
export function upgrade_wallet(hash: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
|
|
80
|
-
export function new_wallet(hash: string, seed_password: string): Promise<any>;
|
|
81
|
-
export function encrypt_wallet(mnemonic: string, hash: string, seed_password: string): Promise<any>;
|
|
82
|
-
export function get_wallet_data(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
83
|
-
export function sync_wallets(): Promise<any>;
|
|
84
|
-
export function get_new_address(descriptor: string, change_descriptor?: string | null): Promise<any>;
|
|
85
|
-
export function send_sats(descriptor: string, change_descriptor: string, destination: string, amount: bigint, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
86
|
-
export function fund_vault(descriptor: string, change_descriptor: string, rgb_address: string, broadcast: boolean, fee_rate?: number | null): Promise<any>;
|
|
87
|
-
export function get_assets_vault(rgb_descriptor_xpub: string): Promise<any>;
|
|
88
|
-
export function drain_wallet(destination: string, descriptor: string, change_descriptor?: string | null, fee_rate?: number | null): Promise<any>;
|
|
89
|
-
export function bump_fee(txid: string, fee_rate: number, descriptor: string, change_descriptor: string | null | undefined, broadcast: boolean): Promise<any>;
|
|
90
|
-
export function psbt_sign_and_publish_file(request: any): Promise<any>;
|
|
91
|
-
export function psbt_publish_file(request: any): Promise<any>;
|
|
92
|
-
export function fund_rgb_vault(sk: string, fee_rate: number, secrets: any, broadcast: boolean, fund_value: bigint | null | undefined, coordinator_fee: boolean): Promise<any>;
|
|
93
|
-
export function transfer_sats(sk: string, address: string, sats: bigint, fee_rate: number, secrets: any): Promise<any>;
|
|
94
|
-
export function get_btc_wallet(sk: string): Promise<any>;
|
|
95
|
-
export function backup_btc_data(nostr_hex_sk: string): Promise<any>;
|
|
96
|
-
export function recover_funds_from_bad_wallets(seed: string, pass_phrase: string, recover_address: string): Promise<any>;
|
|
97
|
-
export function restore_btc_data(nostr_hex_sk: string): Promise<any>;
|
|
98
|
-
export function get_network(): Promise<any>;
|
|
99
|
-
export function switch_network(network_str: string): Promise<any>;
|
|
100
|
-
export function get_env(key: string): Promise<any>;
|
|
101
|
-
export function set_env(key: string, value: string): Promise<any>;
|
|
102
|
-
export function sleep(ms: number): Promise<any>;
|
|
103
104
|
|
|
104
105
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
105
106
|
|
|
@@ -110,6 +111,12 @@ export interface InitOutput {
|
|
|
110
111
|
readonly parse_contract_amount: (a: number, b: number) => any;
|
|
111
112
|
readonly parse_contract_amount_precision: (a: number, b: number, c: number) => [number, number];
|
|
112
113
|
readonly version: () => any;
|
|
114
|
+
readonly fund_rgb_vault: (a: number, b: number, c: number, d: any, e: number, f: number, g: bigint, h: number) => any;
|
|
115
|
+
readonly transfer_sats: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: any) => any;
|
|
116
|
+
readonly get_btc_wallet: (a: number, b: number) => any;
|
|
117
|
+
readonly backup_btc_data: (a: number, b: number) => any;
|
|
118
|
+
readonly recover_funds_from_bad_wallets: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
119
|
+
readonly restore_btc_data: (a: number, b: number) => any;
|
|
113
120
|
readonly store: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
|
|
114
121
|
readonly retrieve: (a: number, b: number, c: number, d: number) => any;
|
|
115
122
|
readonly retrieve_metadata: (a: number, b: number, c: number, d: number) => any;
|
|
@@ -117,6 +124,28 @@ export interface InitOutput {
|
|
|
117
124
|
readonly encode_base64: (a: number, b: number) => [number, number];
|
|
118
125
|
readonly decode_hex: (a: number, b: number) => [number, number, number, number];
|
|
119
126
|
readonly decode_base64: (a: number, b: number) => [number, number, number, number];
|
|
127
|
+
readonly get_network: () => any;
|
|
128
|
+
readonly switch_network: (a: number, b: number) => any;
|
|
129
|
+
readonly get_env: (a: number, b: number) => any;
|
|
130
|
+
readonly set_env: (a: number, b: number, c: number, d: number) => any;
|
|
131
|
+
readonly sleep: (a: number) => any;
|
|
132
|
+
readonly hash_password: (a: number, b: number) => [number, number];
|
|
133
|
+
readonly new_mnemonic: (a: number, b: number) => any;
|
|
134
|
+
readonly save_mnemonic: (a: number, b: number, c: number, d: number) => any;
|
|
135
|
+
readonly decrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
136
|
+
readonly upgrade_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
137
|
+
readonly new_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
138
|
+
readonly encrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
139
|
+
readonly get_wallet_data: (a: number, b: number, c: number, d: number) => any;
|
|
140
|
+
readonly sync_wallets: () => any;
|
|
141
|
+
readonly get_new_address: (a: number, b: number, c: number, d: number) => any;
|
|
142
|
+
readonly send_sats: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number) => any;
|
|
143
|
+
readonly fund_vault: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
144
|
+
readonly get_assets_vault: (a: number, b: number) => any;
|
|
145
|
+
readonly drain_wallet: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
146
|
+
readonly bump_fee: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
147
|
+
readonly psbt_sign_and_publish_file: (a: any) => any;
|
|
148
|
+
readonly psbt_publish_file: (a: any) => any;
|
|
120
149
|
readonly create_watcher: (a: number, b: number, c: any) => any;
|
|
121
150
|
readonly recover_watcher: (a: number, b: number, c: any) => any;
|
|
122
151
|
readonly destroy_watcher: (a: number, b: number) => any;
|
|
@@ -125,6 +154,15 @@ export interface InitOutput {
|
|
|
125
154
|
readonly watcher_next_address: (a: number, b: number, c: number, d: number) => any;
|
|
126
155
|
readonly watcher_next_utxo: (a: number, b: number, c: number, d: number) => any;
|
|
127
156
|
readonly watcher_unspent_utxos: (a: number, b: number, c: number, d: number) => any;
|
|
157
|
+
readonly create_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
158
|
+
readonly auth: (a: number, b: number, c: number, d: number) => any;
|
|
159
|
+
readonly ln_create_invoice: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
160
|
+
readonly get_balance: (a: number, b: number) => any;
|
|
161
|
+
readonly get_txs: (a: number, b: number) => any;
|
|
162
|
+
readonly pay_invoice: (a: number, b: number, c: number, d: number) => any;
|
|
163
|
+
readonly check_payment: (a: number, b: number) => any;
|
|
164
|
+
readonly swap_btc_ln: (a: number, b: number, c: number, d: number) => any;
|
|
165
|
+
readonly swap_ln_btc: (a: number, b: number, c: bigint, d: number, e: number) => any;
|
|
128
166
|
readonly get_rgb_version: () => [number, number];
|
|
129
167
|
readonly get_rgb_wallet: (a: number, b: number) => any;
|
|
130
168
|
readonly get_btc_wallet_data: (a: number, b: number) => any;
|
|
@@ -145,6 +183,7 @@ export interface InitOutput {
|
|
|
145
183
|
readonly save_transfer: (a: number, b: number, c: any) => any;
|
|
146
184
|
readonly list_transfers: (a: number, b: number) => any;
|
|
147
185
|
readonly verify_transfers: (a: number, b: number) => any;
|
|
186
|
+
readonly verify_transfers_force: (a: number, b: number) => any;
|
|
148
187
|
readonly list_offers: (a: number, b: number) => any;
|
|
149
188
|
readonly list_offers_fresh: (a: number, b: number) => any;
|
|
150
189
|
readonly offers: (a: number, b: number) => any;
|
|
@@ -162,45 +201,8 @@ export interface InitOutput {
|
|
|
162
201
|
readonly close_airdrop: (a: number, b: number, c: any) => any;
|
|
163
202
|
readonly backup_rgb_data: (a: number, b: number) => any;
|
|
164
203
|
readonly restore_rgb_data: (a: number, b: number) => any;
|
|
165
|
-
readonly create_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
166
|
-
readonly auth: (a: number, b: number, c: number, d: number) => any;
|
|
167
|
-
readonly ln_create_invoice: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
168
|
-
readonly get_balance: (a: number, b: number) => any;
|
|
169
|
-
readonly get_txs: (a: number, b: number) => any;
|
|
170
|
-
readonly pay_invoice: (a: number, b: number, c: number, d: number) => any;
|
|
171
|
-
readonly check_payment: (a: number, b: number) => any;
|
|
172
|
-
readonly swap_btc_ln: (a: number, b: number, c: number, d: number) => any;
|
|
173
|
-
readonly swap_ln_btc: (a: number, b: number, c: bigint, d: number, e: number) => any;
|
|
174
204
|
readonly new_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
175
205
|
readonly update_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
176
|
-
readonly hash_password: (a: number, b: number) => [number, number];
|
|
177
|
-
readonly new_mnemonic: (a: number, b: number) => any;
|
|
178
|
-
readonly save_mnemonic: (a: number, b: number, c: number, d: number) => any;
|
|
179
|
-
readonly decrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
180
|
-
readonly upgrade_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
181
|
-
readonly new_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
182
|
-
readonly encrypt_wallet: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
183
|
-
readonly get_wallet_data: (a: number, b: number, c: number, d: number) => any;
|
|
184
|
-
readonly sync_wallets: () => any;
|
|
185
|
-
readonly get_new_address: (a: number, b: number, c: number, d: number) => any;
|
|
186
|
-
readonly send_sats: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number) => any;
|
|
187
|
-
readonly fund_vault: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
188
|
-
readonly get_assets_vault: (a: number, b: number) => any;
|
|
189
|
-
readonly drain_wallet: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
190
|
-
readonly bump_fee: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
191
|
-
readonly psbt_sign_and_publish_file: (a: any) => any;
|
|
192
|
-
readonly psbt_publish_file: (a: any) => any;
|
|
193
|
-
readonly fund_rgb_vault: (a: number, b: number, c: number, d: any, e: number, f: number, g: bigint, h: number) => any;
|
|
194
|
-
readonly transfer_sats: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: any) => any;
|
|
195
|
-
readonly get_btc_wallet: (a: number, b: number) => any;
|
|
196
|
-
readonly backup_btc_data: (a: number, b: number) => any;
|
|
197
|
-
readonly recover_funds_from_bad_wallets: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
198
|
-
readonly restore_btc_data: (a: number, b: number) => any;
|
|
199
|
-
readonly get_network: () => any;
|
|
200
|
-
readonly switch_network: (a: number, b: number) => any;
|
|
201
|
-
readonly get_env: (a: number, b: number) => any;
|
|
202
|
-
readonly set_env: (a: number, b: number, c: number, d: number) => any;
|
|
203
|
-
readonly sleep: (a: number) => any;
|
|
204
206
|
readonly rustsecp256k1_v0_9_2_context_create: (a: number) => number;
|
|
205
207
|
readonly rustsecp256k1_v0_9_2_context_destroy: (a: number) => void;
|
|
206
208
|
readonly rustsecp256k1_v0_9_2_default_illegal_callback_fn: (a: number, b: number) => void;
|
|
@@ -226,12 +228,12 @@ export interface InitOutput {
|
|
|
226
228
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
227
229
|
readonly __wbindgen_export_7: WebAssembly.Table;
|
|
228
230
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
229
|
-
readonly
|
|
230
|
-
readonly
|
|
231
|
-
readonly
|
|
231
|
+
readonly closure1936_externref_shim: (a: number, b: number, c: any) => void;
|
|
232
|
+
readonly closure2726_externref_shim: (a: number, b: number, c: any) => void;
|
|
233
|
+
readonly closure2757_externref_shim: (a: number, b: number, c: any) => void;
|
|
232
234
|
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7ceba1bc0c075797: (a: number, b: number) => void;
|
|
233
|
-
readonly
|
|
234
|
-
readonly
|
|
235
|
+
readonly closure3937_externref_shim: (a: number, b: number, c: any) => void;
|
|
236
|
+
readonly closure4229_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
235
237
|
readonly __wbindgen_start: () => void;
|
|
236
238
|
}
|
|
237
239
|
|