diff --git a/.gitea/workflows/docker-ext.yml b/.gitea/workflows/docker-ext.yml index 7a06e38..3d90385 100644 --- a/.gitea/workflows/docker-ext.yml +++ b/.gitea/workflows/docker-ext.yml @@ -37,6 +37,17 @@ jobs: ssh-private-key: | ${{ secrets.SSH_PRIVATE_KEY }} + - name: Build WebAssembly + run: | + set -euo pipefail + # Install Rust and wasm-pack + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + source ~/.cargo/env + curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + + # Build the WebAssembly package + npm run build_wasm + - name: Extract docker tag from commit message (optional) id: tag run: | diff --git a/pkg/package.json b/pkg/package.json index 6d2d710..7aff693 100644 --- a/pkg/package.json +++ b/pkg/package.json @@ -1,7 +1,7 @@ { "name": "sdk_client", "type": "module", - "version": "0.1.0", + "version": "0.1.3", "files": [ "sdk_client_bg.wasm", "sdk_client.js", diff --git a/pkg/sdk_client.d.ts b/pkg/sdk_client.d.ts index 6c3a7a7..4b38399 100644 --- a/pkg/sdk_client.d.ts +++ b/pkg/sdk_client.d.ts @@ -6,14 +6,11 @@ export function get_member(): Member; export function restore_device(device: any): void; export function create_device_from_sp_wallet(sp_wallet: string): string; export function create_new_device(birthday: number, network_str: string): string; +export function scan_blocks(tip_height: number, blindbit_url: string): Promise; export function is_paired(): boolean; export function pair_device(process_id: string, sp_addresses: string[]): void; export function unpair_device(): void; export function dump_wallet(): string; -export function reset_process_cache(): void; -export function dump_process_cache(): string; -export function set_process_cache(processes: any): void; -export function add_to_process_cache(process_id: string, process: string): void; export function reset_shared_secrets(): void; export function set_shared_secrets(secrets: string): void; export function get_pairing_process_id(): string; @@ -21,8 +18,11 @@ export function dump_device(): Device; export function dump_neutered_device(): Device; export function reset_device(): void; export function get_txid(transaction: string): string; +export function get_prevouts(transaction: string): string[]; +export function get_opreturn(transaction: string): string; +export function process_commit_new_state(process: Process, state_id: string, new_tip: string): Process; export function parse_new_tx(new_tx_msg: string, block_height: number, members_list: OutPointMemberMap): ApiReturn; -export function parse_cipher(cipher_msg: string, members_list: OutPointMemberMap): ApiReturn; +export function parse_cipher(cipher_msg: string, members_list: OutPointMemberMap, processes: OutPointProcessMap): ApiReturn; export function get_outputs(): any; export function get_available_amount(): bigint; /** @@ -50,15 +50,15 @@ export function decode_value(value: Uint8Array): any; export function hash_value(value: any, commited_in: string, label: string): string; /** * Generate a merkle proof for a specific attribute in a process state. - * + * * This function creates a merkle proof that proves the existence of a specific attribute * in a given state of a process. The proof can be used to verify that the attribute * was indeed part of the state without revealing the entire state. - * + * * # Arguments * * `process_state` - The process state object as a JavaScript value * * `attribute_name` - The name of the attribute to generate a proof for - * + * * # Returns * A MerkleProofResult object containing: * * `proof` - The merkle proof as a hex string @@ -66,7 +66,7 @@ export function hash_value(value: any, commited_in: string, label: string): stri * * `attribute` - The attribute name that was proven * * `attribute_index` - The index of the attribute in the merkle tree * * `total_leaves_count` - The total number of leaves in the merkle tree - * + * * # Errors * * "Failed to deserialize process state" - If the process state cannot be deserialized from JsValue * * "Attribute not found in state" - If the attribute doesn't exist in the state @@ -74,18 +74,18 @@ export function hash_value(value: any, commited_in: string, label: string): stri export function get_merkle_proof(process_state: any, attribute_name: string): MerkleProofResult; /** * Validate a merkle proof for a specific attribute. - * + * * This function verifies that a merkle proof is valid and proves the existence * of a specific attribute in a given state. It checks that the proof correctly * leads to the claimed root when combined with the attribute hash. - * + * * # Arguments * * `proof_result` - a JsValue expected to contain a MerkleProofResult with the proof and metadata * * `hash` - The hash of the attribute data as a hex string (the leaf value) - * + * * # Returns * A boolean indicating whether the proof is valid - * + * * # Errors * * "serde_wasm_bindgen deserialization error" - If the proof is not a valid MerkleProofResult * * "Invalid proof format" - If the proof cannot be parsed @@ -105,6 +105,7 @@ export interface UserDiff { notify_user: boolean; need_validation: boolean; validation_status: DiffStatus; + storages: string[]; } export interface UpdatedProcess { @@ -138,14 +139,73 @@ export interface MerkleProofResult { total_leaves_count: number; } +export interface Prd { + prd_type: PrdType; + process_id: OutPoint; + sender: OutPoint | null; + keys: Record; + pcd_commitments: PcdCommitments; + validation_tokens: Proof[]; + roles: Roles; + public_data: Pcd; + payload: string; + proof: Proof | null; +} + +export type PrdType = "None" | "Connect" | "Message" | "Update" | "List" | "Response" | "Confirm" | "TxProposal" | "Request"; + export interface Device { sp_wallet: SpWallet; pairing_process_commitment: OutPoint | null; paired_member: Member; } +export type OutPointProcessMap = Record; + +export type OutPointMemberMap = Record; + +export interface HandshakeMessage { + sp_address: string; + peers_list: OutPointMemberMap; + processes_list: OutPointProcessMap; + chain_tip: number; +} + +export interface NewTxMessage { + transaction: string; + tweak_data: string | null; + error: AnkError | null; +} + +export interface FaucetMessage { + sp_address: string; + commitment: string; + error: AnkError | null; +} + +/** + * Message sent to the server to commit some state in a transaction + * Client must first send a commit message with empty validation_tokens + * Relay will ignore a commit message for an update he\'s not aware of that also bears validation_tokens + */ +export interface CommitMessage { + process_id: OutPoint; + pcd_commitment: PcdCommitments; + roles: Roles; + public_data: Pcd; + validation_tokens: Proof[]; + error: AnkError | null; +} + +export type AnkFlag = "NewTx" | "Faucet" | "Cipher" | "Commit" | "Handshake" | "Sync" | "Unknown"; + export type TsUnsignedTransaction = SilentPaymentUnsignedTransaction; +export interface SecretsStore { + shared_secrets: Record; + unconfirmed_secrets: AnkSharedSecretHash[]; +} + /** * A process is basically a succession of states * The latest state MUST be an empty state with only the commited_in field set at the last unspent outpoint @@ -187,62 +247,3 @@ export interface Member { sp_addresses: string[]; } -export type OutPointProcessMap = Record; - -export type OutPointMemberMap = Record; - -export interface SecretsStore { - shared_secrets: Record; - unconfirmed_secrets: AnkSharedSecretHash[]; -} - -export interface Prd { - prd_type: PrdType; - process_id: OutPoint; - sender: Member; - keys: Record; - pcd_commitments: PcdCommitments; - validation_tokens: Proof[]; - roles: Roles; - public_data: Pcd; - payload: string; - proof: Proof | null; -} - -export type PrdType = "None" | "Connect" | "Message" | "Update" | "List" | "Response" | "Confirm" | "TxProposal" | "Request"; - -export interface HandshakeMessage { - sp_address: string; - peers_list: OutPointMemberMap; - processes_list: OutPointProcessMap; - chain_tip: number; -} - -export interface NewTxMessage { - transaction: string; - tweak_data: string | null; - error: AnkError | null; -} - -export interface FaucetMessage { - sp_address: string; - commitment: string; - error: AnkError | null; -} - -/** - * Message sent to the server to commit some state in a transaction - * Client must first send a commit message with empty validation_tokens - * Relay will ignore a commit message for an update he\'s not aware of that also bears validation_tokens - */ -export interface CommitMessage { - process_id: OutPoint; - pcd_commitment: PcdCommitments; - roles: Roles; - public_data: Pcd; - validation_tokens: Proof[]; - error: AnkError | null; -} - -export type AnkFlag = "NewTx" | "Faucet" | "Cipher" | "Commit" | "Handshake" | "Sync" | "Unknown"; - diff --git a/pkg/sdk_client_bg.js b/pkg/sdk_client_bg.js index 7ed6bae..a1e5842 100644 --- a/pkg/sdk_client_bg.js +++ b/pkg/sdk_client_bg.js @@ -4,8 +4,6 @@ export function __wbg_set_wasm(val) { } -let WASM_VECTOR_LEN = 0; - let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { @@ -15,9 +13,50 @@ function getUint8ArrayMemory0() { return cachedUint8ArrayMemory0; } +const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; + +let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); + +cachedTextDecoder.decode(); + +const MAX_SAFARI_DECODE_BYTES = 2146435072; +let numBytesDecoded = 0; +function decodeText(ptr, len) { + numBytesDecoded += len; + if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { + cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); + cachedTextDecoder.decode(); + numBytesDecoded = len; + } + return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); +} + +function getStringFromWasm0(ptr, len) { + ptr = ptr >>> 0; + return decodeText(ptr, len); +} + +function logError(f, args) { + try { + return f.apply(this, args); + } catch (e) { + let error = (function () { + try { + return e instanceof Error ? `${e.message}\n\nStack:\n${e.stack}` : e.toString(); + } catch(_) { + return ""; + } + }()); + console.error("wasm-bindgen: imported JS function that was not marked as `catch` threw an error:", error); + throw e; + } +} + +let WASM_VECTOR_LEN = 0; + const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder; -let cachedTextEncoder = new lTextEncoder('utf-8'); +const cachedTextEncoder = new lTextEncoder('utf-8'); const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' ? function (arg, view) { @@ -82,22 +121,6 @@ function getDataViewMemory0() { return cachedDataViewMemory0; } -function logError(f, args) { - try { - return f.apply(this, args); - } catch (e) { - let error = (function () { - try { - return e instanceof Error ? `${e.message}\n\nStack:\n${e.stack}` : e.toString(); - } catch(_) { - return ""; - } - }()); - console.error("wasm-bindgen: imported JS function that was not marked as `catch` threw an error:", error); - throw e; - } -} - function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_export_4.set(idx, obj); @@ -123,15 +146,9 @@ function _assertNum(n) { if (typeof(n) !== 'number') throw new Error(`expected a number argument, found ${typeof(n)}`); } -const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; - -let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); - -cachedTextDecoder.decode(); - -function getStringFromWasm0(ptr, len) { +function getArrayU8FromWasm0(ptr, len) { ptr = ptr >>> 0; - return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); + return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); } function isLikeNone(x) { @@ -207,6 +224,40 @@ function debugString(val) { return className; } +const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined') + ? { register: () => {}, unregister: () => {} } + : new FinalizationRegistry( +state => { + wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b); +} +); + +function makeMutClosure(arg0, arg1, dtor, f) { + const state = { a: arg0, b: arg1, cnt: 1, dtor }; + const real = (...args) => { + + // First up with a closure we increment the internal reference + // count. This ensures that the Rust closure environment won't + // be deallocated while we're invoking it. + state.cnt++; + const a = state.a; + state.a = 0; + try { + return f(a, state.b, ...args); + } finally { + if (--state.cnt === 0) { + wasm.__wbindgen_export_5.get(state.dtor)(a, state.b); + CLOSURE_DTORS.unregister(state); + } else { + state.a = a; + } + } + }; + real.original = state; + CLOSURE_DTORS.register(real, state, state); + return real; +} + export function setup() { wasm.setup(); } @@ -311,6 +362,19 @@ export function create_new_device(birthday, network_str) { } } +/** + * @param {number} tip_height + * @param {string} blindbit_url + * @returns {Promise} + */ +export function scan_blocks(tip_height, blindbit_url) { + _assertNum(tip_height); + const ptr0 = passStringToWasm0(blindbit_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + const ret = wasm.scan_blocks(tip_height, ptr0, len0); + return ret; +} + /** * @returns {boolean} */ @@ -375,60 +439,6 @@ export function dump_wallet() { } } -export function reset_process_cache() { - const ret = wasm.reset_process_cache(); - if (ret[1]) { - throw takeFromExternrefTable0(ret[0]); - } -} - -/** - * @returns {string} - */ -export function dump_process_cache() { - let deferred2_0; - let deferred2_1; - try { - const ret = wasm.dump_process_cache(); - var ptr1 = ret[0]; - var len1 = ret[1]; - if (ret[3]) { - ptr1 = 0; len1 = 0; - throw takeFromExternrefTable0(ret[2]); - } - deferred2_0 = ptr1; - deferred2_1 = len1; - return getStringFromWasm0(ptr1, len1); - } finally { - wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); - } -} - -/** - * @param {any} processes - */ -export function set_process_cache(processes) { - const ret = wasm.set_process_cache(processes); - if (ret[1]) { - throw takeFromExternrefTable0(ret[0]); - } -} - -/** - * @param {string} process_id - * @param {string} process - */ -export function add_to_process_cache(process_id, process) { - const ptr0 = passStringToWasm0(process_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ptr1 = passStringToWasm0(process, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ret = wasm.add_to_process_cache(ptr0, len0, ptr1, len1); - if (ret[1]) { - throw takeFromExternrefTable0(ret[0]); - } -} - export function reset_shared_secrets() { const ret = wasm.reset_shared_secrets(); if (ret[1]) { @@ -524,6 +534,75 @@ export function get_txid(transaction) { } } +function getArrayJsValueFromWasm0(ptr, len) { + ptr = ptr >>> 0; + const mem = getDataViewMemory0(); + const result = []; + for (let i = ptr; i < ptr + 4 * len; i += 4) { + result.push(wasm.__wbindgen_export_4.get(mem.getUint32(i, true))); + } + wasm.__externref_drop_slice(ptr, len); + return result; +} +/** + * @param {string} transaction + * @returns {string[]} + */ +export function get_prevouts(transaction) { + const ptr0 = passStringToWasm0(transaction, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + const ret = wasm.get_prevouts(ptr0, len0); + if (ret[3]) { + throw takeFromExternrefTable0(ret[2]); + } + var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice(); + wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); + return v2; +} + +/** + * @param {string} transaction + * @returns {string} + */ +export function get_opreturn(transaction) { + let deferred3_0; + let deferred3_1; + try { + const ptr0 = passStringToWasm0(transaction, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + const ret = wasm.get_opreturn(ptr0, len0); + var ptr2 = ret[0]; + var len2 = ret[1]; + if (ret[3]) { + ptr2 = 0; len2 = 0; + throw takeFromExternrefTable0(ret[2]); + } + deferred3_0 = ptr2; + deferred3_1 = len2; + return getStringFromWasm0(ptr2, len2); + } finally { + wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); + } +} + +/** + * @param {Process} process + * @param {string} state_id + * @param {string} new_tip + * @returns {Process} + */ +export function process_commit_new_state(process, state_id, new_tip) { + const ptr0 = passStringToWasm0(state_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + const ptr1 = passStringToWasm0(new_tip, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + const ret = wasm.process_commit_new_state(process, ptr0, len0, ptr1, len1); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return takeFromExternrefTable0(ret[0]); +} + /** * @param {string} new_tx_msg * @param {number} block_height @@ -544,12 +623,13 @@ export function parse_new_tx(new_tx_msg, block_height, members_list) { /** * @param {string} cipher_msg * @param {OutPointMemberMap} members_list + * @param {OutPointProcessMap} processes * @returns {ApiReturn} */ -export function parse_cipher(cipher_msg, members_list) { +export function parse_cipher(cipher_msg, members_list, processes) { const ptr0 = passStringToWasm0(cipher_msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; - const ret = wasm.parse_cipher(ptr0, len0, members_list); + const ret = wasm.parse_cipher(ptr0, len0, members_list, processes); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } @@ -766,16 +846,6 @@ export function create_faucet_msg() { } } -function getArrayJsValueFromWasm0(ptr, len) { - ptr = ptr >>> 0; - const mem = getDataViewMemory0(); - const result = []; - for (let i = ptr; i < ptr + 4 * len; i += 4) { - result.push(wasm.__wbindgen_export_4.get(mem.getUint32(i, true))); - } - wasm.__externref_drop_slice(ptr, len); - return result; -} /** * @param {string} process_outpoint * @returns {string[]} @@ -813,11 +883,6 @@ function passArray8ToWasm0(arg, malloc) { WASM_VECTOR_LEN = arg.length; return ptr; } - -function getArrayU8FromWasm0(ptr, len) { - ptr = ptr >>> 0; - return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); -} /** * @param {Uint8Array} key * @param {Uint8Array} data @@ -973,6 +1038,40 @@ export function validate_merkle_proof(proof_result, hash) { return ret[0] !== 0; } +function __wbg_adapter_8(arg0, arg1, arg2) { + _assertNum(arg0); + _assertNum(arg1); + wasm.closure681_externref_shim(arg0, arg1, arg2); +} + +function __wbg_adapter_13(arg0, arg1) { + _assertNum(arg0); + _assertNum(arg1); + wasm.wasm_bindgen__convert__closures_____invoke__hc142e2252e76ee8b(arg0, arg1); +} + +function __wbg_adapter_195(arg0, arg1, arg2, arg3) { + _assertNum(arg0); + _assertNum(arg1); + wasm.closure1281_externref_shim(arg0, arg1, arg2, arg3); +} + +const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"]; + +const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"]; + +const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"]; + +export function __wbg_Error_1f3748b298f99708() { return logError(function (arg0, arg1) { + const ret = Error(getStringFromWasm0(arg0, arg1)); + return ret; +}, arguments) }; + +export function __wbg_Number_577a493fc95ea223() { return logError(function (arg0) { + const ret = Number(arg0); + return ret; +}, arguments) }; + export function __wbg_String_8f0eb39a4a4c2f66() { return logError(function (arg0, arg1) { const ret = String(arg1); const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); @@ -981,59 +1080,81 @@ export function __wbg_String_8f0eb39a4a4c2f66() { return logError(function (arg0 getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); }, arguments) }; -export function __wbg_buffer_609cc3eee51ed158() { return logError(function (arg0) { - const ret = arg0.buffer; - return ret; +export function __wbg_abort_6665281623826052() { return logError(function (arg0) { + arg0.abort(); }, arguments) }; -export function __wbg_call_672a4d21634d4a24() { return handleError(function (arg0, arg1) { +export function __wbg_abort_c11a5d245a242912() { return logError(function (arg0, arg1) { + arg0.abort(arg1); +}, arguments) }; + +export function __wbg_append_3e86b0cd6215edd8() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); +}, arguments) }; + +export function __wbg_call_2f8d426a20a307fe() { return handleError(function (arg0, arg1) { const ret = arg0.call(arg1); return ret; }, arguments) }; -export function __wbg_call_7cccdd69e0791ae2() { return handleError(function (arg0, arg1, arg2) { +export function __wbg_call_f53f0647ceb9c567() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments) }; -export function __wbg_crypto_ed58b8e10a292839() { return logError(function (arg0) { +export function __wbg_clearTimeout_6222fede17abcb1a() { return logError(function (arg0) { + const ret = clearTimeout(arg0); + return ret; +}, arguments) }; + +export function __wbg_crypto_574e78ad8b13b65f() { return logError(function (arg0) { const ret = arg0.crypto; return ret; }, arguments) }; -export function __wbg_debug_e17b51583ca6a632() { return logError(function (arg0, arg1, arg2, arg3) { +export function __wbg_debug_75215abdc8f82abb() { return logError(function (arg0, arg1, arg2, arg3) { console.debug(arg0, arg1, arg2, arg3); }, arguments) }; -export function __wbg_done_769e5ede4b31c67b() { return logError(function (arg0) { +export function __wbg_done_4a7743b6f942c9f3() { return logError(function (arg0) { const ret = arg0.done; _assertBoolean(ret); return ret; }, arguments) }; -export function __wbg_entries_3265d4158b33e5dc() { return logError(function (arg0) { +export function __wbg_entries_17f7acbc2d691c0d() { return logError(function (arg0) { const ret = Object.entries(arg0); return ret; }, arguments) }; -export function __wbg_error_524f506f44df1645() { return logError(function (arg0) { - console.error(arg0); -}, arguments) }; - -export function __wbg_error_80de38b3f7cc3c3c() { return logError(function (arg0, arg1, arg2, arg3) { +export function __wbg_error_29e66bad9fc546cd() { return logError(function (arg0, arg1, arg2, arg3) { console.error(arg0, arg1, arg2, arg3); }, arguments) }; -export function __wbg_getRandomValues_bcb4912f16000dc4() { return handleError(function (arg0, arg1) { +export function __wbg_error_41f0589870426ea4() { return logError(function (arg0) { + console.error(arg0); +}, arguments) }; + +export function __wbg_fetch_9885d2e26ad251bb() { return logError(function (arg0, arg1) { + const ret = arg0.fetch(arg1); + return ret; +}, arguments) }; + +export function __wbg_fetch_f156d10be9a5c88a() { return logError(function (arg0) { + const ret = fetch(arg0); + return ret; +}, arguments) }; + +export function __wbg_getRandomValues_b8f5dbd5f3995a9e() { return handleError(function (arg0, arg1) { arg0.getRandomValues(arg1); }, arguments) }; -export function __wbg_get_67b2ba62fc30de12() { return handleError(function (arg0, arg1) { +export function __wbg_get_27b4bcbec57323ca() { return handleError(function (arg0, arg1) { const ret = Reflect.get(arg0, arg1); return ret; }, arguments) }; -export function __wbg_get_b9b93047fe3cf45b() { return logError(function (arg0, arg1) { +export function __wbg_get_59c6316d15f9f1d0() { return logError(function (arg0, arg1) { const ret = arg0[arg1 >>> 0]; return ret; }, arguments) }; @@ -1043,11 +1164,22 @@ export function __wbg_getwithrefkey_1dc361bd10053bfe() { return logError(functio return ret; }, arguments) }; -export function __wbg_info_033d8b8a0838f1d3() { return logError(function (arg0, arg1, arg2, arg3) { +export function __wbg_has_85abdd8aeb8edebf() { return handleError(function (arg0, arg1) { + const ret = Reflect.has(arg0, arg1); + _assertBoolean(ret); + return ret; +}, arguments) }; + +export function __wbg_headers_177bc880a5823968() { return logError(function (arg0) { + const ret = arg0.headers; + return ret; +}, arguments) }; + +export function __wbg_info_4c14802bfaf2f5be() { return logError(function (arg0, arg1, arg2, arg3) { console.info(arg0, arg1, arg2, arg3); }, arguments) }; -export function __wbg_instanceof_ArrayBuffer_e14585432e3737fc() { return logError(function (arg0) { +export function __wbg_instanceof_ArrayBuffer_59339a3a6f0c10ea() { return logError(function (arg0) { let result; try { result = arg0 instanceof ArrayBuffer; @@ -1059,7 +1191,7 @@ export function __wbg_instanceof_ArrayBuffer_e14585432e3737fc() { return logErro return ret; }, arguments) }; -export function __wbg_instanceof_Map_f3469ce2244d2430() { return logError(function (arg0) { +export function __wbg_instanceof_Map_dd89a82d76d1b25f() { return logError(function (arg0) { let result; try { result = arg0 instanceof Map; @@ -1071,7 +1203,19 @@ export function __wbg_instanceof_Map_f3469ce2244d2430() { return logError(functi return ret; }, arguments) }; -export function __wbg_instanceof_Uint8Array_17156bcf118086a9() { return logError(function (arg0) { +export function __wbg_instanceof_Response_0ab386c6818f788a() { return logError(function (arg0) { + let result; + try { + result = arg0 instanceof Response; + } catch (_) { + result = false; + } + const ret = result; + _assertBoolean(ret); + return ret; +}, arguments) }; + +export function __wbg_instanceof_Uint8Array_91f3c5adee7e6672() { return logError(function (arg0) { let result; try { result = arg0 instanceof Uint8Array; @@ -1083,196 +1227,306 @@ export function __wbg_instanceof_Uint8Array_17156bcf118086a9() { return logError return ret; }, arguments) }; -export function __wbg_isArray_a1eab7e0d067391b() { return logError(function (arg0) { +export function __wbg_isArray_bc2498eba6fcb71f() { return logError(function (arg0) { const ret = Array.isArray(arg0); _assertBoolean(ret); return ret; }, arguments) }; -export function __wbg_isSafeInteger_343e2beeeece1bb0() { return logError(function (arg0) { +export function __wbg_isSafeInteger_6091d6e3ee1b65fd() { return logError(function (arg0) { const ret = Number.isSafeInteger(arg0); _assertBoolean(ret); return ret; }, arguments) }; -export function __wbg_iterator_9a24c88df860dc65() { return logError(function () { +export function __wbg_iterator_96378c3c9a17347c() { return logError(function () { const ret = Symbol.iterator; return ret; }, arguments) }; -export function __wbg_length_a446193dc22c12f8() { return logError(function (arg0) { +export function __wbg_length_246fa1f85a0dea5b() { return logError(function (arg0) { const ret = arg0.length; _assertNum(ret); return ret; }, arguments) }; -export function __wbg_length_e2d2a49132c1b256() { return logError(function (arg0) { +export function __wbg_length_904c0910ed998bf3() { return logError(function (arg0) { const ret = arg0.length; _assertNum(ret); return ret; }, arguments) }; -export function __wbg_log_cad59bb680daec67() { return logError(function (arg0, arg1, arg2, arg3) { +export function __wbg_log_cd247da40b37223b() { return logError(function (arg0, arg1, arg2, arg3) { console.log(arg0, arg1, arg2, arg3); }, arguments) }; -export function __wbg_msCrypto_0a36e2ec3a343d26() { return logError(function (arg0) { +export function __wbg_msCrypto_a61aeb35a24c1329() { return logError(function (arg0) { const ret = arg0.msCrypto; return ret; }, arguments) }; -export function __wbg_new_405e22f390576ce2() { return logError(function () { +export function __wbg_new_12588505388d0897() { return handleError(function () { + const ret = new Headers(); + return ret; +}, arguments) }; + +export function __wbg_new_1930cbb8d9ffc31b() { return logError(function () { const ret = new Object(); return ret; }, arguments) }; -export function __wbg_new_5e0be73521bc8c17() { return logError(function () { +export function __wbg_new_56407f99198feff7() { return logError(function () { const ret = new Map(); return ret; }, arguments) }; -export function __wbg_new_78feb108b6472713() { return logError(function () { - const ret = new Array(); +export function __wbg_new_6a8b180049d9484e() { return handleError(function () { + const ret = new AbortController(); return ret; }, arguments) }; -export function __wbg_new_a12002a7f91c75be() { return logError(function (arg0) { +export function __wbg_new_9190433fb67ed635() { return logError(function (arg0) { const ret = new Uint8Array(arg0); return ret; }, arguments) }; -export function __wbg_newnoargs_105ed471475aaf50() { return logError(function (arg0, arg1) { +export function __wbg_new_d5e3800b120e37e1() { return logError(function (arg0, arg1) { + try { + var state0 = {a: arg0, b: arg1}; + var cb0 = (arg0, arg1) => { + const a = state0.a; + state0.a = 0; + try { + return __wbg_adapter_195(a, state0.b, arg0, arg1); + } finally { + state0.a = a; + } + }; + const ret = new Promise(cb0); + return ret; + } finally { + state0.a = state0.b = 0; + } +}, arguments) }; + +export function __wbg_new_e969dc3f68d25093() { return logError(function () { + const ret = new Array(); + return ret; +}, arguments) }; + +export function __wbg_newfromslice_d0d56929c6d9c842() { return logError(function (arg0, arg1) { + const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1)); + return ret; +}, arguments) }; + +export function __wbg_newnoargs_a81330f6e05d8aca() { return logError(function (arg0, arg1) { const ret = new Function(getStringFromWasm0(arg0, arg1)); return ret; }, arguments) }; -export function __wbg_newwithbyteoffsetandlength_d97e637ebe145a9a() { return logError(function (arg0, arg1, arg2) { - const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0); - return ret; -}, arguments) }; - -export function __wbg_newwithlength_a381634e90c276d4() { return logError(function (arg0) { +export function __wbg_newwithlength_ed0ee6c1edca86fc() { return logError(function (arg0) { const ret = new Uint8Array(arg0 >>> 0); return ret; }, arguments) }; -export function __wbg_next_25feadfc0913fea9() { return logError(function (arg0) { - const ret = arg0.next; +export function __wbg_newwithstrandinit_e8e22e9851f3c2fe() { return handleError(function (arg0, arg1, arg2) { + const ret = new Request(getStringFromWasm0(arg0, arg1), arg2); return ret; }, arguments) }; -export function __wbg_next_6574e1a8a62d1055() { return handleError(function (arg0) { +export function __wbg_next_2e6b37020ac5fe58() { return handleError(function (arg0) { const ret = arg0.next(); return ret; }, arguments) }; -export function __wbg_node_02999533c4ea02e3() { return logError(function (arg0) { +export function __wbg_next_3de8f2669431a3ff() { return logError(function (arg0) { + const ret = arg0.next; + return ret; +}, arguments) }; + +export function __wbg_node_905d3e251edff8a2() { return logError(function (arg0) { const ret = arg0.node; return ret; }, arguments) }; -export function __wbg_parse_def2e24ef1252aff() { return handleError(function (arg0, arg1) { +export function __wbg_now_2c95c9de01293173() { return logError(function (arg0) { + const ret = arg0.now(); + return ret; +}, arguments) }; + +export function __wbg_parse_0eaa937cfd6388c4() { return handleError(function (arg0, arg1) { const ret = JSON.parse(getStringFromWasm0(arg0, arg1)); return ret; }, arguments) }; -export function __wbg_process_5c1d670bc53614b8() { return logError(function (arg0) { +export function __wbg_performance_7a3ffd0b17f663ad() { return logError(function (arg0) { + const ret = arg0.performance; + return ret; +}, arguments) }; + +export function __wbg_process_dc0fbacc7c1c06f7() { return logError(function (arg0) { const ret = arg0.process; return ret; }, arguments) }; -export function __wbg_randomFillSync_ab2cfe79ebbf2740() { return handleError(function (arg0, arg1) { +export function __wbg_prototypesetcall_c5f74efd31aea86b() { return logError(function (arg0, arg1, arg2) { + Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2); +}, arguments) }; + +export function __wbg_queueMicrotask_bcc6e26d899696db() { return logError(function (arg0) { + const ret = arg0.queueMicrotask; + return ret; +}, arguments) }; + +export function __wbg_queueMicrotask_f24a794d09c42640() { return logError(function (arg0) { + queueMicrotask(arg0); +}, arguments) }; + +export function __wbg_randomFillSync_ac0988aba3254290() { return handleError(function (arg0, arg1) { arg0.randomFillSync(arg1); }, arguments) }; -export function __wbg_require_79b1e9274cde3c87() { return handleError(function () { +export function __wbg_require_60cc747a6bc5215a() { return handleError(function () { const ret = module.require; return ret; }, arguments) }; -export function __wbg_set_37837023f3d740e8() { return logError(function (arg0, arg1, arg2) { - arg0[arg1 >>> 0] = arg2; +export function __wbg_resolve_5775c0ef9222f556() { return logError(function (arg0) { + const ret = Promise.resolve(arg0); + return ret; +}, arguments) }; + +export function __wbg_setTimeout_2b339866a2aa3789() { return logError(function (arg0, arg1) { + const ret = setTimeout(arg0, arg1); + return ret; +}, arguments) }; + +export function __wbg_set_31197016f65a6a19() { return logError(function (arg0, arg1, arg2) { + const ret = arg0.set(arg1, arg2); + return ret; }, arguments) }; export function __wbg_set_3f1d0b984ed272ed() { return logError(function (arg0, arg1, arg2) { arg0[arg1] = arg2; }, arguments) }; -export function __wbg_set_65595bdd868b3009() { return logError(function (arg0, arg1, arg2) { - arg0.set(arg1, arg2 >>> 0); -}, arguments) }; - -export function __wbg_set_8fc6bf8a5b1071d1() { return logError(function (arg0, arg1, arg2) { - const ret = arg0.set(arg1, arg2); - return ret; -}, arguments) }; - -export function __wbg_set_bb8cecf6a62b9f46() { return handleError(function (arg0, arg1, arg2) { +export function __wbg_set_b33e7a98099eed58() { return handleError(function (arg0, arg1, arg2) { const ret = Reflect.set(arg0, arg1, arg2); _assertBoolean(ret); return ret; }, arguments) }; -export function __wbg_static_accessor_GLOBAL_88a902d13a557d07() { return logError(function () { +export function __wbg_set_d636a0463acf1dbc() { return logError(function (arg0, arg1, arg2) { + arg0[arg1 >>> 0] = arg2; +}, arguments) }; + +export function __wbg_setbody_e324371c31597f2a() { return logError(function (arg0, arg1) { + arg0.body = arg1; +}, arguments) }; + +export function __wbg_setcache_7c95e3469a5bfb76() { return logError(function (arg0, arg1) { + arg0.cache = __wbindgen_enum_RequestCache[arg1]; +}, arguments) }; + +export function __wbg_setcredentials_55a9317ed2777533() { return logError(function (arg0, arg1) { + arg0.credentials = __wbindgen_enum_RequestCredentials[arg1]; +}, arguments) }; + +export function __wbg_setheaders_ac0b1e4890a949cd() { return logError(function (arg0, arg1) { + arg0.headers = arg1; +}, arguments) }; + +export function __wbg_setmethod_9ce6e95af1ae0eaf() { return logError(function (arg0, arg1, arg2) { + arg0.method = getStringFromWasm0(arg1, arg2); +}, arguments) }; + +export function __wbg_setmode_b89d1784e7e7f118() { return logError(function (arg0, arg1) { + arg0.mode = __wbindgen_enum_RequestMode[arg1]; +}, arguments) }; + +export function __wbg_setsignal_e663c6d962763cd5() { return logError(function (arg0, arg1) { + arg0.signal = arg1; +}, arguments) }; + +export function __wbg_signal_bdb003fe19e53a13() { return logError(function (arg0) { + const ret = arg0.signal; + return ret; +}, arguments) }; + +export function __wbg_static_accessor_GLOBAL_1f13249cc3acc96d() { return logError(function () { const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, arguments) }; -export function __wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0() { return logError(function () { +export function __wbg_static_accessor_GLOBAL_THIS_df7ae94b1e0ed6a3() { return logError(function () { const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, arguments) }; -export function __wbg_static_accessor_SELF_37c5d418e4bf5819() { return logError(function () { +export function __wbg_static_accessor_SELF_6265471db3b3c228() { return logError(function () { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, arguments) }; -export function __wbg_static_accessor_WINDOW_5de37043a91a9c40() { return logError(function () { +export function __wbg_static_accessor_WINDOW_16fb482f8ec52863() { return logError(function () { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, arguments) }; -export function __wbg_stringify_f7ed6987935b4a24() { return handleError(function (arg0) { +export function __wbg_status_31874648c8651949() { return logError(function (arg0) { + const ret = arg0.status; + _assertNum(ret); + return ret; +}, arguments) }; + +export function __wbg_stringify_1f41b6198e0932e0() { return handleError(function (arg0) { const ret = JSON.stringify(arg0); return ret; }, arguments) }; -export function __wbg_subarray_aa9065fa9dc5df96() { return logError(function (arg0, arg1, arg2) { +export function __wbg_subarray_a219824899e59712() { return logError(function (arg0, arg1, arg2) { const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0); return ret; }, arguments) }; -export function __wbg_value_cd1ffa7b1ab794f1() { return logError(function (arg0) { +export function __wbg_text_42c080764c927da6() { return handleError(function (arg0) { + const ret = arg0.text(); + return ret; +}, arguments) }; + +export function __wbg_then_8d2fcccde5380a03() { return logError(function (arg0, arg1, arg2) { + const ret = arg0.then(arg1, arg2); + return ret; +}, arguments) }; + +export function __wbg_then_9cc266be2bf537b6() { return logError(function (arg0, arg1) { + const ret = arg0.then(arg1); + return ret; +}, arguments) }; + +export function __wbg_url_d5273b9e10503471() { return logError(function (arg0, arg1) { + const ret = arg1.url; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); +}, arguments) }; + +export function __wbg_value_09d0b4eaab48b91d() { return logError(function (arg0) { const ret = arg0.value; return ret; }, arguments) }; -export function __wbg_versions_c71aa1626a93e0a1() { return logError(function (arg0) { +export function __wbg_versions_c01dfd4722a88165() { return logError(function (arg0) { const ret = arg0.versions; return ret; }, arguments) }; -export function __wbg_warn_aaf1f4664a035bd6() { return logError(function (arg0, arg1, arg2, arg3) { +export function __wbg_warn_426509218f81762d() { return logError(function (arg0, arg1, arg2, arg3) { console.warn(arg0, arg1, arg2, arg3); }, arguments) }; -export function __wbindgen_as_number(arg0) { - const ret = +arg0; - return ret; -}; - -export function __wbindgen_bigint_from_i64(arg0) { - const ret = arg0; - return ret; -}; - -export function __wbindgen_bigint_from_u64(arg0) { - const ret = BigInt.asUintN(64, arg0); - return ret; -}; - -export function __wbindgen_bigint_get_as_i64(arg0, arg1) { +export function __wbg_wbindgenbigintgetasi64_7637cb1a7fb9a81e(arg0, arg1) { const v = arg1; const ret = typeof(v) === 'bigint' ? v : undefined; if (!isLikeNone(ret)) { @@ -1282,14 +1536,27 @@ export function __wbindgen_bigint_get_as_i64(arg0, arg1) { getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true); }; -export function __wbindgen_boolean_get(arg0) { +export function __wbg_wbindgenbooleanget_59f830b1a70d2530(arg0) { const v = arg0; - const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2; - _assertNum(ret); + const ret = typeof(v) === 'boolean' ? v : undefined; + if (!isLikeNone(ret)) { + _assertBoolean(ret); + } + return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0; +}; + +export function __wbg_wbindgencbdrop_a85ed476c6a370b9(arg0) { + const obj = arg0.original; + if (obj.cnt-- == 1) { + obj.a = 0; + return true; + } + const ret = false; + _assertBoolean(ret); return ret; }; -export function __wbindgen_debug_string(arg0, arg1) { +export function __wbg_wbindgendebugstring_bb652b1bc2061b6d(arg0, arg1) { const ret = debugString(arg1); const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; @@ -1297,17 +1564,120 @@ export function __wbindgen_debug_string(arg0, arg1) { getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); }; -export function __wbindgen_error_new(arg0, arg1) { - const ret = new Error(getStringFromWasm0(arg0, arg1)); - return ret; -}; - -export function __wbindgen_in(arg0, arg1) { +export function __wbg_wbindgenin_192b210aa1c401e9(arg0, arg1) { const ret = arg0 in arg1; _assertBoolean(ret); return ret; }; +export function __wbg_wbindgenisbigint_7d76a1ca6454e439(arg0) { + const ret = typeof(arg0) === 'bigint'; + _assertBoolean(ret); + return ret; +}; + +export function __wbg_wbindgenisfunction_ea72b9d66a0e1705(arg0) { + const ret = typeof(arg0) === 'function'; + _assertBoolean(ret); + return ret; +}; + +export function __wbg_wbindgenisobject_dfe064a121d87553(arg0) { + const val = arg0; + const ret = typeof(val) === 'object' && val !== null; + _assertBoolean(ret); + return ret; +}; + +export function __wbg_wbindgenisstring_4b74e4111ba029e6(arg0) { + const ret = typeof(arg0) === 'string'; + _assertBoolean(ret); + return ret; +}; + +export function __wbg_wbindgenisundefined_71f08a6ade4354e7(arg0) { + const ret = arg0 === undefined; + _assertBoolean(ret); + return ret; +}; + +export function __wbg_wbindgenjsvaleq_f27272c0a890df7f(arg0, arg1) { + const ret = arg0 === arg1; + _assertBoolean(ret); + return ret; +}; + +export function __wbg_wbindgenjsvallooseeq_9dd7bb4b95ac195c(arg0, arg1) { + const ret = arg0 == arg1; + _assertBoolean(ret); + return ret; +}; + +export function __wbg_wbindgennumberget_d855f947247a3fbc(arg0, arg1) { + const obj = arg1; + const ret = typeof(obj) === 'number' ? obj : undefined; + if (!isLikeNone(ret)) { + _assertNum(ret); + } + getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true); +}; + +export function __wbg_wbindgenstringget_43fe05afe34b0cb1(arg0, arg1) { + const obj = arg1; + const ret = typeof(obj) === 'string' ? obj : undefined; + var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); +}; + +export function __wbg_wbindgenthrow_4c11a24fca429ccf(arg0, arg1) { + throw new Error(getStringFromWasm0(arg0, arg1)); +}; + +export function __wbindgen_cast_2241b6af4c4b2941() { return logError(function (arg0, arg1) { + // Cast intrinsic for `Ref(String) -> Externref`. + const ret = getStringFromWasm0(arg0, arg1); + return ret; +}, arguments) }; + +export function __wbindgen_cast_4625c577ab2ec9ee() { return logError(function (arg0) { + // Cast intrinsic for `U64 -> Externref`. + const ret = BigInt.asUintN(64, arg0); + return ret; +}, arguments) }; + +export function __wbindgen_cast_58494022e70f54b0() { return logError(function (arg0, arg1) { + // Cast intrinsic for `Closure(Closure { dtor_idx: 680, function: Function { arguments: [Externref], shim_idx: 681, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. + const ret = makeMutClosure(arg0, arg1, 680, __wbg_adapter_8); + return ret; +}, arguments) }; + +export function __wbindgen_cast_9ae0607507abb057() { return logError(function (arg0) { + // Cast intrinsic for `I64 -> Externref`. + const ret = arg0; + return ret; +}, arguments) }; + +export function __wbindgen_cast_cb9088102bce6b30() { return logError(function (arg0, arg1) { + // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`. + const ret = getArrayU8FromWasm0(arg0, arg1); + return ret; +}, arguments) }; + +export function __wbindgen_cast_d6cd19b81560fd6e() { return logError(function (arg0) { + // Cast intrinsic for `F64 -> Externref`. + const ret = arg0; + return ret; +}, arguments) }; + +export function __wbindgen_cast_e4869fcaa62df339() { return logError(function (arg0, arg1) { + // Cast intrinsic for `Closure(Closure { dtor_idx: 663, function: Function { arguments: [], shim_idx: 664, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. + const ret = makeMutClosure(arg0, arg1, 663, __wbg_adapter_13); + return ret; +}, arguments) }; + export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_export_4; const offset = table.grow(4); @@ -1319,84 +1689,3 @@ export function __wbindgen_init_externref_table() { ; }; -export function __wbindgen_is_bigint(arg0) { - const ret = typeof(arg0) === 'bigint'; - _assertBoolean(ret); - return ret; -}; - -export function __wbindgen_is_function(arg0) { - const ret = typeof(arg0) === 'function'; - _assertBoolean(ret); - return ret; -}; - -export function __wbindgen_is_object(arg0) { - const val = arg0; - const ret = typeof(val) === 'object' && val !== null; - _assertBoolean(ret); - return ret; -}; - -export function __wbindgen_is_string(arg0) { - const ret = typeof(arg0) === 'string'; - _assertBoolean(ret); - return ret; -}; - -export function __wbindgen_is_undefined(arg0) { - const ret = arg0 === undefined; - _assertBoolean(ret); - return ret; -}; - -export function __wbindgen_jsval_eq(arg0, arg1) { - const ret = arg0 === arg1; - _assertBoolean(ret); - return ret; -}; - -export function __wbindgen_jsval_loose_eq(arg0, arg1) { - const ret = arg0 == arg1; - _assertBoolean(ret); - return ret; -}; - -export function __wbindgen_memory() { - const ret = wasm.memory; - return ret; -}; - -export function __wbindgen_number_get(arg0, arg1) { - const obj = arg1; - const ret = typeof(obj) === 'number' ? obj : undefined; - if (!isLikeNone(ret)) { - _assertNum(ret); - } - getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true); -}; - -export function __wbindgen_number_new(arg0) { - const ret = arg0; - return ret; -}; - -export function __wbindgen_string_get(arg0, arg1) { - const obj = arg1; - const ret = typeof(obj) === 'string' ? obj : undefined; - var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); -}; - -export function __wbindgen_string_new(arg0, arg1) { - const ret = getStringFromWasm0(arg0, arg1); - return ret; -}; - -export function __wbindgen_throw(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); -}; - diff --git a/pkg/sdk_client_bg.wasm b/pkg/sdk_client_bg.wasm index e8c9c93..79d1069 100644 Binary files a/pkg/sdk_client_bg.wasm and b/pkg/sdk_client_bg.wasm differ diff --git a/pkg/sdk_client_bg.wasm.d.ts b/pkg/sdk_client_bg.wasm.d.ts index 42f0e22..5a22dc9 100644 --- a/pkg/sdk_client_bg.wasm.d.ts +++ b/pkg/sdk_client_bg.wasm.d.ts @@ -7,14 +7,11 @@ export const get_member: () => [number, number, number]; export const restore_device: (a: any) => [number, number]; export const create_device_from_sp_wallet: (a: number, b: number) => [number, number, number, number]; export const create_new_device: (a: number, b: number, c: number) => [number, number, number, number]; +export const scan_blocks: (a: number, b: number, c: number) => any; export const is_paired: () => [number, number, number]; export const pair_device: (a: number, b: number, c: number, d: number) => [number, number]; export const unpair_device: () => [number, number]; export const dump_wallet: () => [number, number, number, number]; -export const reset_process_cache: () => [number, number]; -export const dump_process_cache: () => [number, number, number, number]; -export const set_process_cache: (a: any) => [number, number]; -export const add_to_process_cache: (a: number, b: number, c: number, d: number) => [number, number]; export const reset_shared_secrets: () => [number, number]; export const set_shared_secrets: (a: number, b: number) => [number, number]; export const get_pairing_process_id: () => [number, number, number, number]; @@ -22,8 +19,11 @@ export const dump_device: () => [number, number, number]; export const dump_neutered_device: () => [number, number, number]; export const reset_device: () => [number, number]; export const get_txid: (a: number, b: number) => [number, number, number, number]; +export const get_prevouts: (a: number, b: number) => [number, number, number, number]; +export const get_opreturn: (a: number, b: number) => [number, number, number, number]; +export const process_commit_new_state: (a: any, b: number, c: number, d: number, e: number) => [number, number, number]; export const parse_new_tx: (a: number, b: number, c: number, d: any) => [number, number, number]; -export const parse_cipher: (a: number, b: number, c: any) => [number, number, number]; +export const parse_cipher: (a: number, b: number, c: any, d: any) => [number, number, number]; export const get_outputs: () => [number, number, number]; export const get_available_amount: () => [bigint, number, number]; export const create_transaction: (a: number, b: number, c: number) => [number, number, number]; @@ -63,7 +63,11 @@ export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => export const __wbindgen_exn_store: (a: number) => void; export const __externref_table_alloc: () => number; export const __wbindgen_export_4: WebAssembly.Table; +export const __wbindgen_export_5: WebAssembly.Table; export const __externref_table_dealloc: (a: number) => void; export const __wbindgen_free: (a: number, b: number, c: number) => void; export const __externref_drop_slice: (a: number, b: number) => void; +export const closure681_externref_shim: (a: number, b: number, c: any) => void; +export const wasm_bindgen__convert__closures_____invoke__hc142e2252e76ee8b: (a: number, b: number) => void; +export const closure1281_externref_shim: (a: number, b: number, c: any, d: any) => void; export const __wbindgen_start: () => void;