@utexo/rgb-lib-wasm 1.0.6-test
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/package.json +20 -0
- package/rgb_lib_wasm_bindings.d.ts +331 -0
- package/rgb_lib_wasm_bindings.js +1867 -0
- package/rgb_lib_wasm_bindings_bg.wasm +0 -0
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@utexo/rgb-lib-wasm",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"description": "RGB wallet library WASM bindings for browsers",
|
|
5
|
+
"version": "1.0.6-test",
|
|
6
|
+
"files": [
|
|
7
|
+
"rgb_lib_wasm_bindings_bg.wasm",
|
|
8
|
+
"rgb_lib_wasm_bindings.js",
|
|
9
|
+
"rgb_lib_wasm_bindings.d.ts"
|
|
10
|
+
],
|
|
11
|
+
"main": "rgb_lib_wasm_bindings.js",
|
|
12
|
+
"types": "rgb_lib_wasm_bindings.d.ts",
|
|
13
|
+
"sideEffects": [
|
|
14
|
+
"./snippets/*"
|
|
15
|
+
],
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/UTEXO-Protocol/rgb-lib-wasm.git"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* An RGB invoice parsed from a string. Exposes structured invoice data to JavaScript.
|
|
6
|
+
*/
|
|
7
|
+
export class WasmInvoice {
|
|
8
|
+
free(): void;
|
|
9
|
+
[Symbol.dispose](): void;
|
|
10
|
+
/**
|
|
11
|
+
* Return the parsed invoice data as a JS object.
|
|
12
|
+
*/
|
|
13
|
+
invoiceData(): any;
|
|
14
|
+
/**
|
|
15
|
+
* Return the original invoice string.
|
|
16
|
+
*/
|
|
17
|
+
invoiceString(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Parse an RGB invoice string. Throws if the string is not a valid RGB invoice.
|
|
20
|
+
*/
|
|
21
|
+
constructor(invoice_string: string);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export class WasmWallet {
|
|
25
|
+
free(): void;
|
|
26
|
+
[Symbol.dispose](): void;
|
|
27
|
+
/**
|
|
28
|
+
* Create an encrypted backup of the wallet state. Returns backup bytes as Uint8Array.
|
|
29
|
+
*/
|
|
30
|
+
backup(password: string): Uint8Array;
|
|
31
|
+
/**
|
|
32
|
+
* Check if the wallet needs a backup. Returns true if modified since last backup.
|
|
33
|
+
*/
|
|
34
|
+
backup_info(): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Blind an UTXO to receive RGB assets. Returns ReceiveData as a JS object.
|
|
37
|
+
*
|
|
38
|
+
* `assignment_js` is a JS object like `{ "Fungible": 100 }` or `"NonFungible"` or `"Any"`.
|
|
39
|
+
* `transport_endpoints_js` is a JS array of endpoint strings.
|
|
40
|
+
*/
|
|
41
|
+
blind_receive(asset_id: string | null | undefined, assignment_js: any, duration_seconds: number | null | undefined, transport_endpoints_js: any, min_confirmations: number): any;
|
|
42
|
+
/**
|
|
43
|
+
* Configure VSS (cloud) backup for this wallet.
|
|
44
|
+
*
|
|
45
|
+
* `signing_key_hex` is the 32-byte secret key as a hex string (64 hex chars).
|
|
46
|
+
*
|
|
47
|
+
* **Security note:** The signing key crosses the JS/WASM boundary as a string. It will
|
|
48
|
+
* exist in V8's string pool and cannot be zeroed from Rust. Callers should avoid storing
|
|
49
|
+
* the key in JS longer than necessary (e.g., don't keep it in a global variable).
|
|
50
|
+
*/
|
|
51
|
+
configure_vss_backup(server_url: string, store_id: string, signing_key_hex: string): void;
|
|
52
|
+
/**
|
|
53
|
+
* Create a new RGB wallet with IndexedDB state restoration.
|
|
54
|
+
*
|
|
55
|
+
* Like `new()`, but asynchronously checks IndexedDB for a previously saved
|
|
56
|
+
* snapshot and restores it, so wallet state survives page refreshes.
|
|
57
|
+
*/
|
|
58
|
+
static create(wallet_data_json: string): Promise<WasmWallet>;
|
|
59
|
+
/**
|
|
60
|
+
* Create UTXOs (begin): prepare a PSBT to create new UTXOs for RGB allocations.
|
|
61
|
+
* Returns the unsigned PSBT string.
|
|
62
|
+
*/
|
|
63
|
+
create_utxos_begin(online_js: any, up_to: boolean, num: number | null | undefined, size: number | null | undefined, fee_rate: bigint, skip_sync: boolean): Promise<string>;
|
|
64
|
+
/**
|
|
65
|
+
* Create UTXOs (end): broadcast a signed PSBT to create new UTXOs.
|
|
66
|
+
* Returns the number of created UTXOs.
|
|
67
|
+
*/
|
|
68
|
+
create_utxos_end(online_js: any, signed_psbt: string, skip_sync: boolean): Promise<number>;
|
|
69
|
+
/**
|
|
70
|
+
* Delete failed transfers. Returns true if any were deleted.
|
|
71
|
+
*/
|
|
72
|
+
delete_transfers(batch_transfer_idx: number | null | undefined, no_asset_only: boolean): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Disable VSS (cloud) backup.
|
|
75
|
+
*/
|
|
76
|
+
disable_vss_backup(): void;
|
|
77
|
+
/**
|
|
78
|
+
* Drain all wallet funds (begin): prepare a PSBT. Returns the unsigned PSBT string.
|
|
79
|
+
*/
|
|
80
|
+
drain_to_begin(online_js: any, address: string, destroy_assets: boolean, fee_rate: bigint): Promise<string>;
|
|
81
|
+
/**
|
|
82
|
+
* Drain all wallet funds (end): broadcast a signed PSBT. Returns the txid string.
|
|
83
|
+
*/
|
|
84
|
+
drain_to_end(online_js: any, signed_psbt: string): Promise<string>;
|
|
85
|
+
/**
|
|
86
|
+
* Fail pending transfers. Returns true if any transfers were failed.
|
|
87
|
+
*/
|
|
88
|
+
fail_transfers(online_js: any, batch_transfer_idx: number | null | undefined, no_asset_only: boolean, skip_sync: boolean): Promise<boolean>;
|
|
89
|
+
/**
|
|
90
|
+
* Finalize a signed PSBT (base64-encoded). Returns the finalized PSBT string.
|
|
91
|
+
*/
|
|
92
|
+
finalize_psbt(signed_psbt: string): string;
|
|
93
|
+
/**
|
|
94
|
+
* Return a new Bitcoin address from the vanilla wallet.
|
|
95
|
+
*/
|
|
96
|
+
get_address(): string;
|
|
97
|
+
/**
|
|
98
|
+
* Return the balance for a specific asset.
|
|
99
|
+
*/
|
|
100
|
+
get_asset_balance(asset_id: string): any;
|
|
101
|
+
/**
|
|
102
|
+
* Return metadata for a specific asset (name, ticker, precision, supply, etc.).
|
|
103
|
+
*/
|
|
104
|
+
get_asset_metadata(asset_id: string): any;
|
|
105
|
+
/**
|
|
106
|
+
* Return the BTC balance. Always skips sync on wasm32.
|
|
107
|
+
*/
|
|
108
|
+
get_btc_balance(): any;
|
|
109
|
+
/**
|
|
110
|
+
* Get fee estimation for a target number of blocks.
|
|
111
|
+
*/
|
|
112
|
+
get_fee_estimation(online_js: any, blocks: number): Promise<number>;
|
|
113
|
+
/**
|
|
114
|
+
* Return the WalletData as a JS object.
|
|
115
|
+
*/
|
|
116
|
+
get_wallet_data(): any;
|
|
117
|
+
/**
|
|
118
|
+
* Go online: connect to an indexer. Returns Online data as a JS object.
|
|
119
|
+
*/
|
|
120
|
+
go_online(skip_consistency_check: boolean, indexer_url: string): Promise<any>;
|
|
121
|
+
/**
|
|
122
|
+
* Inflate an IFA asset (begin): prepare a PSBT. Returns the unsigned PSBT string.
|
|
123
|
+
*
|
|
124
|
+
* `inflation_amounts_js` is a JS array of u64 values.
|
|
125
|
+
*/
|
|
126
|
+
inflate_begin(online_js: any, asset_id: string, inflation_amounts_js: any, fee_rate: bigint, min_confirmations: number): Promise<string>;
|
|
127
|
+
/**
|
|
128
|
+
* Inflate an IFA asset (end): broadcast a signed PSBT. Returns an OperationResult JS object.
|
|
129
|
+
*/
|
|
130
|
+
inflate_end(online_js: any, signed_psbt: string): Promise<any>;
|
|
131
|
+
/**
|
|
132
|
+
* Issue a new IFA (Inflatable Fungible Asset).
|
|
133
|
+
*
|
|
134
|
+
* `amounts_js` is a JS array of u64 values.
|
|
135
|
+
* `inflation_amounts_js` is a JS array of u64 values for inflation allowances.
|
|
136
|
+
*/
|
|
137
|
+
issue_asset_ifa(ticker: string, name: string, precision: number, amounts_js: any, inflation_amounts_js: any, replace_rights_num: number, reject_list_url?: string | null): any;
|
|
138
|
+
/**
|
|
139
|
+
* Issue a new NIA (Non-Inflatable Asset).
|
|
140
|
+
*
|
|
141
|
+
* `amounts_js` is a JS array of u64 values.
|
|
142
|
+
*/
|
|
143
|
+
issue_asset_nia(ticker: string, name: string, precision: number, amounts_js: any): any;
|
|
144
|
+
/**
|
|
145
|
+
* List known RGB assets. Pass a JS array of schema strings to filter, or empty for all.
|
|
146
|
+
*/
|
|
147
|
+
list_assets(filter_asset_schemas_js: any): any;
|
|
148
|
+
/**
|
|
149
|
+
* List Bitcoin transactions. Always skips sync on wasm32.
|
|
150
|
+
*/
|
|
151
|
+
list_transactions(): any;
|
|
152
|
+
/**
|
|
153
|
+
* List RGB transfers, optionally filtered by asset ID.
|
|
154
|
+
*/
|
|
155
|
+
list_transfers(asset_id?: string | null): any;
|
|
156
|
+
/**
|
|
157
|
+
* List unspent outputs. Always skips sync on wasm32.
|
|
158
|
+
*/
|
|
159
|
+
list_unspents(settled_only: boolean): any;
|
|
160
|
+
/**
|
|
161
|
+
* List vanilla (non-colored) unspent outputs. Returns a JS array of LocalOutput objects.
|
|
162
|
+
*/
|
|
163
|
+
list_unspents_vanilla(online_js: any, min_confirmations: number, skip_sync: boolean): Promise<any>;
|
|
164
|
+
/**
|
|
165
|
+
* Create a new RGB wallet from a JSON-encoded WalletData.
|
|
166
|
+
*/
|
|
167
|
+
constructor(wallet_data_json: string);
|
|
168
|
+
/**
|
|
169
|
+
* Refresh pending transfers. Returns a RefreshResult JS object.
|
|
170
|
+
*
|
|
171
|
+
* `filter_js` is a JS array of RefreshFilter objects (or empty array for all).
|
|
172
|
+
*/
|
|
173
|
+
refresh(online_js: any, asset_id: string | null | undefined, filter_js: any, skip_sync: boolean): Promise<any>;
|
|
174
|
+
/**
|
|
175
|
+
* Restore wallet state from an encrypted backup.
|
|
176
|
+
*/
|
|
177
|
+
restore_backup(backup_bytes: Uint8Array, password: string): void;
|
|
178
|
+
/**
|
|
179
|
+
* Send RGB assets (begin): prepare a PSBT. Returns the unsigned PSBT string.
|
|
180
|
+
*
|
|
181
|
+
* `recipient_map_js` is a JS object mapping asset IDs to arrays of Recipient objects.
|
|
182
|
+
*/
|
|
183
|
+
send_begin(online_js: any, recipient_map_js: any, donation: boolean, fee_rate: bigint, min_confirmations: number): Promise<string>;
|
|
184
|
+
/**
|
|
185
|
+
* Send BTC (begin): prepare a PSBT. Returns the unsigned PSBT string.
|
|
186
|
+
*/
|
|
187
|
+
send_btc_begin(online_js: any, address: string, amount: bigint, fee_rate: bigint, skip_sync: boolean): Promise<string>;
|
|
188
|
+
/**
|
|
189
|
+
* Send BTC (end): broadcast a signed PSBT. Returns the txid string.
|
|
190
|
+
*/
|
|
191
|
+
send_btc_end(online_js: any, signed_psbt: string, skip_sync: boolean): Promise<string>;
|
|
192
|
+
/**
|
|
193
|
+
* Send RGB assets (end): broadcast a signed PSBT. Returns an OperationResult JS object.
|
|
194
|
+
*/
|
|
195
|
+
send_end(online_js: any, signed_psbt: string, skip_sync: boolean): Promise<any>;
|
|
196
|
+
/**
|
|
197
|
+
* Sign a PSBT (base64-encoded). Returns the signed PSBT string.
|
|
198
|
+
*/
|
|
199
|
+
sign_psbt(unsigned_psbt: string): string;
|
|
200
|
+
/**
|
|
201
|
+
* Sync the wallet with the indexer.
|
|
202
|
+
*/
|
|
203
|
+
sync(online_js: any): Promise<void>;
|
|
204
|
+
/**
|
|
205
|
+
* Upload an encrypted backup to the configured VSS server. Returns the server version.
|
|
206
|
+
*/
|
|
207
|
+
vss_backup(): Promise<any>;
|
|
208
|
+
/**
|
|
209
|
+
* Query VSS backup status. Returns { backup_exists, server_version, backup_required }.
|
|
210
|
+
*/
|
|
211
|
+
vss_backup_info(): Promise<any>;
|
|
212
|
+
/**
|
|
213
|
+
* Download and restore wallet state from VSS server.
|
|
214
|
+
*/
|
|
215
|
+
vss_restore_backup(): Promise<void>;
|
|
216
|
+
/**
|
|
217
|
+
* Create an address to receive RGB assets via witness TX. Returns ReceiveData as a JS object.
|
|
218
|
+
*/
|
|
219
|
+
witness_receive(asset_id: string | null | undefined, assignment_js: any, duration_seconds: number | null | undefined, transport_endpoints_js: any, min_confirmations: number): any;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Check whether the provided URL points to a valid RGB proxy server.
|
|
224
|
+
*/
|
|
225
|
+
export function check_proxy_url(proxy_url: string): Promise<void>;
|
|
226
|
+
|
|
227
|
+
export function generate_keys(network: string): any;
|
|
228
|
+
|
|
229
|
+
export function init(): void;
|
|
230
|
+
|
|
231
|
+
export function restore_keys(network: string, mnemonic: string): any;
|
|
232
|
+
|
|
233
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
234
|
+
|
|
235
|
+
export interface InitOutput {
|
|
236
|
+
readonly memory: WebAssembly.Memory;
|
|
237
|
+
readonly __wbg_wasminvoice_free: (a: number, b: number) => void;
|
|
238
|
+
readonly __wbg_wasmwallet_free: (a: number, b: number) => void;
|
|
239
|
+
readonly check_proxy_url: (a: number, b: number) => any;
|
|
240
|
+
readonly generate_keys: (a: number, b: number) => [number, number, number];
|
|
241
|
+
readonly restore_keys: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
242
|
+
readonly wasminvoice_invoiceData: (a: number) => [number, number, number];
|
|
243
|
+
readonly wasminvoice_invoiceString: (a: number) => [number, number];
|
|
244
|
+
readonly wasminvoice_new: (a: number, b: number) => [number, number, number];
|
|
245
|
+
readonly wasmwallet_backup: (a: number, b: number, c: number) => [number, number, number, number];
|
|
246
|
+
readonly wasmwallet_backup_info: (a: number) => [number, number, number];
|
|
247
|
+
readonly wasmwallet_blind_receive: (a: number, b: number, c: number, d: any, e: number, f: any, g: number) => [number, number, number];
|
|
248
|
+
readonly wasmwallet_configure_vss_backup: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
249
|
+
readonly wasmwallet_create: (a: number, b: number) => any;
|
|
250
|
+
readonly wasmwallet_create_utxos_begin: (a: number, b: any, c: number, d: number, e: number, f: bigint, g: number) => any;
|
|
251
|
+
readonly wasmwallet_create_utxos_end: (a: number, b: any, c: number, d: number, e: number) => any;
|
|
252
|
+
readonly wasmwallet_delete_transfers: (a: number, b: number, c: number) => [number, number, number];
|
|
253
|
+
readonly wasmwallet_disable_vss_backup: (a: number) => void;
|
|
254
|
+
readonly wasmwallet_drain_to_begin: (a: number, b: any, c: number, d: number, e: number, f: bigint) => any;
|
|
255
|
+
readonly wasmwallet_drain_to_end: (a: number, b: any, c: number, d: number) => any;
|
|
256
|
+
readonly wasmwallet_fail_transfers: (a: number, b: any, c: number, d: number, e: number) => any;
|
|
257
|
+
readonly wasmwallet_finalize_psbt: (a: number, b: number, c: number) => [number, number, number, number];
|
|
258
|
+
readonly wasmwallet_get_address: (a: number) => [number, number, number, number];
|
|
259
|
+
readonly wasmwallet_get_asset_balance: (a: number, b: number, c: number) => [number, number, number];
|
|
260
|
+
readonly wasmwallet_get_asset_metadata: (a: number, b: number, c: number) => [number, number, number];
|
|
261
|
+
readonly wasmwallet_get_btc_balance: (a: number) => [number, number, number];
|
|
262
|
+
readonly wasmwallet_get_fee_estimation: (a: number, b: any, c: number) => any;
|
|
263
|
+
readonly wasmwallet_get_wallet_data: (a: number) => [number, number, number];
|
|
264
|
+
readonly wasmwallet_go_online: (a: number, b: number, c: number, d: number) => any;
|
|
265
|
+
readonly wasmwallet_inflate_begin: (a: number, b: any, c: number, d: number, e: any, f: bigint, g: number) => any;
|
|
266
|
+
readonly wasmwallet_inflate_end: (a: number, b: any, c: number, d: number) => any;
|
|
267
|
+
readonly wasmwallet_issue_asset_ifa: (a: number, b: number, c: number, d: number, e: number, f: number, g: any, h: any, i: number, j: number, k: number) => [number, number, number];
|
|
268
|
+
readonly wasmwallet_issue_asset_nia: (a: number, b: number, c: number, d: number, e: number, f: number, g: any) => [number, number, number];
|
|
269
|
+
readonly wasmwallet_list_assets: (a: number, b: any) => [number, number, number];
|
|
270
|
+
readonly wasmwallet_list_transactions: (a: number) => [number, number, number];
|
|
271
|
+
readonly wasmwallet_list_transfers: (a: number, b: number, c: number) => [number, number, number];
|
|
272
|
+
readonly wasmwallet_list_unspents: (a: number, b: number) => [number, number, number];
|
|
273
|
+
readonly wasmwallet_list_unspents_vanilla: (a: number, b: any, c: number, d: number) => any;
|
|
274
|
+
readonly wasmwallet_new: (a: number, b: number) => [number, number, number];
|
|
275
|
+
readonly wasmwallet_refresh: (a: number, b: any, c: number, d: number, e: any, f: number) => any;
|
|
276
|
+
readonly wasmwallet_restore_backup: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
277
|
+
readonly wasmwallet_send_begin: (a: number, b: any, c: any, d: number, e: bigint, f: number) => any;
|
|
278
|
+
readonly wasmwallet_send_btc_begin: (a: number, b: any, c: number, d: number, e: bigint, f: bigint, g: number) => any;
|
|
279
|
+
readonly wasmwallet_send_btc_end: (a: number, b: any, c: number, d: number, e: number) => any;
|
|
280
|
+
readonly wasmwallet_send_end: (a: number, b: any, c: number, d: number, e: number) => any;
|
|
281
|
+
readonly wasmwallet_sign_psbt: (a: number, b: number, c: number) => [number, number, number, number];
|
|
282
|
+
readonly wasmwallet_sync: (a: number, b: any) => any;
|
|
283
|
+
readonly wasmwallet_vss_backup: (a: number) => any;
|
|
284
|
+
readonly wasmwallet_vss_backup_info: (a: number) => any;
|
|
285
|
+
readonly wasmwallet_vss_restore_backup: (a: number) => any;
|
|
286
|
+
readonly wasmwallet_witness_receive: (a: number, b: number, c: number, d: any, e: number, f: any, g: number) => [number, number, number];
|
|
287
|
+
readonly init: () => void;
|
|
288
|
+
readonly rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
289
|
+
readonly rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
290
|
+
readonly rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|
|
291
|
+
readonly rustsecp256k1_v0_10_0_default_illegal_callback_fn: (a: number, b: number) => void;
|
|
292
|
+
readonly wasm_bindgen__closure__destroy__h14bc25e87da085f6: (a: number, b: number) => void;
|
|
293
|
+
readonly wasm_bindgen__closure__destroy__h41146c008ce82ed7: (a: number, b: number) => void;
|
|
294
|
+
readonly wasm_bindgen__closure__destroy__hb25aa0b4bfb6109d: (a: number, b: number) => void;
|
|
295
|
+
readonly wasm_bindgen__closure__destroy__hd01191ea49d0115c: (a: number, b: number) => void;
|
|
296
|
+
readonly wasm_bindgen__convert__closures_____invoke__h7cbc9124c26497ca: (a: number, b: number, c: any) => [number, number];
|
|
297
|
+
readonly wasm_bindgen__convert__closures_____invoke__h7051da1c61586a0d: (a: number, b: number, c: any, d: any) => void;
|
|
298
|
+
readonly wasm_bindgen__convert__closures_____invoke__h12e4aed491120ac3: (a: number, b: number, c: any) => void;
|
|
299
|
+
readonly wasm_bindgen__convert__closures_____invoke__hac69e780134632bb: (a: number, b: number, c: any) => void;
|
|
300
|
+
readonly wasm_bindgen__convert__closures_____invoke__hf5204abb72864ac9: (a: number, b: number) => void;
|
|
301
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
302
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
303
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
304
|
+
readonly __externref_table_alloc: () => number;
|
|
305
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
306
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
307
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
308
|
+
readonly __wbindgen_start: () => void;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
315
|
+
* a precompiled `WebAssembly.Module`.
|
|
316
|
+
*
|
|
317
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
318
|
+
*
|
|
319
|
+
* @returns {InitOutput}
|
|
320
|
+
*/
|
|
321
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
325
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
326
|
+
*
|
|
327
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
328
|
+
*
|
|
329
|
+
* @returns {Promise<InitOutput>}
|
|
330
|
+
*/
|
|
331
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|