bitmask-core 1.0.3-beta.11 → 1.0.5-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 CHANGED
@@ -1,22 +1,29 @@
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>;
3
+ export function convert_contract_amount_raw(decimal: string, precision: number): string;
4
+ export function convert_contract_amount_string(amount: bigint, precision: number): string;
5
+ export function parse_contract_amount(amount: string): any;
6
+ export function parse_contract_amount_precision(amount: string, precision: number): string;
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>;
14
+ export function get_network(): Promise<any>;
15
+ export function switch_network(network_str: string): Promise<any>;
16
+ export function get_env(key: string): Promise<any>;
17
+ export function set_env(key: string, value: string): Promise<any>;
18
+ export function sleep(ms: number): Promise<any>;
19
+ export function create_watcher(nostr_hex_sk: string, request: any): Promise<any>;
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>;
20
27
  export function store(secret_key: string, name: string, data: Uint8Array, force: boolean, metadata?: Uint8Array | null): Promise<any>;
21
28
  export function retrieve(secret_key: string, name: string): Promise<any>;
22
29
  export function retrieve_metadata(secret_key: string, name: string): Promise<any>;
@@ -24,12 +31,6 @@ export function encode_hex(bytes: Uint8Array): string;
24
31
  export function encode_base64(bytes: Uint8Array): string;
25
32
  export function decode_hex(string: string): Uint8Array;
26
33
  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
34
  export function get_rgb_version(): string;
34
35
  export function get_rgb_wallet(nostr_hex_sk: string): Promise<any>;
35
36
  export function get_contract(nostr_hex_sk: string, request: string): Promise<any>;
@@ -50,6 +51,11 @@ export function save_transfer(nostr_hex_sk: string, request: any): Promise<any>;
50
51
  export function list_transfers(nostr_hex_sk: string): Promise<any>;
51
52
  export function verify_transfers(nostr_hex_sk: string): Promise<any>;
52
53
  export function list_offers(nostr_hex_sk: string): Promise<any>;
54
+ /**
55
+ * Cache-bypassing variant of `list_offers`. Fetches marketplace data
56
+ * directly from the server, skipping the 5-minute IDB TTL cache.
57
+ */
58
+ export function list_offers_fresh(nostr_hex_sk: string): Promise<any>;
53
59
  export function offers(nostr_hex_sk: string): Promise<any>;
54
60
  export function bids(nostr_hex_sk: string): Promise<any>;
55
61
  export function offer_swap_suppl(nostr_hex_sk: string, offer_id: string): Promise<any>;
@@ -65,19 +71,6 @@ export function create_airdrop_claim(nostr_hex_sk: string, request: any): Promis
65
71
  export function close_airdrop(nostr_hex_sk: string, request: any): Promise<any>;
66
72
  export function backup_rgb_data(nostr_hex_sk: string): Promise<any>;
67
73
  export function restore_rgb_data(nostr_hex_sk: string): Promise<any>;
68
- export function create_watcher(nostr_hex_sk: string, request: any): Promise<any>;
69
- export function recover_watcher(nostr_hex_sk: string, request: any): Promise<any>;
70
- export function destroy_watcher(nostr_hex_sk: string): Promise<any>;
71
- export function destroy_recover_watcher(nostr_hex_sk: string): Promise<any>;
72
- export function check_watcher(nostr_hex_sk: string): Promise<any>;
73
- export function watcher_next_address(nostr_hex_sk: string, request: string): Promise<any>;
74
- export function watcher_next_utxo(nostr_hex_sk: string, request: string): Promise<any>;
75
- 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
74
  export function create_wallet(username: string, password: string): Promise<any>;
82
75
  export function auth(username: string, password: string): Promise<any>;
83
76
  export function ln_create_invoice(description: string, amount: number, token: string): Promise<any>;
@@ -89,33 +82,52 @@ export function swap_btc_ln(token: string, ln_address?: string | null): Promise<
89
82
  export function swap_ln_btc(address: string, amount: bigint, token: string): Promise<any>;
90
83
  export function new_nostr_pubkey(pubkey: string, token: string): Promise<any>;
91
84
  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;
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>;
97
102
 
98
103
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
99
104
 
100
105
  export interface InitOutput {
101
106
  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;
107
+ readonly convert_contract_amount_raw: (a: number, b: number, c: number) => [number, number];
108
+ readonly convert_contract_amount_string: (a: bigint, b: number) => [number, number];
109
+ readonly parse_contract_amount: (a: number, b: number) => any;
110
+ readonly parse_contract_amount_precision: (a: number, b: number, c: number) => [number, number];
111
+ readonly version: () => any;
112
+ readonly fund_rgb_vault: (a: number, b: number, c: number, d: any, e: number, f: number, g: bigint, h: number) => any;
113
+ readonly transfer_sats: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: any) => any;
114
+ readonly get_btc_wallet: (a: number, b: number) => any;
115
+ readonly backup_btc_data: (a: number, b: number) => any;
116
+ readonly recover_funds_from_bad_wallets: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
117
+ readonly restore_btc_data: (a: number, b: number) => any;
118
+ readonly get_network: () => any;
119
+ readonly switch_network: (a: number, b: number) => any;
120
+ readonly get_env: (a: number, b: number) => any;
121
+ readonly set_env: (a: number, b: number, c: number, d: number) => any;
122
+ readonly sleep: (a: number) => any;
123
+ readonly create_watcher: (a: number, b: number, c: any) => any;
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;
119
131
  readonly store: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
120
132
  readonly retrieve: (a: number, b: number, c: number, d: number) => any;
121
133
  readonly retrieve_metadata: (a: number, b: number, c: number, d: number) => any;
@@ -123,12 +135,6 @@ export interface InitOutput {
123
135
  readonly encode_base64: (a: number, b: number) => [number, number];
124
136
  readonly decode_hex: (a: number, b: number) => [number, number, number, number];
125
137
  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
138
  readonly get_rgb_version: () => [number, number];
133
139
  readonly get_rgb_wallet: (a: number, b: number) => any;
134
140
  readonly get_contract: (a: number, b: number, c: number, d: number) => any;
@@ -149,6 +155,7 @@ export interface InitOutput {
149
155
  readonly list_transfers: (a: number, b: number) => any;
150
156
  readonly verify_transfers: (a: number, b: number) => any;
151
157
  readonly list_offers: (a: number, b: number) => any;
158
+ readonly list_offers_fresh: (a: number, b: number) => any;
152
159
  readonly offers: (a: number, b: number) => any;
153
160
  readonly bids: (a: number, b: number) => any;
154
161
  readonly offer_swap_suppl: (a: number, b: number, c: number, d: number) => any;
@@ -164,19 +171,6 @@ export interface InitOutput {
164
171
  readonly close_airdrop: (a: number, b: number, c: any) => any;
165
172
  readonly backup_rgb_data: (a: number, b: number) => any;
166
173
  readonly restore_rgb_data: (a: number, b: number) => any;
167
- readonly create_watcher: (a: number, b: number, c: any) => any;
168
- readonly recover_watcher: (a: number, b: number, c: any) => any;
169
- readonly destroy_watcher: (a: number, b: number) => any;
170
- readonly destroy_recover_watcher: (a: number, b: number) => any;
171
- readonly check_watcher: (a: number, b: number) => any;
172
- readonly watcher_next_address: (a: number, b: number, c: number, d: number) => any;
173
- readonly watcher_next_utxo: (a: number, b: number, c: number, d: number) => any;
174
- 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
174
  readonly create_wallet: (a: number, b: number, c: number, d: number) => any;
181
175
  readonly auth: (a: number, b: number, c: number, d: number) => any;
182
176
  readonly ln_create_invoice: (a: number, b: number, c: number, d: number, e: number) => any;
@@ -188,11 +182,23 @@ export interface InitOutput {
188
182
  readonly swap_ln_btc: (a: number, b: number, c: bigint, d: number, e: number) => any;
189
183
  readonly new_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
190
184
  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;
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;
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,11 +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 closure1343_externref_shim: (a: number, b: number, c: any) => void;
222
- readonly closure2001_externref_shim: (a: number, b: number, c: any) => void;
223
- readonly closure2672_externref_shim: (a: number, b: number, c: any) => void;
224
- readonly closure3843_externref_shim: (a: number, b: number, c: any) => void;
225
- readonly closure4135_externref_shim: (a: number, b: number, c: any, d: any) => void;
227
+ readonly closure1928_externref_shim: (a: number, b: number, c: any) => void;
228
+ readonly closure2690_externref_shim: (a: number, b: number, c: any) => void;
229
+ readonly closure2721_externref_shim: (a: number, b: number, c: any) => void;
230
+ readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7ceba1bc0c075797: (a: number, b: number) => void;
231
+ readonly closure3901_externref_shim: (a: number, b: number, c: any) => void;
232
+ readonly closure4193_externref_shim: (a: number, b: number, c: any, d: any) => void;
226
233
  readonly __wbindgen_start: () => void;
227
234
  }
228
235