@silencelaboratories/dkls-wasm-ll-node
Advanced tools
Comparing version 1.0.1-pre.3 to 1.1.0-pre.1
@@ -11,4 +11,5 @@ /* tslint:disable */ | ||
* @param {number} party_id | ||
* @param {Uint8Array | undefined} [seed] | ||
*/ | ||
constructor(participants: number, threshold: number, party_id: number); | ||
constructor(participants: number, threshold: number, party_id: number, seed?: Uint8Array); | ||
/** | ||
@@ -25,10 +26,28 @@ * @returns {Uint8Array} | ||
* @param {Keyshare} oldshare | ||
* @param {Uint8Array | undefined} [seed] | ||
* @returns {KeygenSession} | ||
*/ | ||
static initKeyRotation(oldshare: Keyshare): KeygenSession; | ||
static initKeyRotation(oldshare: Keyshare, seed?: Uint8Array): KeygenSession; | ||
/** | ||
* @returns {string | undefined} | ||
* @param {Keyshare} oldshare | ||
* @param {Uint8Array} lost_shares | ||
* @param {Uint8Array | undefined} [seed] | ||
* @returns {KeygenSession} | ||
*/ | ||
error(): string | undefined; | ||
static initKeyRecovery(oldshare: Keyshare, lost_shares: Uint8Array, seed?: Uint8Array): KeygenSession; | ||
/** | ||
* @param {number} participants | ||
* @param {number} threshold | ||
* @param {number} party_id | ||
* @param {Uint8Array} pk | ||
* @param {Uint8Array} lost_shares | ||
* @param {Uint8Array | undefined} [seed] | ||
* @returns {KeygenSession} | ||
*/ | ||
static initLostShareRecovery(participants: number, threshold: number, party_id: number, pk: Uint8Array, lost_shares: Uint8Array, seed?: Uint8Array): KeygenSession; | ||
/** | ||
* @returns {Error | undefined} | ||
*/ | ||
error(): Error | undefined; | ||
/** | ||
* Finish key generation session and return resulting key share. | ||
@@ -52,5 +71,6 @@ * This nethod consumes the session and deallocates it in any | ||
* @param {Array<any> | undefined} [commitments] | ||
* @param {Uint8Array | undefined} [seed] | ||
* @returns {(Message)[]} | ||
*/ | ||
handleMessages(msgs: (Message)[], commitments?: Array<any>): (Message)[]; | ||
handleMessages(msgs: (Message)[], commitments?: Array<any>, seed?: Uint8Array): (Message)[]; | ||
} | ||
@@ -73,6 +93,7 @@ /** | ||
/** | ||
* Merge new and old keyshares after key rotation. | ||
* @param {Keyshare} oldshare | ||
* Depricated method, the method does nothing. | ||
* It exists for backward compatibility only | ||
* @param {Keyshare} _oldshare | ||
*/ | ||
finishKeyRotation(oldshare: Keyshare): void; | ||
finishKeyRotation(_oldshare: Keyshare): void; | ||
/** | ||
@@ -126,4 +147,5 @@ */ | ||
* @param {string} chain_path | ||
* @param {Uint8Array | undefined} [seed] | ||
*/ | ||
constructor(keyshare: Keyshare, chain_path: string); | ||
constructor(keyshare: Keyshare, chain_path: string, seed?: Uint8Array); | ||
/** | ||
@@ -142,5 +164,5 @@ * Serialize session into array of bytes. | ||
* Return an error message, if any. | ||
* @returns {string | undefined} | ||
* @returns {Error | undefined} | ||
*/ | ||
error(): string | undefined; | ||
error(): Error | undefined; | ||
/** | ||
@@ -155,5 +177,6 @@ * Create a fist message and change session state from Init to WaitMg1. | ||
* @param {(Message)[]} msgs | ||
* @param {Uint8Array | undefined} [seed] | ||
* @returns {(Message)[]} | ||
*/ | ||
handleMessages(msgs: (Message)[]): (Message)[]; | ||
handleMessages(msgs: (Message)[], seed?: Uint8Array): (Message)[]; | ||
/** | ||
@@ -160,0 +183,0 @@ * The session contains a "pre-signature". |
@@ -53,25 +53,2 @@ let imports = {}; | ||
let cachedInt32Memory0 = null; | ||
function getInt32Memory0() { | ||
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) { | ||
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); | ||
} | ||
return cachedInt32Memory0; | ||
} | ||
function getArrayU8FromWasm0(ptr, len) { | ||
ptr = ptr >>> 0; | ||
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len); | ||
} | ||
let WASM_VECTOR_LEN = 0; | ||
function passArray8ToWasm0(arg, malloc) { | ||
const ptr = malloc(arg.length * 1, 1) >>> 0; | ||
getUint8Memory0().set(arg, ptr / 1); | ||
WASM_VECTOR_LEN = arg.length; | ||
return ptr; | ||
} | ||
function _assertClass(instance, klass) { | ||
@@ -84,36 +61,4 @@ if (!(instance instanceof klass)) { | ||
let cachedUint32Memory0 = null; | ||
let WASM_VECTOR_LEN = 0; | ||
function getUint32Memory0() { | ||
if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) { | ||
cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer); | ||
} | ||
return cachedUint32Memory0; | ||
} | ||
function passArrayJsValueToWasm0(array, malloc) { | ||
const ptr = malloc(array.length * 4, 4) >>> 0; | ||
const mem = getUint32Memory0(); | ||
for (let i = 0; i < array.length; i++) { | ||
mem[ptr / 4 + i] = addHeapObject(array[i]); | ||
} | ||
WASM_VECTOR_LEN = array.length; | ||
return ptr; | ||
} | ||
function isLikeNone(x) { | ||
return x === undefined || x === null; | ||
} | ||
function getArrayJsValueFromWasm0(ptr, len) { | ||
ptr = ptr >>> 0; | ||
const mem = getUint32Memory0(); | ||
const slice = mem.subarray(ptr / 4, ptr / 4 + len); | ||
const result = []; | ||
for (let i = 0; i < slice.length; i++) { | ||
result.push(takeObject(slice[i])); | ||
} | ||
return result; | ||
} | ||
let cachedTextEncoder = new TextEncoder('utf-8'); | ||
@@ -173,2 +118,57 @@ | ||
function passArray8ToWasm0(arg, malloc) { | ||
const ptr = malloc(arg.length * 1, 1) >>> 0; | ||
getUint8Memory0().set(arg, ptr / 1); | ||
WASM_VECTOR_LEN = arg.length; | ||
return ptr; | ||
} | ||
function isLikeNone(x) { | ||
return x === undefined || x === null; | ||
} | ||
let cachedInt32Memory0 = null; | ||
function getInt32Memory0() { | ||
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) { | ||
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); | ||
} | ||
return cachedInt32Memory0; | ||
} | ||
function getArrayU8FromWasm0(ptr, len) { | ||
ptr = ptr >>> 0; | ||
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len); | ||
} | ||
let cachedUint32Memory0 = null; | ||
function getUint32Memory0() { | ||
if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) { | ||
cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer); | ||
} | ||
return cachedUint32Memory0; | ||
} | ||
function passArrayJsValueToWasm0(array, malloc) { | ||
const ptr = malloc(array.length * 4, 4) >>> 0; | ||
const mem = getUint32Memory0(); | ||
for (let i = 0; i < array.length; i++) { | ||
mem[ptr / 4 + i] = addHeapObject(array[i]); | ||
} | ||
WASM_VECTOR_LEN = array.length; | ||
return ptr; | ||
} | ||
function getArrayJsValueFromWasm0(ptr, len) { | ||
ptr = ptr >>> 0; | ||
const mem = getUint32Memory0(); | ||
const slice = mem.subarray(ptr / 4, ptr / 4 + len); | ||
const result = []; | ||
for (let i = 0; i < slice.length; i++) { | ||
result.push(takeObject(slice[i])); | ||
} | ||
return result; | ||
} | ||
function handleError(f, args) { | ||
@@ -212,5 +212,8 @@ try { | ||
* @param {number} party_id | ||
* @param {Uint8Array | undefined} [seed] | ||
*/ | ||
constructor(participants, threshold, party_id) { | ||
const ret = wasm.keygensession_new(participants, threshold, party_id); | ||
constructor(participants, threshold, party_id, seed) { | ||
var ptr0 = isLikeNone(seed) ? 0 : passArray8ToWasm0(seed, wasm.__wbindgen_malloc); | ||
var len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.keygensession_new(participants, threshold, party_id, ptr0, len0); | ||
this.__wbg_ptr = ret >>> 0; | ||
@@ -247,24 +250,45 @@ return this; | ||
* @param {Keyshare} oldshare | ||
* @param {Uint8Array | undefined} [seed] | ||
* @returns {KeygenSession} | ||
*/ | ||
static initKeyRotation(oldshare) { | ||
_assertClass(oldshare, Keyshare); | ||
const ret = wasm.keygensession_initKeyRotation(oldshare.__wbg_ptr); | ||
return KeygenSession.__wrap(ret); | ||
static initKeyRotation(oldshare, seed) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
_assertClass(oldshare, Keyshare); | ||
var ptr0 = isLikeNone(seed) ? 0 : passArray8ToWasm0(seed, wasm.__wbindgen_malloc); | ||
var len0 = WASM_VECTOR_LEN; | ||
wasm.keygensession_initKeyRotation(retptr, oldshare.__wbg_ptr, ptr0, len0); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return KeygenSession.__wrap(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
/** | ||
* @returns {string | undefined} | ||
* @param {Keyshare} oldshare | ||
* @param {Uint8Array} lost_shares | ||
* @param {Uint8Array | undefined} [seed] | ||
* @returns {KeygenSession} | ||
*/ | ||
error() { | ||
static initKeyRecovery(oldshare, lost_shares, seed) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.keygensession_error(retptr, this.__wbg_ptr); | ||
_assertClass(oldshare, Keyshare); | ||
const ptr0 = passArray8ToWasm0(lost_shares, wasm.__wbindgen_malloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
var ptr1 = isLikeNone(seed) ? 0 : passArray8ToWasm0(seed, wasm.__wbindgen_malloc); | ||
var len1 = WASM_VECTOR_LEN; | ||
wasm.keygensession_initKeyRecovery(retptr, oldshare.__wbg_ptr, ptr0, len0, ptr1, len1); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
let v1; | ||
if (r0 !== 0) { | ||
v1 = getStringFromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_free(r0, r1 * 1, 1); | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return v1; | ||
return KeygenSession.__wrap(r0); | ||
} finally { | ||
@@ -275,2 +299,39 @@ wasm.__wbindgen_add_to_stack_pointer(16); | ||
/** | ||
* @param {number} participants | ||
* @param {number} threshold | ||
* @param {number} party_id | ||
* @param {Uint8Array} pk | ||
* @param {Uint8Array} lost_shares | ||
* @param {Uint8Array | undefined} [seed] | ||
* @returns {KeygenSession} | ||
*/ | ||
static initLostShareRecovery(participants, threshold, party_id, pk, lost_shares, seed) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passArray8ToWasm0(pk, wasm.__wbindgen_malloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passArray8ToWasm0(lost_shares, wasm.__wbindgen_malloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
var ptr2 = isLikeNone(seed) ? 0 : passArray8ToWasm0(seed, wasm.__wbindgen_malloc); | ||
var len2 = WASM_VECTOR_LEN; | ||
wasm.keygensession_initLostShareRecovery(retptr, participants, threshold, party_id, ptr0, len0, ptr1, len1, ptr2, len2); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return KeygenSession.__wrap(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
/** | ||
* @returns {Error | undefined} | ||
*/ | ||
error() { | ||
const ret = wasm.keygensession_error(this.__wbg_ptr); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* Finish key generation session and return resulting key share. | ||
@@ -302,4 +363,15 @@ * This nethod consumes the session and deallocates it in any | ||
createFirstMessage() { | ||
const ret = wasm.keygensession_createFirstMessage(this.__wbg_ptr); | ||
return Message.__wrap(ret); | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.keygensession_createFirstMessage(retptr, this.__wbg_ptr); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return Message.__wrap(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
@@ -325,5 +397,6 @@ /** | ||
* @param {Array<any> | undefined} [commitments] | ||
* @param {Uint8Array | undefined} [seed] | ||
* @returns {(Message)[]} | ||
*/ | ||
handleMessages(msgs, commitments) { | ||
handleMessages(msgs, commitments, seed) { | ||
try { | ||
@@ -333,3 +406,5 @@ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.keygensession_handleMessages(retptr, this.__wbg_ptr, ptr0, len0, isLikeNone(commitments) ? 0 : addHeapObject(commitments)); | ||
var ptr1 = isLikeNone(seed) ? 0 : passArray8ToWasm0(seed, wasm.__wbindgen_malloc); | ||
var len1 = WASM_VECTOR_LEN; | ||
wasm.keygensession_handleMessages(retptr, this.__wbg_ptr, ptr0, len0, isLikeNone(commitments) ? 0 : addHeapObject(commitments), ptr1, len1); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
@@ -342,5 +417,5 @@ var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
} | ||
var v2 = getArrayJsValueFromWasm0(r0, r1).slice(); | ||
var v3 = getArrayJsValueFromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_free(r0, r1 * 4, 4); | ||
return v2; | ||
return v3; | ||
} finally { | ||
@@ -447,8 +522,9 @@ wasm.__wbindgen_add_to_stack_pointer(16); | ||
/** | ||
* Merge new and old keyshares after key rotation. | ||
* @param {Keyshare} oldshare | ||
* Depricated method, the method does nothing. | ||
* It exists for backward compatibility only | ||
* @param {Keyshare} _oldshare | ||
*/ | ||
finishKeyRotation(oldshare) { | ||
_assertClass(oldshare, Keyshare); | ||
var ptr0 = oldshare.__destroy_into_raw(); | ||
finishKeyRotation(_oldshare) { | ||
_assertClass(_oldshare, Keyshare); | ||
var ptr0 = _oldshare.__destroy_into_raw(); | ||
wasm.keyshare_finishKeyRotation(this.__wbg_ptr, ptr0); | ||
@@ -580,4 +656,5 @@ } | ||
* @param {string} chain_path | ||
* @param {Uint8Array | undefined} [seed] | ||
*/ | ||
constructor(keyshare, chain_path) { | ||
constructor(keyshare, chain_path, seed) { | ||
_assertClass(keyshare, Keyshare); | ||
@@ -587,3 +664,5 @@ var ptr0 = keyshare.__destroy_into_raw(); | ||
const len1 = WASM_VECTOR_LEN; | ||
const ret = wasm.signsession_new(ptr0, ptr1, len1); | ||
var ptr2 = isLikeNone(seed) ? 0 : passArray8ToWasm0(seed, wasm.__wbindgen_malloc); | ||
var len2 = WASM_VECTOR_LEN; | ||
const ret = wasm.signsession_new(ptr0, ptr1, len1, ptr2, len2); | ||
this.__wbg_ptr = ret >>> 0; | ||
@@ -622,16 +701,23 @@ return this; | ||
* Return an error message, if any. | ||
* @returns {string | undefined} | ||
* @returns {Error | undefined} | ||
*/ | ||
error() { | ||
const ret = wasm.signsession_error(this.__wbg_ptr); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* Create a fist message and change session state from Init to WaitMg1. | ||
* @returns {Message} | ||
*/ | ||
createFirstMessage() { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.signsession_error(retptr, this.__wbg_ptr); | ||
wasm.signsession_createFirstMessage(retptr, this.__wbg_ptr); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
let v1; | ||
if (r0 !== 0) { | ||
v1 = getStringFromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_free(r0, r1 * 1, 1); | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return v1; | ||
return Message.__wrap(r0); | ||
} finally { | ||
@@ -642,16 +728,9 @@ wasm.__wbindgen_add_to_stack_pointer(16); | ||
/** | ||
* Create a fist message and change session state from Init to WaitMg1. | ||
* @returns {Message} | ||
*/ | ||
createFirstMessage() { | ||
const ret = wasm.signsession_createFirstMessage(this.__wbg_ptr); | ||
return Message.__wrap(ret); | ||
} | ||
/** | ||
* Handle a batch of messages. | ||
* Decode, process and return an array messages to send to other parties. | ||
* @param {(Message)[]} msgs | ||
* @param {Uint8Array | undefined} [seed] | ||
* @returns {(Message)[]} | ||
*/ | ||
handleMessages(msgs) { | ||
handleMessages(msgs, seed) { | ||
try { | ||
@@ -661,3 +740,5 @@ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.signsession_handleMessages(retptr, this.__wbg_ptr, ptr0, len0); | ||
var ptr1 = isLikeNone(seed) ? 0 : passArray8ToWasm0(seed, wasm.__wbindgen_malloc); | ||
var len1 = WASM_VECTOR_LEN; | ||
wasm.signsession_handleMessages(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
@@ -670,5 +751,5 @@ var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
} | ||
var v2 = getArrayJsValueFromWasm0(r0, r1).slice(); | ||
var v3 = getArrayJsValueFromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_free(r0, r1 * 4, 4); | ||
return v2; | ||
return v3; | ||
} finally { | ||
@@ -740,7 +821,12 @@ wasm.__wbindgen_add_to_stack_pointer(16); | ||
module.exports.__wbg_message_new = function(arg0) { | ||
const ret = Message.__wrap(arg0); | ||
module.exports.__wbindgen_string_new = function(arg0, arg1) { | ||
const ret = getStringFromWasm0(arg0, arg1); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbindgen_number_new = function(arg0) { | ||
const ret = arg0; | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_message_unwrap = function(arg0) { | ||
@@ -751,2 +837,7 @@ const ret = Message.__unwrap(takeObject(arg0)); | ||
module.exports.__wbg_message_new = function(arg0) { | ||
const ret = Message.__wrap(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbindgen_is_object = function(arg0) { | ||
@@ -758,3 +849,3 @@ const val = getObject(arg0); | ||
module.exports.__wbg_crypto_d05b68a3572bb8ca = function(arg0) { | ||
module.exports.__wbg_crypto_1d1f22824a6a080c = function(arg0) { | ||
const ret = getObject(arg0).crypto; | ||
@@ -764,3 +855,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_process_b02b3570280d0366 = function(arg0) { | ||
module.exports.__wbg_process_4a72847cc503995b = function(arg0) { | ||
const ret = getObject(arg0).process; | ||
@@ -770,3 +861,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_versions_c1cb42213cedf0f5 = function(arg0) { | ||
module.exports.__wbg_versions_f686565e586dd935 = function(arg0) { | ||
const ret = getObject(arg0).versions; | ||
@@ -776,3 +867,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_node_43b1089f407e4ec2 = function(arg0) { | ||
module.exports.__wbg_node_104a2ff8d6ea03a2 = function(arg0) { | ||
const ret = getObject(arg0).node; | ||
@@ -787,3 +878,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_require_9a7e0f667ead4995 = function() { return handleError(function () { | ||
module.exports.__wbg_require_cca90b1a94a0255b = function() { return handleError(function () { | ||
const ret = module.require; | ||
@@ -793,8 +884,3 @@ return addHeapObject(ret); | ||
module.exports.__wbindgen_string_new = function(arg0, arg1) { | ||
const ret = getStringFromWasm0(arg0, arg1); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_msCrypto_10fc94afee92bd76 = function(arg0) { | ||
module.exports.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) { | ||
const ret = getObject(arg0).msCrypto; | ||
@@ -804,11 +890,11 @@ return addHeapObject(ret); | ||
module.exports.__wbg_randomFillSync_b70ccbdf4926a99d = function() { return handleError(function (arg0, arg1) { | ||
module.exports.__wbg_randomFillSync_5c9c955aa56b6049 = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).randomFillSync(takeObject(arg1)); | ||
}, arguments) }; | ||
module.exports.__wbg_getRandomValues_7e42b4fb8779dc6d = function() { return handleError(function (arg0, arg1) { | ||
module.exports.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).getRandomValues(getObject(arg1)); | ||
}, arguments) }; | ||
module.exports.__wbg_length_161c0d89c6535c1d = function(arg0) { | ||
module.exports.__wbg_length_cd7af8117672b8b8 = function(arg0) { | ||
const ret = getObject(arg0).length; | ||
@@ -818,3 +904,3 @@ return ret; | ||
module.exports.__wbg_newnoargs_cfecb3965268594c = function(arg0, arg1) { | ||
module.exports.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) { | ||
const ret = new Function(getStringFromWasm0(arg0, arg1)); | ||
@@ -829,3 +915,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_self_05040bd9523805b9 = function() { return handleError(function () { | ||
module.exports.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () { | ||
const ret = self.self; | ||
@@ -835,3 +921,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_window_adc720039f2cb14f = function() { return handleError(function () { | ||
module.exports.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () { | ||
const ret = window.window; | ||
@@ -841,3 +927,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_globalThis_622105db80c1457d = function() { return handleError(function () { | ||
module.exports.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () { | ||
const ret = globalThis.globalThis; | ||
@@ -847,3 +933,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_global_f56b013ed9bcf359 = function() { return handleError(function () { | ||
module.exports.__wbg_global_207b558942527489 = function() { return handleError(function () { | ||
const ret = global.global; | ||
@@ -858,3 +944,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_newwithlength_a20dc3b27e1cb1b2 = function(arg0) { | ||
module.exports.__wbg_newwithlength_66ae46612e7f0234 = function(arg0) { | ||
const ret = new Array(arg0 >>> 0); | ||
@@ -864,3 +950,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_get_0ee8ea3c7c984c45 = function(arg0, arg1) { | ||
module.exports.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) { | ||
const ret = getObject(arg0)[arg1 >>> 0]; | ||
@@ -870,7 +956,12 @@ return addHeapObject(ret); | ||
module.exports.__wbg_set_79c308ecd9a1d091 = function(arg0, arg1, arg2) { | ||
module.exports.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) { | ||
getObject(arg0)[arg1 >>> 0] = takeObject(arg2); | ||
}; | ||
module.exports.__wbg_call_3f093dd26d5569f8 = function() { return handleError(function (arg0, arg1) { | ||
module.exports.__wbg_new_28c511d9baebfa89 = function(arg0, arg1) { | ||
const ret = new Error(getStringFromWasm0(arg0, arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) { | ||
const ret = getObject(arg0).call(getObject(arg1)); | ||
@@ -880,3 +971,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_call_67f2111acd2dfdb6 = function() { return handleError(function (arg0, arg1, arg2) { | ||
module.exports.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2)); | ||
@@ -886,3 +977,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_buffer_b914fb8b50ebbc3e = function(arg0) { | ||
module.exports.__wbg_buffer_12d079cc21e14bdb = function(arg0) { | ||
const ret = getObject(arg0).buffer; | ||
@@ -892,3 +983,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_newwithbyteoffsetandlength_0de9ee56e9f6ee6e = function(arg0, arg1, arg2) { | ||
module.exports.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) { | ||
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); | ||
@@ -898,3 +989,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_new_b1f2d6842d615181 = function(arg0) { | ||
module.exports.__wbg_new_63b92bc8671ed464 = function(arg0) { | ||
const ret = new Uint8Array(getObject(arg0)); | ||
@@ -904,3 +995,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_instanceof_Uint8Array_c299a4ee232e76ba = function(arg0) { | ||
module.exports.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) { | ||
let result; | ||
@@ -916,3 +1007,3 @@ try { | ||
module.exports.__wbg_newwithlength_0d03cef43b68a530 = function(arg0) { | ||
module.exports.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) { | ||
const ret = new Uint8Array(arg0 >>> 0); | ||
@@ -922,3 +1013,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_subarray_adc418253d76e2f1 = function(arg0, arg1, arg2) { | ||
module.exports.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) { | ||
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0); | ||
@@ -928,3 +1019,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_length_21c4b0ae73cba59d = function(arg0) { | ||
module.exports.__wbg_length_c20a40f15020d68a = function(arg0) { | ||
const ret = getObject(arg0).length; | ||
@@ -934,3 +1025,3 @@ return ret; | ||
module.exports.__wbg_set_7d988c98e6ced92d = function(arg0, arg1, arg2) { | ||
module.exports.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) { | ||
getObject(arg0).set(getObject(arg1), arg2 >>> 0); | ||
@@ -944,2 +1035,7 @@ }; | ||
module.exports.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2)); | ||
return ret; | ||
}, arguments) }; | ||
module.exports.__wbindgen_throw = function(arg0, arg1) { | ||
@@ -946,0 +1042,0 @@ throw new Error(getStringFromWasm0(arg0, arg1)); |
{ | ||
"name": "@silencelaboratories/dkls-wasm-ll-node", | ||
"version": "1.0.1-pre.3", | ||
"version": "1.1.0-pre.1", | ||
"license": "SLL", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -216,1 +216,15 @@ # Multi-Party-TSS (ECDSA-DKLs23) | ||
as part of error handling. | ||
## Error handling | ||
session.handleMessages() may throw an error. It is impossitle to | ||
recover from the error. It is impossible to continue execition of a | ||
protocol. | ||
In most cases err.message only could help to debug an application. | ||
One special case MUST be handled. | ||
SignSession.handleMessages() could throw an error AbortProtocolAndBanParty. | ||
In this case, the error object has property "banParty", the value is | ||
in range [0 .. threshold-1]. Zero is valid party ID! |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
701299
1107
230