@dynamic-labs-wallet/browser 0.0.241 → 0.0.243
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/internal/core/bip340.cjs +1 -1
- package/internal/core/bip340.d.ts +1 -1
- package/internal/core/common.cjs +1 -1
- package/internal/core/common.d.ts +1 -0
- package/internal/core/ecdsa.cjs +1 -1
- package/internal/core/ecdsa.d.ts +1 -1
- package/internal/core/ed25519_exportable.cjs +1 -1
- package/internal/core/ed25519_exportable.d.ts +0 -1
- package/internal/core/native.d.ts +2 -2
- package/internal/web/generated/libmpc_executor.d.ts +30 -30
- package/internal/web/generated/libmpc_executor.js +1 -1
- package/internal/web/generated/libmpc_executor_bg.wasm +0 -0
- package/package.json +2 -2
package/internal/core/bip340.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.BIP340=void 0;const _1=require("./index.cjs"),utils_1=require("@noble/hashes/utils"),common_1=require("./common.cjs");
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.BIP340=void 0;const _1=require("./index.cjs"),utils_1=require("@noble/hashes/utils"),common_1=require("./common.cjs");class BIP340{constructor(native,url){this.NATIVE=native,this.URL=url}async initKeygen(){const keygenInitKeypair=await(await this.NATIVE).initKeygen();return new _1.BIP340InitKeygenResult(keygenInitKeypair.pubkey,keygenInitKeypair.keypair)}async exportID(keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare;return(await this.NATIVE).bip340GetExportID(secretShare)}async createRoom(numParties,apiKey){return(0,common_1.sanitizeNumberOfParties)(numParties),(await this.NATIVE).createRoom(this.URL,numParties,apiKey)}async keygen(roomUuid,numParties,threshold,keygenInit,keygenIds){if((0,common_1.sanitizeNumberOfParties)(numParties,threshold),keygenIds.length!==numParties-1)throw new Error(`keygenIds length must be exactly: ${numParties-1}, it is: `+keygenIds.length);const keygenResult=await(await this.NATIVE).bip340Keygen(roomUuid,this.URL,numParties,threshold,keygenInit.keygenSecret,keygenIds);if(!keygenResult.pubkey||!keygenResult.secret_share)throw new Error("Keygen failed, no public key or secret share was returned.");const pubkey=(0,utils_1.hexToBytes)(keygenResult.pubkey),secretShareHex=keygenResult.secret_share;return new _1.BIP340KeygenResult(pubkey,secretShareHex)}async sign(roomUuid,keygenResult,msg,derivationPath=new Uint32Array,tweak=new Uint8Array){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,signature=("string"!=typeof msg&&(msg=(0,utils_1.bytesToHex)(msg)),tweak=(0,common_1.getHex32Bytes)(tweak),await(await this.NATIVE).bip340Sign(roomUuid,this.URL,secretShare,msg,Array.from(derivationPath),tweak));return(0,utils_1.hexToBytes)(signature)}async refresh(roomUuid,keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,refreshedKeygenResult=await(await this.NATIVE).bip340Refresh(roomUuid,this.URL,secretShare);if(!refreshedKeygenResult.pubkey||!refreshedKeygenResult.secret_share)throw new Error("Keygen failed, no public key or secret share was returned.");const pubkey=(0,utils_1.hexToBytes)(refreshedKeygenResult.pubkey),secretShareHex=refreshedKeygenResult.secret_share;return new _1.BIP340KeygenResult(pubkey,secretShareHex)}async reshareNewParty(roomUuid,oldThreshold,newThreshold,keygenInit,keygenIds){const resharedKeygenResult=await(await this.NATIVE).bip340ReshareNewParty(roomUuid,this.URL,oldThreshold,newThreshold,keygenInit.keygenSecret,keygenIds),pubkey=(0,utils_1.hexToBytes)(resharedKeygenResult.pubkey),secretShareHex=resharedKeygenResult.secret_share;return new _1.BIP340KeygenResult(pubkey,secretShareHex)}async reshareRemainingParty(roomUuid,newThreshold,keygenResult,keygenIds){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,resharedKeygenResult=await(await this.NATIVE).bip340ReshareRemainingParty(roomUuid,this.URL,newThreshold,secretShare,keygenIds),pubkey=(0,utils_1.hexToBytes)(resharedKeygenResult.pubkey),secretShareHex=resharedKeygenResult.secret_share;return new _1.BIP340KeygenResult(pubkey,secretShareHex)}async deriveTweakPubkey(keygenResult,derivationPath=new Uint32Array,tweak=new Uint8Array){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,pubkey=await(await this.NATIVE).bip340DeriveTweakPubkey(secretShare,Array.from(derivationPath),(0,common_1.getHex32Bytes)(tweak));return(0,utils_1.hexToBytes)(pubkey)}async getXpub(keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare;return(await this.NATIVE).bip340GetXpub(secretShare)}async deriveTweakPubkeyFromXpub(Xpub,derivationPath=new Uint32Array,tweak=new Uint8Array){const pubkey=await(await this.NATIVE).bip340DeriveTweakPubkeyFromXpub(Xpub,Array.from(derivationPath),(0,common_1.getHex32Bytes)(tweak));return(0,utils_1.hexToBytes)(pubkey)}async exportFullPrivateKey(roomUuid,keygenResult,toExportID){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare;return(await this.NATIVE).bip340ExportFullPrivateKey(roomUuid,this.URL,secretShare,toExportID)}async derivePrivateKeyFromXpriv(xpriv,derivationPath=new Uint32Array){return(await this.NATIVE).bip340DerivePrivateKeyFromXpriv(xpriv,Array.from(derivationPath))}async offlineExportFullPrivateKey(keygenResults){const secretShares=keygenResults.map(k=>{if("string"==typeof k)return k;if(k instanceof _1.BIP340KeygenResult)return k.secretShare;throw"UnknownType"});return(await this.NATIVE).bip340OfflineExportFullPrivateKey(secretShares)}async importPrivateKeyRecipient(roomUuid,threshold,keygenInit,keygenIds){const importKeygenResult=await(await this.NATIVE).bip340ImportPrivateKeyRecipient(roomUuid,this.URL,threshold,keygenInit.keygenSecret,keygenIds),pubkey=(0,utils_1.hexToBytes)(importKeygenResult.pubkey),secretShareHex=importKeygenResult.secret_share;return new _1.BIP340KeygenResult(pubkey,secretShareHex)}async importPrivateKeyImporter(roomUuid,threshold,privateKey,keygenInit,keygenIds,chaincode=new Uint8Array){const importKeygenResult=await(await this.NATIVE).bip340ImportPrivateKeyImporter(roomUuid,this.URL,threshold,privateKey,keygenInit.keygenSecret,keygenIds,(0,common_1.getHex32Bytes)(chaincode)),pubkey=(0,utils_1.hexToBytes)(importKeygenResult.pubkey),secretShareHex=importKeygenResult.secret_share;return new _1.BIP340KeygenResult(pubkey,secretShareHex)}}exports.BIP340=BIP340;
|
|
@@ -18,5 +18,5 @@ export declare class BIP340 {
|
|
|
18
18
|
derivePrivateKeyFromXpriv(xpriv: string, derivationPath?: Uint32Array): Promise<string>;
|
|
19
19
|
offlineExportFullPrivateKey(keygenResults: BIP340KeygenResult[] | string[]): Promise<string>;
|
|
20
20
|
importPrivateKeyRecipient(roomUuid: string, threshold: number, keygenInit: BIP340InitKeygenResult, keygenIds: string[]): Promise<BIP340KeygenResult>;
|
|
21
|
-
importPrivateKeyImporter(roomUuid: string, threshold: number, privateKey: string, keygenInit: BIP340InitKeygenResult, keygenIds: string[]): Promise<BIP340KeygenResult>;
|
|
21
|
+
importPrivateKeyImporter(roomUuid: string, threshold: number, privateKey: string, keygenInit: BIP340InitKeygenResult, keygenIds: string[], chaincode?: Uint8Array | string): Promise<BIP340KeygenResult>;
|
|
22
22
|
}
|
package/internal/core/common.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function sanitizeNumberOfParties(...numberOfParties){for(var n of numberOfParties)if(!Number.isInteger(n)||n<1||65535<n)throw new RangeError(`numberOfParties should be an integer in the range: 1..65_535, instead got: ${n} `)}
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.sanitizeNumberOfParties=sanitizeNumberOfParties,exports.getHex32Bytes=getHex32Bytes;const utils_1=require("@noble/hashes/utils");function sanitizeNumberOfParties(...numberOfParties){for(var n of numberOfParties)if(!Number.isInteger(n)||n<1||65535<n)throw new RangeError(`numberOfParties should be an integer in the range: 1..65_535, instead got: ${n} `)}function getHex32Bytes(strOrArr){if("string"!=typeof strOrArr&&(strOrArr=(0,utils_1.bytesToHex)(strOrArr)),0!==strOrArr.length&&64!==strOrArr.length)throw new Error("Tweak must be 32 bytes long");return strOrArr}
|
package/internal/core/ecdsa.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.Ecdsa=void 0;const _1=require("./index.cjs"),common_1=require("./common.cjs");class Ecdsa{constructor(native,hostUrl){this.NATIVE=native,this.URL=hostUrl}async createRoom(numParties,apiKey){return(0,common_1.sanitizeNumberOfParties)(numParties),(await this.NATIVE).createRoom(this.URL,numParties,apiKey)}async initKeygen(){const keygenInitKeypair=await(await this.NATIVE).initKeygen();return new _1.EcdsaInitKeygenResult(keygenInitKeypair.pubkey,keygenInitKeypair.keypair)}async exportID(keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare;return(await this.NATIVE).ecdsaGetExportID(secretShare)}async keygen(roomUuid,numParties,threshold,keygenInit,keygenIds){if((0,common_1.sanitizeNumberOfParties)(numParties,threshold),keygenIds.length!==numParties-1)throw new Error(`keygenIds length must be exactly: ${numParties-1}, it is: `+keygenIds.length);const keygenResult=await(await this.NATIVE).ecdsaKeygen(roomUuid,this.URL,numParties,threshold,keygenInit.keygenSecret,keygenIds),pubkey=new _1.EcdsaPublicKey(keygenResult.pubkey),secretShareHex=keygenResult.secret_share;return new _1.EcdsaKeygenResult(pubkey,secretShareHex)}async sign(roomUuid,keygenResult,msgHash,derivationPath=new Uint32Array){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,expandedSignature=await(await this.NATIVE).ecdsaSign(roomUuid,this.URL,secretShare,msgHash.toHex(),Array.from(derivationPath));return _1.EcdsaSignature.fromBuffer(expandedSignature)}async refresh(roomUuid,keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,refreshedKeygenResult=await(await this.NATIVE).ecdsaRefresh(roomUuid,this.URL,secretShare),pubkey=new _1.EcdsaPublicKey(refreshedKeygenResult.pubkey),secretShareHex=refreshedKeygenResult.secret_share;return new _1.EcdsaKeygenResult(pubkey,secretShareHex)}async reshareNewParty(roomUuid,oldThreshold,newThreshold,keygenInit,keygenIds){const resharedKeygenResult=await(await this.NATIVE).ecdsaReshareNewParty(roomUuid,this.URL,oldThreshold,newThreshold,keygenInit.keygenSecret,keygenIds),pubkey=new _1.EcdsaPublicKey(resharedKeygenResult.pubkey),secretShareHex=resharedKeygenResult.secret_share;return new _1.EcdsaKeygenResult(pubkey,secretShareHex)}async reshareRemainingParty(roomUuid,newThreshold,keygenResult,keygenIds){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,resharedKeygenResult=await(await this.NATIVE).ecdsaReshareRemainingParty(roomUuid,this.URL,newThreshold,secretShare,keygenIds),pubkey=new _1.EcdsaPublicKey(resharedKeygenResult.pubkey),secretShareHex=resharedKeygenResult.secret_share;return new _1.EcdsaKeygenResult(pubkey,secretShareHex)}async derivePubkey(keygenResult,derivationPath=new Uint32Array){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,pubkey=await(await this.NATIVE).ecdsaDerivePubkey(secretShare,Array.from(derivationPath));return new _1.EcdsaPublicKey(pubkey)}async getXpub(keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare;return(await this.NATIVE).ecdsaGetXpub(secretShare)}async derivePubkeyFromXpub(Xpub,derivationPath=new Uint32Array){const pubkey=await(await this.NATIVE).ecdsaDerivePubkeyFromXpub(Xpub,Array.from(derivationPath));return new _1.EcdsaPublicKey(pubkey)}async exportFullPrivateKey(roomUuid,keygenResult,toExportID){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,exported=await(await this.NATIVE).ecdsaExportFullPrivateKey(roomUuid,this.URL,secretShare,toExportID);return exported||void 0}async derivePrivateKeyFromXpriv(xpriv,derivationPath=new Uint32Array){return(await this.NATIVE).ecdsaDerivePrivateKeyFromXpriv(xpriv,Array.from(derivationPath))}async offlineExportFullPrivateKey(keygenResults){const secretShares=keygenResults.map(k=>{if("string"==typeof k)return k;if(k instanceof _1.EcdsaKeygenResult)return k.secretShare;throw"UnknownType"});return(await this.NATIVE).ecdsaOfflineExportFullPrivateKey(secretShares)}async importPrivateKeyRecipient(roomUuid,threshold,keygenInit,keygenIds){const importKeygenResult=await(await this.NATIVE).ecdsaImportPrivateKeyRecipient(roomUuid,this.URL,threshold,keygenInit.keygenSecret,keygenIds),pubkey=new _1.EcdsaPublicKey(importKeygenResult.pubkey),secretShareHex=importKeygenResult.secret_share;return new _1.EcdsaKeygenResult(pubkey,secretShareHex)}async importPrivateKeyImporter(roomUuid,threshold,privateKey,keygenInit,keygenIds){const importKeygenResult=await(await this.NATIVE).ecdsaImportPrivateKeyImporter(roomUuid,this.URL,threshold,privateKey,keygenInit.keygenSecret,keygenIds),pubkey=new _1.EcdsaPublicKey(importKeygenResult.pubkey),secretShareHex=importKeygenResult.secret_share;return new _1.EcdsaKeygenResult(pubkey,secretShareHex)}getHostUrl(path){return path||this.URL}}exports.Ecdsa=Ecdsa;
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.Ecdsa=void 0;const _1=require("./index.cjs"),common_1=require("./common.cjs");class Ecdsa{constructor(native,hostUrl){this.NATIVE=native,this.URL=hostUrl}async createRoom(numParties,apiKey){return(0,common_1.sanitizeNumberOfParties)(numParties),(await this.NATIVE).createRoom(this.URL,numParties,apiKey)}async initKeygen(){const keygenInitKeypair=await(await this.NATIVE).initKeygen();return new _1.EcdsaInitKeygenResult(keygenInitKeypair.pubkey,keygenInitKeypair.keypair)}async exportID(keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare;return(await this.NATIVE).ecdsaGetExportID(secretShare)}async keygen(roomUuid,numParties,threshold,keygenInit,keygenIds){if((0,common_1.sanitizeNumberOfParties)(numParties,threshold),keygenIds.length!==numParties-1)throw new Error(`keygenIds length must be exactly: ${numParties-1}, it is: `+keygenIds.length);const keygenResult=await(await this.NATIVE).ecdsaKeygen(roomUuid,this.URL,numParties,threshold,keygenInit.keygenSecret,keygenIds),pubkey=new _1.EcdsaPublicKey(keygenResult.pubkey),secretShareHex=keygenResult.secret_share;return new _1.EcdsaKeygenResult(pubkey,secretShareHex)}async sign(roomUuid,keygenResult,msgHash,derivationPath=new Uint32Array){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,expandedSignature=await(await this.NATIVE).ecdsaSign(roomUuid,this.URL,secretShare,msgHash.toHex(),Array.from(derivationPath));return _1.EcdsaSignature.fromBuffer(expandedSignature)}async refresh(roomUuid,keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,refreshedKeygenResult=await(await this.NATIVE).ecdsaRefresh(roomUuid,this.URL,secretShare),pubkey=new _1.EcdsaPublicKey(refreshedKeygenResult.pubkey),secretShareHex=refreshedKeygenResult.secret_share;return new _1.EcdsaKeygenResult(pubkey,secretShareHex)}async reshareNewParty(roomUuid,oldThreshold,newThreshold,keygenInit,keygenIds){const resharedKeygenResult=await(await this.NATIVE).ecdsaReshareNewParty(roomUuid,this.URL,oldThreshold,newThreshold,keygenInit.keygenSecret,keygenIds),pubkey=new _1.EcdsaPublicKey(resharedKeygenResult.pubkey),secretShareHex=resharedKeygenResult.secret_share;return new _1.EcdsaKeygenResult(pubkey,secretShareHex)}async reshareRemainingParty(roomUuid,newThreshold,keygenResult,keygenIds){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,resharedKeygenResult=await(await this.NATIVE).ecdsaReshareRemainingParty(roomUuid,this.URL,newThreshold,secretShare,keygenIds),pubkey=new _1.EcdsaPublicKey(resharedKeygenResult.pubkey),secretShareHex=resharedKeygenResult.secret_share;return new _1.EcdsaKeygenResult(pubkey,secretShareHex)}async derivePubkey(keygenResult,derivationPath=new Uint32Array){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,pubkey=await(await this.NATIVE).ecdsaDerivePubkey(secretShare,Array.from(derivationPath));return new _1.EcdsaPublicKey(pubkey)}async getXpub(keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare;return(await this.NATIVE).ecdsaGetXpub(secretShare)}async derivePubkeyFromXpub(Xpub,derivationPath=new Uint32Array){const pubkey=await(await this.NATIVE).ecdsaDerivePubkeyFromXpub(Xpub,Array.from(derivationPath));return new _1.EcdsaPublicKey(pubkey)}async exportFullPrivateKey(roomUuid,keygenResult,toExportID){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,exported=await(await this.NATIVE).ecdsaExportFullPrivateKey(roomUuid,this.URL,secretShare,toExportID);return exported||void 0}async derivePrivateKeyFromXpriv(xpriv,derivationPath=new Uint32Array){return(await this.NATIVE).ecdsaDerivePrivateKeyFromXpriv(xpriv,Array.from(derivationPath))}async offlineExportFullPrivateKey(keygenResults){const secretShares=keygenResults.map(k=>{if("string"==typeof k)return k;if(k instanceof _1.EcdsaKeygenResult)return k.secretShare;throw"UnknownType"});return(await this.NATIVE).ecdsaOfflineExportFullPrivateKey(secretShares)}async importPrivateKeyRecipient(roomUuid,threshold,keygenInit,keygenIds){const importKeygenResult=await(await this.NATIVE).ecdsaImportPrivateKeyRecipient(roomUuid,this.URL,threshold,keygenInit.keygenSecret,keygenIds),pubkey=new _1.EcdsaPublicKey(importKeygenResult.pubkey),secretShareHex=importKeygenResult.secret_share;return new _1.EcdsaKeygenResult(pubkey,secretShareHex)}async importPrivateKeyImporter(roomUuid,threshold,privateKey,keygenInit,keygenIds,chaincode=new Uint8Array){const importKeygenResult=await(await this.NATIVE).ecdsaImportPrivateKeyImporter(roomUuid,this.URL,threshold,privateKey,keygenInit.keygenSecret,keygenIds,(0,common_1.getHex32Bytes)(chaincode)),pubkey=new _1.EcdsaPublicKey(importKeygenResult.pubkey),secretShareHex=importKeygenResult.secret_share;return new _1.EcdsaKeygenResult(pubkey,secretShareHex)}getHostUrl(path){return path||this.URL}}exports.Ecdsa=Ecdsa;
|
package/internal/core/ecdsa.d.ts
CHANGED
|
@@ -18,6 +18,6 @@ export declare class Ecdsa {
|
|
|
18
18
|
derivePrivateKeyFromXpriv(xpriv: string, derivationPath?: Uint32Array): Promise<string>;
|
|
19
19
|
offlineExportFullPrivateKey(keygenResults: EcdsaKeygenResult[] | string[]): Promise<string>;
|
|
20
20
|
importPrivateKeyRecipient(roomUuid: string, threshold: number, keygenInit: EcdsaInitKeygenResult, keygenIds: string[]): Promise<EcdsaKeygenResult>;
|
|
21
|
-
importPrivateKeyImporter(roomUuid: string, threshold: number, privateKey: string, keygenInit: EcdsaInitKeygenResult, keygenIds: string[]): Promise<EcdsaKeygenResult>;
|
|
21
|
+
importPrivateKeyImporter(roomUuid: string, threshold: number, privateKey: string, keygenInit: EcdsaInitKeygenResult, keygenIds: string[], chaincode?: Uint8Array | string): Promise<EcdsaKeygenResult>;
|
|
22
22
|
protected getHostUrl(path?: string): string;
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExportableEd25519=void 0;const _1=require("./index.cjs"),utils_1=require("@noble/hashes/utils"),common_1=require("./common.cjs");class ExportableEd25519{constructor(native,url){this.NATIVE=native,this.URL=url}async initKeygen(){const keygenInitKeypair=await(await this.NATIVE).initKeygen();return new _1.ExportableEd25519InitKeygenResult(keygenInitKeypair.pubkey,keygenInitKeypair.keypair)}async exportID(keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare;return(await this.NATIVE).exportableEd25519GetExportID(secretShare)}async createRoom(numParties,apiKey){return(0,common_1.sanitizeNumberOfParties)(numParties),(await this.NATIVE).createRoom(this.URL,numParties,apiKey)}async sampleKey(roomUuid,numParties,threshold,keygenInit,keygenIds){if((0,common_1.sanitizeNumberOfParties)(numParties,threshold),keygenIds.length!==numParties-1)throw new Error(`keygenIds length must be exactly: ${numParties-1}, it is: `+keygenIds.length);const keygenResult=await(await this.NATIVE).exportableEd25519SampleKey(roomUuid,this.URL,numParties,threshold,keygenInit.keygenSecret,keygenIds);if(!keygenResult.pubkey||!keygenResult.secret_share)throw new Error("Key sampling failed, no public key or secret share was returned.");const pubkey=(0,utils_1.hexToBytes)(keygenResult.pubkey),secretShareHex=keygenResult.secret_share;return new _1.ExportableEd25519KeygenResult(pubkey,secretShareHex)}async receiveKey(roomUuid,numParties,threshold,keygenInit,keygenIds){if((0,common_1.sanitizeNumberOfParties)(numParties,threshold),keygenIds.length!==numParties-1)throw new Error(`keygenIds length must be exactly: ${numParties-1}, it is: `+keygenIds.length);const keygenResult=await(await this.NATIVE).exportableEd25519ReceiveKey(roomUuid,this.URL,numParties,threshold,keygenInit.keygenSecret,keygenIds);if(!keygenResult.pubkey||!keygenResult.secret_share)throw new Error("Key receive failed, no public key or secret share was returned.");const pubkey=(0,utils_1.hexToBytes)(keygenResult.pubkey),secretShareHex=keygenResult.secret_share;return new _1.ExportableEd25519KeygenResult(pubkey,secretShareHex)}async sign(roomUuid,keygenResult,msg){"string"!=typeof msg&&(msg=(0,utils_1.bytesToHex)(msg));const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,signature=await(await this.NATIVE).exportableEd25519Sign(roomUuid,this.URL,secretShare,msg);return(0,utils_1.hexToBytes)(signature)}async refresh(roomUuid,keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,refreshedKeygenResult=await(await this.NATIVE).exportableEd25519Refresh(roomUuid,this.URL,secretShare);if(!refreshedKeygenResult.pubkey||!refreshedKeygenResult.secret_share)throw new Error("Keygen failed, no public key or secret share was returned.");const pubkey=(0,utils_1.hexToBytes)(refreshedKeygenResult.pubkey),secretShareHex=refreshedKeygenResult.secret_share;return new _1.ExportableEd25519KeygenResult(pubkey,secretShareHex)}async reshareNewParty(roomUuid,oldThreshold,newThreshold,keygenInit,keygenIds){const resharedKeygenResult=await(await this.NATIVE).exportableEd25519ReshareNewParty(roomUuid,this.URL,oldThreshold,newThreshold,keygenInit.keygenSecret,keygenIds),pubkey=(0,utils_1.hexToBytes)(resharedKeygenResult.pubkey),secretShareHex=resharedKeygenResult.secret_share;return new _1.ExportableEd25519KeygenResult(pubkey,secretShareHex)}async reshareRemainingParty(roomUuid,newThreshold,keygenResult,keygenIds){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,resharedKeygenResult=await(await this.NATIVE).exportableEd25519ReshareRemainingParty(roomUuid,this.URL,newThreshold,secretShare,keygenIds),pubkey=(0,utils_1.hexToBytes)(resharedKeygenResult.pubkey),secretShareHex=resharedKeygenResult.secret_share;return new _1.ExportableEd25519KeygenResult(pubkey,secretShareHex)}async
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExportableEd25519=void 0;const _1=require("./index.cjs"),utils_1=require("@noble/hashes/utils"),common_1=require("./common.cjs");class ExportableEd25519{constructor(native,url){this.NATIVE=native,this.URL=url}async initKeygen(){const keygenInitKeypair=await(await this.NATIVE).initKeygen();return new _1.ExportableEd25519InitKeygenResult(keygenInitKeypair.pubkey,keygenInitKeypair.keypair)}async exportID(keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare;return(await this.NATIVE).exportableEd25519GetExportID(secretShare)}async createRoom(numParties,apiKey){return(0,common_1.sanitizeNumberOfParties)(numParties),(await this.NATIVE).createRoom(this.URL,numParties,apiKey)}async sampleKey(roomUuid,numParties,threshold,keygenInit,keygenIds){if((0,common_1.sanitizeNumberOfParties)(numParties,threshold),keygenIds.length!==numParties-1)throw new Error(`keygenIds length must be exactly: ${numParties-1}, it is: `+keygenIds.length);const keygenResult=await(await this.NATIVE).exportableEd25519SampleKey(roomUuid,this.URL,numParties,threshold,keygenInit.keygenSecret,keygenIds);if(!keygenResult.pubkey||!keygenResult.secret_share)throw new Error("Key sampling failed, no public key or secret share was returned.");const pubkey=(0,utils_1.hexToBytes)(keygenResult.pubkey),secretShareHex=keygenResult.secret_share;return new _1.ExportableEd25519KeygenResult(pubkey,secretShareHex)}async receiveKey(roomUuid,numParties,threshold,keygenInit,keygenIds){if((0,common_1.sanitizeNumberOfParties)(numParties,threshold),keygenIds.length!==numParties-1)throw new Error(`keygenIds length must be exactly: ${numParties-1}, it is: `+keygenIds.length);const keygenResult=await(await this.NATIVE).exportableEd25519ReceiveKey(roomUuid,this.URL,numParties,threshold,keygenInit.keygenSecret,keygenIds);if(!keygenResult.pubkey||!keygenResult.secret_share)throw new Error("Key receive failed, no public key or secret share was returned.");const pubkey=(0,utils_1.hexToBytes)(keygenResult.pubkey),secretShareHex=keygenResult.secret_share;return new _1.ExportableEd25519KeygenResult(pubkey,secretShareHex)}async sign(roomUuid,keygenResult,msg){"string"!=typeof msg&&(msg=(0,utils_1.bytesToHex)(msg));const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,signature=await(await this.NATIVE).exportableEd25519Sign(roomUuid,this.URL,secretShare,msg);return(0,utils_1.hexToBytes)(signature)}async refresh(roomUuid,keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,refreshedKeygenResult=await(await this.NATIVE).exportableEd25519Refresh(roomUuid,this.URL,secretShare);if(!refreshedKeygenResult.pubkey||!refreshedKeygenResult.secret_share)throw new Error("Keygen failed, no public key or secret share was returned.");const pubkey=(0,utils_1.hexToBytes)(refreshedKeygenResult.pubkey),secretShareHex=refreshedKeygenResult.secret_share;return new _1.ExportableEd25519KeygenResult(pubkey,secretShareHex)}async reshareNewParty(roomUuid,oldThreshold,newThreshold,keygenInit,keygenIds){const resharedKeygenResult=await(await this.NATIVE).exportableEd25519ReshareNewParty(roomUuid,this.URL,oldThreshold,newThreshold,keygenInit.keygenSecret,keygenIds),pubkey=(0,utils_1.hexToBytes)(resharedKeygenResult.pubkey),secretShareHex=resharedKeygenResult.secret_share;return new _1.ExportableEd25519KeygenResult(pubkey,secretShareHex)}async reshareRemainingParty(roomUuid,newThreshold,keygenResult,keygenIds){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,resharedKeygenResult=await(await this.NATIVE).exportableEd25519ReshareRemainingParty(roomUuid,this.URL,newThreshold,secretShare,keygenIds),pubkey=(0,utils_1.hexToBytes)(resharedKeygenResult.pubkey),secretShareHex=resharedKeygenResult.secret_share;return new _1.ExportableEd25519KeygenResult(pubkey,secretShareHex)}async exportFullPrivateKey(roomUuid,keygenResult,toExportID){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,exported=await(await this.NATIVE).exportableEd25519ExportFullPrivateKey(roomUuid,this.URL,secretShare,toExportID);return exported||void 0}async offlineExportFullPrivateKey(keygenResults){const secretShares=keygenResults.map(k=>{if("string"==typeof k)return k;if(k instanceof _1.ExportableEd25519KeygenResult)return k.secretShare;throw new Error("UnknownType")});return(await this.NATIVE).exportableEd25519OfflineExportFullPrivateKey(secretShares)}async importPrivateKeyRecipient(roomUuid,threshold,keygenInit,keygenIds){const importKeygenResult=await(await this.NATIVE).exportableEd25519ImportPrivateKeyRecipient(roomUuid,this.URL,threshold,keygenInit.keygenSecret,keygenIds),pubkey=(0,utils_1.hexToBytes)(importKeygenResult.pubkey),secretShareHex=importKeygenResult.secret_share;return new _1.ExportableEd25519KeygenResult(pubkey,secretShareHex)}async importPrivateKeyImporter(roomUuid,threshold,privateKey,keygenInit,keygenIds){const importKeygenResult=await(await this.NATIVE).exportableEd25519ImportPrivateKeyImporter(roomUuid,this.URL,threshold,privateKey,keygenInit.keygenSecret,keygenIds),pubkey=(0,utils_1.hexToBytes)(importKeygenResult.pubkey),secretShareHex=importKeygenResult.secret_share;return new _1.ExportableEd25519KeygenResult(pubkey,secretShareHex)}async getPubkey(keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare;return(await this.NATIVE).exportableEd25519GetPubkey(secretShare)}}exports.ExportableEd25519=ExportableEd25519;
|
|
@@ -12,7 +12,6 @@ export declare class ExportableEd25519 {
|
|
|
12
12
|
refresh(roomUuid: string, keygenResult: ExportableEd25519KeygenResult | string): Promise<ExportableEd25519KeygenResult>;
|
|
13
13
|
reshareNewParty(roomUuid: string, oldThreshold: number, newThreshold: number, keygenInit: ExportableEd25519InitKeygenResult, keygenIds: string[]): Promise<ExportableEd25519KeygenResult>;
|
|
14
14
|
reshareRemainingParty(roomUuid: string, newThreshold: number, keygenResult: ExportableEd25519KeygenResult | string, keygenIds: string[]): Promise<ExportableEd25519KeygenResult>;
|
|
15
|
-
getPrivateKey(keygenResult: ExportableEd25519KeygenResult | string): Promise<string>;
|
|
16
15
|
exportFullPrivateKey(roomUuid: string, keygenResult: ExportableEd25519KeygenResult | string, toExportID: string): Promise<string | undefined>;
|
|
17
16
|
offlineExportFullPrivateKey(keygenResults: ExportableEd25519KeygenResult[] | string[]): Promise<string>;
|
|
18
17
|
importPrivateKeyRecipient(roomUuid: string, threshold: number, keygenInit: ExportableEd25519InitKeygenResult, keygenIds: string[]): Promise<ExportableEd25519KeygenResult>;
|
|
@@ -32,7 +32,7 @@ export interface DynamicNativeSdkInterface {
|
|
|
32
32
|
pubkey: string;
|
|
33
33
|
secret_share: string;
|
|
34
34
|
}>;
|
|
35
|
-
ecdsaImportPrivateKeyImporter(roomUUID: string, hostUrl: string, threshold: number, privateKey: string, secretShare: string, keygenIDs: string[]): Promise<{
|
|
35
|
+
ecdsaImportPrivateKeyImporter(roomUUID: string, hostUrl: string, threshold: number, privateKey: string, secretShare: string, keygenIDs: string[], chaincode: Uint8Array | string): Promise<{
|
|
36
36
|
pubkey: string;
|
|
37
37
|
secret_share: string;
|
|
38
38
|
}>;
|
|
@@ -129,7 +129,7 @@ export interface DynamicNativeSdkInterface {
|
|
|
129
129
|
pubkey: string;
|
|
130
130
|
secret_share: string;
|
|
131
131
|
}>;
|
|
132
|
-
bip340ImportPrivateKeyImporter(roomUUID: string, hostUrl: string, threshold: number, privateKey: string, secretShare: string, keygenIDs: string[]): Promise<{
|
|
132
|
+
bip340ImportPrivateKeyImporter(roomUUID: string, hostUrl: string, threshold: number, privateKey: string, secretShare: string, keygenIDs: string[], chaincode: Uint8Array | string): Promise<{
|
|
133
133
|
pubkey: string;
|
|
134
134
|
secret_share: string;
|
|
135
135
|
}>;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export function initKeygen(): Promise<KeygenInit>;
|
|
2
|
-
export function createRoom(host_addr: string, num_parties: number, api_token: string): Promise<string>;
|
|
3
1
|
export function ecdsaKeygen(room_uuid: string, host_addr: string, num_parties: number, threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
4
2
|
export function ecdsaSign(room_uuid: string, host_addr: string, secret_share: string, msg_hex: string, derivation_path: Uint32Array): Promise<string>;
|
|
5
3
|
export function ecdsaRefresh(room_uuid: string, host_addr: string, secret_share: string): Promise<KeygenResult>;
|
|
@@ -13,21 +11,7 @@ export function ecdsaExportFullPrivateKey(room_uuid: string, host_addr: string,
|
|
|
13
11
|
export function ecdsaOfflineExportFullPrivateKey(secret_shares: string[]): Promise<string>;
|
|
14
12
|
export function ecdsaDerivePrivateKeyFromXpriv(xpriv: string, derivation_path: Uint32Array): Promise<string>;
|
|
15
13
|
export function ecdsaImportPrivateKeyRecipient(room_uuid: string, host_addr: string, threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
16
|
-
export function ecdsaImportPrivateKeyImporter(room_uuid: string, host_addr: string, threshold: number, private_key_hex: string, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
17
|
-
export function ed25519Keygen(room_uuid: string, host_addr: string, num_parties: number, threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
18
|
-
export function ed25519Sign(room_uuid: string, host_addr: string, secret_share: string, msg_hex: string, derivation_path: Uint32Array): Promise<string>;
|
|
19
|
-
export function ed25519Refresh(room_uuid: string, host_addr: string, secret_share: string): Promise<KeygenResult>;
|
|
20
|
-
export function ed25519ReshareNewParty(room_uuid: string, host_addr: string, _old_threshold: number, new_threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
21
|
-
export function ed25519ReshareRemainingParty(room_uuid: string, host_addr: string, new_threshold: number, secret_share: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
22
|
-
export function ed25519DerivePubkey(secret_share: string, derivation_path: Uint32Array): Promise<string>;
|
|
23
|
-
export function ed25519GetSpub(secret_share: string): Promise<string>;
|
|
24
|
-
export function ed25519DerivePubkeyFromSpub(spub: string, derivation_path: Uint32Array): Promise<string>;
|
|
25
|
-
export function ed25519GetExportID(secret_share: string): Promise<string>;
|
|
26
|
-
export function ed25519ExportFullPrivateKey(room_uuid: string, host_addr: string, secret_share: string, export_to: string): Promise<string | undefined>;
|
|
27
|
-
export function ed25519OfflineExportFullPrivateKey(secret_shares: string[]): Promise<string>;
|
|
28
|
-
export function ed25519DerivePrivateKeyFromSpriv(spriv: string, derivation_path: Uint32Array): Promise<string>;
|
|
29
|
-
export function ed25519ImportPrivateKeyRecipient(room_uuid: string, host_addr: string, threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
30
|
-
export function ed25519ImportPrivateKeyImporter(room_uuid: string, host_addr: string, threshold: number, private_key_hex: string, keygen_secret: string, keygen_ids: string[], is_private_key_raw: boolean): Promise<KeygenResult>;
|
|
14
|
+
export function ecdsaImportPrivateKeyImporter(room_uuid: string, host_addr: string, threshold: number, private_key_hex: string, keygen_secret: string, keygen_ids: string[], chaincode_hex: string): Promise<KeygenResult>;
|
|
31
15
|
export function bip340Keygen(room_uuid: string, host_addr: string, num_parties: number, threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
32
16
|
export function bip340Sign(room_uuid: string, host_addr: string, secret_share: string, msg_hex: string, derivation_path: Uint32Array, opt_tweak: string): Promise<string>;
|
|
33
17
|
export function bip340Refresh(room_uuid: string, host_addr: string, secret_share: string): Promise<KeygenResult>;
|
|
@@ -41,19 +25,7 @@ export function bip340ExportFullPrivateKey(room_uuid: string, host_addr: string,
|
|
|
41
25
|
export function bip340OfflineExportFullPrivateKey(secret_shares: string[]): Promise<string>;
|
|
42
26
|
export function bip340DerivePrivateKeyFromXpriv(xpriv: string, derivation_path: Uint32Array): Promise<string>;
|
|
43
27
|
export function bip340ImportPrivateKeyRecipient(room_uuid: string, host_addr: string, threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
44
|
-
export function bip340ImportPrivateKeyImporter(room_uuid: string, host_addr: string, threshold: number, private_key_hex: string, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
45
|
-
export function exportableEd25519SampleKey(room_uuid: string, host_addr: string, num_parties: number, threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
46
|
-
export function exportableEd25519ReceiveKey(room_uuid: string, host_addr: string, num_parties: number, threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
47
|
-
export function exportableEd25519Sign(room_uuid: string, host_addr: string, secret_share: string, msg_hex: string): Promise<string>;
|
|
48
|
-
export function exportableEd25519Refresh(room_uuid: string, host_addr: string, secret_share: string): Promise<KeygenResult>;
|
|
49
|
-
export function exportableEd25519ReshareNewParty(room_uuid: string, host_addr: string, _old_threshold: number, new_threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
50
|
-
export function exportableEd25519ReshareRemainingParty(room_uuid: string, host_addr: string, new_threshold: number, secret_share: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
51
|
-
export function exportableEd25519GetPubkey(secret_share: string): Promise<string>;
|
|
52
|
-
export function exportableEd25519GetExportID(secret_share: string): Promise<string>;
|
|
53
|
-
export function exportableEd25519ExportFullPrivateKey(room_uuid: string, host_addr: string, secret_share: string, export_to: string): Promise<string | undefined>;
|
|
54
|
-
export function exportableEd25519OfflineExportFullPrivateKey(secret_shares: string[]): Promise<string>;
|
|
55
|
-
export function exportableEd25519ImportPrivateKeyRecipient(room_uuid: string, host_addr: string, threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
56
|
-
export function exportableEd25519ImportPrivateKeyImporter(room_uuid: string, host_addr: string, threshold: number, private_key_hex: string, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
28
|
+
export function bip340ImportPrivateKeyImporter(room_uuid: string, host_addr: string, threshold: number, private_key_hex: string, keygen_secret: string, keygen_ids: string[], chaincode_hex: string): Promise<KeygenResult>;
|
|
57
29
|
export function sr25519Keygen(room_uuid: string, host_addr: string, num_parties: number, threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
58
30
|
export function sr25519Sign(room_uuid: string, host_addr: string, secret_share: string, msg_hex: string, derivation_path: string[]): Promise<string>;
|
|
59
31
|
export function sr25519Refresh(room_uuid: string, host_addr: string, secret_share: string): Promise<KeygenResult>;
|
|
@@ -68,7 +40,35 @@ export function sr25519OfflineExportFullPrivateKey(secret_shares: string[]): Pro
|
|
|
68
40
|
export function sr25519DerivePrivateKeyFromPrivateKey(private_key: string, derivation_path: string[], is_private_key_raw: boolean): Promise<string>;
|
|
69
41
|
export function sr25519ImportPrivateKeyRecipient(room_uuid: string, host_addr: string, threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
70
42
|
export function sr25519ImportPrivateKeyImporter(room_uuid: string, host_addr: string, threshold: number, private_key_hex: string, keygen_secret: string, keygen_ids: string[], is_private_key_raw: boolean): Promise<KeygenResult>;
|
|
43
|
+
export function createRoom(host_addr: string, num_parties: number, api_token: string): Promise<string>;
|
|
44
|
+
export function initKeygen(): Promise<KeygenInit>;
|
|
71
45
|
export function start(): void;
|
|
46
|
+
export function ed25519Keygen(room_uuid: string, host_addr: string, num_parties: number, threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
47
|
+
export function ed25519Sign(room_uuid: string, host_addr: string, secret_share: string, msg_hex: string, derivation_path: Uint32Array): Promise<string>;
|
|
48
|
+
export function ed25519Refresh(room_uuid: string, host_addr: string, secret_share: string): Promise<KeygenResult>;
|
|
49
|
+
export function ed25519ReshareNewParty(room_uuid: string, host_addr: string, _old_threshold: number, new_threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
50
|
+
export function ed25519ReshareRemainingParty(room_uuid: string, host_addr: string, new_threshold: number, secret_share: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
51
|
+
export function ed25519DerivePubkey(secret_share: string, derivation_path: Uint32Array): Promise<string>;
|
|
52
|
+
export function ed25519GetSpub(secret_share: string): Promise<string>;
|
|
53
|
+
export function ed25519DerivePubkeyFromSpub(spub: string, derivation_path: Uint32Array): Promise<string>;
|
|
54
|
+
export function ed25519GetExportID(secret_share: string): Promise<string>;
|
|
55
|
+
export function ed25519ExportFullPrivateKey(room_uuid: string, host_addr: string, secret_share: string, export_to: string): Promise<string | undefined>;
|
|
56
|
+
export function ed25519OfflineExportFullPrivateKey(secret_shares: string[]): Promise<string>;
|
|
57
|
+
export function ed25519DerivePrivateKeyFromSpriv(spriv: string, derivation_path: Uint32Array): Promise<string>;
|
|
58
|
+
export function ed25519ImportPrivateKeyRecipient(room_uuid: string, host_addr: string, threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
59
|
+
export function ed25519ImportPrivateKeyImporter(room_uuid: string, host_addr: string, threshold: number, private_key_hex: string, keygen_secret: string, keygen_ids: string[], is_private_key_raw: boolean): Promise<KeygenResult>;
|
|
60
|
+
export function exportableEd25519SampleKey(room_uuid: string, host_addr: string, num_parties: number, threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
61
|
+
export function exportableEd25519ReceiveKey(room_uuid: string, host_addr: string, num_parties: number, threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
62
|
+
export function exportableEd25519Sign(room_uuid: string, host_addr: string, secret_share: string, msg_hex: string): Promise<string>;
|
|
63
|
+
export function exportableEd25519Refresh(room_uuid: string, host_addr: string, secret_share: string): Promise<KeygenResult>;
|
|
64
|
+
export function exportableEd25519ReshareNewParty(room_uuid: string, host_addr: string, _old_threshold: number, new_threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
65
|
+
export function exportableEd25519ReshareRemainingParty(room_uuid: string, host_addr: string, new_threshold: number, secret_share: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
66
|
+
export function exportableEd25519GetPubkey(secret_share: string): Promise<string>;
|
|
67
|
+
export function exportableEd25519GetExportID(secret_share: string): Promise<string>;
|
|
68
|
+
export function exportableEd25519ExportFullPrivateKey(room_uuid: string, host_addr: string, secret_share: string, export_to: string): Promise<string | undefined>;
|
|
69
|
+
export function exportableEd25519OfflineExportFullPrivateKey(secret_shares: string[]): Promise<string>;
|
|
70
|
+
export function exportableEd25519ImportPrivateKeyRecipient(room_uuid: string, host_addr: string, threshold: number, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
71
|
+
export function exportableEd25519ImportPrivateKeyImporter(room_uuid: string, host_addr: string, threshold: number, private_key_hex: string, keygen_secret: string, keygen_ids: string[]): Promise<KeygenResult>;
|
|
72
72
|
export class KeygenInit {
|
|
73
73
|
static __wrap(ptr: any): any;
|
|
74
74
|
constructor(keypair: string, pubkey: string);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
let wasm;const heap=new Array(128).fill(void 0);function getObject(idx){return heap[idx]}heap.push(void 0,null,!0,!1);const cachedTextDecoder="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&cachedTextDecoder.decode();let cachedUint8ArrayMemory0=null;function getUint8ArrayMemory0(){return null!==cachedUint8ArrayMemory0&&0!==cachedUint8ArrayMemory0.byteLength||(cachedUint8ArrayMemory0=new Uint8Array(wasm.memory.buffer)),cachedUint8ArrayMemory0}function getStringFromWasm0(ptr,len){return ptr>>>=0,cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr,ptr+len))}let heap_next=heap.length;function addHeapObject(obj){heap_next===heap.length&&heap.push(heap.length+1);const idx=heap_next;return heap_next=heap[idx],heap[idx]=obj,idx}function handleError(f,args){try{return f.apply(this,args)}catch(e){wasm.__wbindgen_export_0(addHeapObject(e))}}function dropObject(idx){idx<132||(heap[idx]=heap_next,heap_next=idx)}function takeObject(idx){const ret=getObject(idx);return dropObject(idx),ret}let WASM_VECTOR_LEN=0;const cachedTextEncoder="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},encodeString="function"==typeof cachedTextEncoder.encodeInto?function(arg,view){return cachedTextEncoder.encodeInto(arg,view)}:function(arg,view){const buf=cachedTextEncoder.encode(arg);return view.set(buf),{read:arg.length,written:buf.length}};function passStringToWasm0(arg,malloc,realloc){if(void 0===realloc){const buf=cachedTextEncoder.encode(arg),ptr=malloc(buf.length,1)>>>0;return getUint8ArrayMemory0().subarray(ptr,ptr+buf.length).set(buf),WASM_VECTOR_LEN=buf.length,ptr}let len=arg.length,ptr=malloc(len,1)>>>0;const mem=getUint8ArrayMemory0();let offset=0;for(;offset<len;offset++){const code=arg.charCodeAt(offset);if(127<code)break;mem[ptr+offset]=code}if(offset!==len){0!==offset&&(arg=arg.slice(offset)),ptr=realloc(ptr,len,len=offset+3*arg.length,1)>>>0;const view=getUint8ArrayMemory0().subarray(ptr+offset,ptr+len),ret=encodeString(arg,view);offset+=ret.written,ptr=realloc(ptr,len,offset,1)>>>0}return WASM_VECTOR_LEN=offset,ptr}let cachedDataViewMemory0=null;function getDataViewMemory0(){return(null===cachedDataViewMemory0||!0===cachedDataViewMemory0.buffer.detached||void 0===cachedDataViewMemory0.buffer.detached&&cachedDataViewMemory0.buffer!==wasm.memory.buffer)&&(cachedDataViewMemory0=new DataView(wasm.memory.buffer)),cachedDataViewMemory0}function getArrayU8FromWasm0(ptr,len){return ptr>>>=0,getUint8ArrayMemory0().subarray(+ptr,+ptr+len)}function isLikeNone(x){return null==x}const CLOSURE_DTORS="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(state=>{wasm.__wbindgen_export_3.get(state.dtor)(state.a,state.b)});function makeMutClosure(arg0,arg1,dtor,f){const state={a:arg0,b:arg1,cnt:1,dtor:dtor},real=(...args)=>{state.cnt++;const a=state.a;state.a=0;try{return f(a,state.b,...args)}finally{0==--state.cnt?(wasm.__wbindgen_export_3.get(state.dtor)(a,state.b),CLOSURE_DTORS.unregister(state)):state.a=a}};return real.original=state,CLOSURE_DTORS.register(real,state,state),real}function makeClosure(arg0,arg1,dtor,f){const state={a:arg0,b:arg1,cnt:1,dtor:dtor},real=(...args)=>{state.cnt++;try{return f(state.a,state.b,...args)}finally{0==--state.cnt&&(wasm.__wbindgen_export_3.get(state.dtor)(state.a,state.b),state.a=0,CLOSURE_DTORS.unregister(state))}};return real.original=state,CLOSURE_DTORS.register(real,state,state),real}function debugString(val){const type=typeof val;if("number"==type||"boolean"==type||null==val)return""+val;if("string"==type)return`"${val}"`;if("symbol"==type){const description=val.description;return null==description?"Symbol":`Symbol(${description})`}if("function"==type){const name=val.name;return"string"==typeof name&&0<name.length?`Function(${name})`:"Function"}if(Array.isArray(val)){const length=val.length;let debug="[";0<length&&(debug+=debugString(val[0]));for(let i=1;i<length;i++)debug+=", "+debugString(val[i]);return debug+="]",debug}const builtInMatches=/\[object ([^\]]+)\]/.exec(toString.call(val));let className;if(!(builtInMatches&&1<builtInMatches.length))return toString.call(val);if(className=builtInMatches[1],"Object"==className)try{return"Object("+JSON.stringify(val)+")"}catch(_){return"Object"}return val instanceof Error?`${val.name}: ${val.message}
|
|
2
|
-
`+val.stack:className}function initKeygen(){const ret=wasm.initKeygen();return takeObject(ret)}function createRoom(host_addr,num_parties,api_token){const ptr0=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(api_token,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ret=wasm.createRoom(ptr0,len0,num_parties,ptr1,len1);return takeObject(ret)}function passArrayJsValueToWasm0(array,malloc){const ptr=malloc(4*array.length,4)>>>0,mem=getDataViewMemory0();for(let i=0;i<array.length;i++)mem.setUint32(ptr+4*i,addHeapObject(array[i]),!0);return WASM_VECTOR_LEN=array.length,ptr}function ecdsaKeygen(room_uuid,host_addr,num_parties,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.ecdsaKeygen(ptr0,len0,ptr1,len1,num_parties,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}let cachedUint32ArrayMemory0=null;function getUint32ArrayMemory0(){return null!==cachedUint32ArrayMemory0&&0!==cachedUint32ArrayMemory0.byteLength||(cachedUint32ArrayMemory0=new Uint32Array(wasm.memory.buffer)),cachedUint32ArrayMemory0}function passArray32ToWasm0(arg,malloc){const ptr=malloc(4*arg.length,4)>>>0;return getUint32ArrayMemory0().set(arg,ptr/4),WASM_VECTOR_LEN=arg.length,ptr}function ecdsaSign(room_uuid,host_addr,secret_share,msg_hex,derivation_path){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(msg_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ret=wasm.ecdsaSign(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3,ptr4,len4);return takeObject(ret)}function ecdsaRefresh(room_uuid,host_addr,secret_share){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ret=wasm.ecdsaRefresh(ptr0,len0,ptr1,len1,ptr2,len2);return takeObject(ret)}function ecdsaReshareNewParty(room_uuid,host_addr,_old_threshold,new_threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.ecdsaReshareNewParty(ptr0,len0,ptr1,len1,_old_threshold,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function ecdsaReshareRemainingParty(room_uuid,host_addr,new_threshold,secret_share,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.ecdsaReshareRemainingParty(ptr0,len0,ptr1,len1,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function ecdsaDerivePubkey(secret_share,derivation_path){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.ecdsaDerivePubkey(ptr0,len0,ptr1,len1);return takeObject(ret)}function ecdsaGetXpub(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.ecdsaGetXpub(ptr0,len0);return takeObject(ret)}function ecdsaDerivePubkeyFromXpub(xpub,derivation_path){const ptr0=passStringToWasm0(xpub,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.ecdsaDerivePubkeyFromXpub(ptr0,len0,ptr1,len1);return takeObject(ret)}function ecdsaGetExportID(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.ecdsaGetExportID(ptr0,len0);return takeObject(ret)}function ecdsaExportFullPrivateKey(room_uuid,host_addr,secret_share,export_to){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(export_to,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ret=wasm.ecdsaExportFullPrivateKey(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3);return takeObject(ret)}function ecdsaOfflineExportFullPrivateKey(secret_shares){const ptr0=passArrayJsValueToWasm0(secret_shares,wasm.__wbindgen_export_1),len0=WASM_VECTOR_LEN,ret=wasm.ecdsaOfflineExportFullPrivateKey(ptr0,len0);return takeObject(ret)}function ecdsaDerivePrivateKeyFromXpriv(xpriv,derivation_path){const ptr0=passStringToWasm0(xpriv,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.ecdsaDerivePrivateKeyFromXpriv(ptr0,len0,ptr1,len1);return takeObject(ret)}function ecdsaImportPrivateKeyRecipient(room_uuid,host_addr,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.ecdsaImportPrivateKeyRecipient(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function ecdsaImportPrivateKeyImporter(room_uuid,host_addr,threshold,private_key_hex,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(private_key_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ret=wasm.ecdsaImportPrivateKeyImporter(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3,ptr4,len4);return takeObject(ret)}function ed25519Keygen(room_uuid,host_addr,num_parties,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.ed25519Keygen(ptr0,len0,ptr1,len1,num_parties,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function ed25519Sign(room_uuid,host_addr,secret_share,msg_hex,derivation_path){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(msg_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ret=wasm.ed25519Sign(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3,ptr4,len4);return takeObject(ret)}function ed25519Refresh(room_uuid,host_addr,secret_share){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ret=wasm.ed25519Refresh(ptr0,len0,ptr1,len1,ptr2,len2);return takeObject(ret)}function ed25519ReshareNewParty(room_uuid,host_addr,_old_threshold,new_threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.ed25519ReshareNewParty(ptr0,len0,ptr1,len1,_old_threshold,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function ed25519ReshareRemainingParty(room_uuid,host_addr,new_threshold,secret_share,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.ed25519ReshareRemainingParty(ptr0,len0,ptr1,len1,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function ed25519DerivePubkey(secret_share,derivation_path){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.ed25519DerivePubkey(ptr0,len0,ptr1,len1);return takeObject(ret)}function ed25519GetSpub(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.ed25519GetSpub(ptr0,len0);return takeObject(ret)}function ed25519DerivePubkeyFromSpub(spub,derivation_path){const ptr0=passStringToWasm0(spub,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.ed25519DerivePubkeyFromSpub(ptr0,len0,ptr1,len1);return takeObject(ret)}function ed25519GetExportID(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.ed25519GetExportID(ptr0,len0);return takeObject(ret)}function ed25519ExportFullPrivateKey(room_uuid,host_addr,secret_share,export_to){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(export_to,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ret=wasm.ed25519ExportFullPrivateKey(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3);return takeObject(ret)}function ed25519OfflineExportFullPrivateKey(secret_shares){const ptr0=passArrayJsValueToWasm0(secret_shares,wasm.__wbindgen_export_1),len0=WASM_VECTOR_LEN,ret=wasm.ed25519OfflineExportFullPrivateKey(ptr0,len0);return takeObject(ret)}function ed25519DerivePrivateKeyFromSpriv(spriv,derivation_path){const ptr0=passStringToWasm0(spriv,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.ed25519DerivePrivateKeyFromSpriv(ptr0,len0,ptr1,len1);return takeObject(ret)}function ed25519ImportPrivateKeyRecipient(room_uuid,host_addr,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.ed25519ImportPrivateKeyRecipient(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function ed25519ImportPrivateKeyImporter(room_uuid,host_addr,threshold,private_key_hex,keygen_secret,keygen_ids,is_private_key_raw){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(private_key_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ret=wasm.ed25519ImportPrivateKeyImporter(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3,ptr4,len4,is_private_key_raw);return takeObject(ret)}function bip340Keygen(room_uuid,host_addr,num_parties,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.bip340Keygen(ptr0,len0,ptr1,len1,num_parties,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function bip340Sign(room_uuid,host_addr,secret_share,msg_hex,derivation_path,opt_tweak){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(msg_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ptr5=passStringToWasm0(opt_tweak,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len5=WASM_VECTOR_LEN,ret=wasm.bip340Sign(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3,ptr4,len4,ptr5,len5);return takeObject(ret)}function bip340Refresh(room_uuid,host_addr,secret_share){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ret=wasm.bip340Refresh(ptr0,len0,ptr1,len1,ptr2,len2);return takeObject(ret)}function bip340ReshareNewParty(room_uuid,host_addr,_old_threshold,new_threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.bip340ReshareNewParty(ptr0,len0,ptr1,len1,_old_threshold,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function bip340ReshareRemainingParty(room_uuid,host_addr,new_threshold,secret_share,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.bip340ReshareRemainingParty(ptr0,len0,ptr1,len1,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function bip340DeriveTweakPubkey(secret_share,derivation_path,opt_tweak){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(opt_tweak,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ret=wasm.bip340DeriveTweakPubkey(ptr0,len0,ptr1,len1,ptr2,len2);return takeObject(ret)}function bip340GetXpub(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.bip340GetXpub(ptr0,len0);return takeObject(ret)}function bip340DeriveTweakPubkeyFromXpub(xpub,derivation_path,opt_tweak){const ptr0=passStringToWasm0(xpub,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(opt_tweak,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ret=wasm.bip340DeriveTweakPubkeyFromXpub(ptr0,len0,ptr1,len1,ptr2,len2);return takeObject(ret)}function bip340GetExportID(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.bip340GetExportID(ptr0,len0);return takeObject(ret)}function bip340ExportFullPrivateKey(room_uuid,host_addr,secret_share,export_to){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(export_to,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ret=wasm.bip340ExportFullPrivateKey(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3);return takeObject(ret)}function bip340OfflineExportFullPrivateKey(secret_shares){const ptr0=passArrayJsValueToWasm0(secret_shares,wasm.__wbindgen_export_1),len0=WASM_VECTOR_LEN,ret=wasm.bip340OfflineExportFullPrivateKey(ptr0,len0);return takeObject(ret)}function bip340DerivePrivateKeyFromXpriv(xpriv,derivation_path){const ptr0=passStringToWasm0(xpriv,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.bip340DerivePrivateKeyFromXpriv(ptr0,len0,ptr1,len1);return takeObject(ret)}function bip340ImportPrivateKeyRecipient(room_uuid,host_addr,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.bip340ImportPrivateKeyRecipient(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function bip340ImportPrivateKeyImporter(room_uuid,host_addr,threshold,private_key_hex,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(private_key_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ret=wasm.bip340ImportPrivateKeyImporter(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3,ptr4,len4);return takeObject(ret)}function exportableEd25519SampleKey(room_uuid,host_addr,num_parties,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.exportableEd25519SampleKey(ptr0,len0,ptr1,len1,num_parties,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function exportableEd25519ReceiveKey(room_uuid,host_addr,num_parties,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.exportableEd25519ReceiveKey(ptr0,len0,ptr1,len1,num_parties,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function exportableEd25519Sign(room_uuid,host_addr,secret_share,msg_hex){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(msg_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ret=wasm.exportableEd25519Sign(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3);return takeObject(ret)}function exportableEd25519Refresh(room_uuid,host_addr,secret_share){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ret=wasm.exportableEd25519Refresh(ptr0,len0,ptr1,len1,ptr2,len2);return takeObject(ret)}function exportableEd25519ReshareNewParty(room_uuid,host_addr,_old_threshold,new_threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.exportableEd25519ReshareNewParty(ptr0,len0,ptr1,len1,_old_threshold,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function exportableEd25519ReshareRemainingParty(room_uuid,host_addr,new_threshold,secret_share,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.exportableEd25519ReshareRemainingParty(ptr0,len0,ptr1,len1,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function exportableEd25519GetPubkey(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.exportableEd25519GetPubkey(ptr0,len0);return takeObject(ret)}function exportableEd25519GetExportID(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.exportableEd25519GetExportID(ptr0,len0);return takeObject(ret)}function exportableEd25519ExportFullPrivateKey(room_uuid,host_addr,secret_share,export_to){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(export_to,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ret=wasm.exportableEd25519ExportFullPrivateKey(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3);return takeObject(ret)}function exportableEd25519OfflineExportFullPrivateKey(secret_shares){const ptr0=passArrayJsValueToWasm0(secret_shares,wasm.__wbindgen_export_1),len0=WASM_VECTOR_LEN,ret=wasm.exportableEd25519OfflineExportFullPrivateKey(ptr0,len0);return takeObject(ret)}function exportableEd25519ImportPrivateKeyRecipient(room_uuid,host_addr,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.exportableEd25519ImportPrivateKeyRecipient(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function exportableEd25519ImportPrivateKeyImporter(room_uuid,host_addr,threshold,private_key_hex,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(private_key_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ret=wasm.exportableEd25519ImportPrivateKeyImporter(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3,ptr4,len4);return takeObject(ret)}function sr25519Keygen(room_uuid,host_addr,num_parties,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.sr25519Keygen(ptr0,len0,ptr1,len1,num_parties,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function sr25519Sign(room_uuid,host_addr,secret_share,msg_hex,derivation_path){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(msg_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArrayJsValueToWasm0(derivation_path,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ret=wasm.sr25519Sign(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3,ptr4,len4);return takeObject(ret)}function sr25519Refresh(room_uuid,host_addr,secret_share){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ret=wasm.sr25519Refresh(ptr0,len0,ptr1,len1,ptr2,len2);return takeObject(ret)}function sr25519ReshareNewParty(room_uuid,host_addr,_old_threshold,new_threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.sr25519ReshareNewParty(ptr0,len0,ptr1,len1,_old_threshold,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function sr25519ReshareRemainingParty(room_uuid,host_addr,new_threshold,secret_share,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.sr25519ReshareRemainingParty(ptr0,len0,ptr1,len1,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function sr25519DerivePubkey(secret_share,derivation_path){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArrayJsValueToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.sr25519DerivePubkey(ptr0,len0,ptr1,len1);return takeObject(ret)}function sr25519GetPubkey(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.sr25519GetPubkey(ptr0,len0);return takeObject(ret)}function sr25519DerivePubkeyFromPubkey(pubkey,derivation_path){const ptr0=passStringToWasm0(pubkey,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArrayJsValueToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.sr25519DerivePubkeyFromPubkey(ptr0,len0,ptr1,len1);return takeObject(ret)}function sr25519GetExportID(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.sr25519GetExportID(ptr0,len0);return takeObject(ret)}function sr25519ExportFullPrivateKey(room_uuid,host_addr,secret_share,export_to){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(export_to,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ret=wasm.sr25519ExportFullPrivateKey(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3);return takeObject(ret)}function sr25519OfflineExportFullPrivateKey(secret_shares){const ptr0=passArrayJsValueToWasm0(secret_shares,wasm.__wbindgen_export_1),len0=WASM_VECTOR_LEN,ret=wasm.sr25519OfflineExportFullPrivateKey(ptr0,len0);return takeObject(ret)}function sr25519DerivePrivateKeyFromPrivateKey(private_key,derivation_path,is_private_key_raw){const ptr0=passStringToWasm0(private_key,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArrayJsValueToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.sr25519DerivePrivateKeyFromPrivateKey(ptr0,len0,ptr1,len1,is_private_key_raw);return takeObject(ret)}function sr25519ImportPrivateKeyRecipient(room_uuid,host_addr,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.sr25519ImportPrivateKeyRecipient(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function sr25519ImportPrivateKeyImporter(room_uuid,host_addr,threshold,private_key_hex,keygen_secret,keygen_ids,is_private_key_raw){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(private_key_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ret=wasm.sr25519ImportPrivateKeyImporter(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3,ptr4,len4,is_private_key_raw);return takeObject(ret)}function start(){wasm.start()}function __wbg_adapter_28(arg0,arg1){wasm.__wbindgen_export_5(arg0,arg1)}function __wbg_adapter_33(arg0,arg1,arg2){wasm.__wbindgen_export_6(arg0,arg1,addHeapObject(arg2))}function __wbg_adapter_38(arg0,arg1,arg2){wasm.__wbindgen_export_7(arg0,arg1,addHeapObject(arg2))}function __wbg_adapter_85(arg0,arg1,arg2,arg3){wasm.__wbindgen_export_8(arg0,arg1,addHeapObject(arg2),addHeapObject(arg3))}const __wbindgen_enum_BinaryType=["blob","arraybuffer"],__wbindgen_enum_RequestCredentials=["omit","same-origin","include"],__wbindgen_enum_RequestMode=["same-origin","no-cors","cors","navigate"],KeygenInitFinalization="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(ptr=>wasm.__wbg_keygeninit_free(ptr>>>0,1));class KeygenInit{static __wrap(ptr){ptr>>>=0;const obj=Object.create(KeygenInit.prototype);return obj.__wbg_ptr=ptr,KeygenInitFinalization.register(obj,obj.__wbg_ptr,obj),obj}__destroy_into_raw(){const ptr=this.__wbg_ptr;return this.__wbg_ptr=0,KeygenInitFinalization.unregister(this),ptr}free(){const ptr=this.__destroy_into_raw();wasm.__wbg_keygeninit_free(ptr,0)}get keypair(){let deferred1_0,deferred1_1;try{const retptr=wasm.__wbindgen_add_to_stack_pointer(-16);wasm.__wbg_get_keygeninit_keypair(retptr,this.__wbg_ptr);var r0=getDataViewMemory0().getInt32(retptr+0,!0),r1=getDataViewMemory0().getInt32(retptr+4,!0);return deferred1_0=r0,deferred1_1=r1,getStringFromWasm0(r0,r1)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_export_4(deferred1_0,deferred1_1,1)}}get pubkey(){let deferred1_0,deferred1_1;try{const retptr=wasm.__wbindgen_add_to_stack_pointer(-16);wasm.__wbg_get_keygeninit_pubkey(retptr,this.__wbg_ptr);var r0=getDataViewMemory0().getInt32(retptr+0,!0),r1=getDataViewMemory0().getInt32(retptr+4,!0);return deferred1_0=r0,deferred1_1=r1,getStringFromWasm0(r0,r1)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_export_4(deferred1_0,deferred1_1,1)}}constructor(keypair,pubkey){const ptr0=passStringToWasm0(keypair,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(pubkey,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ret=wasm.keygeninit_new(ptr0,len0,ptr1,len1);return this.__wbg_ptr=ret>>>0,KeygenInitFinalization.register(this,this.__wbg_ptr,this),this}}const KeygenResultFinalization="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(ptr=>wasm.__wbg_keygenresult_free(ptr>>>0,1));class KeygenResult{static __wrap(ptr){ptr>>>=0;const obj=Object.create(KeygenResult.prototype);return obj.__wbg_ptr=ptr,KeygenResultFinalization.register(obj,obj.__wbg_ptr,obj),obj}__destroy_into_raw(){const ptr=this.__wbg_ptr;return this.__wbg_ptr=0,KeygenResultFinalization.unregister(this),ptr}free(){const ptr=this.__destroy_into_raw();wasm.__wbg_keygenresult_free(ptr,0)}get secret_share(){let deferred1_0,deferred1_1;try{const retptr=wasm.__wbindgen_add_to_stack_pointer(-16);wasm.__wbg_get_keygeninit_keypair(retptr,this.__wbg_ptr);var r0=getDataViewMemory0().getInt32(retptr+0,!0),r1=getDataViewMemory0().getInt32(retptr+4,!0);return deferred1_0=r0,deferred1_1=r1,getStringFromWasm0(r0,r1)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_export_4(deferred1_0,deferred1_1,1)}}get pubkey(){let deferred1_0,deferred1_1;try{const retptr=wasm.__wbindgen_add_to_stack_pointer(-16);wasm.__wbg_get_keygeninit_pubkey(retptr,this.__wbg_ptr);var r0=getDataViewMemory0().getInt32(retptr+0,!0),r1=getDataViewMemory0().getInt32(retptr+4,!0);return deferred1_0=r0,deferred1_1=r1,getStringFromWasm0(r0,r1)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_export_4(deferred1_0,deferred1_1,1)}}}async function __wbg_load(module,imports){if("function"==typeof Response&&module instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(module,imports)}catch(e){if("application/wasm"==module.headers.get("Content-Type"))throw e;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e)}const bytes=await module.arrayBuffer();return WebAssembly.instantiate(bytes,imports)}{const instance=await WebAssembly.instantiate(module,imports);return instance instanceof WebAssembly.Instance?{instance:instance,module:module}:instance}}function __wbg_get_imports(){const imports={wbg:{}};return imports.wbg.__wbg_abort_410ec47a64ac6117=function(arg0,arg1){getObject(arg0).abort(getObject(arg1))},imports.wbg.__wbg_abort_775ef1d17fc65868=function(arg0){getObject(arg0).abort()},imports.wbg.__wbg_append_8c7dd8d641a5f01b=function(){return handleError(function(arg0,arg1,arg2,arg3,arg4){getObject(arg0).append(getStringFromWasm0(arg1,arg2),getStringFromWasm0(arg3,arg4))},arguments)},imports.wbg.__wbg_buffer_609cc3eee51ed158=function(arg0){const ret=getObject(arg0).buffer;return addHeapObject(ret)},imports.wbg.__wbg_call_672a4d21634d4a24=function(){return handleError(function(arg0,arg1){const ret=getObject(arg0).call(getObject(arg1));return addHeapObject(ret)},arguments)},imports.wbg.__wbg_call_7cccdd69e0791ae2=function(){return handleError(function(arg0,arg1,arg2){const ret=getObject(arg0).call(getObject(arg1),getObject(arg2));return addHeapObject(ret)},arguments)},imports.wbg.__wbg_clearTimeout_86721db0036bea98=function(arg0){const ret=clearTimeout(takeObject(arg0));return addHeapObject(ret)},imports.wbg.__wbg_clearTimeout_96804de0ab838f26=function(arg0){const ret=clearTimeout(takeObject(arg0));return addHeapObject(ret)},imports.wbg.__wbg_close_2893b7d056a0627d=function(){return handleError(function(arg0){getObject(arg0).close()},arguments)},imports.wbg.__wbg_close_e1253d480ed93ce3=function(){return handleError(function(arg0,arg1,arg2,arg3){getObject(arg0).close(arg1,getStringFromWasm0(arg2,arg3))},arguments)},imports.wbg.__wbg_code_f4ec1e6e2e1b0417=function(arg0){const ret=getObject(arg0).code;return ret},imports.wbg.__wbg_crypto_574e78ad8b13b65f=function(arg0){const ret=getObject(arg0).crypto;return addHeapObject(ret)},imports.wbg.__wbg_data_432d9c3df2630942=function(arg0){const ret=getObject(arg0).data;return addHeapObject(ret)},imports.wbg.__wbg_done_769e5ede4b31c67b=function(arg0){const ret=getObject(arg0).done;return ret},imports.wbg.__wbg_fetch_509096533071c657=function(arg0,arg1){const ret=getObject(arg0).fetch(getObject(arg1));return addHeapObject(ret)},imports.wbg.__wbg_fetch_d36a73832f0a45e8=function(arg0){const ret=fetch(getObject(arg0));return addHeapObject(ret)},imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return handleError(function(arg0,arg1){getObject(arg0).getRandomValues(getObject(arg1))},arguments)},imports.wbg.__wbg_get_67b2ba62fc30de12=function(){return handleError(function(arg0,arg1){const ret=Reflect.get(getObject(arg0),getObject(arg1));return addHeapObject(ret)},arguments)},imports.wbg.__wbg_has_a5ea9117f258a0ec=function(){return handleError(function(arg0,arg1){const ret=Reflect.has(getObject(arg0),getObject(arg1));return ret},arguments)},imports.wbg.__wbg_headers_9cb51cfd2ac780a4=function(arg0){const ret=getObject(arg0).headers;return addHeapObject(ret)},imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(arg0){let result;try{result=getObject(arg0)instanceof ArrayBuffer}catch(_){result=!1}const ret=result;return ret},imports.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644=function(arg0){let result;try{result=getObject(arg0)instanceof Response}catch(_){result=!1}const ret=result;return ret},imports.wbg.__wbg_iterator_9a24c88df860dc65=function(){const ret=Symbol.iterator;return addHeapObject(ret)},imports.wbg.__wbg_keygeninit_new=function(arg0){const ret=KeygenInit.__wrap(arg0);return addHeapObject(ret)},imports.wbg.__wbg_keygenresult_new=function(arg0){const ret=KeygenResult.__wrap(arg0);return addHeapObject(ret)},imports.wbg.__wbg_length_a446193dc22c12f8=function(arg0){const ret=getObject(arg0).length;return ret},imports.wbg.__wbg_message_d1685a448ba00178=function(arg0,arg1){const ret=getObject(arg1).message,ptr1=passStringToWasm0(ret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,!0),getDataViewMemory0().setInt32(arg0+0,ptr1,!0)},imports.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(arg0){const ret=getObject(arg0).msCrypto;return addHeapObject(ret)},imports.wbg.__wbg_new_018dcc2d6c8c2f6a=function(){return handleError(function(){const ret=new Headers;return addHeapObject(ret)},arguments)},imports.wbg.__wbg_new_23a2665fac83c611=function(arg0,arg1){try{var state0={a:arg0,b:arg1},cb0=(arg0,arg1)=>{const a=state0.a;state0.a=0;try{return __wbg_adapter_85(a,state0.b,arg0,arg1)}finally{state0.a=a}};const ret=new Promise(cb0);return addHeapObject(ret)}finally{state0.a=state0.b=0}},imports.wbg.__wbg_new_405e22f390576ce2=function(){const ret=new Object;return addHeapObject(ret)},imports.wbg.__wbg_new_92c54fc74574ef55=function(){return handleError(function(arg0,arg1){const ret=new WebSocket(getStringFromWasm0(arg0,arg1));return addHeapObject(ret)},arguments)},imports.wbg.__wbg_new_a12002a7f91c75be=function(arg0){const ret=new Uint8Array(getObject(arg0));return addHeapObject(ret)},imports.wbg.__wbg_new_e25e5aab09ff45db=function(){return handleError(function(){const ret=new AbortController;return addHeapObject(ret)},arguments)},imports.wbg.__wbg_newnoargs_105ed471475aaf50=function(arg0,arg1){const ret=new Function(getStringFromWasm0(arg0,arg1));return addHeapObject(ret)},imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(arg0,arg1,arg2){const ret=new Uint8Array(getObject(arg0),arg1>>>0,arg2>>>0);return addHeapObject(ret)},imports.wbg.__wbg_newwithlength_a381634e90c276d4=function(arg0){const ret=new Uint8Array(arg0>>>0);return addHeapObject(ret)},imports.wbg.__wbg_newwithstrandinit_06c535e0a867c635=function(){return handleError(function(arg0,arg1,arg2){const ret=new Request(getStringFromWasm0(arg0,arg1),getObject(arg2));return addHeapObject(ret)},arguments)},imports.wbg.__wbg_next_25feadfc0913fea9=function(arg0){const ret=getObject(arg0).next;return addHeapObject(ret)},imports.wbg.__wbg_next_6574e1a8a62d1055=function(){return handleError(function(arg0){const ret=getObject(arg0).next();return addHeapObject(ret)},arguments)},imports.wbg.__wbg_node_905d3e251edff8a2=function(arg0){const ret=getObject(arg0).node;return addHeapObject(ret)},imports.wbg.__wbg_process_dc0fbacc7c1c06f7=function(arg0){const ret=getObject(arg0).process;return addHeapObject(ret)},imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5=function(arg0){queueMicrotask(getObject(arg0))},imports.wbg.__wbg_queueMicrotask_d3219def82552485=function(arg0){const ret=getObject(arg0).queueMicrotask;return addHeapObject(ret)},imports.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return handleError(function(arg0,arg1){getObject(arg0).randomFillSync(takeObject(arg1))},arguments)},imports.wbg.__wbg_readyState_7ef6e63c349899ed=function(arg0){const ret=getObject(arg0).readyState;return ret},imports.wbg.__wbg_reason_49f1cede8bcf23dd=function(arg0,arg1){const ret=getObject(arg1).reason,ptr1=passStringToWasm0(ret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,!0),getDataViewMemory0().setInt32(arg0+0,ptr1,!0)},imports.wbg.__wbg_require_60cc747a6bc5215a=function(){return handleError(function(){const ret=module.require;return addHeapObject(ret)},arguments)},imports.wbg.__wbg_resolve_4851785c9c5f573d=function(arg0){const ret=Promise.resolve(getObject(arg0));return addHeapObject(ret)},imports.wbg.__wbg_send_0293179ba074ffb4=function(){return handleError(function(arg0,arg1,arg2){getObject(arg0).send(getStringFromWasm0(arg1,arg2))},arguments)},imports.wbg.__wbg_send_fc0c204e8a1757f4=function(){return handleError(function(arg0,arg1,arg2){getObject(arg0).send(getArrayU8FromWasm0(arg1,arg2))},arguments)},imports.wbg.__wbg_setTimeout_2e707715f8cc9497=function(arg0,arg1){const ret=setTimeout(getObject(arg0),arg1);return addHeapObject(ret)},imports.wbg.__wbg_setTimeout_eefe7f4c234b0c6b=function(){return handleError(function(arg0,arg1){const ret=setTimeout(getObject(arg0),arg1);return addHeapObject(ret)},arguments)},imports.wbg.__wbg_set_65595bdd868b3009=function(arg0,arg1,arg2){getObject(arg0).set(getObject(arg1),arg2>>>0)},imports.wbg.__wbg_setbinaryType_92fa1ffd873b327c=function(arg0,arg1){getObject(arg0).binaryType=__wbindgen_enum_BinaryType[arg1]},imports.wbg.__wbg_setbody_5923b78a95eedf29=function(arg0,arg1){getObject(arg0).body=getObject(arg1)},imports.wbg.__wbg_setcredentials_c3a22f1cd105a2c6=function(arg0,arg1){getObject(arg0).credentials=__wbindgen_enum_RequestCredentials[arg1]},imports.wbg.__wbg_setheaders_834c0bdb6a8949ad=function(arg0,arg1){getObject(arg0).headers=getObject(arg1)},imports.wbg.__wbg_setmethod_3c5280fe5d890842=function(arg0,arg1,arg2){getObject(arg0).method=getStringFromWasm0(arg1,arg2)},imports.wbg.__wbg_setmode_5dc300b865044b65=function(arg0,arg1){getObject(arg0).mode=__wbindgen_enum_RequestMode[arg1]},imports.wbg.__wbg_setonclose_14fc475a49d488fc=function(arg0,arg1){getObject(arg0).onclose=getObject(arg1)},imports.wbg.__wbg_setonerror_8639efe354b947cd=function(arg0,arg1){getObject(arg0).onerror=getObject(arg1)},imports.wbg.__wbg_setonmessage_6eccab530a8fb4c7=function(arg0,arg1){getObject(arg0).onmessage=getObject(arg1)},imports.wbg.__wbg_setonopen_2da654e1f39745d5=function(arg0,arg1){getObject(arg0).onopen=getObject(arg1)},imports.wbg.__wbg_setsignal_75b21ef3a81de905=function(arg0,arg1){getObject(arg0).signal=getObject(arg1)},imports.wbg.__wbg_signal_aaf9ad74119f20a4=function(arg0){const ret=getObject(arg0).signal;return addHeapObject(ret)},imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){const ret="undefined"==typeof global?null:global;return isLikeNone(ret)?0:addHeapObject(ret)},imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){const ret="undefined"==typeof globalThis?null:globalThis;return isLikeNone(ret)?0:addHeapObject(ret)},imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){const ret="undefined"==typeof self?null:self;return isLikeNone(ret)?0:addHeapObject(ret)},imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){const ret="undefined"==typeof window?null:window;return isLikeNone(ret)?0:addHeapObject(ret)},imports.wbg.__wbg_status_f6360336ca686bf0=function(arg0){const ret=getObject(arg0).status;return ret},imports.wbg.__wbg_stringify_f7ed6987935b4a24=function(){return handleError(function(arg0){const ret=JSON.stringify(getObject(arg0));return addHeapObject(ret)},arguments)},imports.wbg.__wbg_subarray_aa9065fa9dc5df96=function(arg0,arg1,arg2){const ret=getObject(arg0).subarray(arg1>>>0,arg2>>>0);return addHeapObject(ret)},imports.wbg.__wbg_text_7805bea50de2af49=function(){return handleError(function(arg0){const ret=getObject(arg0).text();return addHeapObject(ret)},arguments)},imports.wbg.__wbg_then_44b73946d2fb3e7d=function(arg0,arg1){const ret=getObject(arg0).then(getObject(arg1));return addHeapObject(ret)},imports.wbg.__wbg_then_48b406749878a531=function(arg0,arg1,arg2){const ret=getObject(arg0).then(getObject(arg1),getObject(arg2));return addHeapObject(ret)},imports.wbg.__wbg_url_ae10c34ca209681d=function(arg0,arg1){const ret=getObject(arg1).url,ptr1=passStringToWasm0(ret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,!0),getDataViewMemory0().setInt32(arg0+0,ptr1,!0)},imports.wbg.__wbg_value_cd1ffa7b1ab794f1=function(arg0){const ret=getObject(arg0).value;return addHeapObject(ret)},imports.wbg.__wbg_versions_c01dfd4722a88165=function(arg0){const ret=getObject(arg0).versions;return addHeapObject(ret)},imports.wbg.__wbg_wasClean_605b4fd66d44354a=function(arg0){const ret=getObject(arg0).wasClean;return ret},imports.wbg.__wbindgen_cb_drop=function(arg0){const obj=takeObject(arg0).original;if(1==obj.cnt--)return obj.a=0,!0;const ret=!1;return ret},imports.wbg.__wbindgen_closure_wrapper1508=function(arg0,arg1,arg2){const ret=makeMutClosure(arg0,arg1,59,__wbg_adapter_28);return addHeapObject(ret)},imports.wbg.__wbindgen_closure_wrapper2318=function(arg0,arg1,arg2){const ret=makeMutClosure(arg0,arg1,90,__wbg_adapter_28);return addHeapObject(ret)},imports.wbg.__wbindgen_closure_wrapper3377=function(arg0,arg1,arg2){const ret=makeMutClosure(arg0,arg1,90,__wbg_adapter_33);return addHeapObject(ret)},imports.wbg.__wbindgen_closure_wrapper3382=function(arg0,arg1,arg2){const ret=makeMutClosure(arg0,arg1,90,__wbg_adapter_33);return addHeapObject(ret)},imports.wbg.__wbindgen_closure_wrapper3385=function(arg0,arg1,arg2){const ret=makeClosure(arg0,arg1,90,__wbg_adapter_38);return addHeapObject(ret)},imports.wbg.__wbindgen_closure_wrapper3390=function(arg0,arg1,arg2){const ret=makeClosure(arg0,arg1,90,__wbg_adapter_38);return addHeapObject(ret)},imports.wbg.__wbindgen_closure_wrapper3392=function(arg0,arg1,arg2){const ret=makeClosure(arg0,arg1,90,__wbg_adapter_38);return addHeapObject(ret)},imports.wbg.__wbindgen_closure_wrapper4277=function(arg0,arg1,arg2){const ret=makeMutClosure(arg0,arg1,90,__wbg_adapter_33);return addHeapObject(ret)},imports.wbg.__wbindgen_debug_string=function(arg0,arg1){const ret=debugString(getObject(arg1)),ptr1=passStringToWasm0(ret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,!0),getDataViewMemory0().setInt32(arg0+0,ptr1,!0)},imports.wbg.__wbindgen_error_new=function(arg0,arg1){const ret=new Error(getStringFromWasm0(arg0,arg1));return addHeapObject(ret)},imports.wbg.__wbindgen_is_function=function(arg0){const ret="function"==typeof getObject(arg0);return ret},imports.wbg.__wbindgen_is_object=function(arg0){const val=getObject(arg0),ret="object"==typeof val&&null!==val;return ret},imports.wbg.__wbindgen_is_string=function(arg0){const ret="string"==typeof getObject(arg0);return ret},imports.wbg.__wbindgen_is_undefined=function(arg0){const ret=void 0===getObject(arg0);return ret},imports.wbg.__wbindgen_memory=function(){const ret=wasm.memory;return addHeapObject(ret)},imports.wbg.__wbindgen_object_clone_ref=function(arg0){const ret=getObject(arg0);return addHeapObject(ret)},imports.wbg.__wbindgen_object_drop_ref=function(arg0){takeObject(arg0)},imports.wbg.__wbindgen_string_get=function(arg0,arg1){const obj=getObject(arg1),ret="string"==typeof obj?obj:void 0;var arg1=isLikeNone(ret)?0:passStringToWasm0(ret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,!0),getDataViewMemory0().setInt32(arg0+0,arg1,!0)},imports.wbg.__wbindgen_string_new=function(arg0,arg1){const ret=getStringFromWasm0(arg0,arg1);return addHeapObject(ret)},imports.wbg.__wbindgen_throw=function(arg0,arg1){throw new Error(getStringFromWasm0(arg0,arg1))},imports}function __wbg_init_memory(imports,memory){}function __wbg_finalize_init(instance,module){return wasm=instance.exports,__wbg_init.__wbindgen_wasm_module=module,cachedDataViewMemory0=null,cachedUint32ArrayMemory0=null,cachedUint8ArrayMemory0=null,wasm.__wbindgen_start(),wasm}function initSync(module){if(void 0!==wasm)return wasm;void 0!==module&&(Object.getPrototypeOf(module)===Object.prototype?module=module.module:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const imports=__wbg_get_imports(),instance=(__wbg_init_memory(imports),module instanceof WebAssembly.Module||(module=new WebAssembly.Module(module)),new WebAssembly.Instance(module,imports));return __wbg_finalize_init(instance,module)}async function __wbg_init(module_or_path){if(void 0!==wasm)return wasm;void 0!==module_or_path&&(Object.getPrototypeOf(module_or_path)===Object.prototype?module_or_path=module_or_path.module_or_path:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===module_or_path&&(module_or_path=new URL("libmpc_executor_bg.wasm",import.meta.url));const imports=__wbg_get_imports(),{instance,module}=(("string"==typeof module_or_path||"function"==typeof Request&&module_or_path instanceof Request||"function"==typeof URL&&module_or_path instanceof URL)&&(module_or_path=fetch(module_or_path)),__wbg_init_memory(imports),await __wbg_load(await module_or_path,imports));return __wbg_finalize_init(instance,module)}export default __wbg_init;export{initKeygen,createRoom,ecdsaKeygen,ecdsaSign,ecdsaRefresh,ecdsaReshareNewParty,ecdsaReshareRemainingParty,ecdsaDerivePubkey,ecdsaGetXpub,ecdsaDerivePubkeyFromXpub,ecdsaGetExportID,ecdsaExportFullPrivateKey,ecdsaOfflineExportFullPrivateKey,ecdsaDerivePrivateKeyFromXpriv,ecdsaImportPrivateKeyRecipient,ecdsaImportPrivateKeyImporter,ed25519Keygen,ed25519Sign,ed25519Refresh,ed25519ReshareNewParty,ed25519ReshareRemainingParty,ed25519DerivePubkey,ed25519GetSpub,ed25519DerivePubkeyFromSpub,ed25519GetExportID,ed25519ExportFullPrivateKey,ed25519OfflineExportFullPrivateKey,ed25519DerivePrivateKeyFromSpriv,ed25519ImportPrivateKeyRecipient,ed25519ImportPrivateKeyImporter,bip340Keygen,bip340Sign,bip340Refresh,bip340ReshareNewParty,bip340ReshareRemainingParty,bip340DeriveTweakPubkey,bip340GetXpub,bip340DeriveTweakPubkeyFromXpub,bip340GetExportID,bip340ExportFullPrivateKey,bip340OfflineExportFullPrivateKey,bip340DerivePrivateKeyFromXpriv,bip340ImportPrivateKeyRecipient,bip340ImportPrivateKeyImporter,exportableEd25519SampleKey,exportableEd25519ReceiveKey,exportableEd25519Sign,exportableEd25519Refresh,exportableEd25519ReshareNewParty,exportableEd25519ReshareRemainingParty,exportableEd25519GetPubkey,exportableEd25519GetExportID,exportableEd25519ExportFullPrivateKey,exportableEd25519OfflineExportFullPrivateKey,exportableEd25519ImportPrivateKeyRecipient,exportableEd25519ImportPrivateKeyImporter,sr25519Keygen,sr25519Sign,sr25519Refresh,sr25519ReshareNewParty,sr25519ReshareRemainingParty,sr25519DerivePubkey,sr25519GetPubkey,sr25519DerivePubkeyFromPubkey,sr25519GetExportID,sr25519ExportFullPrivateKey,sr25519OfflineExportFullPrivateKey,sr25519DerivePrivateKeyFromPrivateKey,sr25519ImportPrivateKeyRecipient,sr25519ImportPrivateKeyImporter,start,KeygenInit,KeygenResult,initSync};
|
|
2
|
+
`+val.stack:className}function passArrayJsValueToWasm0(array,malloc){const ptr=malloc(4*array.length,4)>>>0,mem=getDataViewMemory0();for(let i=0;i<array.length;i++)mem.setUint32(ptr+4*i,addHeapObject(array[i]),!0);return WASM_VECTOR_LEN=array.length,ptr}function ecdsaKeygen(room_uuid,host_addr,num_parties,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.ecdsaKeygen(ptr0,len0,ptr1,len1,num_parties,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}let cachedUint32ArrayMemory0=null;function getUint32ArrayMemory0(){return null!==cachedUint32ArrayMemory0&&0!==cachedUint32ArrayMemory0.byteLength||(cachedUint32ArrayMemory0=new Uint32Array(wasm.memory.buffer)),cachedUint32ArrayMemory0}function passArray32ToWasm0(arg,malloc){const ptr=malloc(4*arg.length,4)>>>0;return getUint32ArrayMemory0().set(arg,ptr/4),WASM_VECTOR_LEN=arg.length,ptr}function ecdsaSign(room_uuid,host_addr,secret_share,msg_hex,derivation_path){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(msg_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ret=wasm.ecdsaSign(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3,ptr4,len4);return takeObject(ret)}function ecdsaRefresh(room_uuid,host_addr,secret_share){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ret=wasm.ecdsaRefresh(ptr0,len0,ptr1,len1,ptr2,len2);return takeObject(ret)}function ecdsaReshareNewParty(room_uuid,host_addr,_old_threshold,new_threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.ecdsaReshareNewParty(ptr0,len0,ptr1,len1,_old_threshold,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function ecdsaReshareRemainingParty(room_uuid,host_addr,new_threshold,secret_share,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.ecdsaReshareRemainingParty(ptr0,len0,ptr1,len1,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function ecdsaDerivePubkey(secret_share,derivation_path){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.ecdsaDerivePubkey(ptr0,len0,ptr1,len1);return takeObject(ret)}function ecdsaGetXpub(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.ecdsaGetXpub(ptr0,len0);return takeObject(ret)}function ecdsaDerivePubkeyFromXpub(xpub,derivation_path){const ptr0=passStringToWasm0(xpub,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.ecdsaDerivePubkeyFromXpub(ptr0,len0,ptr1,len1);return takeObject(ret)}function ecdsaGetExportID(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.ecdsaGetExportID(ptr0,len0);return takeObject(ret)}function ecdsaExportFullPrivateKey(room_uuid,host_addr,secret_share,export_to){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(export_to,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ret=wasm.ecdsaExportFullPrivateKey(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3);return takeObject(ret)}function ecdsaOfflineExportFullPrivateKey(secret_shares){const ptr0=passArrayJsValueToWasm0(secret_shares,wasm.__wbindgen_export_1),len0=WASM_VECTOR_LEN,ret=wasm.ecdsaOfflineExportFullPrivateKey(ptr0,len0);return takeObject(ret)}function ecdsaDerivePrivateKeyFromXpriv(xpriv,derivation_path){const ptr0=passStringToWasm0(xpriv,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.ecdsaDerivePrivateKeyFromXpriv(ptr0,len0,ptr1,len1);return takeObject(ret)}function ecdsaImportPrivateKeyRecipient(room_uuid,host_addr,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.ecdsaImportPrivateKeyRecipient(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function ecdsaImportPrivateKeyImporter(room_uuid,host_addr,threshold,private_key_hex,keygen_secret,keygen_ids,chaincode_hex){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(private_key_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ptr5=passStringToWasm0(chaincode_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len5=WASM_VECTOR_LEN,ret=wasm.ecdsaImportPrivateKeyImporter(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3,ptr4,len4,ptr5,len5);return takeObject(ret)}function bip340Keygen(room_uuid,host_addr,num_parties,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.bip340Keygen(ptr0,len0,ptr1,len1,num_parties,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function bip340Sign(room_uuid,host_addr,secret_share,msg_hex,derivation_path,opt_tweak){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(msg_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ptr5=passStringToWasm0(opt_tweak,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len5=WASM_VECTOR_LEN,ret=wasm.bip340Sign(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3,ptr4,len4,ptr5,len5);return takeObject(ret)}function bip340Refresh(room_uuid,host_addr,secret_share){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ret=wasm.bip340Refresh(ptr0,len0,ptr1,len1,ptr2,len2);return takeObject(ret)}function bip340ReshareNewParty(room_uuid,host_addr,_old_threshold,new_threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.bip340ReshareNewParty(ptr0,len0,ptr1,len1,_old_threshold,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function bip340ReshareRemainingParty(room_uuid,host_addr,new_threshold,secret_share,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.bip340ReshareRemainingParty(ptr0,len0,ptr1,len1,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function bip340DeriveTweakPubkey(secret_share,derivation_path,opt_tweak){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(opt_tweak,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ret=wasm.bip340DeriveTweakPubkey(ptr0,len0,ptr1,len1,ptr2,len2);return takeObject(ret)}function bip340GetXpub(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.bip340GetXpub(ptr0,len0);return takeObject(ret)}function bip340DeriveTweakPubkeyFromXpub(xpub,derivation_path,opt_tweak){const ptr0=passStringToWasm0(xpub,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(opt_tweak,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ret=wasm.bip340DeriveTweakPubkeyFromXpub(ptr0,len0,ptr1,len1,ptr2,len2);return takeObject(ret)}function bip340GetExportID(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.bip340GetExportID(ptr0,len0);return takeObject(ret)}function bip340ExportFullPrivateKey(room_uuid,host_addr,secret_share,export_to){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(export_to,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ret=wasm.bip340ExportFullPrivateKey(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3);return takeObject(ret)}function bip340OfflineExportFullPrivateKey(secret_shares){const ptr0=passArrayJsValueToWasm0(secret_shares,wasm.__wbindgen_export_1),len0=WASM_VECTOR_LEN,ret=wasm.bip340OfflineExportFullPrivateKey(ptr0,len0);return takeObject(ret)}function bip340DerivePrivateKeyFromXpriv(xpriv,derivation_path){const ptr0=passStringToWasm0(xpriv,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.bip340DerivePrivateKeyFromXpriv(ptr0,len0,ptr1,len1);return takeObject(ret)}function bip340ImportPrivateKeyRecipient(room_uuid,host_addr,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.bip340ImportPrivateKeyRecipient(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function bip340ImportPrivateKeyImporter(room_uuid,host_addr,threshold,private_key_hex,keygen_secret,keygen_ids,chaincode_hex){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(private_key_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ptr5=passStringToWasm0(chaincode_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len5=WASM_VECTOR_LEN,ret=wasm.bip340ImportPrivateKeyImporter(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3,ptr4,len4,ptr5,len5);return takeObject(ret)}function sr25519Keygen(room_uuid,host_addr,num_parties,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.sr25519Keygen(ptr0,len0,ptr1,len1,num_parties,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function sr25519Sign(room_uuid,host_addr,secret_share,msg_hex,derivation_path){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(msg_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArrayJsValueToWasm0(derivation_path,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ret=wasm.sr25519Sign(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3,ptr4,len4);return takeObject(ret)}function sr25519Refresh(room_uuid,host_addr,secret_share){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ret=wasm.sr25519Refresh(ptr0,len0,ptr1,len1,ptr2,len2);return takeObject(ret)}function sr25519ReshareNewParty(room_uuid,host_addr,_old_threshold,new_threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.sr25519ReshareNewParty(ptr0,len0,ptr1,len1,_old_threshold,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function sr25519ReshareRemainingParty(room_uuid,host_addr,new_threshold,secret_share,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.sr25519ReshareRemainingParty(ptr0,len0,ptr1,len1,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function sr25519DerivePubkey(secret_share,derivation_path){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArrayJsValueToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.sr25519DerivePubkey(ptr0,len0,ptr1,len1);return takeObject(ret)}function sr25519GetPubkey(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.sr25519GetPubkey(ptr0,len0);return takeObject(ret)}function sr25519DerivePubkeyFromPubkey(pubkey,derivation_path){const ptr0=passStringToWasm0(pubkey,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArrayJsValueToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.sr25519DerivePubkeyFromPubkey(ptr0,len0,ptr1,len1);return takeObject(ret)}function sr25519GetExportID(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.sr25519GetExportID(ptr0,len0);return takeObject(ret)}function sr25519ExportFullPrivateKey(room_uuid,host_addr,secret_share,export_to){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(export_to,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ret=wasm.sr25519ExportFullPrivateKey(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3);return takeObject(ret)}function sr25519OfflineExportFullPrivateKey(secret_shares){const ptr0=passArrayJsValueToWasm0(secret_shares,wasm.__wbindgen_export_1),len0=WASM_VECTOR_LEN,ret=wasm.sr25519OfflineExportFullPrivateKey(ptr0,len0);return takeObject(ret)}function sr25519DerivePrivateKeyFromPrivateKey(private_key,derivation_path,is_private_key_raw){const ptr0=passStringToWasm0(private_key,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArrayJsValueToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.sr25519DerivePrivateKeyFromPrivateKey(ptr0,len0,ptr1,len1,is_private_key_raw);return takeObject(ret)}function sr25519ImportPrivateKeyRecipient(room_uuid,host_addr,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.sr25519ImportPrivateKeyRecipient(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function sr25519ImportPrivateKeyImporter(room_uuid,host_addr,threshold,private_key_hex,keygen_secret,keygen_ids,is_private_key_raw){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(private_key_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ret=wasm.sr25519ImportPrivateKeyImporter(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3,ptr4,len4,is_private_key_raw);return takeObject(ret)}function createRoom(host_addr,num_parties,api_token){const ptr0=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(api_token,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ret=wasm.createRoom(ptr0,len0,num_parties,ptr1,len1);return takeObject(ret)}function initKeygen(){const ret=wasm.initKeygen();return takeObject(ret)}function start(){wasm.start()}function ed25519Keygen(room_uuid,host_addr,num_parties,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.ed25519Keygen(ptr0,len0,ptr1,len1,num_parties,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function ed25519Sign(room_uuid,host_addr,secret_share,msg_hex,derivation_path){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(msg_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ret=wasm.ed25519Sign(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3,ptr4,len4);return takeObject(ret)}function ed25519Refresh(room_uuid,host_addr,secret_share){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ret=wasm.ed25519Refresh(ptr0,len0,ptr1,len1,ptr2,len2);return takeObject(ret)}function ed25519ReshareNewParty(room_uuid,host_addr,_old_threshold,new_threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.ed25519ReshareNewParty(ptr0,len0,ptr1,len1,_old_threshold,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function ed25519ReshareRemainingParty(room_uuid,host_addr,new_threshold,secret_share,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.ed25519ReshareRemainingParty(ptr0,len0,ptr1,len1,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function ed25519DerivePubkey(secret_share,derivation_path){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.ed25519DerivePubkey(ptr0,len0,ptr1,len1);return takeObject(ret)}function ed25519GetSpub(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.ed25519GetSpub(ptr0,len0);return takeObject(ret)}function ed25519DerivePubkeyFromSpub(spub,derivation_path){const ptr0=passStringToWasm0(spub,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.ed25519DerivePubkeyFromSpub(ptr0,len0,ptr1,len1);return takeObject(ret)}function ed25519GetExportID(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.ed25519GetExportID(ptr0,len0);return takeObject(ret)}function ed25519ExportFullPrivateKey(room_uuid,host_addr,secret_share,export_to){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(export_to,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ret=wasm.ed25519ExportFullPrivateKey(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3);return takeObject(ret)}function ed25519OfflineExportFullPrivateKey(secret_shares){const ptr0=passArrayJsValueToWasm0(secret_shares,wasm.__wbindgen_export_1),len0=WASM_VECTOR_LEN,ret=wasm.ed25519OfflineExportFullPrivateKey(ptr0,len0);return takeObject(ret)}function ed25519DerivePrivateKeyFromSpriv(spriv,derivation_path){const ptr0=passStringToWasm0(spriv,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passArray32ToWasm0(derivation_path,wasm.__wbindgen_export_1),len1=WASM_VECTOR_LEN,ret=wasm.ed25519DerivePrivateKeyFromSpriv(ptr0,len0,ptr1,len1);return takeObject(ret)}function ed25519ImportPrivateKeyRecipient(room_uuid,host_addr,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.ed25519ImportPrivateKeyRecipient(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function ed25519ImportPrivateKeyImporter(room_uuid,host_addr,threshold,private_key_hex,keygen_secret,keygen_ids,is_private_key_raw){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(private_key_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ret=wasm.ed25519ImportPrivateKeyImporter(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3,ptr4,len4,is_private_key_raw);return takeObject(ret)}function exportableEd25519SampleKey(room_uuid,host_addr,num_parties,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.exportableEd25519SampleKey(ptr0,len0,ptr1,len1,num_parties,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function exportableEd25519ReceiveKey(room_uuid,host_addr,num_parties,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.exportableEd25519ReceiveKey(ptr0,len0,ptr1,len1,num_parties,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function exportableEd25519Sign(room_uuid,host_addr,secret_share,msg_hex){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(msg_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ret=wasm.exportableEd25519Sign(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3);return takeObject(ret)}function exportableEd25519Refresh(room_uuid,host_addr,secret_share){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ret=wasm.exportableEd25519Refresh(ptr0,len0,ptr1,len1,ptr2,len2);return takeObject(ret)}function exportableEd25519ReshareNewParty(room_uuid,host_addr,_old_threshold,new_threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.exportableEd25519ReshareNewParty(ptr0,len0,ptr1,len1,_old_threshold,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function exportableEd25519ReshareRemainingParty(room_uuid,host_addr,new_threshold,secret_share,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.exportableEd25519ReshareRemainingParty(ptr0,len0,ptr1,len1,new_threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function exportableEd25519GetPubkey(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.exportableEd25519GetPubkey(ptr0,len0);return takeObject(ret)}function exportableEd25519GetExportID(secret_share){const ptr0=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ret=wasm.exportableEd25519GetExportID(ptr0,len0);return takeObject(ret)}function exportableEd25519ExportFullPrivateKey(room_uuid,host_addr,secret_share,export_to){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(secret_share,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(export_to,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ret=wasm.exportableEd25519ExportFullPrivateKey(ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3);return takeObject(ret)}function exportableEd25519OfflineExportFullPrivateKey(secret_shares){const ptr0=passArrayJsValueToWasm0(secret_shares,wasm.__wbindgen_export_1),len0=WASM_VECTOR_LEN,ret=wasm.exportableEd25519OfflineExportFullPrivateKey(ptr0,len0);return takeObject(ret)}function exportableEd25519ImportPrivateKeyRecipient(room_uuid,host_addr,threshold,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len3=WASM_VECTOR_LEN,ret=wasm.exportableEd25519ImportPrivateKeyRecipient(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3);return takeObject(ret)}function exportableEd25519ImportPrivateKeyImporter(room_uuid,host_addr,threshold,private_key_hex,keygen_secret,keygen_ids){const ptr0=passStringToWasm0(room_uuid,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(host_addr,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ptr2=passStringToWasm0(private_key_hex,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len2=WASM_VECTOR_LEN,ptr3=passStringToWasm0(keygen_secret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len3=WASM_VECTOR_LEN,ptr4=passArrayJsValueToWasm0(keygen_ids,wasm.__wbindgen_export_1),len4=WASM_VECTOR_LEN,ret=wasm.exportableEd25519ImportPrivateKeyImporter(ptr0,len0,ptr1,len1,threshold,ptr2,len2,ptr3,len3,ptr4,len4);return takeObject(ret)}function __wbg_adapter_28(arg0,arg1){wasm.__wbindgen_export_5(arg0,arg1)}function __wbg_adapter_35(arg0,arg1,arg2){wasm.__wbindgen_export_6(arg0,arg1,addHeapObject(arg2))}function __wbg_adapter_40(arg0,arg1,arg2){wasm.__wbindgen_export_7(arg0,arg1,addHeapObject(arg2))}function __wbg_adapter_91(arg0,arg1,arg2,arg3){wasm.__wbindgen_export_8(arg0,arg1,addHeapObject(arg2),addHeapObject(arg3))}const __wbindgen_enum_BinaryType=["blob","arraybuffer"],__wbindgen_enum_RequestCache=["default","no-store","reload","no-cache","force-cache","only-if-cached"],__wbindgen_enum_RequestCredentials=["omit","same-origin","include"],__wbindgen_enum_RequestMode=["same-origin","no-cors","cors","navigate"],KeygenInitFinalization="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(ptr=>wasm.__wbg_keygeninit_free(ptr>>>0,1));class KeygenInit{static __wrap(ptr){ptr>>>=0;const obj=Object.create(KeygenInit.prototype);return obj.__wbg_ptr=ptr,KeygenInitFinalization.register(obj,obj.__wbg_ptr,obj),obj}__destroy_into_raw(){const ptr=this.__wbg_ptr;return this.__wbg_ptr=0,KeygenInitFinalization.unregister(this),ptr}free(){const ptr=this.__destroy_into_raw();wasm.__wbg_keygeninit_free(ptr,0)}get keypair(){let deferred1_0,deferred1_1;try{const retptr=wasm.__wbindgen_add_to_stack_pointer(-16);wasm.__wbg_get_keygeninit_keypair(retptr,this.__wbg_ptr);var r0=getDataViewMemory0().getInt32(retptr+0,!0),r1=getDataViewMemory0().getInt32(retptr+4,!0);return deferred1_0=r0,deferred1_1=r1,getStringFromWasm0(r0,r1)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_export_4(deferred1_0,deferred1_1,1)}}get pubkey(){let deferred1_0,deferred1_1;try{const retptr=wasm.__wbindgen_add_to_stack_pointer(-16);wasm.__wbg_get_keygeninit_pubkey(retptr,this.__wbg_ptr);var r0=getDataViewMemory0().getInt32(retptr+0,!0),r1=getDataViewMemory0().getInt32(retptr+4,!0);return deferred1_0=r0,deferred1_1=r1,getStringFromWasm0(r0,r1)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_export_4(deferred1_0,deferred1_1,1)}}constructor(keypair,pubkey){const ptr0=passStringToWasm0(keypair,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len0=WASM_VECTOR_LEN,ptr1=passStringToWasm0(pubkey,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN,ret=wasm.keygeninit_new(ptr0,len0,ptr1,len1);return this.__wbg_ptr=ret>>>0,KeygenInitFinalization.register(this,this.__wbg_ptr,this),this}}const KeygenResultFinalization="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(ptr=>wasm.__wbg_keygenresult_free(ptr>>>0,1));class KeygenResult{static __wrap(ptr){ptr>>>=0;const obj=Object.create(KeygenResult.prototype);return obj.__wbg_ptr=ptr,KeygenResultFinalization.register(obj,obj.__wbg_ptr,obj),obj}__destroy_into_raw(){const ptr=this.__wbg_ptr;return this.__wbg_ptr=0,KeygenResultFinalization.unregister(this),ptr}free(){const ptr=this.__destroy_into_raw();wasm.__wbg_keygenresult_free(ptr,0)}get secret_share(){let deferred1_0,deferred1_1;try{const retptr=wasm.__wbindgen_add_to_stack_pointer(-16);wasm.__wbg_get_keygeninit_keypair(retptr,this.__wbg_ptr);var r0=getDataViewMemory0().getInt32(retptr+0,!0),r1=getDataViewMemory0().getInt32(retptr+4,!0);return deferred1_0=r0,deferred1_1=r1,getStringFromWasm0(r0,r1)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_export_4(deferred1_0,deferred1_1,1)}}get pubkey(){let deferred1_0,deferred1_1;try{const retptr=wasm.__wbindgen_add_to_stack_pointer(-16);wasm.__wbg_get_keygeninit_pubkey(retptr,this.__wbg_ptr);var r0=getDataViewMemory0().getInt32(retptr+0,!0),r1=getDataViewMemory0().getInt32(retptr+4,!0);return deferred1_0=r0,deferred1_1=r1,getStringFromWasm0(r0,r1)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_export_4(deferred1_0,deferred1_1,1)}}}async function __wbg_load(module,imports){if("function"==typeof Response&&module instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(module,imports)}catch(e){if("application/wasm"==module.headers.get("Content-Type"))throw e;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e)}const bytes=await module.arrayBuffer();return WebAssembly.instantiate(bytes,imports)}{const instance=await WebAssembly.instantiate(module,imports);return instance instanceof WebAssembly.Instance?{instance:instance,module:module}:instance}}function __wbg_get_imports(){const imports={wbg:{}};return imports.wbg.__wbg_abort_410ec47a64ac6117=function(arg0,arg1){getObject(arg0).abort(getObject(arg1))},imports.wbg.__wbg_abort_775ef1d17fc65868=function(arg0){getObject(arg0).abort()},imports.wbg.__wbg_append_8c7dd8d641a5f01b=function(){return handleError(function(arg0,arg1,arg2,arg3,arg4){getObject(arg0).append(getStringFromWasm0(arg1,arg2),getStringFromWasm0(arg3,arg4))},arguments)},imports.wbg.__wbg_buffer_609cc3eee51ed158=function(arg0){const ret=getObject(arg0).buffer;return addHeapObject(ret)},imports.wbg.__wbg_call_672a4d21634d4a24=function(){return handleError(function(arg0,arg1){const ret=getObject(arg0).call(getObject(arg1));return addHeapObject(ret)},arguments)},imports.wbg.__wbg_call_7cccdd69e0791ae2=function(){return handleError(function(arg0,arg1,arg2){const ret=getObject(arg0).call(getObject(arg1),getObject(arg2));return addHeapObject(ret)},arguments)},imports.wbg.__wbg_clearTimeout_5a54f8841c30079a=function(arg0){const ret=clearTimeout(takeObject(arg0));return addHeapObject(ret)},imports.wbg.__wbg_clearTimeout_7a42b49784aea641=function(arg0){const ret=clearTimeout(takeObject(arg0));return addHeapObject(ret)},imports.wbg.__wbg_clearTimeout_96804de0ab838f26=function(arg0){const ret=clearTimeout(takeObject(arg0));return addHeapObject(ret)},imports.wbg.__wbg_close_2893b7d056a0627d=function(){return handleError(function(arg0){getObject(arg0).close()},arguments)},imports.wbg.__wbg_close_e1253d480ed93ce3=function(){return handleError(function(arg0,arg1,arg2,arg3){getObject(arg0).close(arg1,getStringFromWasm0(arg2,arg3))},arguments)},imports.wbg.__wbg_code_f4ec1e6e2e1b0417=function(arg0){const ret=getObject(arg0).code;return ret},imports.wbg.__wbg_crypto_574e78ad8b13b65f=function(arg0){const ret=getObject(arg0).crypto;return addHeapObject(ret)},imports.wbg.__wbg_data_432d9c3df2630942=function(arg0){const ret=getObject(arg0).data;return addHeapObject(ret)},imports.wbg.__wbg_done_769e5ede4b31c67b=function(arg0){const ret=getObject(arg0).done;return ret},imports.wbg.__wbg_fetch_509096533071c657=function(arg0,arg1){const ret=getObject(arg0).fetch(getObject(arg1));return addHeapObject(ret)},imports.wbg.__wbg_fetch_74a3e84ebd2c9a0e=function(arg0){const ret=fetch(getObject(arg0));return addHeapObject(ret)},imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return handleError(function(arg0,arg1){getObject(arg0).getRandomValues(getObject(arg1))},arguments)},imports.wbg.__wbg_get_67b2ba62fc30de12=function(){return handleError(function(arg0,arg1){const ret=Reflect.get(getObject(arg0),getObject(arg1));return addHeapObject(ret)},arguments)},imports.wbg.__wbg_has_a5ea9117f258a0ec=function(){return handleError(function(arg0,arg1){const ret=Reflect.has(getObject(arg0),getObject(arg1));return ret},arguments)},imports.wbg.__wbg_headers_9cb51cfd2ac780a4=function(arg0){const ret=getObject(arg0).headers;return addHeapObject(ret)},imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(arg0){let result;try{result=getObject(arg0)instanceof ArrayBuffer}catch(_){result=!1}const ret=result;return ret},imports.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644=function(arg0){let result;try{result=getObject(arg0)instanceof Response}catch(_){result=!1}const ret=result;return ret},imports.wbg.__wbg_iterator_9a24c88df860dc65=function(){const ret=Symbol.iterator;return addHeapObject(ret)},imports.wbg.__wbg_keygeninit_new=function(arg0){const ret=KeygenInit.__wrap(arg0);return addHeapObject(ret)},imports.wbg.__wbg_keygenresult_new=function(arg0){const ret=KeygenResult.__wrap(arg0);return addHeapObject(ret)},imports.wbg.__wbg_length_a446193dc22c12f8=function(arg0){const ret=getObject(arg0).length;return ret},imports.wbg.__wbg_message_d1685a448ba00178=function(arg0,arg1){const ret=getObject(arg1).message,ptr1=passStringToWasm0(ret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,!0),getDataViewMemory0().setInt32(arg0+0,ptr1,!0)},imports.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(arg0){const ret=getObject(arg0).msCrypto;return addHeapObject(ret)},imports.wbg.__wbg_new_018dcc2d6c8c2f6a=function(){return handleError(function(){const ret=new Headers;return addHeapObject(ret)},arguments)},imports.wbg.__wbg_new_23a2665fac83c611=function(arg0,arg1){try{var state0={a:arg0,b:arg1},cb0=(arg0,arg1)=>{const a=state0.a;state0.a=0;try{return __wbg_adapter_91(a,state0.b,arg0,arg1)}finally{state0.a=a}};const ret=new Promise(cb0);return addHeapObject(ret)}finally{state0.a=state0.b=0}},imports.wbg.__wbg_new_405e22f390576ce2=function(){const ret=new Object;return addHeapObject(ret)},imports.wbg.__wbg_new_92c54fc74574ef55=function(){return handleError(function(arg0,arg1){const ret=new WebSocket(getStringFromWasm0(arg0,arg1));return addHeapObject(ret)},arguments)},imports.wbg.__wbg_new_a12002a7f91c75be=function(arg0){const ret=new Uint8Array(getObject(arg0));return addHeapObject(ret)},imports.wbg.__wbg_new_e25e5aab09ff45db=function(){return handleError(function(){const ret=new AbortController;return addHeapObject(ret)},arguments)},imports.wbg.__wbg_newnoargs_105ed471475aaf50=function(arg0,arg1){const ret=new Function(getStringFromWasm0(arg0,arg1));return addHeapObject(ret)},imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(arg0,arg1,arg2){const ret=new Uint8Array(getObject(arg0),arg1>>>0,arg2>>>0);return addHeapObject(ret)},imports.wbg.__wbg_newwithlength_a381634e90c276d4=function(arg0){const ret=new Uint8Array(arg0>>>0);return addHeapObject(ret)},imports.wbg.__wbg_newwithstrandinit_06c535e0a867c635=function(){return handleError(function(arg0,arg1,arg2){const ret=new Request(getStringFromWasm0(arg0,arg1),getObject(arg2));return addHeapObject(ret)},arguments)},imports.wbg.__wbg_next_25feadfc0913fea9=function(arg0){const ret=getObject(arg0).next;return addHeapObject(ret)},imports.wbg.__wbg_next_6574e1a8a62d1055=function(){return handleError(function(arg0){const ret=getObject(arg0).next();return addHeapObject(ret)},arguments)},imports.wbg.__wbg_node_905d3e251edff8a2=function(arg0){const ret=getObject(arg0).node;return addHeapObject(ret)},imports.wbg.__wbg_process_dc0fbacc7c1c06f7=function(arg0){const ret=getObject(arg0).process;return addHeapObject(ret)},imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5=function(arg0){queueMicrotask(getObject(arg0))},imports.wbg.__wbg_queueMicrotask_d3219def82552485=function(arg0){const ret=getObject(arg0).queueMicrotask;return addHeapObject(ret)},imports.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return handleError(function(arg0,arg1){getObject(arg0).randomFillSync(takeObject(arg1))},arguments)},imports.wbg.__wbg_readyState_7ef6e63c349899ed=function(arg0){const ret=getObject(arg0).readyState;return ret},imports.wbg.__wbg_reason_49f1cede8bcf23dd=function(arg0,arg1){const ret=getObject(arg1).reason,ptr1=passStringToWasm0(ret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,!0),getDataViewMemory0().setInt32(arg0+0,ptr1,!0)},imports.wbg.__wbg_require_60cc747a6bc5215a=function(){return handleError(function(){const ret=module.require;return addHeapObject(ret)},arguments)},imports.wbg.__wbg_resolve_4851785c9c5f573d=function(arg0){const ret=Promise.resolve(getObject(arg0));return addHeapObject(ret)},imports.wbg.__wbg_send_0293179ba074ffb4=function(){return handleError(function(arg0,arg1,arg2){getObject(arg0).send(getStringFromWasm0(arg1,arg2))},arguments)},imports.wbg.__wbg_send_fc0c204e8a1757f4=function(){return handleError(function(arg0,arg1,arg2){getObject(arg0).send(getArrayU8FromWasm0(arg1,arg2))},arguments)},imports.wbg.__wbg_setTimeout_7bb3429662ab1e70=function(arg0,arg1){const ret=setTimeout(getObject(arg0),arg1);return addHeapObject(ret)},imports.wbg.__wbg_setTimeout_db2dbaeefb6f39c7=function(){return handleError(function(arg0,arg1){const ret=setTimeout(getObject(arg0),arg1);return addHeapObject(ret)},arguments)},imports.wbg.__wbg_setTimeout_eefe7f4c234b0c6b=function(){return handleError(function(arg0,arg1){const ret=setTimeout(getObject(arg0),arg1);return addHeapObject(ret)},arguments)},imports.wbg.__wbg_set_65595bdd868b3009=function(arg0,arg1,arg2){getObject(arg0).set(getObject(arg1),arg2>>>0)},imports.wbg.__wbg_setbinaryType_92fa1ffd873b327c=function(arg0,arg1){getObject(arg0).binaryType=__wbindgen_enum_BinaryType[arg1]},imports.wbg.__wbg_setbody_5923b78a95eedf29=function(arg0,arg1){getObject(arg0).body=getObject(arg1)},imports.wbg.__wbg_setcache_12f17c3a980650e4=function(arg0,arg1){getObject(arg0).cache=__wbindgen_enum_RequestCache[arg1]},imports.wbg.__wbg_setcredentials_c3a22f1cd105a2c6=function(arg0,arg1){getObject(arg0).credentials=__wbindgen_enum_RequestCredentials[arg1]},imports.wbg.__wbg_setheaders_834c0bdb6a8949ad=function(arg0,arg1){getObject(arg0).headers=getObject(arg1)},imports.wbg.__wbg_setmethod_3c5280fe5d890842=function(arg0,arg1,arg2){getObject(arg0).method=getStringFromWasm0(arg1,arg2)},imports.wbg.__wbg_setmode_5dc300b865044b65=function(arg0,arg1){getObject(arg0).mode=__wbindgen_enum_RequestMode[arg1]},imports.wbg.__wbg_setonclose_14fc475a49d488fc=function(arg0,arg1){getObject(arg0).onclose=getObject(arg1)},imports.wbg.__wbg_setonerror_8639efe354b947cd=function(arg0,arg1){getObject(arg0).onerror=getObject(arg1)},imports.wbg.__wbg_setonmessage_6eccab530a8fb4c7=function(arg0,arg1){getObject(arg0).onmessage=getObject(arg1)},imports.wbg.__wbg_setonopen_2da654e1f39745d5=function(arg0,arg1){getObject(arg0).onopen=getObject(arg1)},imports.wbg.__wbg_setsignal_75b21ef3a81de905=function(arg0,arg1){getObject(arg0).signal=getObject(arg1)},imports.wbg.__wbg_signal_aaf9ad74119f20a4=function(arg0){const ret=getObject(arg0).signal;return addHeapObject(ret)},imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){const ret="undefined"==typeof global?null:global;return isLikeNone(ret)?0:addHeapObject(ret)},imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){const ret="undefined"==typeof globalThis?null:globalThis;return isLikeNone(ret)?0:addHeapObject(ret)},imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){const ret="undefined"==typeof self?null:self;return isLikeNone(ret)?0:addHeapObject(ret)},imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){const ret="undefined"==typeof window?null:window;return isLikeNone(ret)?0:addHeapObject(ret)},imports.wbg.__wbg_status_f6360336ca686bf0=function(arg0){const ret=getObject(arg0).status;return ret},imports.wbg.__wbg_stringify_f7ed6987935b4a24=function(){return handleError(function(arg0){const ret=JSON.stringify(getObject(arg0));return addHeapObject(ret)},arguments)},imports.wbg.__wbg_subarray_aa9065fa9dc5df96=function(arg0,arg1,arg2){const ret=getObject(arg0).subarray(arg1>>>0,arg2>>>0);return addHeapObject(ret)},imports.wbg.__wbg_text_7805bea50de2af49=function(){return handleError(function(arg0){const ret=getObject(arg0).text();return addHeapObject(ret)},arguments)},imports.wbg.__wbg_then_44b73946d2fb3e7d=function(arg0,arg1){const ret=getObject(arg0).then(getObject(arg1));return addHeapObject(ret)},imports.wbg.__wbg_then_48b406749878a531=function(arg0,arg1,arg2){const ret=getObject(arg0).then(getObject(arg1),getObject(arg2));return addHeapObject(ret)},imports.wbg.__wbg_url_ae10c34ca209681d=function(arg0,arg1){const ret=getObject(arg1).url,ptr1=passStringToWasm0(ret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,!0),getDataViewMemory0().setInt32(arg0+0,ptr1,!0)},imports.wbg.__wbg_value_cd1ffa7b1ab794f1=function(arg0){const ret=getObject(arg0).value;return addHeapObject(ret)},imports.wbg.__wbg_versions_c01dfd4722a88165=function(arg0){const ret=getObject(arg0).versions;return addHeapObject(ret)},imports.wbg.__wbg_wasClean_605b4fd66d44354a=function(arg0){const ret=getObject(arg0).wasClean;return ret},imports.wbg.__wbindgen_cb_drop=function(arg0){const obj=takeObject(arg0).original;if(1==obj.cnt--)return obj.a=0,!0;const ret=!1;return ret},imports.wbg.__wbindgen_closure_wrapper1453=function(arg0,arg1,arg2){const ret=makeMutClosure(arg0,arg1,57,__wbg_adapter_28);return addHeapObject(ret)},imports.wbg.__wbindgen_closure_wrapper1466=function(arg0,arg1,arg2){const ret=makeMutClosure(arg0,arg1,57,__wbg_adapter_28);return addHeapObject(ret)},imports.wbg.__wbindgen_closure_wrapper2258=function(arg0,arg1,arg2){const ret=makeMutClosure(arg0,arg1,88,__wbg_adapter_28);return addHeapObject(ret)},imports.wbg.__wbindgen_closure_wrapper3913=function(arg0,arg1,arg2){const ret=makeMutClosure(arg0,arg1,88,__wbg_adapter_35);return addHeapObject(ret)},imports.wbg.__wbindgen_closure_wrapper3918=function(arg0,arg1,arg2){const ret=makeMutClosure(arg0,arg1,88,__wbg_adapter_35);return addHeapObject(ret)},imports.wbg.__wbindgen_closure_wrapper3921=function(arg0,arg1,arg2){const ret=makeClosure(arg0,arg1,88,__wbg_adapter_40);return addHeapObject(ret)},imports.wbg.__wbindgen_closure_wrapper3926=function(arg0,arg1,arg2){const ret=makeClosure(arg0,arg1,88,__wbg_adapter_40);return addHeapObject(ret)},imports.wbg.__wbindgen_closure_wrapper3929=function(arg0,arg1,arg2){const ret=makeClosure(arg0,arg1,88,__wbg_adapter_40);return addHeapObject(ret)},imports.wbg.__wbindgen_closure_wrapper4494=function(arg0,arg1,arg2){const ret=makeMutClosure(arg0,arg1,88,__wbg_adapter_35);return addHeapObject(ret)},imports.wbg.__wbindgen_debug_string=function(arg0,arg1){const ret=debugString(getObject(arg1)),ptr1=passStringToWasm0(ret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,!0),getDataViewMemory0().setInt32(arg0+0,ptr1,!0)},imports.wbg.__wbindgen_error_new=function(arg0,arg1){const ret=new Error(getStringFromWasm0(arg0,arg1));return addHeapObject(ret)},imports.wbg.__wbindgen_is_function=function(arg0){const ret="function"==typeof getObject(arg0);return ret},imports.wbg.__wbindgen_is_object=function(arg0){const val=getObject(arg0),ret="object"==typeof val&&null!==val;return ret},imports.wbg.__wbindgen_is_string=function(arg0){const ret="string"==typeof getObject(arg0);return ret},imports.wbg.__wbindgen_is_undefined=function(arg0){const ret=void 0===getObject(arg0);return ret},imports.wbg.__wbindgen_memory=function(){const ret=wasm.memory;return addHeapObject(ret)},imports.wbg.__wbindgen_object_clone_ref=function(arg0){const ret=getObject(arg0);return addHeapObject(ret)},imports.wbg.__wbindgen_object_drop_ref=function(arg0){takeObject(arg0)},imports.wbg.__wbindgen_string_get=function(arg0,arg1){const obj=getObject(arg1),ret="string"==typeof obj?obj:void 0;var arg1=isLikeNone(ret)?0:passStringToWasm0(ret,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,!0),getDataViewMemory0().setInt32(arg0+0,arg1,!0)},imports.wbg.__wbindgen_string_new=function(arg0,arg1){const ret=getStringFromWasm0(arg0,arg1);return addHeapObject(ret)},imports.wbg.__wbindgen_throw=function(arg0,arg1){throw new Error(getStringFromWasm0(arg0,arg1))},imports}function __wbg_init_memory(imports,memory){}function __wbg_finalize_init(instance,module){return wasm=instance.exports,__wbg_init.__wbindgen_wasm_module=module,cachedDataViewMemory0=null,cachedUint32ArrayMemory0=null,cachedUint8ArrayMemory0=null,wasm.__wbindgen_start(),wasm}function initSync(module){if(void 0!==wasm)return wasm;void 0!==module&&(Object.getPrototypeOf(module)===Object.prototype?module=module.module:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const imports=__wbg_get_imports(),instance=(__wbg_init_memory(imports),module instanceof WebAssembly.Module||(module=new WebAssembly.Module(module)),new WebAssembly.Instance(module,imports));return __wbg_finalize_init(instance,module)}async function __wbg_init(module_or_path){if(void 0!==wasm)return wasm;void 0!==module_or_path&&(Object.getPrototypeOf(module_or_path)===Object.prototype?module_or_path=module_or_path.module_or_path:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===module_or_path&&(module_or_path=new URL("libmpc_executor_bg.wasm",import.meta.url));const imports=__wbg_get_imports(),{instance,module}=(("string"==typeof module_or_path||"function"==typeof Request&&module_or_path instanceof Request||"function"==typeof URL&&module_or_path instanceof URL)&&(module_or_path=fetch(module_or_path)),__wbg_init_memory(imports),await __wbg_load(await module_or_path,imports));return __wbg_finalize_init(instance,module)}export default __wbg_init;export{ecdsaKeygen,ecdsaSign,ecdsaRefresh,ecdsaReshareNewParty,ecdsaReshareRemainingParty,ecdsaDerivePubkey,ecdsaGetXpub,ecdsaDerivePubkeyFromXpub,ecdsaGetExportID,ecdsaExportFullPrivateKey,ecdsaOfflineExportFullPrivateKey,ecdsaDerivePrivateKeyFromXpriv,ecdsaImportPrivateKeyRecipient,ecdsaImportPrivateKeyImporter,bip340Keygen,bip340Sign,bip340Refresh,bip340ReshareNewParty,bip340ReshareRemainingParty,bip340DeriveTweakPubkey,bip340GetXpub,bip340DeriveTweakPubkeyFromXpub,bip340GetExportID,bip340ExportFullPrivateKey,bip340OfflineExportFullPrivateKey,bip340DerivePrivateKeyFromXpriv,bip340ImportPrivateKeyRecipient,bip340ImportPrivateKeyImporter,sr25519Keygen,sr25519Sign,sr25519Refresh,sr25519ReshareNewParty,sr25519ReshareRemainingParty,sr25519DerivePubkey,sr25519GetPubkey,sr25519DerivePubkeyFromPubkey,sr25519GetExportID,sr25519ExportFullPrivateKey,sr25519OfflineExportFullPrivateKey,sr25519DerivePrivateKeyFromPrivateKey,sr25519ImportPrivateKeyRecipient,sr25519ImportPrivateKeyImporter,createRoom,initKeygen,start,ed25519Keygen,ed25519Sign,ed25519Refresh,ed25519ReshareNewParty,ed25519ReshareRemainingParty,ed25519DerivePubkey,ed25519GetSpub,ed25519DerivePubkeyFromSpub,ed25519GetExportID,ed25519ExportFullPrivateKey,ed25519OfflineExportFullPrivateKey,ed25519DerivePrivateKeyFromSpriv,ed25519ImportPrivateKeyRecipient,ed25519ImportPrivateKeyImporter,exportableEd25519SampleKey,exportableEd25519ReceiveKey,exportableEd25519Sign,exportableEd25519Refresh,exportableEd25519ReshareNewParty,exportableEd25519ReshareRemainingParty,exportableEd25519GetPubkey,exportableEd25519GetExportID,exportableEd25519ExportFullPrivateKey,exportableEd25519OfflineExportFullPrivateKey,exportableEd25519ImportPrivateKeyRecipient,exportableEd25519ImportPrivateKeyImporter,KeygenInit,KeygenResult,initSync};
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/browser",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.243",
|
|
4
4
|
"license": "Licensed under the Dynamic Labs, Inc. Terms Of Service (https://www.dynamic.xyz/terms-conditions)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@dynamic-labs-wallet/core": "0.0.
|
|
7
|
+
"@dynamic-labs-wallet/core": "0.0.243",
|
|
8
8
|
"@dynamic-labs/logger": "^4.25.3",
|
|
9
9
|
"@dynamic-labs/sdk-api-core": "^0.0.828",
|
|
10
10
|
"argon2id": "1.0.1",
|