bitmask-core 1.0.3-beta.10 → 1.0.4-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 +69 -63
- package/bitmask_core.js +464 -453
- package/bitmask_core_bg.wasm +0 -0
- package/bitmask_core_bg.wasm.d.ts +35 -34
- package/package.json +1 -1
package/bitmask_core.d.ts
CHANGED
|
@@ -7,6 +7,19 @@ export function encode_hex(bytes: Uint8Array): string;
|
|
|
7
7
|
export function encode_base64(bytes: Uint8Array): string;
|
|
8
8
|
export function decode_hex(string: string): Uint8Array;
|
|
9
9
|
export function decode_base64(string: string): Uint8Array;
|
|
10
|
+
export function convert_contract_amount_raw(decimal: string, precision: number): string;
|
|
11
|
+
export function convert_contract_amount_string(amount: bigint, precision: number): string;
|
|
12
|
+
export function parse_contract_amount(amount: string): any;
|
|
13
|
+
export function parse_contract_amount_precision(amount: string, precision: number): string;
|
|
14
|
+
export function version(): any;
|
|
15
|
+
export function create_watcher(nostr_hex_sk: string, request: any): Promise<any>;
|
|
16
|
+
export function recover_watcher(nostr_hex_sk: string, request: any): Promise<any>;
|
|
17
|
+
export function destroy_watcher(nostr_hex_sk: string): Promise<any>;
|
|
18
|
+
export function destroy_recover_watcher(nostr_hex_sk: string): Promise<any>;
|
|
19
|
+
export function check_watcher(nostr_hex_sk: string): Promise<any>;
|
|
20
|
+
export function watcher_next_address(nostr_hex_sk: string, request: string): Promise<any>;
|
|
21
|
+
export function watcher_next_utxo(nostr_hex_sk: string, request: string): Promise<any>;
|
|
22
|
+
export function watcher_unspent_utxos(nostr_hex_sk: string, request: string): Promise<any>;
|
|
10
23
|
export function get_rgb_version(): string;
|
|
11
24
|
export function get_rgb_wallet(nostr_hex_sk: string): Promise<any>;
|
|
12
25
|
export function get_contract(nostr_hex_sk: string, request: string): Promise<any>;
|
|
@@ -27,6 +40,11 @@ export function save_transfer(nostr_hex_sk: string, request: any): Promise<any>;
|
|
|
27
40
|
export function list_transfers(nostr_hex_sk: string): Promise<any>;
|
|
28
41
|
export function verify_transfers(nostr_hex_sk: string): Promise<any>;
|
|
29
42
|
export function list_offers(nostr_hex_sk: string): Promise<any>;
|
|
43
|
+
/**
|
|
44
|
+
* Cache-bypassing variant of `list_offers`. Fetches marketplace data
|
|
45
|
+
* directly from the server, skipping the 5-minute IDB TTL cache.
|
|
46
|
+
*/
|
|
47
|
+
export function list_offers_fresh(nostr_hex_sk: string): Promise<any>;
|
|
30
48
|
export function offers(nostr_hex_sk: string): Promise<any>;
|
|
31
49
|
export function bids(nostr_hex_sk: string): Promise<any>;
|
|
32
50
|
export function offer_swap_suppl(nostr_hex_sk: string, offer_id: string): Promise<any>;
|
|
@@ -42,6 +60,22 @@ export function create_airdrop_claim(nostr_hex_sk: string, request: any): Promis
|
|
|
42
60
|
export function close_airdrop(nostr_hex_sk: string, request: any): Promise<any>;
|
|
43
61
|
export function backup_rgb_data(nostr_hex_sk: string): Promise<any>;
|
|
44
62
|
export function restore_rgb_data(nostr_hex_sk: string): Promise<any>;
|
|
63
|
+
export function create_wallet(username: string, password: string): Promise<any>;
|
|
64
|
+
export function auth(username: string, password: string): Promise<any>;
|
|
65
|
+
export function ln_create_invoice(description: string, amount: number, token: string): Promise<any>;
|
|
66
|
+
export function get_balance(token: string): Promise<any>;
|
|
67
|
+
export function get_txs(token: string): Promise<any>;
|
|
68
|
+
export function pay_invoice(payment_request: string, token: string): Promise<any>;
|
|
69
|
+
export function check_payment(payment_hash: string): Promise<any>;
|
|
70
|
+
export function swap_btc_ln(token: string, ln_address?: string | null): Promise<any>;
|
|
71
|
+
export function swap_ln_btc(address: string, amount: bigint, token: string): Promise<any>;
|
|
72
|
+
export function get_network(): Promise<any>;
|
|
73
|
+
export function switch_network(network_str: string): Promise<any>;
|
|
74
|
+
export function get_env(key: string): Promise<any>;
|
|
75
|
+
export function set_env(key: string, value: string): Promise<any>;
|
|
76
|
+
export function sleep(ms: number): Promise<any>;
|
|
77
|
+
export function new_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
78
|
+
export function update_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
45
79
|
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
80
|
export function transfer_sats(sk: string, address: string, sats: bigint, fee_rate: number, secrets: any): Promise<any>;
|
|
47
81
|
export function get_btc_wallet(sk: string): Promise<any>;
|
|
@@ -65,35 +99,6 @@ export function drain_wallet(destination: string, descriptor: string, change_des
|
|
|
65
99
|
export function bump_fee(txid: string, fee_rate: number, descriptor: string, change_descriptor: string | null | undefined, broadcast: boolean): Promise<any>;
|
|
66
100
|
export function psbt_sign_and_publish_file(request: any): Promise<any>;
|
|
67
101
|
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>;
|
|
80
|
-
export function create_watcher(nostr_hex_sk: string, request: any): Promise<any>;
|
|
81
|
-
export function recover_watcher(nostr_hex_sk: string, request: any): Promise<any>;
|
|
82
|
-
export function destroy_watcher(nostr_hex_sk: string): Promise<any>;
|
|
83
|
-
export function destroy_recover_watcher(nostr_hex_sk: string): Promise<any>;
|
|
84
|
-
export function check_watcher(nostr_hex_sk: string): Promise<any>;
|
|
85
|
-
export function watcher_next_address(nostr_hex_sk: string, request: string): Promise<any>;
|
|
86
|
-
export function watcher_next_utxo(nostr_hex_sk: string, request: string): Promise<any>;
|
|
87
|
-
export function watcher_unspent_utxos(nostr_hex_sk: string, request: string): Promise<any>;
|
|
88
|
-
export function create_wallet(username: string, password: string): Promise<any>;
|
|
89
|
-
export function auth(username: string, password: string): Promise<any>;
|
|
90
|
-
export function ln_create_invoice(description: string, amount: number, token: string): Promise<any>;
|
|
91
|
-
export function get_balance(token: string): Promise<any>;
|
|
92
|
-
export function get_txs(token: string): Promise<any>;
|
|
93
|
-
export function pay_invoice(payment_request: string, token: string): Promise<any>;
|
|
94
|
-
export function check_payment(payment_hash: string): Promise<any>;
|
|
95
|
-
export function swap_btc_ln(token: string, ln_address?: string | null): Promise<any>;
|
|
96
|
-
export function swap_ln_btc(address: string, amount: bigint, token: string): Promise<any>;
|
|
97
102
|
|
|
98
103
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
99
104
|
|
|
@@ -106,6 +111,19 @@ export interface InitOutput {
|
|
|
106
111
|
readonly encode_base64: (a: number, b: number) => [number, number];
|
|
107
112
|
readonly decode_hex: (a: number, b: number) => [number, number, number, number];
|
|
108
113
|
readonly decode_base64: (a: number, b: number) => [number, number, number, number];
|
|
114
|
+
readonly convert_contract_amount_raw: (a: number, b: number, c: number) => [number, number];
|
|
115
|
+
readonly convert_contract_amount_string: (a: bigint, b: number) => [number, number];
|
|
116
|
+
readonly parse_contract_amount: (a: number, b: number) => any;
|
|
117
|
+
readonly parse_contract_amount_precision: (a: number, b: number, c: number) => [number, number];
|
|
118
|
+
readonly version: () => any;
|
|
119
|
+
readonly create_watcher: (a: number, b: number, c: any) => any;
|
|
120
|
+
readonly recover_watcher: (a: number, b: number, c: any) => any;
|
|
121
|
+
readonly destroy_watcher: (a: number, b: number) => any;
|
|
122
|
+
readonly destroy_recover_watcher: (a: number, b: number) => any;
|
|
123
|
+
readonly check_watcher: (a: number, b: number) => any;
|
|
124
|
+
readonly watcher_next_address: (a: number, b: number, c: number, d: number) => any;
|
|
125
|
+
readonly watcher_next_utxo: (a: number, b: number, c: number, d: number) => any;
|
|
126
|
+
readonly watcher_unspent_utxos: (a: number, b: number, c: number, d: number) => any;
|
|
109
127
|
readonly get_rgb_version: () => [number, number];
|
|
110
128
|
readonly get_rgb_wallet: (a: number, b: number) => any;
|
|
111
129
|
readonly get_contract: (a: number, b: number, c: number, d: number) => any;
|
|
@@ -126,6 +144,7 @@ export interface InitOutput {
|
|
|
126
144
|
readonly list_transfers: (a: number, b: number) => any;
|
|
127
145
|
readonly verify_transfers: (a: number, b: number) => any;
|
|
128
146
|
readonly list_offers: (a: number, b: number) => any;
|
|
147
|
+
readonly list_offers_fresh: (a: number, b: number) => any;
|
|
129
148
|
readonly offers: (a: number, b: number) => any;
|
|
130
149
|
readonly bids: (a: number, b: number) => any;
|
|
131
150
|
readonly offer_swap_suppl: (a: number, b: number, c: number, d: number) => any;
|
|
@@ -141,6 +160,22 @@ export interface InitOutput {
|
|
|
141
160
|
readonly close_airdrop: (a: number, b: number, c: any) => any;
|
|
142
161
|
readonly backup_rgb_data: (a: number, b: number) => any;
|
|
143
162
|
readonly restore_rgb_data: (a: number, b: number) => any;
|
|
163
|
+
readonly create_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
164
|
+
readonly auth: (a: number, b: number, c: number, d: number) => any;
|
|
165
|
+
readonly ln_create_invoice: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
166
|
+
readonly get_balance: (a: number, b: number) => any;
|
|
167
|
+
readonly get_txs: (a: number, b: number) => any;
|
|
168
|
+
readonly pay_invoice: (a: number, b: number, c: number, d: number) => any;
|
|
169
|
+
readonly check_payment: (a: number, b: number) => any;
|
|
170
|
+
readonly swap_btc_ln: (a: number, b: number, c: number, d: number) => any;
|
|
171
|
+
readonly swap_ln_btc: (a: number, b: number, c: bigint, d: number, e: number) => any;
|
|
172
|
+
readonly get_network: () => any;
|
|
173
|
+
readonly switch_network: (a: number, b: number) => any;
|
|
174
|
+
readonly get_env: (a: number, b: number) => any;
|
|
175
|
+
readonly set_env: (a: number, b: number, c: number, d: number) => any;
|
|
176
|
+
readonly sleep: (a: number) => any;
|
|
177
|
+
readonly new_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
178
|
+
readonly update_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
|
|
144
179
|
readonly fund_rgb_vault: (a: number, b: number, c: number, d: any, e: number, f: number, g: bigint, h: number) => any;
|
|
145
180
|
readonly transfer_sats: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: any) => any;
|
|
146
181
|
readonly get_btc_wallet: (a: number, b: number) => any;
|
|
@@ -164,35 +199,6 @@ export interface InitOutput {
|
|
|
164
199
|
readonly bump_fee: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
165
200
|
readonly psbt_sign_and_publish_file: (a: any) => any;
|
|
166
201
|
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;
|
|
179
|
-
readonly create_watcher: (a: number, b: number, c: any) => any;
|
|
180
|
-
readonly recover_watcher: (a: number, b: number, c: any) => any;
|
|
181
|
-
readonly destroy_watcher: (a: number, b: number) => any;
|
|
182
|
-
readonly destroy_recover_watcher: (a: number, b: number) => any;
|
|
183
|
-
readonly check_watcher: (a: number, b: number) => any;
|
|
184
|
-
readonly watcher_next_address: (a: number, b: number, c: number, d: number) => any;
|
|
185
|
-
readonly watcher_next_utxo: (a: number, b: number, c: number, d: number) => any;
|
|
186
|
-
readonly watcher_unspent_utxos: (a: number, b: number, c: number, d: number) => any;
|
|
187
|
-
readonly create_wallet: (a: number, b: number, c: number, d: number) => any;
|
|
188
|
-
readonly auth: (a: number, b: number, c: number, d: number) => any;
|
|
189
|
-
readonly ln_create_invoice: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
190
|
-
readonly get_balance: (a: number, b: number) => any;
|
|
191
|
-
readonly get_txs: (a: number, b: number) => any;
|
|
192
|
-
readonly pay_invoice: (a: number, b: number, c: number, d: number) => any;
|
|
193
|
-
readonly check_payment: (a: number, b: number) => any;
|
|
194
|
-
readonly swap_btc_ln: (a: number, b: number, c: number, d: number) => any;
|
|
195
|
-
readonly swap_ln_btc: (a: number, b: number, c: bigint, d: number, e: number) => any;
|
|
196
202
|
readonly rustsecp256k1_v0_9_2_context_create: (a: number) => number;
|
|
197
203
|
readonly rustsecp256k1_v0_9_2_context_destroy: (a: number) => void;
|
|
198
204
|
readonly rustsecp256k1_v0_9_2_default_illegal_callback_fn: (a: number, b: number) => void;
|
|
@@ -218,12 +224,12 @@ export interface InitOutput {
|
|
|
218
224
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
219
225
|
readonly __wbindgen_export_7: WebAssembly.Table;
|
|
220
226
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
221
|
-
readonly
|
|
222
|
-
readonly
|
|
223
|
-
readonly
|
|
227
|
+
readonly closure680_externref_shim: (a: number, b: number, c: any) => void;
|
|
228
|
+
readonly closure2691_externref_shim: (a: number, b: number, c: any) => void;
|
|
229
|
+
readonly closure2722_externref_shim: (a: number, b: number, c: any) => void;
|
|
224
230
|
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7ceba1bc0c075797: (a: number, b: number) => void;
|
|
225
|
-
readonly
|
|
226
|
-
readonly
|
|
231
|
+
readonly closure3902_externref_shim: (a: number, b: number, c: any) => void;
|
|
232
|
+
readonly closure4194_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
227
233
|
readonly __wbindgen_start: () => void;
|
|
228
234
|
}
|
|
229
235
|
|