@dynamic-labs-wallet/browser 0.0.201 → 0.0.203
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/common.cjs +1 -1
- package/internal/core/ecdsa.cjs +1 -1
- package/internal/core/ed25519.cjs +1 -1
- package/internal/core/ed25519_exportable.cjs +1 -1
- package/internal/core/index.cjs +1 -1
- package/internal/core/sr25519.cjs +1 -1
- package/internal/core/types.cjs +1 -1
- package/internal/web/generated/libmpc_executor.js +2 -2
- package/internal/web/index.d.ts +1 -1
- package/internal/web/index.js +1 -1
- package/package.json +2 -2
package/internal/core/bip340.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.BIP340=void 0;
|
|
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");function getTweak(tweak){if("string"!=typeof tweak&&(tweak=(0,utils_1.bytesToHex)(tweak)),0!==tweak.length&&64!==tweak.length)throw new Error("Tweak must be 32 bytes long");return tweak}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=getTweak(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),getTweak(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),getTweak(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){const importKeygenResult=await(await this.NATIVE).bip340ImportPrivateKeyImporter(roomUuid,this.URL,threshold,privateKey,keygenInit.keygenSecret,keygenIds),pubkey=(0,utils_1.hexToBytes)(importKeygenResult.pubkey),secretShareHex=importKeygenResult.secret_share;return new _1.BIP340KeygenResult(pubkey,secretShareHex)}}exports.BIP340=BIP340;
|
package/internal/core/common.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function sanitizeNumberOfParties(...
|
|
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} `)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.sanitizeNumberOfParties=sanitizeNumberOfParties;
|
package/internal/core/ecdsa.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.Ecdsa=void 0;
|
|
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 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.Ed25519=void 0;
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.Ed25519=void 0;const _1=require("./index.cjs"),utils_1=require("@noble/hashes/utils"),common_1=require("./common.cjs");class Ed25519{constructor(native,url){this.NATIVE=native,this.URL=url}async initKeygen(){const keygenInitKeypair=await(await this.NATIVE).initKeygen();return new _1.Ed25519InitKeygenResult(keygenInitKeypair.pubkey,keygenInitKeypair.keypair)}async exportID(keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare;return(await this.NATIVE).ed25519GetExportID(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).ed25519Keygen(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.Ed25519KeygenResult(pubkey,secretShareHex)}async sign(roomUuid,keygenResult,msg,derivationPath=new Uint32Array){"string"!=typeof msg&&(msg=(0,utils_1.bytesToHex)(msg));const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,signature=await(await this.NATIVE).ed25519Sign(roomUuid,this.URL,secretShare,msg,Array.from(derivationPath));return(0,utils_1.hexToBytes)(signature)}async refresh(roomUuid,keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,refreshedKeygenResult=await(await this.NATIVE).ed25519Refresh(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.Ed25519KeygenResult(pubkey,secretShareHex)}async reshareNewParty(roomUuid,oldThreshold,newThreshold,keygenInit,keygenIds){const resharedKeygenResult=await(await this.NATIVE).ed25519ReshareNewParty(roomUuid,this.URL,oldThreshold,newThreshold,keygenInit.keygenSecret,keygenIds),pubkey=(0,utils_1.hexToBytes)(resharedKeygenResult.pubkey),secretShareHex=resharedKeygenResult.secret_share;return new _1.Ed25519KeygenResult(pubkey,secretShareHex)}async reshareRemainingParty(roomUuid,newThreshold,keygenResult,keygenIds){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,resharedKeygenResult=await(await this.NATIVE).ed25519ReshareRemainingParty(roomUuid,this.URL,newThreshold,secretShare,keygenIds),pubkey=(0,utils_1.hexToBytes)(resharedKeygenResult.pubkey),secretShareHex=resharedKeygenResult.secret_share;return new _1.Ed25519KeygenResult(pubkey,secretShareHex)}async derivePubkey(keygenResult,derivationPath=new Uint32Array){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,pubkey=await(await this.NATIVE).ed25519DerivePubkey(secretShare,Array.from(derivationPath));return(0,utils_1.hexToBytes)(pubkey)}async getSpub(keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare;return(await this.NATIVE).ed25519GetSpub(secretShare)}async derivePubkeyFromSpub(spub,derivation){const pubkey=await(await this.NATIVE).ed25519DerivePubkeyFromSpub(spub,Array.from(derivation));return(0,utils_1.hexToBytes)(pubkey)}async exportFullPrivateKey(roomUuid,keygenResult,toExportID){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,exported=await(await this.NATIVE).ed25519ExportFullPrivateKey(roomUuid,this.URL,secretShare,toExportID);return exported||void 0}async derivePrivateKeyFromSpriv(spriv,derivationPath=new Uint32Array){return(await this.NATIVE).ed25519DerivePrivateKeyFromSpriv(spriv,Array.from(derivationPath))}async offlineExportFullPrivateKey(keygenResults){const secretShares=keygenResults.map(k=>{if("string"==typeof k)return k;if(k instanceof _1.Ed25519KeygenResult)return k.secretShare;throw"UnknownType"});return(await this.NATIVE).ed25519OfflineExportFullPrivateKey(secretShares)}async importPrivateKeyRecipient(roomUuid,threshold,keygenInit,keygenIds){const importKeygenResult=await(await this.NATIVE).ed25519ImportPrivateKeyRecipient(roomUuid,this.URL,threshold,keygenInit.keygenSecret,keygenIds),pubkey=(0,utils_1.hexToBytes)(importKeygenResult.pubkey),secretShareHex=importKeygenResult.secret_share;return new _1.Ed25519KeygenResult(pubkey,secretShareHex)}async importPrivateKeyImporter(roomUuid,threshold,privateKey,keygenInit,keygenIds,isPrivateKeyRaw=!1){const importKeygenResult=await(await this.NATIVE).ed25519ImportPrivateKeyImporter(roomUuid,this.URL,threshold,privateKey,keygenInit.keygenSecret,keygenIds,isPrivateKeyRaw),pubkey=(0,utils_1.hexToBytes)(importKeygenResult.pubkey),secretShareHex=importKeygenResult.secret_share;return new _1.Ed25519KeygenResult(pubkey,secretShareHex)}}exports.Ed25519=Ed25519;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExportableEd25519=void 0;
|
|
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 getPrivateKey(keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare;return(await this.NATIVE).exportableEd25519GetPubkey(secretShare)}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;
|
package/internal/core/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.BIP340=exports.Sr25519=exports.ExportableEd25519=exports.Ed25519=exports.Ecdsa=exports.MessageHash=exports.BIP340KeygenResult=exports.BIP340InitKeygenResult=exports.Sr25519KeygenResult=exports.Sr25519InitKeygenResult=exports.ExportableEd25519KeygenResult=exports.ExportableEd25519InitKeygenResult=exports.Ed25519KeygenResult=exports.Ed25519InitKeygenResult=exports.EcdsaSignature=exports.EcdsaPublicKey=exports.EcdsaKeygenResult=exports.EcdsaInitKeygenResult=void 0;
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.BIP340=exports.Sr25519=exports.ExportableEd25519=exports.Ed25519=exports.Ecdsa=exports.MessageHash=exports.BIP340KeygenResult=exports.BIP340InitKeygenResult=exports.Sr25519KeygenResult=exports.Sr25519InitKeygenResult=exports.ExportableEd25519KeygenResult=exports.ExportableEd25519InitKeygenResult=exports.Ed25519KeygenResult=exports.Ed25519InitKeygenResult=exports.EcdsaSignature=exports.EcdsaPublicKey=exports.EcdsaKeygenResult=exports.EcdsaInitKeygenResult=void 0;const types_1=require("./types.cjs"),ecdsa_1=(Object.defineProperty(exports,"EcdsaInitKeygenResult",{value:types_1.EcdsaInitKeygenResult}),Object.defineProperty(exports,"EcdsaKeygenResult",{value:types_1.EcdsaKeygenResult}),Object.defineProperty(exports,"EcdsaPublicKey",{value:types_1.EcdsaPublicKey}),Object.defineProperty(exports,"EcdsaSignature",{value:types_1.EcdsaSignature}),Object.defineProperty(exports,"Ed25519InitKeygenResult",{value:types_1.Ed25519InitKeygenResult}),Object.defineProperty(exports,"Ed25519KeygenResult",{value:types_1.Ed25519KeygenResult}),Object.defineProperty(exports,"ExportableEd25519InitKeygenResult",{value:types_1.ExportableEd25519InitKeygenResult}),Object.defineProperty(exports,"ExportableEd25519KeygenResult",{value:types_1.ExportableEd25519KeygenResult}),Object.defineProperty(exports,"Sr25519InitKeygenResult",{value:types_1.Sr25519InitKeygenResult}),Object.defineProperty(exports,"Sr25519KeygenResult",{value:types_1.Sr25519KeygenResult}),Object.defineProperty(exports,"BIP340InitKeygenResult",{value:types_1.BIP340InitKeygenResult}),Object.defineProperty(exports,"BIP340KeygenResult",{value:types_1.BIP340KeygenResult}),Object.defineProperty(exports,"MessageHash",{value:types_1.MessageHash}),require("./ecdsa.cjs")),ed25519_1=(Object.defineProperty(exports,"Ecdsa",{value:ecdsa_1.Ecdsa}),require("./ed25519.cjs")),ed25519_exportable_1=(Object.defineProperty(exports,"Ed25519",{value:ed25519_1.Ed25519}),require("./ed25519_exportable.cjs")),sr25519_1=(Object.defineProperty(exports,"ExportableEd25519",{value:ed25519_exportable_1.ExportableEd25519}),require("./sr25519.cjs")),bip340_1=(Object.defineProperty(exports,"Sr25519",{value:sr25519_1.Sr25519}),require("./bip340.cjs"));Object.defineProperty(exports,"BIP340",{value:bip340_1.BIP340});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.Sr25519=void 0;
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.Sr25519=void 0;const _1=require("./index.cjs"),utils_1=require("@noble/hashes/utils"),common_1=require("./common.cjs");class Sr25519{constructor(native,url){this.NATIVE=native,this.URL=url}async initKeygen(){const keygenInitKeypair=await(await this.NATIVE).initKeygen();return new _1.Sr25519InitKeygenResult(keygenInitKeypair.pubkey,keygenInitKeypair.keypair)}async exportID(keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare;return(await this.NATIVE).sr25519GetExportID(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).sr25519Keygen(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.Sr25519KeygenResult(pubkey,secretShareHex)}async sign(roomUuid,keygenResult,msg,derivationPath=[]){"string"!=typeof msg&&(msg=(0,utils_1.bytesToHex)(msg));const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,signature=await(await this.NATIVE).sr25519Sign(roomUuid,this.URL,secretShare,msg,Array.from(derivationPath));return(0,utils_1.hexToBytes)(signature)}async refresh(roomUuid,keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,refreshedKeygenResult=await(await this.NATIVE).sr25519Refresh(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.Sr25519KeygenResult(pubkey,secretShareHex)}async reshareNewParty(roomUuid,oldThreshold,newThreshold,keygenInit,keygenIds){const resharedKeygenResult=await(await this.NATIVE).sr25519ReshareNewParty(roomUuid,this.URL,oldThreshold,newThreshold,keygenInit.keygenSecret,keygenIds),pubkey=(0,utils_1.hexToBytes)(resharedKeygenResult.pubkey),secretShareHex=resharedKeygenResult.secret_share;return new _1.Sr25519KeygenResult(pubkey,secretShareHex)}async reshareRemainingParty(roomUuid,newThreshold,keygenResult,keygenIds){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,resharedKeygenResult=await(await this.NATIVE).sr25519ReshareRemainingParty(roomUuid,this.URL,newThreshold,secretShare,keygenIds),pubkey=(0,utils_1.hexToBytes)(resharedKeygenResult.pubkey),secretShareHex=resharedKeygenResult.secret_share;return new _1.Sr25519KeygenResult(pubkey,secretShareHex)}async derivePubkey(keygenResult,derivationPath=[]){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,derivedPubkey=await(await this.NATIVE).sr25519DerivePubkey(secretShare,Array.from(derivationPath));return(0,utils_1.hexToBytes)(derivedPubkey)}async getPubkey(keygenResult){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,pubKey=await(await this.NATIVE).sr25519GetPubkey(secretShare);return(0,utils_1.hexToBytes)(pubKey)}async derivePubkeyFromPubkey(pubkey,derivation){const derivedPubkey=await(await this.NATIVE).sr25519DerivePubkeyFromPubkey((0,utils_1.bytesToHex)(pubkey),Array.from(derivation));return(0,utils_1.hexToBytes)(derivedPubkey)}async exportFullPrivateKey(roomUuid,keygenResult,toExportID){const secretShare="string"==typeof keygenResult?keygenResult:keygenResult.secretShare,exported=await(await this.NATIVE).sr25519ExportFullPrivateKey(roomUuid,this.URL,secretShare,toExportID);return exported||void 0}async derivePrivateKeyFromPrivateKey(privkey,isPrivateKeyRaw,derivationPath=[]){return(await this.NATIVE).sr25519DerivePrivateKeyFromPrivateKey(privkey,Array.from(derivationPath),isPrivateKeyRaw)}async offlineExportFullPrivateKey(keygenResults){const secretShares=keygenResults.map(k=>{if("string"==typeof k)return k;if(k instanceof _1.Sr25519KeygenResult)return k.secretShare;throw"UnknownType"});return(await this.NATIVE).sr25519OfflineExportFullPrivateKey(secretShares)}async importPrivateKeyRecipient(roomUuid,threshold,keygenInit,keygenIds){const importKeygenResult=await(await this.NATIVE).sr25519ImportPrivateKeyRecipient(roomUuid,this.URL,threshold,keygenInit.keygenSecret,keygenIds),pubkey=(0,utils_1.hexToBytes)(importKeygenResult.pubkey),secretShareHex=importKeygenResult.secret_share;return new _1.Sr25519KeygenResult(pubkey,secretShareHex)}async importPrivateKeyImporter(roomUuid,threshold,privateKey,keygenInit,keygenIds,isPrivateKeyRaw=!1){const importKeygenResult=await(await this.NATIVE).sr25519ImportPrivateKeyImporter(roomUuid,this.URL,threshold,privateKey,keygenInit.keygenSecret,keygenIds,isPrivateKeyRaw),pubkey=(0,utils_1.hexToBytes)(importKeygenResult.pubkey),secretShareHex=importKeygenResult.secret_share;return new _1.Sr25519KeygenResult(pubkey,secretShareHex)}}exports.Sr25519=Sr25519;
|
package/internal/core/types.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.BIP340InitKeygenResult=exports.BIP340KeygenResult=exports.EcdsaSignature=exports.Sr25519InitKeygenResult=exports.ExportableEd25519InitKeygenResult=exports.ExportableEd25519KeygenResult=exports.Sr25519KeygenResult=exports.Ed25519InitKeygenResult=exports.Ed25519KeygenResult=exports.EcdsaInitKeygenResult=exports.EcdsaKeygenResult=exports.EcdsaPublicKey=exports.MessageHash=void 0;
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.BIP340InitKeygenResult=exports.BIP340KeygenResult=exports.EcdsaSignature=exports.Sr25519InitKeygenResult=exports.ExportableEd25519InitKeygenResult=exports.ExportableEd25519KeygenResult=exports.Sr25519KeygenResult=exports.Ed25519InitKeygenResult=exports.Ed25519KeygenResult=exports.EcdsaInitKeygenResult=exports.EcdsaKeygenResult=exports.EcdsaPublicKey=exports.MessageHash=void 0;const utils_1=require("@noble/hashes/utils"),sha3_1=require("@noble/hashes/sha3"),sha256_1=require("@noble/hashes/sha256");class MessageHash{constructor(bytes){if(this.bytes=new Uint8Array,"string"==typeof bytes){if(bytes.length!==2*MessageHash.LENGTH)throw new Error("Invalid length for MessageHash: "+bytes.length);this.bytes=(0,utils_1.hexToBytes)(bytes)}else{if(bytes.length!==MessageHash.LENGTH)throw new Error("Invalid length for MessageHash: "+bytes.length);this.bytes=bytes}}static sha256(message){return new MessageHash((0,sha256_1.sha256)(message))}static sha256d(message){return new MessageHash((0,sha256_1.sha256)((0,sha256_1.sha256)(message)))}static keccak256(message){return new MessageHash((0,sha3_1.keccak_256)(message))}toHex(){return(0,utils_1.bytesToHex)(this.bytes)}}exports.MessageHash=MessageHash,MessageHash.LENGTH=32;class EcdsaPublicKey{constructor(pubkey){if("string"==typeof pubkey&&(pubkey=(0,utils_1.hexToBytes)(pubkey)),pubkey.length===EcdsaPublicKey.LENGTH+1)this.pubkey=pubkey.slice(1);else{if(pubkey.length!==EcdsaPublicKey.LENGTH)throw new RangeError(`Invalid ${this.constructor.name} length, expected: ${EcdsaPublicKey.LENGTH} bytes, found: `+pubkey.length);this.pubkey=pubkey}}serializeUncompressed(){return new Uint8Array([4,...this.pubkey])}serializeCompressed(){const isOdd=1&this.pubkey[63];return new Uint8Array([2+isOdd,...this.pubkey.slice(0,32)])}pubKeyAsHex(){return(0,utils_1.bytesToHex)(this.serializeUncompressed())}}exports.EcdsaPublicKey=EcdsaPublicKey,EcdsaPublicKey.LENGTH=64;class EcdsaKeygenResult{constructor(pubkey,secretShare){this.pubkey=pubkey,this.secretShare=secretShare}}exports.EcdsaKeygenResult=EcdsaKeygenResult;class EcdsaInitKeygenResult{constructor(keygenId,keygenSecret){this.keygenId=keygenId,this.keygenSecret=keygenSecret}}exports.EcdsaInitKeygenResult=EcdsaInitKeygenResult;class Ed25519KeygenResult{constructor(pubkey,secretShare){this.pubkey=pubkey,this.secretShare=secretShare}}exports.Ed25519KeygenResult=Ed25519KeygenResult;class Ed25519InitKeygenResult{constructor(keygenId,keygenSecret){this.keygenId=keygenId,this.keygenSecret=keygenSecret}}exports.Ed25519InitKeygenResult=Ed25519InitKeygenResult;class Sr25519KeygenResult{constructor(pubkey,secretShare){this.pubkey=pubkey,this.secretShare=secretShare}}exports.Sr25519KeygenResult=Sr25519KeygenResult;class ExportableEd25519KeygenResult{constructor(pubkey,secretShare){this.pubkey=pubkey,this.secretShare=secretShare}}exports.ExportableEd25519KeygenResult=ExportableEd25519KeygenResult;class ExportableEd25519InitKeygenResult{constructor(keygenId,keygenSecret){this.keygenId=keygenId,this.keygenSecret=keygenSecret}}exports.ExportableEd25519InitKeygenResult=ExportableEd25519InitKeygenResult;class Sr25519InitKeygenResult{constructor(keygenId,keygenSecret){this.keygenId=keygenId,this.keygenSecret=keygenSecret}}exports.Sr25519InitKeygenResult=Sr25519InitKeygenResult;class EcdsaSignature{static fromBuffer(expandedSignature){"string"==typeof expandedSignature&&(expandedSignature=(0,utils_1.hexToBytes)(expandedSignature));const maxSize=2*EcdsaSignature.FIELD_SIZE+EcdsaSignature.MAX_DER_LEN+1,minSize=2*EcdsaSignature.FIELD_SIZE+EcdsaSignature.MIN_DER_LEN+1;if(expandedSignature.length<minSize||expandedSignature.length>maxSize)throw new RangeError(`Invalid ${this.constructor.name} length, expected between ${minSize}..${maxSize} bytes, found: `+expandedSignature.length);const r=expandedSignature.subarray(0,EcdsaSignature.FIELD_SIZE),s=expandedSignature.subarray(EcdsaSignature.FIELD_SIZE,2*EcdsaSignature.FIELD_SIZE),v=expandedSignature[2*EcdsaSignature.FIELD_SIZE],der=expandedSignature.subarray(2*EcdsaSignature.FIELD_SIZE+1);return new EcdsaSignature(r,s,v,der)}constructor(r,s,v,DERencoding){if(s.length!==EcdsaSignature.FIELD_SIZE)throw new RangeError(`Invalid 's' length, expected: ${EcdsaSignature.FIELD_SIZE} found: `+s.length);if(r.length!==EcdsaSignature.FIELD_SIZE)throw new RangeError(`Invalid 'r' length, expected: ${EcdsaSignature.FIELD_SIZE} found: `+r.length);if(!Number.isInteger(v)||v<27||30<v)throw new RangeError("Invalid 'v' value, expected 27/28/29/30 found: "+v);if(DERencoding.length<EcdsaSignature.MIN_DER_LEN||DERencoding.length>EcdsaSignature.MAX_DER_LEN)throw new RangeError(`Invalid DER encoding, expected length: ${EcdsaSignature.MIN_DER_LEN}..${EcdsaSignature.MAX_DER_LEN} found: `+DERencoding.length);this.r=r,this.s=s,this.v=v,this.der=DERencoding}}exports.EcdsaSignature=EcdsaSignature,EcdsaSignature.FIELD_SIZE=32,EcdsaSignature.MAX_DER_LEN=72,EcdsaSignature.MIN_DER_LEN=8;class BIP340KeygenResult{constructor(pubkey,secretShare){this.pubkey=pubkey,this.secretShare=secretShare}}exports.BIP340KeygenResult=BIP340KeygenResult;class BIP340InitKeygenResult{constructor(keygenId,keygenSecret){this.keygenId=keygenId,this.keygenSecret=keygenSecret}}exports.BIP340InitKeygenResult=BIP340InitKeygenResult;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let wasm
|
|
2
|
-
`+t.stack:r}function initKeygen(){return takeObject(wasm.initKeygen())}function createRoom(e,_,t){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),n=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),r=WASM_VECTOR_LEN;return takeObject(wasm.createRoom(e,n,_,t,r))}function passArrayJsValueToWasm0(_,e){var t=e(4*_.length,4)>>>0,n=getDataViewMemory0();for(let e=0;e<_.length;e++)n.setUint32(t+4*e,addHeapObject(_[e]),!0);return WASM_VECTOR_LEN=_.length,t}function ecdsaKeygen(e,_,t,n,r,a){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passStringToWasm0(r,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,a=passArrayJsValueToWasm0(a,wasm.__wbindgen_export_1),w=WASM_VECTOR_LEN;return takeObject(wasm.ecdsaKeygen(e,s,_,i,t,n,r,o,a,w))}let cachedUint32ArrayMemory0=null;function getUint32ArrayMemory0(){return cachedUint32ArrayMemory0=null!==cachedUint32ArrayMemory0&&0!==cachedUint32ArrayMemory0.byteLength?cachedUint32ArrayMemory0:new Uint32Array(wasm.memory.buffer)}function passArray32ToWasm0(e,_){_=_(4*e.length,4)>>>0;return getUint32ArrayMemory0().set(e,_/4),WASM_VECTOR_LEN=e.length,_}function ecdsaSign(e,_,t,n,r){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,r=passArray32ToWasm0(r,wasm.__wbindgen_export_1),w=WASM_VECTOR_LEN;return takeObject(wasm.ecdsaSign(e,a,_,s,t,i,n,o,r,w))}function ecdsaRefresh(e,_,t){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),n=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),r=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN;return takeObject(wasm.ecdsaRefresh(e,n,_,r,t,a))}function ecdsaReshareNewParty(e,_,t,n,r,a){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passStringToWasm0(r,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,a=passArrayJsValueToWasm0(a,wasm.__wbindgen_export_1),w=WASM_VECTOR_LEN;return takeObject(wasm.ecdsaReshareNewParty(e,s,_,i,t,n,r,o,a,w))}function ecdsaReshareRemainingParty(e,_,t,n,r){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passArrayJsValueToWasm0(r,wasm.__wbindgen_export_1),o=WASM_VECTOR_LEN;return takeObject(wasm.ecdsaReshareRemainingParty(e,a,_,s,t,n,i,r,o))}function ecdsaDerivePubkey(e,_){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),t=WASM_VECTOR_LEN,_=passArray32ToWasm0(_,wasm.__wbindgen_export_1),n=WASM_VECTOR_LEN;return takeObject(wasm.ecdsaDerivePubkey(e,t,_,n))}function ecdsaGetXpub(e){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),_=WASM_VECTOR_LEN;return takeObject(wasm.ecdsaGetXpub(e,_))}function ecdsaDerivePubkeyFromXpub(e,_){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),t=WASM_VECTOR_LEN,_=passArray32ToWasm0(_,wasm.__wbindgen_export_1),n=WASM_VECTOR_LEN;return takeObject(wasm.ecdsaDerivePubkeyFromXpub(e,t,_,n))}function ecdsaGetExportID(e){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),_=WASM_VECTOR_LEN;return takeObject(wasm.ecdsaGetExportID(e,_))}function ecdsaExportFullPrivateKey(e,_,t,n){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),r=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN;return takeObject(wasm.ecdsaExportFullPrivateKey(e,r,_,a,t,s,n,i))}function ecdsaOfflineExportFullPrivateKey(e){var e=passArrayJsValueToWasm0(e,wasm.__wbindgen_export_1),_=WASM_VECTOR_LEN;return takeObject(wasm.ecdsaOfflineExportFullPrivateKey(e,_))}function ecdsaDerivePrivateKeyFromXpriv(e,_){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),t=WASM_VECTOR_LEN,_=passArray32ToWasm0(_,wasm.__wbindgen_export_1),n=WASM_VECTOR_LEN;return takeObject(wasm.ecdsaDerivePrivateKeyFromXpriv(e,t,_,n))}function ecdsaImportPrivateKeyRecipient(e,_,t,n,r){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passArrayJsValueToWasm0(r,wasm.__wbindgen_export_1),o=WASM_VECTOR_LEN;return takeObject(wasm.ecdsaImportPrivateKeyRecipient(e,a,_,s,t,n,i,r,o))}function ecdsaImportPrivateKeyImporter(e,_,t,n,r,a){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,r=passStringToWasm0(r,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),w=WASM_VECTOR_LEN,a=passArrayJsValueToWasm0(a,wasm.__wbindgen_export_1),g=WASM_VECTOR_LEN;return takeObject(wasm.ecdsaImportPrivateKeyImporter(e,s,_,i,t,n,o,r,w,a,g))}function ed25519Keygen(e,_,t,n,r,a){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passStringToWasm0(r,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,a=passArrayJsValueToWasm0(a,wasm.__wbindgen_export_1),w=WASM_VECTOR_LEN;return takeObject(wasm.ed25519Keygen(e,s,_,i,t,n,r,o,a,w))}function ed25519Sign(e,_,t,n,r){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,r=passArray32ToWasm0(r,wasm.__wbindgen_export_1),w=WASM_VECTOR_LEN;return takeObject(wasm.ed25519Sign(e,a,_,s,t,i,n,o,r,w))}function ed25519Refresh(e,_,t){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),n=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),r=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN;return takeObject(wasm.ed25519Refresh(e,n,_,r,t,a))}function ed25519ReshareNewParty(e,_,t,n,r,a){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passStringToWasm0(r,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,a=passArrayJsValueToWasm0(a,wasm.__wbindgen_export_1),w=WASM_VECTOR_LEN;return takeObject(wasm.ed25519ReshareNewParty(e,s,_,i,t,n,r,o,a,w))}function ed25519ReshareRemainingParty(e,_,t,n,r){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passArrayJsValueToWasm0(r,wasm.__wbindgen_export_1),o=WASM_VECTOR_LEN;return takeObject(wasm.ed25519ReshareRemainingParty(e,a,_,s,t,n,i,r,o))}function ed25519DerivePubkey(e,_){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),t=WASM_VECTOR_LEN,_=passArray32ToWasm0(_,wasm.__wbindgen_export_1),n=WASM_VECTOR_LEN;return takeObject(wasm.ed25519DerivePubkey(e,t,_,n))}function ed25519GetSpub(e){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),_=WASM_VECTOR_LEN;return takeObject(wasm.ed25519GetSpub(e,_))}function ed25519DerivePubkeyFromSpub(e,_){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),t=WASM_VECTOR_LEN,_=passArray32ToWasm0(_,wasm.__wbindgen_export_1),n=WASM_VECTOR_LEN;return takeObject(wasm.ed25519DerivePubkeyFromSpub(e,t,_,n))}function ed25519GetExportID(e){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),_=WASM_VECTOR_LEN;return takeObject(wasm.ed25519GetExportID(e,_))}function ed25519ExportFullPrivateKey(e,_,t,n){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),r=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN;return takeObject(wasm.ed25519ExportFullPrivateKey(e,r,_,a,t,s,n,i))}function ed25519OfflineExportFullPrivateKey(e){var e=passArrayJsValueToWasm0(e,wasm.__wbindgen_export_1),_=WASM_VECTOR_LEN;return takeObject(wasm.ed25519OfflineExportFullPrivateKey(e,_))}function ed25519DerivePrivateKeyFromSpriv(e,_){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),t=WASM_VECTOR_LEN,_=passArray32ToWasm0(_,wasm.__wbindgen_export_1),n=WASM_VECTOR_LEN;return takeObject(wasm.ed25519DerivePrivateKeyFromSpriv(e,t,_,n))}function ed25519ImportPrivateKeyRecipient(e,_,t,n,r){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passArrayJsValueToWasm0(r,wasm.__wbindgen_export_1),o=WASM_VECTOR_LEN;return takeObject(wasm.ed25519ImportPrivateKeyRecipient(e,a,_,s,t,n,i,r,o))}function ed25519ImportPrivateKeyImporter(e,_,t,n,r,a,s){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),w=WASM_VECTOR_LEN,r=passStringToWasm0(r,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),g=WASM_VECTOR_LEN,a=passArrayJsValueToWasm0(a,wasm.__wbindgen_export_1),b=WASM_VECTOR_LEN;return takeObject(wasm.ed25519ImportPrivateKeyImporter(e,i,_,o,t,n,w,r,g,a,b,s))}function bip340Keygen(e,_,t,n,r,a){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passStringToWasm0(r,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,a=passArrayJsValueToWasm0(a,wasm.__wbindgen_export_1),w=WASM_VECTOR_LEN;return takeObject(wasm.bip340Keygen(e,s,_,i,t,n,r,o,a,w))}function bip340Sign(e,_,t,n,r,a){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),w=WASM_VECTOR_LEN,r=passArray32ToWasm0(r,wasm.__wbindgen_export_1),g=WASM_VECTOR_LEN,a=passStringToWasm0(a,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),b=WASM_VECTOR_LEN;return takeObject(wasm.bip340Sign(e,s,_,i,t,o,n,w,r,g,a,b))}function bip340Refresh(e,_,t){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),n=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),r=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN;return takeObject(wasm.bip340Refresh(e,n,_,r,t,a))}function bip340ReshareNewParty(e,_,t,n,r,a){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passStringToWasm0(r,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,a=passArrayJsValueToWasm0(a,wasm.__wbindgen_export_1),w=WASM_VECTOR_LEN;return takeObject(wasm.bip340ReshareNewParty(e,s,_,i,t,n,r,o,a,w))}function bip340ReshareRemainingParty(e,_,t,n,r){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passArrayJsValueToWasm0(r,wasm.__wbindgen_export_1),o=WASM_VECTOR_LEN;return takeObject(wasm.bip340ReshareRemainingParty(e,a,_,s,t,n,i,r,o))}function bip340DeriveTweakPubkey(e,_,t){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),n=WASM_VECTOR_LEN,_=passArray32ToWasm0(_,wasm.__wbindgen_export_1),r=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN;return takeObject(wasm.bip340DeriveTweakPubkey(e,n,_,r,t,a))}function bip340GetXpub(e){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),_=WASM_VECTOR_LEN;return takeObject(wasm.bip340GetXpub(e,_))}function bip340DeriveTweakPubkeyFromXpub(e,_,t){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),n=WASM_VECTOR_LEN,_=passArray32ToWasm0(_,wasm.__wbindgen_export_1),r=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN;return takeObject(wasm.bip340DeriveTweakPubkeyFromXpub(e,n,_,r,t,a))}function bip340GetExportID(e){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),_=WASM_VECTOR_LEN;return takeObject(wasm.bip340GetExportID(e,_))}function bip340ExportFullPrivateKey(e,_,t,n){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),r=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN;return takeObject(wasm.bip340ExportFullPrivateKey(e,r,_,a,t,s,n,i))}function bip340OfflineExportFullPrivateKey(e){var e=passArrayJsValueToWasm0(e,wasm.__wbindgen_export_1),_=WASM_VECTOR_LEN;return takeObject(wasm.bip340OfflineExportFullPrivateKey(e,_))}function bip340DerivePrivateKeyFromXpriv(e,_){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),t=WASM_VECTOR_LEN,_=passArray32ToWasm0(_,wasm.__wbindgen_export_1),n=WASM_VECTOR_LEN;return takeObject(wasm.bip340DerivePrivateKeyFromXpriv(e,t,_,n))}function bip340ImportPrivateKeyRecipient(e,_,t,n,r){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passArrayJsValueToWasm0(r,wasm.__wbindgen_export_1),o=WASM_VECTOR_LEN;return takeObject(wasm.bip340ImportPrivateKeyRecipient(e,a,_,s,t,n,i,r,o))}function bip340ImportPrivateKeyImporter(e,_,t,n,r,a){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,r=passStringToWasm0(r,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),w=WASM_VECTOR_LEN,a=passArrayJsValueToWasm0(a,wasm.__wbindgen_export_1),g=WASM_VECTOR_LEN;return takeObject(wasm.bip340ImportPrivateKeyImporter(e,s,_,i,t,n,o,r,w,a,g))}function exportableEd25519SampleKey(e,_,t,n,r,a){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passStringToWasm0(r,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,a=passArrayJsValueToWasm0(a,wasm.__wbindgen_export_1),w=WASM_VECTOR_LEN;return takeObject(wasm.exportableEd25519SampleKey(e,s,_,i,t,n,r,o,a,w))}function exportableEd25519ReceiveKey(e,_,t,n,r,a){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passStringToWasm0(r,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,a=passArrayJsValueToWasm0(a,wasm.__wbindgen_export_1),w=WASM_VECTOR_LEN;return takeObject(wasm.exportableEd25519ReceiveKey(e,s,_,i,t,n,r,o,a,w))}function exportableEd25519Sign(e,_,t,n){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),r=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN;return takeObject(wasm.exportableEd25519Sign(e,r,_,a,t,s,n,i))}function exportableEd25519Refresh(e,_,t){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),n=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),r=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN;return takeObject(wasm.exportableEd25519Refresh(e,n,_,r,t,a))}function exportableEd25519ReshareNewParty(e,_,t,n,r,a){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passStringToWasm0(r,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,a=passArrayJsValueToWasm0(a,wasm.__wbindgen_export_1),w=WASM_VECTOR_LEN;return takeObject(wasm.exportableEd25519ReshareNewParty(e,s,_,i,t,n,r,o,a,w))}function exportableEd25519ReshareRemainingParty(e,_,t,n,r){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passArrayJsValueToWasm0(r,wasm.__wbindgen_export_1),o=WASM_VECTOR_LEN;return takeObject(wasm.exportableEd25519ReshareRemainingParty(e,a,_,s,t,n,i,r,o))}function exportableEd25519GetPubkey(e){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),_=WASM_VECTOR_LEN;return takeObject(wasm.exportableEd25519GetPubkey(e,_))}function exportableEd25519GetExportID(e){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),_=WASM_VECTOR_LEN;return takeObject(wasm.exportableEd25519GetExportID(e,_))}function exportableEd25519ExportFullPrivateKey(e,_,t,n){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),r=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN;return takeObject(wasm.exportableEd25519ExportFullPrivateKey(e,r,_,a,t,s,n,i))}function exportableEd25519OfflineExportFullPrivateKey(e){var e=passArrayJsValueToWasm0(e,wasm.__wbindgen_export_1),_=WASM_VECTOR_LEN;return takeObject(wasm.exportableEd25519OfflineExportFullPrivateKey(e,_))}function exportableEd25519ImportPrivateKeyRecipient(e,_,t,n,r){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passArrayJsValueToWasm0(r,wasm.__wbindgen_export_1),o=WASM_VECTOR_LEN;return takeObject(wasm.exportableEd25519ImportPrivateKeyRecipient(e,a,_,s,t,n,i,r,o))}function exportableEd25519ImportPrivateKeyImporter(e,_,t,n,r,a){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,r=passStringToWasm0(r,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),w=WASM_VECTOR_LEN,a=passArrayJsValueToWasm0(a,wasm.__wbindgen_export_1),g=WASM_VECTOR_LEN;return takeObject(wasm.exportableEd25519ImportPrivateKeyImporter(e,s,_,i,t,n,o,r,w,a,g))}function sr25519Keygen(e,_,t,n,r,a){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passStringToWasm0(r,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,a=passArrayJsValueToWasm0(a,wasm.__wbindgen_export_1),w=WASM_VECTOR_LEN;return takeObject(wasm.sr25519Keygen(e,s,_,i,t,n,r,o,a,w))}function sr25519Sign(e,_,t,n,r){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,r=passArrayJsValueToWasm0(r,wasm.__wbindgen_export_1),w=WASM_VECTOR_LEN;return takeObject(wasm.sr25519Sign(e,a,_,s,t,i,n,o,r,w))}function sr25519Refresh(e,_,t){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),n=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),r=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN;return takeObject(wasm.sr25519Refresh(e,n,_,r,t,a))}function sr25519ReshareNewParty(e,_,t,n,r,a){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passStringToWasm0(r,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,a=passArrayJsValueToWasm0(a,wasm.__wbindgen_export_1),w=WASM_VECTOR_LEN;return takeObject(wasm.sr25519ReshareNewParty(e,s,_,i,t,n,r,o,a,w))}function sr25519ReshareRemainingParty(e,_,t,n,r){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passArrayJsValueToWasm0(r,wasm.__wbindgen_export_1),o=WASM_VECTOR_LEN;return takeObject(wasm.sr25519ReshareRemainingParty(e,a,_,s,t,n,i,r,o))}function sr25519DerivePubkey(e,_){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),t=WASM_VECTOR_LEN,_=passArrayJsValueToWasm0(_,wasm.__wbindgen_export_1),n=WASM_VECTOR_LEN;return takeObject(wasm.sr25519DerivePubkey(e,t,_,n))}function sr25519GetPubkey(e){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),_=WASM_VECTOR_LEN;return takeObject(wasm.sr25519GetPubkey(e,_))}function sr25519DerivePubkeyFromPubkey(e,_){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),t=WASM_VECTOR_LEN,_=passArrayJsValueToWasm0(_,wasm.__wbindgen_export_1),n=WASM_VECTOR_LEN;return takeObject(wasm.sr25519DerivePubkeyFromPubkey(e,t,_,n))}function sr25519GetExportID(e){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),_=WASM_VECTOR_LEN;return takeObject(wasm.sr25519GetExportID(e,_))}function sr25519ExportFullPrivateKey(e,_,t,n){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),r=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,t=passStringToWasm0(t,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN;return takeObject(wasm.sr25519ExportFullPrivateKey(e,r,_,a,t,s,n,i))}function sr25519OfflineExportFullPrivateKey(e){var e=passArrayJsValueToWasm0(e,wasm.__wbindgen_export_1),_=WASM_VECTOR_LEN;return takeObject(wasm.sr25519OfflineExportFullPrivateKey(e,_))}function sr25519DerivePrivateKeyFromPrivateKey(e,_,t){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),n=WASM_VECTOR_LEN,_=passArrayJsValueToWasm0(_,wasm.__wbindgen_export_1),r=WASM_VECTOR_LEN;return takeObject(wasm.sr25519DerivePrivateKeyFromPrivateKey(e,n,_,r,t))}function sr25519ImportPrivateKeyRecipient(e,_,t,n,r){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),a=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),s=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,r=passArrayJsValueToWasm0(r,wasm.__wbindgen_export_1),o=WASM_VECTOR_LEN;return takeObject(wasm.sr25519ImportPrivateKeyRecipient(e,a,_,s,t,n,i,r,o))}function sr25519ImportPrivateKeyImporter(e,_,t,n,r,a,s){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),i=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),o=WASM_VECTOR_LEN,n=passStringToWasm0(n,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),w=WASM_VECTOR_LEN,r=passStringToWasm0(r,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),g=WASM_VECTOR_LEN,a=passArrayJsValueToWasm0(a,wasm.__wbindgen_export_1),b=WASM_VECTOR_LEN;return takeObject(wasm.sr25519ImportPrivateKeyImporter(e,i,_,o,t,n,w,r,g,a,b,s))}function start(){wasm.start()}function __wbg_adapter_28(e,_){wasm.__wbindgen_export_5(e,_)}function __wbg_adapter_33(e,_,t){wasm.__wbindgen_export_6(e,_,addHeapObject(t))}function __wbg_adapter_38(e,_,t){wasm.__wbindgen_export_7(e,_,addHeapObject(t))}function __wbg_adapter_85(e,_,t,n){wasm.__wbindgen_export_8(e,_,addHeapObject(t),addHeapObject(n))}let __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(e=>wasm.__wbg_keygeninit_free(e>>>0,1));class KeygenInit{static __wrap(e){e>>>=0;var _=Object.create(KeygenInit.prototype);return _.__wbg_ptr=e,KeygenInitFinalization.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){var e=this.__wbg_ptr;return this.__wbg_ptr=0,KeygenInitFinalization.unregister(this),e}free(){var e=this.__destroy_into_raw();wasm.__wbg_keygeninit_free(e,0)}get keypair(){let e,_;try{var t=wasm.__wbindgen_add_to_stack_pointer(-16),n=(wasm.__wbg_get_keygeninit_keypair(t,this.__wbg_ptr),getDataViewMemory0().getInt32(t+0,!0)),r=getDataViewMemory0().getInt32(t+4,!0);return getStringFromWasm0(e=n,_=r)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_export_4(e,_,1)}}get pubkey(){let e,_;try{var t=wasm.__wbindgen_add_to_stack_pointer(-16),n=(wasm.__wbg_get_keygeninit_pubkey(t,this.__wbg_ptr),getDataViewMemory0().getInt32(t+0,!0)),r=getDataViewMemory0().getInt32(t+4,!0);return getStringFromWasm0(e=n,_=r)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_export_4(e,_,1)}}constructor(e,_){var e=passStringToWasm0(e,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),t=WASM_VECTOR_LEN,_=passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),n=WASM_VECTOR_LEN,e=wasm.keygeninit_new(e,t,_,n);return this.__wbg_ptr=e>>>0,KeygenInitFinalization.register(this,this.__wbg_ptr,this),this}}let KeygenResultFinalization="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>wasm.__wbg_keygenresult_free(e>>>0,1));class KeygenResult{static __wrap(e){e>>>=0;var _=Object.create(KeygenResult.prototype);return _.__wbg_ptr=e,KeygenResultFinalization.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){var e=this.__wbg_ptr;return this.__wbg_ptr=0,KeygenResultFinalization.unregister(this),e}free(){var e=this.__destroy_into_raw();wasm.__wbg_keygenresult_free(e,0)}get secret_share(){let e,_;try{var t=wasm.__wbindgen_add_to_stack_pointer(-16),n=(wasm.__wbg_get_keygeninit_keypair(t,this.__wbg_ptr),getDataViewMemory0().getInt32(t+0,!0)),r=getDataViewMemory0().getInt32(t+4,!0);return getStringFromWasm0(e=n,_=r)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_export_4(e,_,1)}}get pubkey(){let e,_;try{var t=wasm.__wbindgen_add_to_stack_pointer(-16),n=(wasm.__wbg_get_keygeninit_pubkey(t,this.__wbg_ptr),getDataViewMemory0().getInt32(t+0,!0)),r=getDataViewMemory0().getInt32(t+4,!0);return getStringFromWasm0(e=n,_=r)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_export_4(e,_,1)}}}async function __wbg_load(_,e){if("function"==typeof Response&&_ instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(_,e)}catch(e){if("application/wasm"==_.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)}var t=await _.arrayBuffer();return WebAssembly.instantiate(t,e)}return(t=await WebAssembly.instantiate(_,e))instanceof WebAssembly.Instance?{instance:t,module:_}:t}function __wbg_get_imports(){var e={wbg:{}};return e.wbg.__wbg_abort_410ec47a64ac6117=function(e,_){getObject(e).abort(getObject(_))},e.wbg.__wbg_abort_775ef1d17fc65868=function(e){getObject(e).abort()},e.wbg.__wbg_append_8c7dd8d641a5f01b=function(){return handleError(function(e,_,t,n,r){getObject(e).append(getStringFromWasm0(_,t),getStringFromWasm0(n,r))},arguments)},e.wbg.__wbg_buffer_609cc3eee51ed158=function(e){return addHeapObject(getObject(e).buffer)},e.wbg.__wbg_call_672a4d21634d4a24=function(){return handleError(function(e,_){return addHeapObject(getObject(e).call(getObject(_)))},arguments)},e.wbg.__wbg_call_7cccdd69e0791ae2=function(){return handleError(function(e,_,t){return addHeapObject(getObject(e).call(getObject(_),getObject(t)))},arguments)},e.wbg.__wbg_clearTimeout_86721db0036bea98=function(e){return addHeapObject(clearTimeout(takeObject(e)))},e.wbg.__wbg_clearTimeout_96804de0ab838f26=function(e){return addHeapObject(clearTimeout(takeObject(e)))},e.wbg.__wbg_close_2893b7d056a0627d=function(){return handleError(function(e){getObject(e).close()},arguments)},e.wbg.__wbg_close_e1253d480ed93ce3=function(){return handleError(function(e,_,t,n){getObject(e).close(_,getStringFromWasm0(t,n))},arguments)},e.wbg.__wbg_code_f4ec1e6e2e1b0417=function(e){return getObject(e).code},e.wbg.__wbg_crypto_574e78ad8b13b65f=function(e){return addHeapObject(getObject(e).crypto)},e.wbg.__wbg_data_432d9c3df2630942=function(e){return addHeapObject(getObject(e).data)},e.wbg.__wbg_done_769e5ede4b31c67b=function(e){return getObject(e).done},e.wbg.__wbg_fetch_509096533071c657=function(e,_){return addHeapObject(getObject(e).fetch(getObject(_)))},e.wbg.__wbg_fetch_d36a73832f0a45e8=function(e){return addHeapObject(fetch(getObject(e)))},e.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return handleError(function(e,_){getObject(e).getRandomValues(getObject(_))},arguments)},e.wbg.__wbg_get_67b2ba62fc30de12=function(){return handleError(function(e,_){return addHeapObject(Reflect.get(getObject(e),getObject(_)))},arguments)},e.wbg.__wbg_has_a5ea9117f258a0ec=function(){return handleError(function(e,_){return Reflect.has(getObject(e),getObject(_))},arguments)},e.wbg.__wbg_headers_9cb51cfd2ac780a4=function(e){return addHeapObject(getObject(e).headers)},e.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(e){let _;try{_=getObject(e)instanceof ArrayBuffer}catch(e){_=!1}return _},e.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644=function(e){let _;try{_=getObject(e)instanceof Response}catch(e){_=!1}return _},e.wbg.__wbg_iterator_9a24c88df860dc65=function(){return addHeapObject(Symbol.iterator)},e.wbg.__wbg_keygeninit_new=function(e){return addHeapObject(KeygenInit.__wrap(e))},e.wbg.__wbg_keygenresult_new=function(e){return addHeapObject(KeygenResult.__wrap(e))},e.wbg.__wbg_length_a446193dc22c12f8=function(e){return getObject(e).length},e.wbg.__wbg_message_d1685a448ba00178=function(e,_){var _=passStringToWasm0(getObject(_).message,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),t=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(e+4,t,!0),getDataViewMemory0().setInt32(e+0,_,!0)},e.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(e){return addHeapObject(getObject(e).msCrypto)},e.wbg.__wbg_new_018dcc2d6c8c2f6a=function(){return handleError(function(){return addHeapObject(new Headers)},arguments)},e.wbg.__wbg_new_23a2665fac83c611=function(e,_){try{var n={a:e,b:_};return addHeapObject(new Promise((e,_)=>{var t=n.a;n.a=0;try{return __wbg_adapter_85(t,n.b,e,_)}finally{n.a=t}}))}finally{n.a=n.b=0}},e.wbg.__wbg_new_405e22f390576ce2=function(){return addHeapObject(new Object)},e.wbg.__wbg_new_92c54fc74574ef55=function(){return handleError(function(e,_){return addHeapObject(new WebSocket(getStringFromWasm0(e,_)))},arguments)},e.wbg.__wbg_new_a12002a7f91c75be=function(e){return addHeapObject(new Uint8Array(getObject(e)))},e.wbg.__wbg_new_e25e5aab09ff45db=function(){return handleError(function(){return addHeapObject(new AbortController)},arguments)},e.wbg.__wbg_newnoargs_105ed471475aaf50=function(e,_){return addHeapObject(new Function(getStringFromWasm0(e,_)))},e.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(e,_,t){return addHeapObject(new Uint8Array(getObject(e),_>>>0,t>>>0))},e.wbg.__wbg_newwithlength_a381634e90c276d4=function(e){return addHeapObject(new Uint8Array(e>>>0))},e.wbg.__wbg_newwithstrandinit_06c535e0a867c635=function(){return handleError(function(e,_,t){return addHeapObject(new Request(getStringFromWasm0(e,_),getObject(t)))},arguments)},e.wbg.__wbg_next_25feadfc0913fea9=function(e){return addHeapObject(getObject(e).next)},e.wbg.__wbg_next_6574e1a8a62d1055=function(){return handleError(function(e){return addHeapObject(getObject(e).next())},arguments)},e.wbg.__wbg_node_905d3e251edff8a2=function(e){return addHeapObject(getObject(e).node)},e.wbg.__wbg_process_dc0fbacc7c1c06f7=function(e){return addHeapObject(getObject(e).process)},e.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5=function(e){queueMicrotask(getObject(e))},e.wbg.__wbg_queueMicrotask_d3219def82552485=function(e){return addHeapObject(getObject(e).queueMicrotask)},e.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return handleError(function(e,_){getObject(e).randomFillSync(takeObject(_))},arguments)},e.wbg.__wbg_readyState_7ef6e63c349899ed=function(e){return getObject(e).readyState},e.wbg.__wbg_reason_49f1cede8bcf23dd=function(e,_){var _=passStringToWasm0(getObject(_).reason,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),t=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(e+4,t,!0),getDataViewMemory0().setInt32(e+0,_,!0)},e.wbg.__wbg_require_60cc747a6bc5215a=function(){return handleError(function(){return addHeapObject(module.require)},arguments)},e.wbg.__wbg_resolve_4851785c9c5f573d=function(e){return addHeapObject(Promise.resolve(getObject(e)))},e.wbg.__wbg_send_0293179ba074ffb4=function(){return handleError(function(e,_,t){getObject(e).send(getStringFromWasm0(_,t))},arguments)},e.wbg.__wbg_send_fc0c204e8a1757f4=function(){return handleError(function(e,_,t){getObject(e).send(getArrayU8FromWasm0(_,t))},arguments)},e.wbg.__wbg_setTimeout_2e707715f8cc9497=function(e,_){return addHeapObject(setTimeout(getObject(e),_))},e.wbg.__wbg_setTimeout_eefe7f4c234b0c6b=function(){return handleError(function(e,_){return addHeapObject(setTimeout(getObject(e),_))},arguments)},e.wbg.__wbg_set_65595bdd868b3009=function(e,_,t){getObject(e).set(getObject(_),t>>>0)},e.wbg.__wbg_setbinaryType_92fa1ffd873b327c=function(e,_){getObject(e).binaryType=__wbindgen_enum_BinaryType[_]},e.wbg.__wbg_setbody_5923b78a95eedf29=function(e,_){getObject(e).body=getObject(_)},e.wbg.__wbg_setcredentials_c3a22f1cd105a2c6=function(e,_){getObject(e).credentials=__wbindgen_enum_RequestCredentials[_]},e.wbg.__wbg_setheaders_834c0bdb6a8949ad=function(e,_){getObject(e).headers=getObject(_)},e.wbg.__wbg_setmethod_3c5280fe5d890842=function(e,_,t){getObject(e).method=getStringFromWasm0(_,t)},e.wbg.__wbg_setmode_5dc300b865044b65=function(e,_){getObject(e).mode=__wbindgen_enum_RequestMode[_]},e.wbg.__wbg_setonclose_14fc475a49d488fc=function(e,_){getObject(e).onclose=getObject(_)},e.wbg.__wbg_setonerror_8639efe354b947cd=function(e,_){getObject(e).onerror=getObject(_)},e.wbg.__wbg_setonmessage_6eccab530a8fb4c7=function(e,_){getObject(e).onmessage=getObject(_)},e.wbg.__wbg_setonopen_2da654e1f39745d5=function(e,_){getObject(e).onopen=getObject(_)},e.wbg.__wbg_setsignal_75b21ef3a81de905=function(e,_){getObject(e).signal=getObject(_)},e.wbg.__wbg_signal_aaf9ad74119f20a4=function(e){return addHeapObject(getObject(e).signal)},e.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){var e="undefined"==typeof global?null:global;return isLikeNone(e)?0:addHeapObject(e)},e.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){var e="undefined"==typeof globalThis?null:globalThis;return isLikeNone(e)?0:addHeapObject(e)},e.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){var e="undefined"==typeof self?null:self;return isLikeNone(e)?0:addHeapObject(e)},e.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){var e="undefined"==typeof window?null:window;return isLikeNone(e)?0:addHeapObject(e)},e.wbg.__wbg_status_f6360336ca686bf0=function(e){return getObject(e).status},e.wbg.__wbg_stringify_f7ed6987935b4a24=function(){return handleError(function(e){return addHeapObject(JSON.stringify(getObject(e)))},arguments)},e.wbg.__wbg_subarray_aa9065fa9dc5df96=function(e,_,t){return addHeapObject(getObject(e).subarray(_>>>0,t>>>0))},e.wbg.__wbg_text_7805bea50de2af49=function(){return handleError(function(e){return addHeapObject(getObject(e).text())},arguments)},e.wbg.__wbg_then_44b73946d2fb3e7d=function(e,_){return addHeapObject(getObject(e).then(getObject(_)))},e.wbg.__wbg_then_48b406749878a531=function(e,_,t){return addHeapObject(getObject(e).then(getObject(_),getObject(t)))},e.wbg.__wbg_url_ae10c34ca209681d=function(e,_){var _=passStringToWasm0(getObject(_).url,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),t=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(e+4,t,!0),getDataViewMemory0().setInt32(e+0,_,!0)},e.wbg.__wbg_value_cd1ffa7b1ab794f1=function(e){return addHeapObject(getObject(e).value)},e.wbg.__wbg_versions_c01dfd4722a88165=function(e){return addHeapObject(getObject(e).versions)},e.wbg.__wbg_wasClean_605b4fd66d44354a=function(e){return getObject(e).wasClean},e.wbg.__wbindgen_cb_drop=function(e){e=takeObject(e).original;return 1==e.cnt--&&!(e.a=0)},e.wbg.__wbindgen_closure_wrapper1508=function(e,_,t){return addHeapObject(makeMutClosure(e,_,59,__wbg_adapter_28))},e.wbg.__wbindgen_closure_wrapper2318=function(e,_,t){return addHeapObject(makeMutClosure(e,_,90,__wbg_adapter_28))},e.wbg.__wbindgen_closure_wrapper3377=function(e,_,t){return addHeapObject(makeMutClosure(e,_,90,__wbg_adapter_33))},e.wbg.__wbindgen_closure_wrapper3382=function(e,_,t){return addHeapObject(makeMutClosure(e,_,90,__wbg_adapter_33))},e.wbg.__wbindgen_closure_wrapper3385=function(e,_,t){return addHeapObject(makeClosure(e,_,90,__wbg_adapter_38))},e.wbg.__wbindgen_closure_wrapper3390=function(e,_,t){return addHeapObject(makeClosure(e,_,90,__wbg_adapter_38))},e.wbg.__wbindgen_closure_wrapper3392=function(e,_,t){return addHeapObject(makeClosure(e,_,90,__wbg_adapter_38))},e.wbg.__wbindgen_closure_wrapper4277=function(e,_,t){return addHeapObject(makeMutClosure(e,_,90,__wbg_adapter_33))},e.wbg.__wbindgen_debug_string=function(e,_){var _=passStringToWasm0(debugString(getObject(_)),wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),t=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(e+4,t,!0),getDataViewMemory0().setInt32(e+0,_,!0)},e.wbg.__wbindgen_error_new=function(e,_){return addHeapObject(new Error(getStringFromWasm0(e,_)))},e.wbg.__wbindgen_is_function=function(e){return"function"==typeof getObject(e)},e.wbg.__wbindgen_is_object=function(e){e=getObject(e);return"object"==typeof e&&null!==e},e.wbg.__wbindgen_is_string=function(e){return"string"==typeof getObject(e)},e.wbg.__wbindgen_is_undefined=function(e){return void 0===getObject(e)},e.wbg.__wbindgen_memory=function(){return addHeapObject(wasm.memory)},e.wbg.__wbindgen_object_clone_ref=function(e){return addHeapObject(getObject(e))},e.wbg.__wbindgen_object_drop_ref=function(e){takeObject(e)},e.wbg.__wbindgen_string_get=function(e,_){var _=getObject(_),_="string"==typeof _?_:void 0,_=isLikeNone(_)?0:passStringToWasm0(_,wasm.__wbindgen_export_1,wasm.__wbindgen_export_2),t=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(e+4,t,!0),getDataViewMemory0().setInt32(e+0,_,!0)},e.wbg.__wbindgen_string_new=function(e,_){return addHeapObject(getStringFromWasm0(e,_))},e.wbg.__wbindgen_throw=function(e,_){throw new Error(getStringFromWasm0(e,_))},e}function __wbg_init_memory(e,_){}function __wbg_finalize_init(e,_){return wasm=e.exports,__wbg_init.__wbindgen_wasm_module=_,cachedDataViewMemory0=null,cachedUint32ArrayMemory0=null,cachedUint8ArrayMemory0=null,wasm.__wbindgen_start(),wasm}function initSync(e){if(void 0!==wasm)return wasm;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?e=e.module:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));var _=__wbg_get_imports(),_=(__wbg_init_memory(_),e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e)),new WebAssembly.Instance(e,_));return __wbg_finalize_init(_,e)}async function __wbg_init(e){if(void 0!==wasm)return wasm;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?e=e.module_or_path:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===e&&(e=new URL("libmpc_executor_bg.wasm",import.meta.url));var _=__wbg_get_imports(),{instance:e,module:_}=(("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e)),__wbg_init_memory(_),await __wbg_load(await e,_));return __wbg_finalize_init(e,_)}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};
|
|
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};
|
package/internal/web/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EcdsaInitKeygenResult, Ecdsa as EcdsaInternal, EcdsaKeygenResult, EcdsaPublicKey, EcdsaSignature, Ed25519InitKeygenResult, Ed25519 as Ed25519Internal, Ed25519KeygenResult, ExportableEd25519InitKeygenResult, ExportableEd25519 as ExportableEd25519Internal, ExportableEd25519KeygenResult, Sr25519InitKeygenResult, Sr25519 as Sr25519Internal, Sr25519KeygenResult, BIP340InitKeygenResult, BIP340 as BIP340Internal, BIP340KeygenResult, MessageHash } from '../core';
|
|
1
|
+
import { EcdsaInitKeygenResult, Ecdsa as EcdsaInternal, EcdsaKeygenResult, EcdsaPublicKey, EcdsaSignature, Ed25519InitKeygenResult, Ed25519 as Ed25519Internal, Ed25519KeygenResult, ExportableEd25519InitKeygenResult, ExportableEd25519 as ExportableEd25519Internal, ExportableEd25519KeygenResult, Sr25519InitKeygenResult, Sr25519 as Sr25519Internal, Sr25519KeygenResult, BIP340InitKeygenResult, BIP340 as BIP340Internal, BIP340KeygenResult, MessageHash } from '../core/index.d.ts';
|
|
2
2
|
export { EcdsaKeygenResult, EcdsaPublicKey, EcdsaSignature, Ed25519KeygenResult, ExportableEd25519KeygenResult, ExportableEd25519InitKeygenResult, Sr25519KeygenResult, MessageHash, EcdsaInitKeygenResult, Ed25519InitKeygenResult, Sr25519InitKeygenResult, BIP340InitKeygenResult, BIP340KeygenResult, };
|
|
3
3
|
export declare class Ecdsa extends EcdsaInternal {
|
|
4
4
|
constructor(hostUrl?: string);
|
package/internal/web/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{EcdsaInitKeygenResult,Ecdsa as EcdsaInternal,EcdsaKeygenResult,EcdsaPublicKey,EcdsaSignature,Ed25519InitKeygenResult,Ed25519 as Ed25519Internal,Ed25519KeygenResult,ExportableEd25519InitKeygenResult,ExportableEd25519 as ExportableEd25519Internal,ExportableEd25519KeygenResult,Sr25519InitKeygenResult,Sr25519 as Sr25519Internal,Sr25519KeygenResult,BIP340InitKeygenResult,BIP340 as BIP340Internal,BIP340KeygenResult,MessageHash}from"../core";import init,*as sdkAPI from"./generated/libmpc_executor.js";
|
|
1
|
+
import{EcdsaInitKeygenResult,Ecdsa as EcdsaInternal,EcdsaKeygenResult,EcdsaPublicKey,EcdsaSignature,Ed25519InitKeygenResult,Ed25519 as Ed25519Internal,Ed25519KeygenResult,ExportableEd25519InitKeygenResult,ExportableEd25519 as ExportableEd25519Internal,ExportableEd25519KeygenResult,Sr25519InitKeygenResult,Sr25519 as Sr25519Internal,Sr25519KeygenResult,BIP340InitKeygenResult,BIP340 as BIP340Internal,BIP340KeygenResult,MessageHash}from"../core/index.cjs";import init,*as sdkAPI from"./generated/libmpc_executor.js";const DEFAULT_RELAY_URL="relay.dynamicauth.com",sdkPromise=init().then(()=>({initKeygen:sdkAPI.initKeygen,createRoom:sdkAPI.createRoom,ecdsaGetExportID:sdkAPI.ecdsaGetExportID,ecdsaKeygen:sdkAPI.ecdsaKeygen,ecdsaSign:(roomUUID,hostUrl,secretShare,msgHex,derivationPath)=>sdkAPI.ecdsaSign(roomUUID,hostUrl,secretShare,msgHex,new Uint32Array(derivationPath)),ecdsaRefresh:sdkAPI.ecdsaRefresh,ecdsaReshareNewParty:sdkAPI.ecdsaReshareNewParty,ecdsaReshareRemainingParty:sdkAPI.ecdsaReshareRemainingParty,ecdsaDerivePubkey:(secretShare,derive)=>sdkAPI.ecdsaDerivePubkey(secretShare,new Uint32Array(derive)),ecdsaGetXpub:sdkAPI.ecdsaGetXpub,ecdsaDerivePubkeyFromXpub:async(xpub,derive)=>sdkAPI.ecdsaDerivePubkeyFromXpub(xpub,new Uint32Array(derive)),ecdsaExportFullPrivateKey:sdkAPI.ecdsaExportFullPrivateKey,ecdsaOfflineExportFullPrivateKey:sdkAPI.ecdsaOfflineExportFullPrivateKey,ecdsaDerivePrivateKeyFromXpriv:async(xpriv,derive)=>sdkAPI.ecdsaDerivePrivateKeyFromXpriv(xpriv,new Uint32Array(derive)),ecdsaImportPrivateKeyRecipient:sdkAPI.ecdsaImportPrivateKeyRecipient,ecdsaImportPrivateKeyImporter:sdkAPI.ecdsaImportPrivateKeyImporter,ed25519GetExportID:sdkAPI.ed25519GetExportID,ed25519Keygen:sdkAPI.ed25519Keygen,ed25519Sign:(roomUUID,hostUrl,secretShare,msgHex,derivationPath)=>sdkAPI.ed25519Sign(roomUUID,hostUrl,secretShare,msgHex,new Uint32Array(derivationPath)),ed25519Refresh:sdkAPI.ed25519Refresh,ed25519ReshareNewParty:sdkAPI.ed25519ReshareNewParty,ed25519ReshareRemainingParty:sdkAPI.ed25519ReshareRemainingParty,ed25519DerivePubkey:(secretShare,derive)=>sdkAPI.ed25519DerivePubkey(secretShare,new Uint32Array(derive)),ed25519GetSpub:sdkAPI.ed25519GetSpub,ed25519DerivePubkeyFromSpub:async(spub,derive)=>sdkAPI.ed25519DerivePubkeyFromSpub(spub,new Uint32Array(derive)),ed25519ExportFullPrivateKey:sdkAPI.ed25519ExportFullPrivateKey,ed25519OfflineExportFullPrivateKey:sdkAPI.ed25519OfflineExportFullPrivateKey,ed25519DerivePrivateKeyFromSpriv:async(spriv,derive)=>sdkAPI.ed25519DerivePrivateKeyFromSpriv(spriv,new Uint32Array(derive)),ed25519ImportPrivateKeyRecipient:sdkAPI.ed25519ImportPrivateKeyRecipient,ed25519ImportPrivateKeyImporter:sdkAPI.ed25519ImportPrivateKeyImporter,exportableEd25519GetExportID:sdkAPI.exportableEd25519GetExportID,exportableEd25519SampleKey:sdkAPI.exportableEd25519SampleKey,exportableEd25519ReceiveKey:sdkAPI.exportableEd25519ReceiveKey,exportableEd25519Sign:(roomUUID,hostUrl,secretShare,msgHex)=>sdkAPI.exportableEd25519Sign(roomUUID,hostUrl,secretShare,msgHex),exportableEd25519Refresh:sdkAPI.exportableEd25519Refresh,exportableEd25519ReshareNewParty:sdkAPI.exportableEd25519ReshareNewParty,exportableEd25519ReshareRemainingParty:sdkAPI.exportableEd25519ReshareRemainingParty,exportableEd25519GetPubkey:sdkAPI.exportableEd25519GetPubkey,exportableEd25519ExportFullPrivateKey:sdkAPI.exportableEd25519ExportFullPrivateKey,exportableEd25519OfflineExportFullPrivateKey:sdkAPI.exportableEd25519OfflineExportFullPrivateKey,exportableEd25519ImportPrivateKeyRecipient:sdkAPI.exportableEd25519ImportPrivateKeyRecipient,exportableEd25519ImportPrivateKeyImporter:sdkAPI.exportableEd25519ImportPrivateKeyImporter,bip340GetExportID:sdkAPI.bip340GetExportID,bip340Keygen:sdkAPI.bip340Keygen,bip340Sign:async(roomUUID,hostUrl,secretShare,msgHex,derivationPath,tweak)=>sdkAPI.bip340Sign(roomUUID,hostUrl,secretShare,msgHex,new Uint32Array(derivationPath),tweak),bip340Refresh:sdkAPI.bip340Refresh,bip340ReshareNewParty:sdkAPI.bip340ReshareNewParty,bip340ReshareRemainingParty:sdkAPI.bip340ReshareRemainingParty,bip340DeriveTweakPubkey:async(secretShare,derive,tweak)=>sdkAPI.bip340DeriveTweakPubkey(secretShare,new Uint32Array(derive),tweak),bip340GetXpub:sdkAPI.bip340GetXpub,bip340DeriveTweakPubkeyFromXpub:async(xpub,derive,tweak)=>sdkAPI.bip340DeriveTweakPubkeyFromXpub(xpub,new Uint32Array(derive),tweak),bip340ExportFullPrivateKey:sdkAPI.bip340ExportFullPrivateKey,bip340DerivePrivateKeyFromXpriv:async(xpriv,derive)=>sdkAPI.bip340DerivePrivateKeyFromXpriv(xpriv,new Uint32Array(derive)),bip340OfflineExportFullPrivateKey:sdkAPI.bip340OfflineExportFullPrivateKey,bip340ImportPrivateKeyRecipient:sdkAPI.bip340ImportPrivateKeyRecipient,bip340ImportPrivateKeyImporter:sdkAPI.bip340ImportPrivateKeyImporter,sr25519GetExportID:sdkAPI.sr25519GetExportID,sr25519Keygen:sdkAPI.sr25519Keygen,sr25519Sign:sdkAPI.sr25519Sign,sr25519Refresh:sdkAPI.sr25519Refresh,sr25519ReshareNewParty:sdkAPI.sr25519ReshareNewParty,sr25519ReshareRemainingParty:sdkAPI.sr25519ReshareRemainingParty,sr25519DerivePubkey:sdkAPI.sr25519DerivePubkey,sr25519GetPubkey:sdkAPI.sr25519GetPubkey,sr25519DerivePubkeyFromPubkey:sdkAPI.sr25519DerivePubkeyFromPubkey,sr25519ExportFullPrivateKey:sdkAPI.sr25519ExportFullPrivateKey,sr25519DerivePrivateKeyFromPrivateKey:sdkAPI.sr25519DerivePrivateKeyFromPrivateKey,sr25519OfflineExportFullPrivateKey:sdkAPI.sr25519OfflineExportFullPrivateKey,sr25519ImportPrivateKeyRecipient:sdkAPI.sr25519ImportPrivateKeyRecipient,sr25519ImportPrivateKeyImporter:sdkAPI.sr25519ImportPrivateKeyImporter}));class Ecdsa extends EcdsaInternal{constructor(hostUrl){super(sdkPromise,hostUrl||DEFAULT_RELAY_URL)}}class Ed25519 extends Ed25519Internal{constructor(hostUrl){super(sdkPromise,hostUrl||DEFAULT_RELAY_URL)}}class Sr25519 extends Sr25519Internal{constructor(hostUrl){super(sdkPromise,hostUrl||DEFAULT_RELAY_URL)}}class ExportableEd25519 extends ExportableEd25519Internal{constructor(hostUrl){super(sdkPromise,hostUrl||DEFAULT_RELAY_URL)}}class BIP340 extends BIP340Internal{constructor(hostUrl){super(sdkPromise,hostUrl||DEFAULT_RELAY_URL)}}export{EcdsaKeygenResult,EcdsaPublicKey,EcdsaSignature,Ed25519KeygenResult,ExportableEd25519KeygenResult,ExportableEd25519InitKeygenResult,Sr25519KeygenResult,MessageHash,EcdsaInitKeygenResult,Ed25519InitKeygenResult,Sr25519InitKeygenResult,BIP340InitKeygenResult,BIP340KeygenResult,Ecdsa,Ed25519,Sr25519,ExportableEd25519,BIP340};
|
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.203",
|
|
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.203",
|
|
8
8
|
"@dynamic-labs/logger": "^4.25.3",
|
|
9
9
|
"@dynamic-labs/sdk-api-core": "^0.0.818",
|
|
10
10
|
"argon2id": "1.0.1",
|