bitmask-core 0.7.6-beta.3 → 0.11.0-beta.2
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/README.md +4 -1
- package/bitmask_core.d.ts +95 -220
- package/bitmask_core.js +681 -682
- package/bitmask_core_bg.js +913 -668
- package/bitmask_core_bg.wasm +0 -0
- package/bitmask_core_bg.wasm.d.ts +27 -42
- package/constants.js +1 -8
- package/constants.ts +1 -8
- package/package.json +1 -1
- package/rgb.d.ts +39 -54
- package/rgb.d.ts.map +1 -1
- package/rgb.js +129 -70
- package/rgb.ts +122 -127
package/README.md
CHANGED
|
@@ -27,7 +27,10 @@ Some environment variables may be needed in order to compile on macos-aarch64, f
|
|
|
27
27
|
|
|
28
28
|
If there are issues compiling, be sure to check you're compiling with the latest Rust version.
|
|
29
29
|
|
|
30
|
-
To build this as a NodeJS module
|
|
30
|
+
To build this as a NodeJS module:
|
|
31
|
+
|
|
32
|
+
1. Define rust flags: `export RUSTFLAGS='-C target-feature=+atomics,+bulk-memory,+mutable-globals'`
|
|
33
|
+
2. Execute: `wasm-pack build --release --target bundler`
|
|
31
34
|
|
|
32
35
|
## Test
|
|
33
36
|
|
package/bitmask_core.d.ts
CHANGED
|
@@ -1,257 +1,188 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
* @param {string}
|
|
5
|
-
* @param {
|
|
4
|
+
* @param {string} secret_key
|
|
5
|
+
* @param {string} name
|
|
6
|
+
* @param {Uint8Array} data
|
|
7
|
+
* @param {boolean} force
|
|
8
|
+
* @param {Uint8Array | undefined} [metadata]
|
|
6
9
|
* @returns {Promise<any>}
|
|
7
10
|
*/
|
|
8
|
-
export function
|
|
11
|
+
export function store(secret_key: string, name: string, data: Uint8Array, force: boolean, metadata?: Uint8Array): Promise<any>;
|
|
9
12
|
/**
|
|
10
|
-
* @param {string}
|
|
11
|
-
* @param {string}
|
|
13
|
+
* @param {string} secret_key
|
|
14
|
+
* @param {string} name
|
|
12
15
|
* @returns {Promise<any>}
|
|
13
16
|
*/
|
|
14
|
-
export function
|
|
17
|
+
export function retrieve(secret_key: string, name: string): Promise<any>;
|
|
15
18
|
/**
|
|
16
|
-
* @param {string}
|
|
17
|
-
* @param {string}
|
|
19
|
+
* @param {string} secret_key
|
|
20
|
+
* @param {string} name
|
|
18
21
|
* @returns {Promise<any>}
|
|
19
22
|
*/
|
|
20
|
-
export function
|
|
23
|
+
export function retrieve_metadata(secret_key: string, name: string): Promise<any>;
|
|
21
24
|
/**
|
|
22
|
-
* @param {
|
|
23
|
-
* @
|
|
24
|
-
* @returns {Promise<any>}
|
|
25
|
+
* @param {Uint8Array} bytes
|
|
26
|
+
* @returns {string}
|
|
25
27
|
*/
|
|
26
|
-
export function
|
|
28
|
+
export function encode_hex(bytes: Uint8Array): string;
|
|
27
29
|
/**
|
|
28
|
-
* @param {
|
|
29
|
-
* @
|
|
30
|
-
* @returns {Promise<any>}
|
|
30
|
+
* @param {Uint8Array} bytes
|
|
31
|
+
* @returns {string}
|
|
31
32
|
*/
|
|
32
|
-
export function
|
|
33
|
+
export function encode_base64(bytes: Uint8Array): string;
|
|
33
34
|
/**
|
|
34
|
-
* @param {string}
|
|
35
|
-
* @
|
|
36
|
-
* @returns {Promise<any>}
|
|
35
|
+
* @param {string} string
|
|
36
|
+
* @returns {Uint8Array}
|
|
37
37
|
*/
|
|
38
|
-
export function
|
|
38
|
+
export function decode_hex(string: string): Uint8Array;
|
|
39
39
|
/**
|
|
40
|
-
* @param {string}
|
|
41
|
-
* @
|
|
42
|
-
* @returns {Promise<any>}
|
|
40
|
+
* @param {string} string
|
|
41
|
+
* @returns {Uint8Array}
|
|
43
42
|
*/
|
|
44
|
-
export function
|
|
43
|
+
export function decode_base64(string: string): Uint8Array;
|
|
45
44
|
/**
|
|
46
|
-
* @
|
|
47
|
-
* @returns {Promise<any>}
|
|
45
|
+
* @returns {string}
|
|
48
46
|
*/
|
|
49
|
-
export function
|
|
47
|
+
export function get_rgb_version(): string;
|
|
50
48
|
/**
|
|
51
49
|
* @param {string} nostr_hex_sk
|
|
52
50
|
* @param {any} request
|
|
53
51
|
* @returns {Promise<any>}
|
|
54
52
|
*/
|
|
55
|
-
export function
|
|
53
|
+
export function create_watcher(nostr_hex_sk: string, request: any): Promise<any>;
|
|
56
54
|
/**
|
|
57
55
|
* @param {string} nostr_hex_sk
|
|
58
|
-
* @param {any} request
|
|
59
56
|
* @returns {Promise<any>}
|
|
60
57
|
*/
|
|
61
|
-
export function
|
|
58
|
+
export function destroy_watcher(nostr_hex_sk: string): Promise<any>;
|
|
62
59
|
/**
|
|
63
60
|
* @param {string} nostr_hex_sk
|
|
64
|
-
* @param {any} request
|
|
65
|
-
* @param {any} secrets
|
|
66
61
|
* @returns {Promise<any>}
|
|
67
62
|
*/
|
|
68
|
-
export function
|
|
63
|
+
export function check_watcher(nostr_hex_sk: string): Promise<any>;
|
|
69
64
|
/**
|
|
70
65
|
* @param {string} nostr_hex_sk
|
|
71
|
-
* @param {any} request
|
|
72
66
|
* @returns {Promise<any>}
|
|
73
67
|
*/
|
|
74
|
-
export function
|
|
68
|
+
export function watcher_rgb_wallet(nostr_hex_sk: string): Promise<any>;
|
|
75
69
|
/**
|
|
76
70
|
* @param {string} nostr_hex_sk
|
|
77
71
|
* @param {string} request
|
|
78
72
|
* @returns {Promise<any>}
|
|
79
73
|
*/
|
|
80
|
-
export function
|
|
81
|
-
/**
|
|
82
|
-
* @param {string} nostr_hex_sk
|
|
83
|
-
* @returns {Promise<any>}
|
|
84
|
-
*/
|
|
85
|
-
export function list_transfers(nostr_hex_sk: string): Promise<any>;
|
|
86
|
-
/**
|
|
87
|
-
* @param {string} nostr_hex_sk
|
|
88
|
-
* @returns {Promise<any>}
|
|
89
|
-
*/
|
|
90
|
-
export function verify_transfers(nostr_hex_sk: string): Promise<any>;
|
|
91
|
-
/**
|
|
92
|
-
* @param {string} nostr_hex_sk
|
|
93
|
-
* @param {any} request
|
|
94
|
-
* @returns {Promise<any>}
|
|
95
|
-
*/
|
|
96
|
-
export function get_swap(nostr_hex_sk: string, request: any): Promise<any>;
|
|
97
|
-
/**
|
|
98
|
-
* @param {string} nostr_hex_sk
|
|
99
|
-
* @returns {Promise<any>}
|
|
100
|
-
*/
|
|
101
|
-
export function public_offers(nostr_hex_sk: string): Promise<any>;
|
|
74
|
+
export function watcher_next_address(nostr_hex_sk: string, request: string): Promise<any>;
|
|
102
75
|
/**
|
|
103
76
|
* @param {string} nostr_hex_sk
|
|
77
|
+
* @param {string} request
|
|
104
78
|
* @returns {Promise<any>}
|
|
105
79
|
*/
|
|
106
|
-
export function
|
|
80
|
+
export function watcher_next_utxo(nostr_hex_sk: string, request: string): Promise<any>;
|
|
107
81
|
/**
|
|
108
82
|
* @param {string} nostr_hex_sk
|
|
83
|
+
* @param {string} request
|
|
109
84
|
* @returns {Promise<any>}
|
|
110
85
|
*/
|
|
111
|
-
export function
|
|
86
|
+
export function watcher_unspent_utxos(nostr_hex_sk: string, request: string): Promise<any>;
|
|
112
87
|
/**
|
|
113
88
|
* @param {string} nostr_hex_sk
|
|
114
|
-
* @param {
|
|
89
|
+
* @param {string} request
|
|
115
90
|
* @returns {Promise<any>}
|
|
116
91
|
*/
|
|
117
|
-
export function
|
|
92
|
+
export function get_contract(nostr_hex_sk: string, request: string): Promise<any>;
|
|
118
93
|
/**
|
|
119
94
|
* @param {string} nostr_hex_sk
|
|
120
|
-
* @param {
|
|
121
|
-
* @param {any} secrets
|
|
95
|
+
* @param {boolean} arg1
|
|
122
96
|
* @returns {Promise<any>}
|
|
123
97
|
*/
|
|
124
|
-
export function
|
|
98
|
+
export function list_contracts(nostr_hex_sk: string, arg1: boolean): Promise<any>;
|
|
125
99
|
/**
|
|
126
100
|
* @param {string} nostr_hex_sk
|
|
127
|
-
* @param {
|
|
128
|
-
* @param {any} secrets
|
|
101
|
+
* @param {string} request
|
|
129
102
|
* @returns {Promise<any>}
|
|
130
103
|
*/
|
|
131
|
-
export function
|
|
104
|
+
export function import_contract(nostr_hex_sk: string, request: string): Promise<any>;
|
|
132
105
|
/**
|
|
133
106
|
* @param {string} nostr_hex_sk
|
|
134
107
|
* @param {any} request
|
|
135
|
-
* @param {any} secrets
|
|
136
108
|
* @returns {Promise<any>}
|
|
137
109
|
*/
|
|
138
|
-
export function
|
|
110
|
+
export function issue_contract(nostr_hex_sk: string, request: any): Promise<any>;
|
|
139
111
|
/**
|
|
140
112
|
* @param {string} nostr_hex_sk
|
|
141
113
|
* @param {any} request
|
|
142
114
|
* @returns {Promise<any>}
|
|
143
115
|
*/
|
|
144
|
-
export function
|
|
116
|
+
export function issue_contract_proxy(nostr_hex_sk: string, request: any): Promise<any>;
|
|
145
117
|
/**
|
|
146
118
|
* @param {string} nostr_hex_sk
|
|
147
119
|
* @param {any} request
|
|
148
|
-
* @param {any} secrets
|
|
149
120
|
* @returns {Promise<any>}
|
|
150
121
|
*/
|
|
151
|
-
export function
|
|
122
|
+
export function create_rgb_invoice(nostr_hex_sk: string, request: any): Promise<any>;
|
|
152
123
|
/**
|
|
153
124
|
* @param {string} nostr_hex_sk
|
|
154
|
-
* @param {
|
|
155
|
-
* @param {any} secrets
|
|
125
|
+
* @param {string} request
|
|
156
126
|
* @returns {Promise<any>}
|
|
157
127
|
*/
|
|
158
|
-
export function
|
|
128
|
+
export function remove_rgb_invoice(nostr_hex_sk: string, request: string): Promise<any>;
|
|
159
129
|
/**
|
|
160
130
|
* @param {string} nostr_hex_sk
|
|
161
|
-
* @param {any} request
|
|
162
131
|
* @returns {Promise<any>}
|
|
163
132
|
*/
|
|
164
|
-
export function
|
|
133
|
+
export function list_rgb_invoices(nostr_hex_sk: string): Promise<any>;
|
|
165
134
|
/**
|
|
166
|
-
* @param {string}
|
|
167
|
-
* @param {any} request
|
|
168
|
-
* @param {any} secrets
|
|
135
|
+
* @param {string} invoice
|
|
169
136
|
* @returns {Promise<any>}
|
|
170
137
|
*/
|
|
171
|
-
export function
|
|
138
|
+
export function decode_rgb_invoice(invoice: string): Promise<any>;
|
|
172
139
|
/**
|
|
173
140
|
* @param {string} nostr_hex_sk
|
|
174
141
|
* @param {any} request
|
|
175
|
-
* @param {any} secrets
|
|
176
142
|
* @returns {Promise<any>}
|
|
177
143
|
*/
|
|
178
|
-
export function
|
|
144
|
+
export function can_create_transfer_contract(nostr_hex_sk: string, request: any): Promise<any>;
|
|
179
145
|
/**
|
|
180
146
|
* @param {string} nostr_hex_sk
|
|
181
147
|
* @param {any} request
|
|
182
148
|
* @returns {Promise<any>}
|
|
183
149
|
*/
|
|
184
|
-
export function
|
|
150
|
+
export function create_rgb_transfer(nostr_hex_sk: string, request: any): Promise<any>;
|
|
185
151
|
/**
|
|
186
152
|
* @param {string} nostr_hex_sk
|
|
187
153
|
* @param {any} request
|
|
188
154
|
* @param {any} secrets
|
|
189
|
-
* @param {bigint} fee
|
|
190
|
-
* @param {string} max_claim
|
|
191
155
|
* @returns {Promise<any>}
|
|
192
156
|
*/
|
|
193
|
-
export function
|
|
157
|
+
export function create_and_publish_rgb_transfer(nostr_hex_sk: string, request: any, secrets: any): Promise<any>;
|
|
194
158
|
/**
|
|
195
|
-
* @param {string}
|
|
159
|
+
* @param {string} _nostr_hex_sk
|
|
196
160
|
* @param {any} request
|
|
197
161
|
* @returns {Promise<any>}
|
|
198
162
|
*/
|
|
199
|
-
export function
|
|
163
|
+
export function psbt_sign_file(_nostr_hex_sk: string, request: any): Promise<any>;
|
|
200
164
|
/**
|
|
201
165
|
* @param {string} nostr_hex_sk
|
|
202
166
|
* @param {any} request
|
|
203
167
|
* @returns {Promise<any>}
|
|
204
168
|
*/
|
|
205
|
-
export function
|
|
169
|
+
export function accept_transfer(nostr_hex_sk: string, request: any): Promise<any>;
|
|
206
170
|
/**
|
|
207
171
|
* @param {string} nostr_hex_sk
|
|
208
172
|
* @param {any} request
|
|
209
173
|
* @returns {Promise<any>}
|
|
210
174
|
*/
|
|
211
|
-
export function
|
|
175
|
+
export function save_transfer(nostr_hex_sk: string, request: any): Promise<any>;
|
|
212
176
|
/**
|
|
213
177
|
* @param {string} nostr_hex_sk
|
|
214
178
|
* @returns {Promise<any>}
|
|
215
179
|
*/
|
|
216
|
-
export function
|
|
217
|
-
/**
|
|
218
|
-
* @param {string} nostr_hex_sk
|
|
219
|
-
* @returns {Promise<any>}
|
|
220
|
-
*/
|
|
221
|
-
export function watcher_rgb_wallet(nostr_hex_sk: string): Promise<any>;
|
|
222
|
-
/**
|
|
223
|
-
* @param {string} nostr_hex_sk
|
|
224
|
-
* @param {string} request
|
|
225
|
-
* @returns {Promise<any>}
|
|
226
|
-
*/
|
|
227
|
-
export function watcher_next_address(nostr_hex_sk: string, request: string): Promise<any>;
|
|
180
|
+
export function list_transfers(nostr_hex_sk: string): Promise<any>;
|
|
228
181
|
/**
|
|
229
182
|
* @param {string} nostr_hex_sk
|
|
230
|
-
* @param {string} request
|
|
231
183
|
* @returns {Promise<any>}
|
|
232
184
|
*/
|
|
233
|
-
export function
|
|
234
|
-
/**
|
|
235
|
-
* @param {string} nostr_hex_sk
|
|
236
|
-
* @param {string} request
|
|
237
|
-
* @returns {Promise<any>}
|
|
238
|
-
*/
|
|
239
|
-
export function watcher_unspent_utxos(nostr_hex_sk: string, request: string): Promise<any>;
|
|
240
|
-
/**
|
|
241
|
-
* @param {string} _nostr_hex_sk
|
|
242
|
-
* @param {any} request
|
|
243
|
-
* @returns {Promise<any>}
|
|
244
|
-
*/
|
|
245
|
-
export function psbt_sign_file(_nostr_hex_sk: string, request: any): Promise<any>;
|
|
246
|
-
/**
|
|
247
|
-
* @param {string} invoice
|
|
248
|
-
* @returns {Promise<any>}
|
|
249
|
-
*/
|
|
250
|
-
export function decode_invoice(invoice: string): Promise<any>;
|
|
251
|
-
/**
|
|
252
|
-
* @returns {string}
|
|
253
|
-
*/
|
|
254
|
-
export function get_rgb_version(): string;
|
|
185
|
+
export function verify_transfers(nostr_hex_sk: string): Promise<any>;
|
|
255
186
|
/**
|
|
256
187
|
* @returns {Promise<any>}
|
|
257
188
|
*/
|
|
@@ -441,46 +372,17 @@ export function swap_btc_ln(token: string, ln_address?: string): Promise<any>;
|
|
|
441
372
|
*/
|
|
442
373
|
export function swap_ln_btc(address: string, amount: bigint, token: string): Promise<any>;
|
|
443
374
|
/**
|
|
444
|
-
* @param {string}
|
|
445
|
-
* @param {string}
|
|
446
|
-
* @param {Uint8Array} data
|
|
447
|
-
* @param {boolean} force
|
|
448
|
-
* @param {Uint8Array | undefined} [metadata]
|
|
449
|
-
* @returns {Promise<any>}
|
|
450
|
-
*/
|
|
451
|
-
export function store(secret_key: string, name: string, data: Uint8Array, force: boolean, metadata?: Uint8Array): Promise<any>;
|
|
452
|
-
/**
|
|
453
|
-
* @param {string} secret_key
|
|
454
|
-
* @param {string} name
|
|
375
|
+
* @param {string} pubkey
|
|
376
|
+
* @param {string} token
|
|
455
377
|
* @returns {Promise<any>}
|
|
456
378
|
*/
|
|
457
|
-
export function
|
|
379
|
+
export function new_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
458
380
|
/**
|
|
459
|
-
* @param {string}
|
|
460
|
-
* @param {string}
|
|
381
|
+
* @param {string} pubkey
|
|
382
|
+
* @param {string} token
|
|
461
383
|
* @returns {Promise<any>}
|
|
462
384
|
*/
|
|
463
|
-
export function
|
|
464
|
-
/**
|
|
465
|
-
* @param {Uint8Array} bytes
|
|
466
|
-
* @returns {string}
|
|
467
|
-
*/
|
|
468
|
-
export function encode_hex(bytes: Uint8Array): string;
|
|
469
|
-
/**
|
|
470
|
-
* @param {Uint8Array} bytes
|
|
471
|
-
* @returns {string}
|
|
472
|
-
*/
|
|
473
|
-
export function encode_base64(bytes: Uint8Array): string;
|
|
474
|
-
/**
|
|
475
|
-
* @param {string} string
|
|
476
|
-
* @returns {Uint8Array}
|
|
477
|
-
*/
|
|
478
|
-
export function decode_hex(string: string): Uint8Array;
|
|
479
|
-
/**
|
|
480
|
-
* @param {string} string
|
|
481
|
-
* @returns {Uint8Array}
|
|
482
|
-
*/
|
|
483
|
-
export function decode_base64(string: string): Uint8Array;
|
|
385
|
+
export function update_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
484
386
|
/**
|
|
485
387
|
* @param {string} decimal
|
|
486
388
|
* @param {number} precision
|
|
@@ -508,65 +410,43 @@ export function parse_contract_amount_precision(amount: string, precision: numbe
|
|
|
508
410
|
* @returns {any}
|
|
509
411
|
*/
|
|
510
412
|
export function version(): any;
|
|
511
|
-
/**
|
|
512
|
-
* @param {string} pubkey
|
|
513
|
-
* @param {string} token
|
|
514
|
-
* @returns {Promise<any>}
|
|
515
|
-
*/
|
|
516
|
-
export function new_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
517
|
-
/**
|
|
518
|
-
* @param {string} pubkey
|
|
519
|
-
* @param {string} token
|
|
520
|
-
* @returns {Promise<any>}
|
|
521
|
-
*/
|
|
522
|
-
export function update_nostr_pubkey(pubkey: string, token: string): Promise<any>;
|
|
523
413
|
|
|
524
414
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
525
415
|
|
|
526
416
|
export interface InitOutput {
|
|
527
417
|
readonly memory: WebAssembly.Memory;
|
|
528
|
-
readonly
|
|
418
|
+
readonly store: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
419
|
+
readonly retrieve: (a: number, b: number, c: number, d: number) => number;
|
|
420
|
+
readonly retrieve_metadata: (a: number, b: number, c: number, d: number) => number;
|
|
421
|
+
readonly encode_hex: (a: number, b: number, c: number) => void;
|
|
422
|
+
readonly encode_base64: (a: number, b: number, c: number) => void;
|
|
423
|
+
readonly decode_hex: (a: number, b: number, c: number) => void;
|
|
424
|
+
readonly decode_base64: (a: number, b: number, c: number) => void;
|
|
425
|
+
readonly get_rgb_version: (a: number) => void;
|
|
426
|
+
readonly create_watcher: (a: number, b: number, c: number) => number;
|
|
427
|
+
readonly destroy_watcher: (a: number, b: number) => number;
|
|
428
|
+
readonly check_watcher: (a: number, b: number) => number;
|
|
429
|
+
readonly watcher_rgb_wallet: (a: number, b: number) => number;
|
|
430
|
+
readonly watcher_next_address: (a: number, b: number, c: number, d: number) => number;
|
|
431
|
+
readonly watcher_next_utxo: (a: number, b: number, c: number, d: number) => number;
|
|
432
|
+
readonly watcher_unspent_utxos: (a: number, b: number, c: number, d: number) => number;
|
|
529
433
|
readonly get_contract: (a: number, b: number, c: number, d: number) => number;
|
|
434
|
+
readonly list_contracts: (a: number, b: number, c: number) => number;
|
|
530
435
|
readonly import_contract: (a: number, b: number, c: number, d: number) => number;
|
|
531
436
|
readonly issue_contract: (a: number, b: number, c: number) => number;
|
|
532
437
|
readonly issue_contract_proxy: (a: number, b: number, c: number) => number;
|
|
533
438
|
readonly create_rgb_invoice: (a: number, b: number, c: number) => number;
|
|
534
439
|
readonly remove_rgb_invoice: (a: number, b: number, c: number, d: number) => number;
|
|
535
440
|
readonly list_rgb_invoices: (a: number, b: number) => number;
|
|
441
|
+
readonly decode_rgb_invoice: (a: number, b: number) => number;
|
|
536
442
|
readonly can_create_transfer_contract: (a: number, b: number, c: number) => number;
|
|
537
443
|
readonly create_rgb_transfer: (a: number, b: number, c: number) => number;
|
|
538
444
|
readonly create_and_publish_rgb_transfer: (a: number, b: number, c: number, d: number) => number;
|
|
445
|
+
readonly psbt_sign_file: (a: number, b: number, c: number) => number;
|
|
539
446
|
readonly accept_transfer: (a: number, b: number, c: number) => number;
|
|
540
|
-
readonly save_transfer: (a: number, b: number, c: number
|
|
447
|
+
readonly save_transfer: (a: number, b: number, c: number) => number;
|
|
541
448
|
readonly list_transfers: (a: number, b: number) => number;
|
|
542
449
|
readonly verify_transfers: (a: number, b: number) => number;
|
|
543
|
-
readonly get_swap: (a: number, b: number, c: number) => number;
|
|
544
|
-
readonly public_offers: (a: number, b: number) => number;
|
|
545
|
-
readonly my_offers: (a: number, b: number) => number;
|
|
546
|
-
readonly my_bids: (a: number, b: number) => number;
|
|
547
|
-
readonly create_hotswap_offer: (a: number, b: number, c: number) => number;
|
|
548
|
-
readonly create_hotswap_bid: (a: number, b: number, c: number, d: number) => number;
|
|
549
|
-
readonly can_create_p2p_offer: (a: number, b: number, c: number, d: number) => number;
|
|
550
|
-
readonly create_p2p_offer: (a: number, b: number, c: number, d: number) => number;
|
|
551
|
-
readonly cancel_p2p_offer: (a: number, b: number, c: number) => number;
|
|
552
|
-
readonly can_create_p2p_bid: (a: number, b: number, c: number, d: number) => number;
|
|
553
|
-
readonly create_p2p_bid: (a: number, b: number, c: number, d: number) => number;
|
|
554
|
-
readonly cancel_p2p_bid: (a: number, b: number, c: number) => number;
|
|
555
|
-
readonly create_auction_offer: (a: number, b: number, c: number, d: number) => number;
|
|
556
|
-
readonly create_auction_bid: (a: number, b: number, c: number, d: number) => number;
|
|
557
|
-
readonly close_auction_offer: (a: number, b: number, c: number) => number;
|
|
558
|
-
readonly create_airdrop_offer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
559
|
-
readonly create_airdrop_bid: (a: number, b: number, c: number) => number;
|
|
560
|
-
readonly close_airdrop_offer: (a: number, b: number, c: number) => number;
|
|
561
|
-
readonly create_watcher: (a: number, b: number, c: number) => number;
|
|
562
|
-
readonly check_watcher: (a: number, b: number) => number;
|
|
563
|
-
readonly watcher_rgb_wallet: (a: number, b: number) => number;
|
|
564
|
-
readonly watcher_next_address: (a: number, b: number, c: number, d: number) => number;
|
|
565
|
-
readonly watcher_next_utxo: (a: number, b: number, c: number, d: number) => number;
|
|
566
|
-
readonly watcher_unspent_utxos: (a: number, b: number, c: number, d: number) => number;
|
|
567
|
-
readonly psbt_sign_file: (a: number, b: number, c: number) => number;
|
|
568
|
-
readonly decode_invoice: (a: number, b: number) => number;
|
|
569
|
-
readonly get_rgb_version: (a: number) => void;
|
|
570
450
|
readonly get_network: () => number;
|
|
571
451
|
readonly switch_network: (a: number, b: number) => number;
|
|
572
452
|
readonly get_env: (a: number, b: number) => number;
|
|
@@ -598,22 +478,15 @@ export interface InitOutput {
|
|
|
598
478
|
readonly check_payment: (a: number, b: number) => number;
|
|
599
479
|
readonly swap_btc_ln: (a: number, b: number, c: number, d: number) => number;
|
|
600
480
|
readonly swap_ln_btc: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
601
|
-
readonly
|
|
602
|
-
readonly
|
|
603
|
-
readonly retrieve_metadata: (a: number, b: number, c: number, d: number) => number;
|
|
604
|
-
readonly encode_hex: (a: number, b: number, c: number) => void;
|
|
605
|
-
readonly encode_base64: (a: number, b: number, c: number) => void;
|
|
606
|
-
readonly decode_hex: (a: number, b: number, c: number) => void;
|
|
607
|
-
readonly decode_base64: (a: number, b: number, c: number) => void;
|
|
481
|
+
readonly new_nostr_pubkey: (a: number, b: number, c: number, d: number) => number;
|
|
482
|
+
readonly update_nostr_pubkey: (a: number, b: number, c: number, d: number) => number;
|
|
608
483
|
readonly convert_contract_amount_raw: (a: number, b: number, c: number, d: number) => void;
|
|
609
484
|
readonly convert_contract_amount_string: (a: number, b: number, c: number) => void;
|
|
610
485
|
readonly parse_contract_amount: (a: number, b: number) => number;
|
|
611
486
|
readonly parse_contract_amount_precision: (a: number, b: number, c: number, d: number) => void;
|
|
612
487
|
readonly version: () => number;
|
|
613
|
-
readonly
|
|
614
|
-
readonly
|
|
615
|
-
readonly rustsecp256k1zkp_v0_8_0_default_illegal_callback_fn: (a: number, b: number) => void;
|
|
616
|
-
readonly rustsecp256k1zkp_v0_8_0_default_error_callback_fn: (a: number, b: number) => void;
|
|
488
|
+
readonly rustsecp256k1zkp_v0_10_0_default_illegal_callback_fn: (a: number, b: number) => void;
|
|
489
|
+
readonly rustsecp256k1zkp_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|
|
617
490
|
readonly rustsecp256k1_v0_9_2_context_create: (a: number) => number;
|
|
618
491
|
readonly rustsecp256k1_v0_9_2_context_destroy: (a: number) => void;
|
|
619
492
|
readonly rustsecp256k1_v0_9_2_default_illegal_callback_fn: (a: number, b: number) => void;
|
|
@@ -633,11 +506,13 @@ export interface InitOutput {
|
|
|
633
506
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
634
507
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
635
508
|
readonly __wbindgen_export_2: WebAssembly.Table;
|
|
636
|
-
readonly
|
|
509
|
+
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4a8f0a711fd89483: (a: number, b: number, c: number) => void;
|
|
510
|
+
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h67989bb546254912: (a: number, b: number, c: number) => void;
|
|
511
|
+
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h44bb1f1f44df6b9a: (a: number, b: number, c: number) => void;
|
|
637
512
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
638
513
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
639
514
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
640
|
-
readonly
|
|
515
|
+
readonly wasm_bindgen__convert__closures__invoke2_mut__h33e096e989ef8747: (a: number, b: number, c: number, d: number) => void;
|
|
641
516
|
}
|
|
642
517
|
|
|
643
518
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
@@ -645,18 +520,18 @@ export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
|
645
520
|
* Instantiates the given `module`, which can either be bytes or
|
|
646
521
|
* a precompiled `WebAssembly.Module`.
|
|
647
522
|
*
|
|
648
|
-
* @param {SyncInitInput} module
|
|
523
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
649
524
|
*
|
|
650
525
|
* @returns {InitOutput}
|
|
651
526
|
*/
|
|
652
|
-
export function initSync(module: SyncInitInput): InitOutput;
|
|
527
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
653
528
|
|
|
654
529
|
/**
|
|
655
530
|
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
656
531
|
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
657
532
|
*
|
|
658
|
-
* @param {InitInput | Promise<InitInput>} module_or_path
|
|
533
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
659
534
|
*
|
|
660
535
|
* @returns {Promise<InitOutput>}
|
|
661
536
|
*/
|
|
662
|
-
export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
|
|
537
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|