bitmask-core 1.1.7-beta.0 → 1.1.7-beta.1

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,5 +1,22 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export function get_network(): Promise<any>;
4
+ export function switch_network(network_str: string): Promise<any>;
5
+ export function get_env(key: string): Promise<any>;
6
+ export function set_env(key: string, value: string): Promise<any>;
7
+ export function sleep(ms: number): Promise<any>;
8
+ export function store(secret_key: string, name: string, data: Uint8Array, force: boolean, metadata?: Uint8Array | null): Promise<any>;
9
+ export function retrieve(secret_key: string, name: string): Promise<any>;
10
+ export function retrieve_metadata(secret_key: string, name: string): Promise<any>;
11
+ export function encode_hex(bytes: Uint8Array): string;
12
+ export function encode_base64(bytes: Uint8Array): string;
13
+ export function decode_hex(string: string): Uint8Array;
14
+ export function decode_base64(string: string): Uint8Array;
15
+ export function convert_contract_amount_raw(decimal: string, precision: number): string;
16
+ export function convert_contract_amount_string(amount: bigint, precision: number): string;
17
+ export function parse_contract_amount(amount: string): any;
18
+ export function parse_contract_amount_precision(amount: string, precision: number): string;
19
+ export function version(): any;
3
20
  export function get_rgb_version(): string;
4
21
  export function get_rgb_wallet(nostr_hex_sk: string): Promise<any>;
5
22
  export function get_btc_wallet_data(nostr_hex_sk: string): Promise<any>;
@@ -42,13 +59,16 @@ export function create_airdrop_claim(nostr_hex_sk: string, request: any): Promis
42
59
  export function close_airdrop(nostr_hex_sk: string, request: any): Promise<any>;
43
60
  export function backup_rgb_data(nostr_hex_sk: string): Promise<any>;
44
61
  export function restore_rgb_data(nostr_hex_sk: string): Promise<any>;
45
- export function store(secret_key: string, name: string, data: Uint8Array, force: boolean, metadata?: Uint8Array | null): Promise<any>;
46
- export function retrieve(secret_key: string, name: string): Promise<any>;
47
- export function retrieve_metadata(secret_key: string, name: string): Promise<any>;
48
- export function encode_hex(bytes: Uint8Array): string;
49
- export function encode_base64(bytes: Uint8Array): string;
50
- export function decode_hex(string: string): Uint8Array;
51
- export function decode_base64(string: string): Uint8Array;
62
+ export function new_nostr_pubkey(pubkey: string, token: string): Promise<any>;
63
+ export function update_nostr_pubkey(pubkey: string, token: string): Promise<any>;
64
+ export function create_watcher(nostr_hex_sk: string, request: any): Promise<any>;
65
+ export function recover_watcher(nostr_hex_sk: string, request: any): Promise<any>;
66
+ export function destroy_watcher(nostr_hex_sk: string): Promise<any>;
67
+ export function destroy_recover_watcher(nostr_hex_sk: string): Promise<any>;
68
+ export function check_watcher(nostr_hex_sk: string): Promise<any>;
69
+ export function watcher_next_address(nostr_hex_sk: string, request: string): Promise<any>;
70
+ export function watcher_next_utxo(nostr_hex_sk: string, request: string): Promise<any>;
71
+ export function watcher_unspent_utxos(nostr_hex_sk: string, request: string): Promise<any>;
52
72
  export function fund_rgb_vault(sk: string, fee_rate: number, secrets: any, broadcast: boolean, fund_value: bigint | null | undefined, coordinator_fee: boolean): Promise<any>;
53
73
  export function transfer_sats(sk: string, address: string, sats: bigint, fee_rate: number, secrets: any): Promise<any>;
54
74
  export function get_btc_wallet(sk: string): Promise<any>;
@@ -81,31 +101,28 @@ export function pay_invoice(payment_request: string, token: string): Promise<any
81
101
  export function check_payment(payment_hash: string): Promise<any>;
82
102
  export function swap_btc_ln(token: string, ln_address?: string | null): Promise<any>;
83
103
  export function swap_ln_btc(address: string, amount: bigint, token: string): Promise<any>;
84
- export function get_network(): Promise<any>;
85
- export function switch_network(network_str: string): Promise<any>;
86
- export function get_env(key: string): Promise<any>;
87
- export function set_env(key: string, value: string): Promise<any>;
88
- export function sleep(ms: number): Promise<any>;
89
- export function new_nostr_pubkey(pubkey: string, token: string): Promise<any>;
90
- export function update_nostr_pubkey(pubkey: string, token: string): Promise<any>;
91
- export function convert_contract_amount_raw(decimal: string, precision: number): string;
92
- export function convert_contract_amount_string(amount: bigint, precision: number): string;
93
- export function parse_contract_amount(amount: string): any;
94
- export function parse_contract_amount_precision(amount: string, precision: number): string;
95
- export function version(): any;
96
- export function create_watcher(nostr_hex_sk: string, request: any): Promise<any>;
97
- export function recover_watcher(nostr_hex_sk: string, request: any): Promise<any>;
98
- export function destroy_watcher(nostr_hex_sk: string): Promise<any>;
99
- export function destroy_recover_watcher(nostr_hex_sk: string): Promise<any>;
100
- export function check_watcher(nostr_hex_sk: string): Promise<any>;
101
- export function watcher_next_address(nostr_hex_sk: string, request: string): Promise<any>;
102
- export function watcher_next_utxo(nostr_hex_sk: string, request: string): Promise<any>;
103
- export function watcher_unspent_utxos(nostr_hex_sk: string, request: string): Promise<any>;
104
104
 
105
105
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
106
106
 
107
107
  export interface InitOutput {
108
108
  readonly memory: WebAssembly.Memory;
109
+ readonly get_network: () => any;
110
+ readonly switch_network: (a: number, b: number) => any;
111
+ readonly get_env: (a: number, b: number) => any;
112
+ readonly set_env: (a: number, b: number, c: number, d: number) => any;
113
+ readonly sleep: (a: number) => any;
114
+ readonly store: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
115
+ readonly retrieve: (a: number, b: number, c: number, d: number) => any;
116
+ readonly retrieve_metadata: (a: number, b: number, c: number, d: number) => any;
117
+ readonly encode_hex: (a: number, b: number) => [number, number];
118
+ readonly encode_base64: (a: number, b: number) => [number, number];
119
+ readonly decode_hex: (a: number, b: number) => [number, number, number, number];
120
+ readonly decode_base64: (a: number, b: number) => [number, number, number, number];
121
+ readonly convert_contract_amount_raw: (a: number, b: number, c: number) => [number, number];
122
+ readonly convert_contract_amount_string: (a: bigint, b: number) => [number, number];
123
+ readonly parse_contract_amount: (a: number, b: number) => any;
124
+ readonly parse_contract_amount_precision: (a: number, b: number, c: number) => [number, number];
125
+ readonly version: () => any;
109
126
  readonly get_rgb_version: () => [number, number];
110
127
  readonly get_rgb_wallet: (a: number, b: number) => any;
111
128
  readonly get_btc_wallet_data: (a: number, b: number) => any;
@@ -144,13 +161,16 @@ export interface InitOutput {
144
161
  readonly close_airdrop: (a: number, b: number, c: any) => any;
145
162
  readonly backup_rgb_data: (a: number, b: number) => any;
146
163
  readonly restore_rgb_data: (a: number, b: number) => any;
147
- readonly store: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
148
- readonly retrieve: (a: number, b: number, c: number, d: number) => any;
149
- readonly retrieve_metadata: (a: number, b: number, c: number, d: number) => any;
150
- readonly encode_hex: (a: number, b: number) => [number, number];
151
- readonly encode_base64: (a: number, b: number) => [number, number];
152
- readonly decode_hex: (a: number, b: number) => [number, number, number, number];
153
- readonly decode_base64: (a: number, b: number) => [number, number, number, number];
164
+ readonly new_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
165
+ readonly update_nostr_pubkey: (a: number, b: number, c: number, d: 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;
154
174
  readonly fund_rgb_vault: (a: number, b: number, c: number, d: any, e: number, f: number, g: bigint, h: number) => any;
155
175
  readonly transfer_sats: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: any) => any;
156
176
  readonly get_btc_wallet: (a: number, b: number) => any;
@@ -183,26 +203,6 @@ export interface InitOutput {
183
203
  readonly check_payment: (a: number, b: number) => any;
184
204
  readonly swap_btc_ln: (a: number, b: number, c: number, d: number) => any;
185
205
  readonly swap_ln_btc: (a: number, b: number, c: bigint, d: number, e: number) => any;
186
- readonly get_network: () => any;
187
- readonly switch_network: (a: number, b: number) => any;
188
- readonly get_env: (a: number, b: number) => any;
189
- readonly set_env: (a: number, b: number, c: number, d: number) => any;
190
- readonly sleep: (a: number) => any;
191
- readonly new_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
192
- readonly update_nostr_pubkey: (a: number, b: number, c: number, d: number) => any;
193
- readonly convert_contract_amount_raw: (a: number, b: number, c: number) => [number, number];
194
- readonly convert_contract_amount_string: (a: bigint, b: number) => [number, number];
195
- readonly parse_contract_amount: (a: number, b: number) => any;
196
- readonly parse_contract_amount_precision: (a: number, b: number, c: number) => [number, number];
197
- readonly version: () => any;
198
- readonly create_watcher: (a: number, b: number, c: any) => any;
199
- readonly recover_watcher: (a: number, b: number, c: any) => any;
200
- readonly destroy_watcher: (a: number, b: number) => any;
201
- readonly destroy_recover_watcher: (a: number, b: number) => any;
202
- readonly check_watcher: (a: number, b: number) => any;
203
- readonly watcher_next_address: (a: number, b: number, c: number, d: number) => any;
204
- readonly watcher_next_utxo: (a: number, b: number, c: number, d: number) => any;
205
- readonly watcher_unspent_utxos: (a: number, b: number, c: number, d: number) => any;
206
206
  readonly rustsecp256k1_v0_9_2_context_create: (a: number) => number;
207
207
  readonly rustsecp256k1_v0_9_2_context_destroy: (a: number) => void;
208
208
  readonly rustsecp256k1_v0_9_2_default_illegal_callback_fn: (a: number, b: number) => void;
@@ -228,12 +228,12 @@ export interface InitOutput {
228
228
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
229
229
  readonly __wbindgen_export_7: WebAssembly.Table;
230
230
  readonly __externref_table_dealloc: (a: number) => void;
231
- readonly closure1125_externref_shim: (a: number, b: number, c: any) => void;
232
- readonly closure2754_externref_shim: (a: number, b: number, c: any) => void;
233
- readonly closure2785_externref_shim: (a: number, b: number, c: any) => void;
231
+ readonly closure1202_externref_shim: (a: number, b: number, c: any) => void;
232
+ readonly closure2743_externref_shim: (a: number, b: number, c: any) => void;
233
+ readonly closure2774_externref_shim: (a: number, b: number, c: any) => void;
234
234
  readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7ceba1bc0c075797: (a: number, b: number) => void;
235
- readonly closure3965_externref_shim: (a: number, b: number, c: any) => void;
236
- readonly closure4257_externref_shim: (a: number, b: number, c: any, d: any) => void;
235
+ readonly closure3954_externref_shim: (a: number, b: number, c: any) => void;
236
+ readonly closure4246_externref_shim: (a: number, b: number, c: any, d: any) => void;
237
237
  readonly __wbindgen_start: () => void;
238
238
  }
239
239