v2
This commit is contained in:
@@ -277,6 +277,42 @@ export function is_unlocked() {
|
||||
return ret !== 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default public key for a workspace (keyspace)
|
||||
* This returns the public key of the first keypair in the keyspace
|
||||
* @param {string} workspace_id
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export function get_workspace_default_public_key(workspace_id) {
|
||||
const ptr0 = passStringToWasm0(workspace_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
const len0 = WASM_VECTOR_LEN;
|
||||
const ret = wasm.get_workspace_default_public_key(ptr0, len0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current unlocked public key as hex string
|
||||
* @returns {string}
|
||||
*/
|
||||
export function get_current_unlocked_public_key() {
|
||||
let deferred2_0;
|
||||
let deferred2_1;
|
||||
try {
|
||||
const ret = wasm.get_current_unlocked_public_key();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all keypairs from the current session
|
||||
* Returns an array of keypair objects with id, type, and metadata
|
||||
@@ -323,7 +359,7 @@ function passArray8ToWasm0(arg, malloc) {
|
||||
return ptr;
|
||||
}
|
||||
/**
|
||||
* Sign message with current session
|
||||
* Sign message with current session (requires selected keypair)
|
||||
* @param {Uint8Array} message
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@@ -334,6 +370,41 @@ export function sign(message) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current keyspace name
|
||||
* @returns {string}
|
||||
*/
|
||||
export function get_current_keyspace_name() {
|
||||
let deferred2_0;
|
||||
let deferred2_1;
|
||||
try {
|
||||
const ret = wasm.get_current_keyspace_name();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sign message with default keypair (first keypair in keyspace) without changing session state
|
||||
* @param {Uint8Array} message
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export function sign_with_default_keypair(message) {
|
||||
const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
|
||||
const len0 = WASM_VECTOR_LEN;
|
||||
const ret = wasm.sign_with_default_keypair(ptr0, len0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify a signature with the current session's selected keypair
|
||||
* @param {Uint8Array} message
|
||||
@@ -395,24 +466,391 @@ export function run_rhai(script) {
|
||||
return takeFromExternrefTable0(ret[0]);
|
||||
}
|
||||
|
||||
function __wbg_adapter_32(arg0, arg1, arg2) {
|
||||
wasm.closure121_externref_shim(arg0, arg1, arg2);
|
||||
function __wbg_adapter_34(arg0, arg1, arg2) {
|
||||
wasm.closure174_externref_shim(arg0, arg1, arg2);
|
||||
}
|
||||
|
||||
function __wbg_adapter_35(arg0, arg1, arg2) {
|
||||
wasm.closure150_externref_shim(arg0, arg1, arg2);
|
||||
function __wbg_adapter_39(arg0, arg1) {
|
||||
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha4436a3f79fb1a0f(arg0, arg1);
|
||||
}
|
||||
|
||||
function __wbg_adapter_38(arg0, arg1, arg2) {
|
||||
wasm.closure227_externref_shim(arg0, arg1, arg2);
|
||||
function __wbg_adapter_44(arg0, arg1, arg2) {
|
||||
wasm.closure237_externref_shim(arg0, arg1, arg2);
|
||||
}
|
||||
|
||||
function __wbg_adapter_138(arg0, arg1, arg2, arg3) {
|
||||
wasm.closure1879_externref_shim(arg0, arg1, arg2, arg3);
|
||||
function __wbg_adapter_49(arg0, arg1) {
|
||||
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf148c54a4a246cea(arg0, arg1);
|
||||
}
|
||||
|
||||
function __wbg_adapter_52(arg0, arg1, arg2) {
|
||||
wasm.closure308_externref_shim(arg0, arg1, arg2);
|
||||
}
|
||||
|
||||
function __wbg_adapter_55(arg0, arg1, arg2) {
|
||||
wasm.closure392_externref_shim(arg0, arg1, arg2);
|
||||
}
|
||||
|
||||
function __wbg_adapter_207(arg0, arg1, arg2, arg3) {
|
||||
wasm.closure2046_externref_shim(arg0, arg1, arg2, arg3);
|
||||
}
|
||||
|
||||
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
||||
|
||||
const __wbindgen_enum_IdbTransactionMode = ["readonly", "readwrite", "versionchange", "readwriteflush", "cleanup"];
|
||||
|
||||
const SigSocketConnectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
||||
? { register: () => {}, unregister: () => {} }
|
||||
: new FinalizationRegistry(ptr => wasm.__wbg_sigsocketconnection_free(ptr >>> 0, 1));
|
||||
/**
|
||||
* WASM-bindgen wrapper for SigSocket client
|
||||
*
|
||||
* This provides a clean JavaScript API for the browser extension to:
|
||||
* - Connect to SigSocket servers
|
||||
* - Send responses to sign requests
|
||||
* - Manage connection state
|
||||
*/
|
||||
export class SigSocketConnection {
|
||||
|
||||
__destroy_into_raw() {
|
||||
const ptr = this.__wbg_ptr;
|
||||
this.__wbg_ptr = 0;
|
||||
SigSocketConnectionFinalization.unregister(this);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
free() {
|
||||
const ptr = this.__destroy_into_raw();
|
||||
wasm.__wbg_sigsocketconnection_free(ptr, 0);
|
||||
}
|
||||
/**
|
||||
* Create a new SigSocket connection
|
||||
*/
|
||||
constructor() {
|
||||
const ret = wasm.sigsocketconnection_new();
|
||||
this.__wbg_ptr = ret >>> 0;
|
||||
SigSocketConnectionFinalization.register(this, this.__wbg_ptr, this);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Connect to a SigSocket server
|
||||
*
|
||||
* # Arguments
|
||||
* * `server_url` - WebSocket server URL (e.g., "ws://localhost:8080/ws")
|
||||
* * `public_key_hex` - Client's public key as hex string
|
||||
*
|
||||
* # Returns
|
||||
* * `Ok(())` - Successfully connected
|
||||
* * `Err(error)` - Connection failed
|
||||
* @param {string} server_url
|
||||
* @param {string} public_key_hex
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
connect(server_url, public_key_hex) {
|
||||
const ptr0 = passStringToWasm0(server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
const len0 = WASM_VECTOR_LEN;
|
||||
const ptr1 = passStringToWasm0(public_key_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
const len1 = WASM_VECTOR_LEN;
|
||||
const ret = wasm.sigsocketconnection_connect(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
||||
return ret;
|
||||
}
|
||||
/**
|
||||
* Send a response to a sign request
|
||||
*
|
||||
* This should be called by the extension after the user has approved
|
||||
* a sign request and the message has been signed.
|
||||
*
|
||||
* # Arguments
|
||||
* * `request_id` - ID of the original request
|
||||
* * `message_base64` - Original message (base64-encoded)
|
||||
* * `signature_hex` - Signature as hex string
|
||||
*
|
||||
* # Returns
|
||||
* * `Ok(())` - Response sent successfully
|
||||
* * `Err(error)` - Failed to send response
|
||||
* @param {string} request_id
|
||||
* @param {string} message_base64
|
||||
* @param {string} signature_hex
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
send_response(request_id, message_base64, signature_hex) {
|
||||
const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
const len0 = WASM_VECTOR_LEN;
|
||||
const ptr1 = passStringToWasm0(message_base64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
const len1 = WASM_VECTOR_LEN;
|
||||
const ptr2 = passStringToWasm0(signature_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
const len2 = WASM_VECTOR_LEN;
|
||||
const ret = wasm.sigsocketconnection_send_response(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
||||
return ret;
|
||||
}
|
||||
/**
|
||||
* Send a rejection for a sign request
|
||||
*
|
||||
* This should be called when the user rejects a sign request.
|
||||
*
|
||||
* # Arguments
|
||||
* * `request_id` - ID of the request to reject
|
||||
* * `reason` - Reason for rejection (optional)
|
||||
*
|
||||
* # Returns
|
||||
* * `Ok(())` - Rejection sent successfully
|
||||
* * `Err(error)` - Failed to send rejection
|
||||
* @param {string} request_id
|
||||
* @param {string} reason
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
send_rejection(request_id, reason) {
|
||||
const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
const len0 = WASM_VECTOR_LEN;
|
||||
const ptr1 = passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
const len1 = WASM_VECTOR_LEN;
|
||||
const ret = wasm.sigsocketconnection_send_rejection(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
||||
return ret;
|
||||
}
|
||||
/**
|
||||
* Disconnect from the SigSocket server
|
||||
*/
|
||||
disconnect() {
|
||||
wasm.sigsocketconnection_disconnect(this.__wbg_ptr);
|
||||
}
|
||||
/**
|
||||
* Check if connected to the server
|
||||
* @returns {boolean}
|
||||
*/
|
||||
is_connected() {
|
||||
const ret = wasm.sigsocketconnection_is_connected(this.__wbg_ptr);
|
||||
return ret !== 0;
|
||||
}
|
||||
}
|
||||
|
||||
const SigSocketManagerFinalization = (typeof FinalizationRegistry === 'undefined')
|
||||
? { register: () => {}, unregister: () => {} }
|
||||
: new FinalizationRegistry(ptr => wasm.__wbg_sigsocketmanager_free(ptr >>> 0, 1));
|
||||
/**
|
||||
* SigSocket manager for high-level operations
|
||||
*/
|
||||
export class SigSocketManager {
|
||||
|
||||
__destroy_into_raw() {
|
||||
const ptr = this.__wbg_ptr;
|
||||
this.__wbg_ptr = 0;
|
||||
SigSocketManagerFinalization.unregister(this);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
free() {
|
||||
const ptr = this.__destroy_into_raw();
|
||||
wasm.__wbg_sigsocketmanager_free(ptr, 0);
|
||||
}
|
||||
/**
|
||||
* Connect to SigSocket server with smart connection management
|
||||
*
|
||||
* This handles all connection logic:
|
||||
* - Reuses existing connection if same workspace
|
||||
* - Switches connection if different workspace
|
||||
* - Creates new connection if none exists
|
||||
*
|
||||
* # Arguments
|
||||
* * `workspace` - The workspace name to connect with
|
||||
* * `server_url` - The SigSocket server URL (e.g., "ws://localhost:8080/ws")
|
||||
* * `event_callback` - JavaScript function to call when events occur
|
||||
*
|
||||
* # Returns
|
||||
* * `Ok(connection_info)` - JSON string with connection details
|
||||
* * `Err(error)` - If connection failed or workspace is invalid
|
||||
* @param {string} workspace
|
||||
* @param {string} server_url
|
||||
* @param {Function} event_callback
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
static connect_workspace_with_events(workspace, server_url, event_callback) {
|
||||
const ptr0 = passStringToWasm0(workspace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
const len0 = WASM_VECTOR_LEN;
|
||||
const ptr1 = passStringToWasm0(server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
const len1 = WASM_VECTOR_LEN;
|
||||
const ret = wasm.sigsocketmanager_connect_workspace_with_events(ptr0, len0, ptr1, len1, event_callback);
|
||||
return ret;
|
||||
}
|
||||
/**
|
||||
* Connect to SigSocket server with a specific workspace (backward compatibility)
|
||||
*
|
||||
* This is a simpler version that doesn't set up event callbacks.
|
||||
* Use connect_workspace_with_events for full functionality.
|
||||
*
|
||||
* # Arguments
|
||||
* * `workspace` - The workspace name to connect with
|
||||
* * `server_url` - The SigSocket server URL (e.g., "ws://localhost:8080/ws")
|
||||
*
|
||||
* # Returns
|
||||
* * `Ok(connection_info)` - JSON string with connection details
|
||||
* * `Err(error)` - If connection failed or workspace is invalid
|
||||
* @param {string} workspace
|
||||
* @param {string} server_url
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
static connect_workspace(workspace, server_url) {
|
||||
const ptr0 = passStringToWasm0(workspace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
const len0 = WASM_VECTOR_LEN;
|
||||
const ptr1 = passStringToWasm0(server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
const len1 = WASM_VECTOR_LEN;
|
||||
const ret = wasm.sigsocketmanager_connect_workspace(ptr0, len0, ptr1, len1);
|
||||
return ret;
|
||||
}
|
||||
/**
|
||||
* Disconnect from SigSocket server
|
||||
*
|
||||
* # Returns
|
||||
* * `Ok(())` - Successfully disconnected
|
||||
* * `Err(error)` - If disconnect failed
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
static disconnect() {
|
||||
const ret = wasm.sigsocketmanager_disconnect();
|
||||
return ret;
|
||||
}
|
||||
/**
|
||||
* Check if we can approve a specific sign request
|
||||
*
|
||||
* This validates that:
|
||||
* 1. The request exists
|
||||
* 2. The vault session is unlocked
|
||||
* 3. The current workspace matches the request's target
|
||||
*
|
||||
* # Arguments
|
||||
* * `request_id` - The ID of the request to validate
|
||||
*
|
||||
* # Returns
|
||||
* * `Ok(true)` - Request can be approved
|
||||
* * `Ok(false)` - Request cannot be approved
|
||||
* * `Err(error)` - Validation error
|
||||
* @param {string} request_id
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
static can_approve_request(request_id) {
|
||||
const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
const len0 = WASM_VECTOR_LEN;
|
||||
const ret = wasm.sigsocketmanager_can_approve_request(ptr0, len0);
|
||||
return ret;
|
||||
}
|
||||
/**
|
||||
* Approve a sign request and send the signature to the server
|
||||
*
|
||||
* This performs the complete approval flow:
|
||||
* 1. Validates the request can be approved
|
||||
* 2. Signs the message using the vault
|
||||
* 3. Sends the signature to the SigSocket server
|
||||
* 4. Removes the request from pending list
|
||||
*
|
||||
* # Arguments
|
||||
* * `request_id` - The ID of the request to approve
|
||||
*
|
||||
* # Returns
|
||||
* * `Ok(signature)` - Base64-encoded signature that was sent
|
||||
* * `Err(error)` - If approval failed
|
||||
* @param {string} request_id
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
static approve_request(request_id) {
|
||||
const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
const len0 = WASM_VECTOR_LEN;
|
||||
const ret = wasm.sigsocketmanager_approve_request(ptr0, len0);
|
||||
return ret;
|
||||
}
|
||||
/**
|
||||
* Reject a sign request
|
||||
*
|
||||
* # Arguments
|
||||
* * `request_id` - The ID of the request to reject
|
||||
* * `reason` - The reason for rejection
|
||||
*
|
||||
* # Returns
|
||||
* * `Ok(())` - Request rejected successfully
|
||||
* * `Err(error)` - If rejection failed
|
||||
* @param {string} request_id
|
||||
* @param {string} reason
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
static reject_request(request_id, reason) {
|
||||
const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
const len0 = WASM_VECTOR_LEN;
|
||||
const ptr1 = passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
const len1 = WASM_VECTOR_LEN;
|
||||
const ret = wasm.sigsocketmanager_reject_request(ptr0, len0, ptr1, len1);
|
||||
return ret;
|
||||
}
|
||||
/**
|
||||
* Get pending requests filtered by current workspace
|
||||
*
|
||||
* This returns only the requests that the current vault session can handle,
|
||||
* based on the unlocked workspace and its public key.
|
||||
*
|
||||
* # Returns
|
||||
* * `Ok(requests_json)` - JSON array of filtered requests
|
||||
* * `Err(error)` - If filtering failed
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
static get_filtered_requests() {
|
||||
const ret = wasm.sigsocketmanager_get_filtered_requests();
|
||||
return ret;
|
||||
}
|
||||
/**
|
||||
* Add a pending sign request (called when request arrives from server)
|
||||
*
|
||||
* # Arguments
|
||||
* * `request_json` - JSON string containing the sign request
|
||||
*
|
||||
* # Returns
|
||||
* * `Ok(())` - Request added successfully
|
||||
* * `Err(error)` - If adding failed
|
||||
* @param {string} request_json
|
||||
*/
|
||||
static add_pending_request(request_json) {
|
||||
const ptr0 = passStringToWasm0(request_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
const len0 = WASM_VECTOR_LEN;
|
||||
const ret = wasm.sigsocketmanager_add_pending_request(ptr0, len0);
|
||||
if (ret[1]) {
|
||||
throw takeFromExternrefTable0(ret[0]);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Get connection status
|
||||
*
|
||||
* # Returns
|
||||
* * `Ok(status_json)` - JSON object with connection status
|
||||
* * `Err(error)` - If getting status failed
|
||||
* @returns {string}
|
||||
*/
|
||||
static get_connection_status() {
|
||||
let deferred2_0;
|
||||
let deferred2_1;
|
||||
try {
|
||||
const ret = wasm.sigsocketmanager_get_connection_status();
|
||||
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);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Clear all pending requests
|
||||
*
|
||||
* # Returns
|
||||
* * `Ok(())` - Requests cleared successfully
|
||||
*/
|
||||
static clear_pending_requests() {
|
||||
const ret = wasm.sigsocketmanager_clear_pending_requests();
|
||||
if (ret[1]) {
|
||||
throw takeFromExternrefTable0(ret[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function __wbg_load(module, imports) {
|
||||
if (typeof Response === 'function' && module instanceof Response) {
|
||||
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
||||
@@ -459,6 +897,9 @@ function __wbg_get_imports() {
|
||||
const ret = arg0.call(arg1, arg2);
|
||||
return ret;
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_close_2893b7d056a0627d = function() { return handleError(function (arg0) {
|
||||
arg0.close();
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_createObjectStore_d2f9e1016f4d81b9 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
||||
const ret = arg0.createObjectStore(getStringFromWasm0(arg1, arg2), arg3);
|
||||
return ret;
|
||||
@@ -467,6 +908,10 @@ function __wbg_get_imports() {
|
||||
const ret = arg0.crypto;
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbg_data_432d9c3df2630942 = function(arg0) {
|
||||
const ret = arg0.data;
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbg_error_524f506f44df1645 = function(arg0) {
|
||||
console.error(arg0);
|
||||
};
|
||||
@@ -539,10 +984,23 @@ function __wbg_get_imports() {
|
||||
const ret = result;
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbg_instanceof_Window_def73ea0955fc569 = function(arg0) {
|
||||
let result;
|
||||
try {
|
||||
result = arg0 instanceof Window;
|
||||
} catch (_) {
|
||||
result = false;
|
||||
}
|
||||
const ret = result;
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbg_length_52b6c4580c5ec934 = function(arg0) {
|
||||
const ret = arg0.length;
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbg_log_c222819a41e063d3 = function(arg0) {
|
||||
console.log(arg0);
|
||||
};
|
||||
imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
||||
const ret = arg0.msCrypto;
|
||||
return ret;
|
||||
@@ -558,7 +1016,7 @@ function __wbg_get_imports() {
|
||||
const a = state0.a;
|
||||
state0.a = 0;
|
||||
try {
|
||||
return __wbg_adapter_138(a, state0.b, arg0, arg1);
|
||||
return __wbg_adapter_207(a, state0.b, arg0, arg1);
|
||||
} finally {
|
||||
state0.a = a;
|
||||
}
|
||||
@@ -577,6 +1035,10 @@ function __wbg_get_imports() {
|
||||
const ret = new Array();
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbg_new_92c54fc74574ef55 = function() { return handleError(function (arg0, arg1) {
|
||||
const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
|
||||
return ret;
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
|
||||
const ret = new Uint8Array(arg0);
|
||||
return ret;
|
||||
@@ -609,6 +1071,12 @@ function __wbg_get_imports() {
|
||||
const ret = arg0.objectStore(getStringFromWasm0(arg1, arg2));
|
||||
return ret;
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_onConnectionStateChanged_b0dc098522afadba = function(arg0) {
|
||||
onConnectionStateChanged(arg0 !== 0);
|
||||
};
|
||||
imports.wbg.__wbg_onSignRequestReceived_93232ba7a0919705 = function(arg0, arg1, arg2, arg3) {
|
||||
onSignRequestReceived(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
||||
};
|
||||
imports.wbg.__wbg_open_88b1390d99a7c691 = function() { return handleError(function (arg0, arg1, arg2) {
|
||||
const ret = arg0.open(getStringFromWasm0(arg1, arg2));
|
||||
return ret;
|
||||
@@ -643,6 +1111,10 @@ function __wbg_get_imports() {
|
||||
imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
|
||||
arg0.randomFillSync(arg1);
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_readyState_7ef6e63c349899ed = function(arg0) {
|
||||
const ret = arg0.readyState;
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
|
||||
const ret = module.require;
|
||||
return ret;
|
||||
@@ -655,12 +1127,38 @@ function __wbg_get_imports() {
|
||||
const ret = arg0.result;
|
||||
return ret;
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_send_0293179ba074ffb4 = function() { return handleError(function (arg0, arg1, arg2) {
|
||||
arg0.send(getStringFromWasm0(arg1, arg2));
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_setTimeout_f2fe5af8e3debeb3 = function() { return handleError(function (arg0, arg1, arg2) {
|
||||
const ret = arg0.setTimeout(arg1, arg2);
|
||||
return ret;
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
|
||||
arg0.set(arg1, arg2 >>> 0);
|
||||
};
|
||||
imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(function (arg0, arg1, arg2) {
|
||||
const ret = Reflect.set(arg0, arg1, arg2);
|
||||
return ret;
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_setbinaryType_92fa1ffd873b327c = function(arg0, arg1) {
|
||||
arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
|
||||
};
|
||||
imports.wbg.__wbg_setonclose_14fc475a49d488fc = function(arg0, arg1) {
|
||||
arg0.onclose = arg1;
|
||||
};
|
||||
imports.wbg.__wbg_setonerror_8639efe354b947cd = function(arg0, arg1) {
|
||||
arg0.onerror = arg1;
|
||||
};
|
||||
imports.wbg.__wbg_setonerror_d7e3056cc6e56085 = function(arg0, arg1) {
|
||||
arg0.onerror = arg1;
|
||||
};
|
||||
imports.wbg.__wbg_setonmessage_6eccab530a8fb4c7 = function(arg0, arg1) {
|
||||
arg0.onmessage = arg1;
|
||||
};
|
||||
imports.wbg.__wbg_setonopen_2da654e1f39745d5 = function(arg0, arg1) {
|
||||
arg0.onopen = arg1;
|
||||
};
|
||||
imports.wbg.__wbg_setonsuccess_afa464ee777a396d = function(arg0, arg1) {
|
||||
arg0.onsuccess = arg1;
|
||||
};
|
||||
@@ -695,6 +1193,10 @@ function __wbg_get_imports() {
|
||||
const ret = arg0.then(arg1);
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
|
||||
const ret = arg0.then(arg1, arg2);
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbg_transaction_d6d07c3c9963c49e = function() { return handleError(function (arg0, arg1, arg2) {
|
||||
const ret = arg0.transaction(arg1, __wbindgen_enum_IdbTransactionMode[arg2]);
|
||||
return ret;
|
||||
@@ -703,6 +1205,9 @@ function __wbg_get_imports() {
|
||||
const ret = arg0.versions;
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbg_warn_4ca3906c248c47c4 = function(arg0) {
|
||||
console.warn(arg0);
|
||||
};
|
||||
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
||||
const obj = arg0.original;
|
||||
if (obj.cnt-- == 1) {
|
||||
@@ -712,16 +1217,40 @@ function __wbg_get_imports() {
|
||||
const ret = false;
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbindgen_closure_wrapper378 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 122, __wbg_adapter_32);
|
||||
imports.wbg.__wbindgen_closure_wrapper1015 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 309, __wbg_adapter_52);
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbindgen_closure_wrapper549 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 151, __wbg_adapter_35);
|
||||
imports.wbg.__wbindgen_closure_wrapper1320 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 393, __wbg_adapter_55);
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbindgen_closure_wrapper857 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 228, __wbg_adapter_38);
|
||||
imports.wbg.__wbindgen_closure_wrapper423 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 172, __wbg_adapter_34);
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbindgen_closure_wrapper424 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 172, __wbg_adapter_34);
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbindgen_closure_wrapper425 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 172, __wbg_adapter_39);
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbindgen_closure_wrapper428 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 172, __wbg_adapter_34);
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbindgen_closure_wrapper766 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 238, __wbg_adapter_44);
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbindgen_closure_wrapper767 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 238, __wbg_adapter_44);
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbindgen_closure_wrapper770 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 238, __wbg_adapter_49);
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
||||
@@ -778,6 +1307,14 @@ function __wbg_get_imports() {
|
||||
const ret = wasm.memory;
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbindgen_string_get = function(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);
|
||||
};
|
||||
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
||||
const ret = getStringFromWasm0(arg0, arg1);
|
||||
return ret;
|
||||
|
Binary file not shown.
Reference in New Issue
Block a user