@seams/wallet 0.30.0 → 0.33.0
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/README.md +7 -7
- package/THIRD_PARTY_NOTICES.md +1 -127
- package/dist/.build-inputs.sha256 +1 -1
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuFooter.js +38 -10
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuSurface.js +23 -67
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/RecoveryOptions.js +60 -0
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/mountAuthMenuSurface.js +6 -0
- package/dist/esm/SeamsWeb/walletIframe/shared/authMenuPresentation.js +28 -0
- package/dist/esm/SeamsWeb/walletIframe/shared/messages.js +21 -10
- package/dist/esm/SeamsWeb/walletIframe/shared/walletAlternatives.js +4 -14
- package/dist/esm/core/ui/walletIcon.js +11 -3
- package/dist/esm/externalNear/controller.js +3 -2
- package/dist/esm/externalNear/meteor.js +1 -1
- package/dist/esm/externalNear/meteorRequest.js +8 -2
- package/dist/esm/react/components/HostedSeamsAuthMenu/shell.js +17 -1
- package/dist/esm/sdk/{host-Csu5L7VF.js → host-BsVFOugh.js} +1 -1
- package/dist/esm/sdk/ownerNearOperation-BsIdSH0C.js +1 -0
- package/dist/esm/sdk/registration-Coh0_Nva.js +1 -0
- package/dist/esm/sdk/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/esm/sdk/runtime-auth-CJCU2yJi.js +1 -0
- package/dist/esm/sdk/{runtime-device-link-DQe0aqRi.js → runtime-device-link-C0oXLSnz.js} +1 -1
- package/dist/esm/sdk/{runtime-ecdsa-tempo-DKkeMMpm.js → runtime-ecdsa-tempo-BC8u9NuI.js} +1 -1
- package/dist/esm/sdk/{runtime-email-otp-CzTe7r9I.js → runtime-email-otp-Cl4iu0z7.js} +1 -1
- package/dist/esm/sdk/{runtime-export-BiyLbdCe.js → runtime-export-BdhfErGJ.js} +1 -1
- package/dist/esm/sdk/{runtime-near-Kk0n1FSf.js → runtime-near-CT2ALBct.js} +1 -1
- package/dist/esm/sdk/{runtime-preferences-B-A3hddU.js → runtime-preferences-fN2G9tct.js} +1 -1
- package/dist/esm/sdk/{runtime-recovery-C9p1TU1w.js → runtime-recovery-n-TGLkwz.js} +1 -1
- package/dist/esm/sdk/{runtimeContext-ChuvOC0h.js → runtimeContext-DI28d8Qu.js} +1 -1
- package/dist/esm/sdk/wallet-iframe-host-ecdsa.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-full.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-near.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-runtime.js +1 -1
- package/dist/esm/sdk/wallet-service.css +2 -0
- package/dist/esm/sdk/wallet-ui.css +1 -1
- package/dist/esm/wasm/near_signer/pkg/wasm_signer_worker_bg.wasm +0 -0
- package/dist/esm/wasm/router_ab_ecdsa_client/pkg/router_ab_ecdsa_client_bg.wasm +0 -0
- package/dist/esm/wasm/router_ab_ed25519_yao_client/pkg/router_ab_ed25519_yao_client.d.ts +212 -233
- package/dist/esm/wasm/router_ab_ed25519_yao_client/pkg/router_ab_ed25519_yao_client.js +675 -694
- package/dist/esm/wasm/router_ab_ed25519_yao_client/pkg/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/public/headers.manifest.json +1 -1
- package/dist/public/sdk/{host-Csu5L7VF.js → host-BsVFOugh.js} +1 -1
- package/dist/public/sdk/ownerNearOperation-BsIdSH0C.js +1 -0
- package/dist/public/sdk/registration-Coh0_Nva.js +1 -0
- package/dist/public/sdk/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/public/sdk/runtime-auth-CJCU2yJi.js +1 -0
- package/dist/public/sdk/{runtime-device-link-DQe0aqRi.js → runtime-device-link-C0oXLSnz.js} +1 -1
- package/dist/public/sdk/{runtime-ecdsa-tempo-DKkeMMpm.js → runtime-ecdsa-tempo-BC8u9NuI.js} +1 -1
- package/dist/public/sdk/{runtime-email-otp-CzTe7r9I.js → runtime-email-otp-Cl4iu0z7.js} +1 -1
- package/dist/public/sdk/{runtime-export-BiyLbdCe.js → runtime-export-BdhfErGJ.js} +1 -1
- package/dist/public/sdk/{runtime-near-Kk0n1FSf.js → runtime-near-CT2ALBct.js} +1 -1
- package/dist/public/sdk/{runtime-preferences-B-A3hddU.js → runtime-preferences-fN2G9tct.js} +1 -1
- package/dist/public/sdk/{runtime-recovery-C9p1TU1w.js → runtime-recovery-n-TGLkwz.js} +1 -1
- package/dist/public/sdk/{runtimeContext-ChuvOC0h.js → runtimeContext-DI28d8Qu.js} +1 -1
- package/dist/public/sdk/wallet-iframe-host-ecdsa.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-full.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-near.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-runtime.js +1 -1
- package/dist/public/sdk/wallet-service.css +2 -0
- package/dist/public/sdk/wallet-ui.css +1 -1
- package/dist/public/sdk/workers/device-linking-key.worker.js +454 -947
- package/dist/public/sdk/workers/email-otp.worker.js +588 -820
- package/dist/public/sdk/workers/evm_crypto_bg.wasm +0 -0
- package/dist/public/sdk/workers/passkey-mpc-export.worker.js +572 -804
- package/dist/public/sdk/workers/router_ab_ecdsa_client_bg.wasm +0 -0
- package/dist/public/sdk/workers/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/public/sdk/workers/tempo_signer_bg.wasm +0 -0
- package/dist/public/sdk/workers/wallet-custody-ceremony.worker.js +524 -971
- package/dist/public/sdk/workers/wallet_custody_ceremony_bg.wasm +0 -0
- package/dist/public/sdk/workers/wasm_signer_worker_bg.wasm +0 -0
- package/dist/public/wallet-assets.manifest.json +29 -29
- package/dist/public/wallet-service/index.html +4 -4
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuFooter.d.ts +4 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuSurface.d.ts +3 -1
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/RecoveryOptions.d.ts +11 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/mountAuthMenuSurface.d.ts +3 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/shared/authMenuPresentation.d.ts +13 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/shared/messages.d.ts +7 -1
- package/dist/types/wallet/src/core/ui/walletIcon.d.ts +1 -0
- package/dist/types/wallet/src/externalNear/meteorRequest.d.ts +3 -0
- package/dist/types/wallet/src/index.d.ts +1 -1
- package/dist/types/wallet/src/react/components/HostedSeamsAuthMenu/public.d.ts +1 -1
- package/dist/types/wallet/src/react/components/HostedSeamsAuthMenu/types.d.ts +6 -2
- package/dist/types/wallet/src/react/index.d.ts +1 -1
- package/dist/workers/device-linking-key.worker.js +454 -947
- package/dist/workers/email-otp.worker.js +588 -820
- package/dist/workers/evm_crypto_bg.wasm +0 -0
- package/dist/workers/passkey-mpc-export.worker.js +572 -804
- package/dist/workers/router_ab_ecdsa_client_bg.wasm +0 -0
- package/dist/workers/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/workers/tempo_signer_bg.wasm +0 -0
- package/dist/workers/wallet-custody-ceremony.worker.js +524 -971
- package/dist/workers/wallet_custody_ceremony_bg.wasm +0 -0
- package/dist/workers/wasm_signer_worker_bg.wasm +0 -0
- package/package.json +17 -17
- package/dist/esm/sdk/ownerNearOperation-DCxxHcwX.js +0 -1
- package/dist/esm/sdk/registration-C7w_51wE.js +0 -1
- package/dist/esm/sdk/runtime-auth-BMT_gIKI.js +0 -1
- package/dist/public/sdk/ownerNearOperation-DCxxHcwX.js +0 -1
- package/dist/public/sdk/registration-C7w_51wE.js +0 -1
- package/dist/public/sdk/runtime-auth-BMT_gIKI.js +0 -1
|
@@ -1,9 +1,252 @@
|
|
|
1
1
|
//#region ../../crates/router-ab-ed25519-yao-client/pkg/router_ab_ed25519_yao_client.js
|
|
2
|
+
let wasm;
|
|
3
|
+
let WASM_VECTOR_LEN = 0;
|
|
4
|
+
let cachedUint8ArrayMemory0 = null;
|
|
5
|
+
function getUint8ArrayMemory0() {
|
|
6
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
7
|
+
return cachedUint8ArrayMemory0;
|
|
8
|
+
}
|
|
9
|
+
const cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : { encode: () => {
|
|
10
|
+
throw Error("TextEncoder not available");
|
|
11
|
+
} };
|
|
12
|
+
const encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function(arg, view) {
|
|
13
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
14
|
+
} : function(arg, view) {
|
|
15
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
16
|
+
view.set(buf);
|
|
17
|
+
return {
|
|
18
|
+
read: arg.length,
|
|
19
|
+
written: buf.length
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
23
|
+
if (realloc === void 0) {
|
|
24
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
25
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
26
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
27
|
+
WASM_VECTOR_LEN = buf.length;
|
|
28
|
+
return ptr;
|
|
29
|
+
}
|
|
30
|
+
let len = arg.length;
|
|
31
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
32
|
+
const mem = getUint8ArrayMemory0();
|
|
33
|
+
let offset = 0;
|
|
34
|
+
for (; offset < len; offset++) {
|
|
35
|
+
const code = arg.charCodeAt(offset);
|
|
36
|
+
if (code > 127) break;
|
|
37
|
+
mem[ptr + offset] = code;
|
|
38
|
+
}
|
|
39
|
+
if (offset !== len) {
|
|
40
|
+
if (offset !== 0) arg = arg.slice(offset);
|
|
41
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
42
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
43
|
+
const ret = encodeString(arg, view);
|
|
44
|
+
offset += ret.written;
|
|
45
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
46
|
+
}
|
|
47
|
+
WASM_VECTOR_LEN = offset;
|
|
48
|
+
return ptr;
|
|
49
|
+
}
|
|
50
|
+
let cachedDataViewMemory0 = null;
|
|
51
|
+
function getDataViewMemory0() {
|
|
52
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
53
|
+
return cachedDataViewMemory0;
|
|
54
|
+
}
|
|
55
|
+
function addToExternrefTable0(obj) {
|
|
56
|
+
const idx = wasm.__externref_table_alloc();
|
|
57
|
+
wasm.__wbindgen_export_4.set(idx, obj);
|
|
58
|
+
return idx;
|
|
59
|
+
}
|
|
60
|
+
function handleError(f, args) {
|
|
61
|
+
try {
|
|
62
|
+
return f.apply(this, args);
|
|
63
|
+
} catch (e) {
|
|
64
|
+
const idx = addToExternrefTable0(e);
|
|
65
|
+
wasm.__wbindgen_exn_store(idx);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", {
|
|
69
|
+
ignoreBOM: true,
|
|
70
|
+
fatal: true
|
|
71
|
+
}) : { decode: () => {
|
|
72
|
+
throw Error("TextDecoder not available");
|
|
73
|
+
} };
|
|
74
|
+
if (typeof TextDecoder !== "undefined") cachedTextDecoder.decode();
|
|
75
|
+
function getStringFromWasm0(ptr, len) {
|
|
76
|
+
ptr = ptr >>> 0;
|
|
77
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
78
|
+
}
|
|
79
|
+
function isLikeNone(x) {
|
|
80
|
+
return x === void 0 || x === null;
|
|
81
|
+
}
|
|
82
|
+
function debugString(val) {
|
|
83
|
+
const type = typeof val;
|
|
84
|
+
if (type == "number" || type == "boolean" || val == null) return `${val}`;
|
|
85
|
+
if (type == "string") return `"${val}"`;
|
|
86
|
+
if (type == "symbol") {
|
|
87
|
+
const description = val.description;
|
|
88
|
+
if (description == null) return "Symbol";
|
|
89
|
+
else return `Symbol(${description})`;
|
|
90
|
+
}
|
|
91
|
+
if (type == "function") {
|
|
92
|
+
const name = val.name;
|
|
93
|
+
if (typeof name == "string" && name.length > 0) return `Function(${name})`;
|
|
94
|
+
else return "Function";
|
|
95
|
+
}
|
|
96
|
+
if (Array.isArray(val)) {
|
|
97
|
+
const length = val.length;
|
|
98
|
+
let debug = "[";
|
|
99
|
+
if (length > 0) debug += debugString(val[0]);
|
|
100
|
+
for (let i = 1; i < length; i++) debug += ", " + debugString(val[i]);
|
|
101
|
+
debug += "]";
|
|
102
|
+
return debug;
|
|
103
|
+
}
|
|
104
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
105
|
+
let className;
|
|
106
|
+
if (builtInMatches && builtInMatches.length > 1) className = builtInMatches[1];
|
|
107
|
+
else return toString.call(val);
|
|
108
|
+
if (className == "Object") try {
|
|
109
|
+
return "Object(" + JSON.stringify(val) + ")";
|
|
110
|
+
} catch (_) {
|
|
111
|
+
return "Object";
|
|
112
|
+
}
|
|
113
|
+
if (val instanceof Error) return `${val.name}: ${val.message}\n${val.stack}`;
|
|
114
|
+
return className;
|
|
115
|
+
}
|
|
116
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
117
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
118
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
119
|
+
WASM_VECTOR_LEN = arg.length;
|
|
120
|
+
return ptr;
|
|
121
|
+
}
|
|
122
|
+
function takeFromExternrefTable0(idx) {
|
|
123
|
+
const value = wasm.__wbindgen_export_4.get(idx);
|
|
124
|
+
wasm.__externref_table_dealloc(idx);
|
|
125
|
+
return value;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Opens the wallet's Ed25519 continuity cache with any enrolled factor.
|
|
129
|
+
*
|
|
130
|
+
* **The unlock read side, and deliberately one call.** The custody seed
|
|
131
|
+
* exists only between opening the envelope and deriving the cache key.
|
|
132
|
+
* Splitting this into "open the envelope" and "open the cache" would put the
|
|
133
|
+
* seed in a caller's hands, and every caller here is JavaScript.
|
|
134
|
+
*
|
|
135
|
+
* Exported from *this* module rather than the ceremony's because the handle
|
|
136
|
+
* it returns has to be the one the signing path already uses: two wasm
|
|
137
|
+
* modules each define their own `WasmActivatedClientV1`, and a handle from
|
|
138
|
+
* the wrong module cannot sign.
|
|
139
|
+
*
|
|
140
|
+
* The caller never assembles the cache seal binding. It is rebuilt here from
|
|
141
|
+
* the record's own fields, because it is both HKDF input and AEAD associated
|
|
142
|
+
* data — a caller that assembled it even slightly differently would hold a
|
|
143
|
+
* record that never opens, and the failure would read as a bad factor.
|
|
144
|
+
*
|
|
145
|
+
* Any factor works, which is the point of sealing under the seed: a passkey
|
|
146
|
+
* enrolled long after registration opens the cache the Email OTP enrollment
|
|
147
|
+
* wrote, and the reverse.
|
|
148
|
+
* @param {Uint8Array} factor_secret
|
|
149
|
+
* @param {string} envelope_binding_json
|
|
150
|
+
* @param {Uint8Array} envelope_nonce
|
|
151
|
+
* @param {Uint8Array} envelope_ciphertext
|
|
152
|
+
* @param {Uint8Array} envelope_aad_hash
|
|
153
|
+
* @param {Uint8Array} envelope_ciphertext_digest
|
|
154
|
+
* @param {Uint8Array} application_binding_digest
|
|
155
|
+
* @param {Uint8Array} registered_public_key
|
|
156
|
+
* @param {bigint} state_epoch
|
|
157
|
+
* @param {number} client_participant_id
|
|
158
|
+
* @param {number} signing_worker_participant_id
|
|
159
|
+
* @param {Uint8Array} signing_worker_verifying_share
|
|
160
|
+
* @param {Uint8Array} cache_nonce
|
|
161
|
+
* @param {Uint8Array} cache_ciphertext
|
|
162
|
+
* @returns {WasmActivatedClientV1}
|
|
163
|
+
*/
|
|
164
|
+
function openWalletCustodyEd25519MaterialV1(factor_secret, envelope_binding_json, envelope_nonce, envelope_ciphertext, envelope_aad_hash, envelope_ciphertext_digest, application_binding_digest, registered_public_key, state_epoch, client_participant_id, signing_worker_participant_id, signing_worker_verifying_share, cache_nonce, cache_ciphertext) {
|
|
165
|
+
const ptr0 = passArray8ToWasm0(factor_secret, wasm.__wbindgen_malloc);
|
|
166
|
+
const len0 = WASM_VECTOR_LEN;
|
|
167
|
+
const ptr1 = passStringToWasm0(envelope_binding_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
168
|
+
const len1 = WASM_VECTOR_LEN;
|
|
169
|
+
const ptr2 = passArray8ToWasm0(envelope_nonce, wasm.__wbindgen_malloc);
|
|
170
|
+
const len2 = WASM_VECTOR_LEN;
|
|
171
|
+
const ptr3 = passArray8ToWasm0(envelope_ciphertext, wasm.__wbindgen_malloc);
|
|
172
|
+
const len3 = WASM_VECTOR_LEN;
|
|
173
|
+
const ptr4 = passArray8ToWasm0(envelope_aad_hash, wasm.__wbindgen_malloc);
|
|
174
|
+
const len4 = WASM_VECTOR_LEN;
|
|
175
|
+
const ptr5 = passArray8ToWasm0(envelope_ciphertext_digest, wasm.__wbindgen_malloc);
|
|
176
|
+
const len5 = WASM_VECTOR_LEN;
|
|
177
|
+
const ptr6 = passArray8ToWasm0(application_binding_digest, wasm.__wbindgen_malloc);
|
|
178
|
+
const len6 = WASM_VECTOR_LEN;
|
|
179
|
+
const ptr7 = passArray8ToWasm0(registered_public_key, wasm.__wbindgen_malloc);
|
|
180
|
+
const len7 = WASM_VECTOR_LEN;
|
|
181
|
+
const ptr8 = passArray8ToWasm0(signing_worker_verifying_share, wasm.__wbindgen_malloc);
|
|
182
|
+
const len8 = WASM_VECTOR_LEN;
|
|
183
|
+
const ptr9 = passArray8ToWasm0(cache_nonce, wasm.__wbindgen_malloc);
|
|
184
|
+
const len9 = WASM_VECTOR_LEN;
|
|
185
|
+
const ptr10 = passArray8ToWasm0(cache_ciphertext, wasm.__wbindgen_malloc);
|
|
186
|
+
const len10 = WASM_VECTOR_LEN;
|
|
187
|
+
const ret = wasm.openWalletCustodyEd25519MaterialV1(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7, state_epoch, client_participant_id, signing_worker_participant_id, ptr8, len8, ptr9, len9, ptr10, len10);
|
|
188
|
+
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
189
|
+
return WasmActivatedClientV1.__wrap(ret[0]);
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Opens a verified owner custody-seed envelope and derives the exact Client
|
|
193
|
+
* root for an approved lane job. This is the owner-capability branch; ordinary
|
|
194
|
+
* factor opens continue to require a dedicated Client-root envelope.
|
|
195
|
+
* @param {Uint8Array} factor_secret
|
|
196
|
+
* @param {string} envelope_binding_json
|
|
197
|
+
* @param {Uint8Array} envelope_nonce
|
|
198
|
+
* @param {Uint8Array} envelope_ciphertext
|
|
199
|
+
* @param {Uint8Array} envelope_aad_hash
|
|
200
|
+
* @param {Uint8Array} envelope_ciphertext_digest
|
|
201
|
+
* @param {Uint8Array} application_binding_digest
|
|
202
|
+
* @param {string} wallet_key_id
|
|
203
|
+
* @param {string} enrollment_id
|
|
204
|
+
* @param {bigint} revocation_epoch
|
|
205
|
+
* @param {Uint8Array} registered_public_key
|
|
206
|
+
* @returns {WasmEd25519YaoLaneSourceV1}
|
|
207
|
+
*/
|
|
208
|
+
function ed25519_yao_lane_source_from_wallet_seed_v1(factor_secret, envelope_binding_json, envelope_nonce, envelope_ciphertext, envelope_aad_hash, envelope_ciphertext_digest, application_binding_digest, wallet_key_id, enrollment_id, revocation_epoch, registered_public_key) {
|
|
209
|
+
const ptr0 = passArray8ToWasm0(factor_secret, wasm.__wbindgen_malloc);
|
|
210
|
+
const len0 = WASM_VECTOR_LEN;
|
|
211
|
+
const ptr1 = passStringToWasm0(envelope_binding_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
212
|
+
const len1 = WASM_VECTOR_LEN;
|
|
213
|
+
const ptr2 = passArray8ToWasm0(envelope_nonce, wasm.__wbindgen_malloc);
|
|
214
|
+
const len2 = WASM_VECTOR_LEN;
|
|
215
|
+
const ptr3 = passArray8ToWasm0(envelope_ciphertext, wasm.__wbindgen_malloc);
|
|
216
|
+
const len3 = WASM_VECTOR_LEN;
|
|
217
|
+
const ptr4 = passArray8ToWasm0(envelope_aad_hash, wasm.__wbindgen_malloc);
|
|
218
|
+
const len4 = WASM_VECTOR_LEN;
|
|
219
|
+
const ptr5 = passArray8ToWasm0(envelope_ciphertext_digest, wasm.__wbindgen_malloc);
|
|
220
|
+
const len5 = WASM_VECTOR_LEN;
|
|
221
|
+
const ptr6 = passArray8ToWasm0(application_binding_digest, wasm.__wbindgen_malloc);
|
|
222
|
+
const len6 = WASM_VECTOR_LEN;
|
|
223
|
+
const ptr7 = passStringToWasm0(wallet_key_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
224
|
+
const len7 = WASM_VECTOR_LEN;
|
|
225
|
+
const ptr8 = passStringToWasm0(enrollment_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
226
|
+
const len8 = WASM_VECTOR_LEN;
|
|
227
|
+
const ptr9 = passArray8ToWasm0(registered_public_key, wasm.__wbindgen_malloc);
|
|
228
|
+
const len9 = WASM_VECTOR_LEN;
|
|
229
|
+
const ret = wasm.ed25519_yao_lane_source_from_wallet_seed_v1(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7, ptr8, len8, revocation_epoch, ptr9, len9);
|
|
230
|
+
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
231
|
+
return WasmEd25519YaoLaneSourceV1.__wrap(ret[0]);
|
|
232
|
+
}
|
|
233
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
234
|
+
ptr = ptr >>> 0;
|
|
235
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
236
|
+
}
|
|
237
|
+
function _assertClass(instance, klass) {
|
|
238
|
+
if (!(instance instanceof klass)) throw new Error(`expected instance of ${klass.name}`);
|
|
239
|
+
}
|
|
240
|
+
const WasmActivatedClientV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
241
|
+
register: () => {},
|
|
242
|
+
unregister: () => {}
|
|
243
|
+
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmactivatedclientv1_free(ptr >>> 0, 1));
|
|
2
244
|
/**
|
|
3
245
|
* Verified Client activation material retained inside the browser WASM boundary.
|
|
4
246
|
*/
|
|
5
247
|
var WasmActivatedClientV1 = class WasmActivatedClientV1 {
|
|
6
248
|
static __wrap(ptr) {
|
|
249
|
+
ptr = ptr >>> 0;
|
|
7
250
|
const obj = Object.create(WasmActivatedClientV1.prototype);
|
|
8
251
|
obj.__wbg_ptr = ptr;
|
|
9
252
|
WasmActivatedClientV1Finalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -20,6 +263,34 @@ var WasmActivatedClientV1 = class WasmActivatedClientV1 {
|
|
|
20
263
|
wasm.__wbg_wasmactivatedclientv1_free(ptr, 0);
|
|
21
264
|
}
|
|
22
265
|
/**
|
|
266
|
+
* Returns the activated SigningWorker state epoch.
|
|
267
|
+
* @returns {bigint}
|
|
268
|
+
*/
|
|
269
|
+
state_epoch() {
|
|
270
|
+
const ret = wasm.wasmactivatedclientv1_state_epoch(this.__wbg_ptr);
|
|
271
|
+
return BigInt.asUintN(64, ret);
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Authenticates and encrypts the active Client material for same-device rehydration.
|
|
275
|
+
* @param {Uint8Array} passkey_prf_first
|
|
276
|
+
* @param {Uint8Array} binding
|
|
277
|
+
* @param {Uint8Array} nonce
|
|
278
|
+
* @returns {Uint8Array}
|
|
279
|
+
*/
|
|
280
|
+
seal_local_material(passkey_prf_first, binding, nonce) {
|
|
281
|
+
const ptr0 = passArray8ToWasm0(passkey_prf_first, wasm.__wbindgen_malloc);
|
|
282
|
+
const len0 = WASM_VECTOR_LEN;
|
|
283
|
+
const ptr1 = passArray8ToWasm0(binding, wasm.__wbindgen_malloc);
|
|
284
|
+
const len1 = WASM_VECTOR_LEN;
|
|
285
|
+
const ptr2 = passArray8ToWasm0(nonce, wasm.__wbindgen_malloc);
|
|
286
|
+
const len2 = WASM_VECTOR_LEN;
|
|
287
|
+
const ret = wasm.wasmactivatedclientv1_seal_local_material(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
288
|
+
if (ret[3]) throw takeFromExternrefTable0(ret[2]);
|
|
289
|
+
var v4 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
290
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
291
|
+
return v4;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
23
294
|
* Creates a signature share while retaining the Client scalar inside WASM.
|
|
24
295
|
* @param {number} client_participant_id
|
|
25
296
|
* @param {number} signing_worker_participant_id
|
|
@@ -40,24 +311,6 @@ var WasmActivatedClientV1 = class WasmActivatedClientV1 {
|
|
|
40
311
|
return WasmClientSigningShareV1.__wrap(ret[0]);
|
|
41
312
|
}
|
|
42
313
|
/**
|
|
43
|
-
* Imports one linked-device Client share after verifying the complete
|
|
44
|
-
* public threshold relation carried by its activation receipt.
|
|
45
|
-
* @param {Uint8Array} client_scalar_share
|
|
46
|
-
* @param {number} client_participant_id
|
|
47
|
-
* @param {number} signing_worker_participant_id
|
|
48
|
-
* @param {string} public_receipt_json
|
|
49
|
-
* @returns {WasmActivatedClientV1}
|
|
50
|
-
*/
|
|
51
|
-
static import_linked_material(client_scalar_share, client_participant_id, signing_worker_participant_id, public_receipt_json) {
|
|
52
|
-
const ptr0 = passArray8ToWasm0(client_scalar_share, wasm.__wbindgen_malloc);
|
|
53
|
-
const len0 = WASM_VECTOR_LEN;
|
|
54
|
-
const ptr1 = passStringToWasm0(public_receipt_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
55
|
-
const len1 = WASM_VECTOR_LEN;
|
|
56
|
-
const ret = wasm.wasmactivatedclientv1_import_linked_material(ptr0, len0, client_participant_id, signing_worker_participant_id, ptr1, len1);
|
|
57
|
-
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
58
|
-
return WasmActivatedClientV1.__wrap(ret[0]);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
314
|
* Opens a same-device envelope and re-verifies its public threshold relation.
|
|
62
315
|
* @param {Uint8Array} passkey_prf_first
|
|
63
316
|
* @param {Uint8Array} binding
|
|
@@ -98,40 +351,34 @@ var WasmActivatedClientV1 = class WasmActivatedClientV1 {
|
|
|
98
351
|
return v1;
|
|
99
352
|
}
|
|
100
353
|
/**
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
* @param {Uint8Array}
|
|
104
|
-
* @param {
|
|
105
|
-
* @
|
|
354
|
+
* Imports one linked-device Client share after verifying the complete
|
|
355
|
+
* public threshold relation carried by its activation receipt.
|
|
356
|
+
* @param {Uint8Array} client_scalar_share
|
|
357
|
+
* @param {number} client_participant_id
|
|
358
|
+
* @param {number} signing_worker_participant_id
|
|
359
|
+
* @param {string} public_receipt_json
|
|
360
|
+
* @returns {WasmActivatedClientV1}
|
|
106
361
|
*/
|
|
107
|
-
|
|
108
|
-
const ptr0 = passArray8ToWasm0(
|
|
362
|
+
static import_linked_material(client_scalar_share, client_participant_id, signing_worker_participant_id, public_receipt_json) {
|
|
363
|
+
const ptr0 = passArray8ToWasm0(client_scalar_share, wasm.__wbindgen_malloc);
|
|
109
364
|
const len0 = WASM_VECTOR_LEN;
|
|
110
|
-
const ptr1 =
|
|
365
|
+
const ptr1 = passStringToWasm0(public_receipt_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
111
366
|
const len1 = WASM_VECTOR_LEN;
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
if (ret[3]) throw takeFromExternrefTable0(ret[2]);
|
|
116
|
-
var v4 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
117
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
118
|
-
return v4;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Returns the activated SigningWorker state epoch.
|
|
122
|
-
* @returns {bigint}
|
|
123
|
-
*/
|
|
124
|
-
state_epoch() {
|
|
125
|
-
const ret = wasm.wasmactivatedclientv1_state_epoch(this.__wbg_ptr);
|
|
126
|
-
return BigInt.asUintN(64, ret);
|
|
367
|
+
const ret = wasm.wasmactivatedclientv1_import_linked_material(ptr0, len0, client_participant_id, signing_worker_participant_id, ptr1, len1);
|
|
368
|
+
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
369
|
+
return WasmActivatedClientV1.__wrap(ret[0]);
|
|
127
370
|
}
|
|
128
371
|
};
|
|
129
|
-
|
|
372
|
+
const WasmClientSigningShareV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
373
|
+
register: () => {},
|
|
374
|
+
unregister: () => {}
|
|
375
|
+
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmclientsigningsharev1_free(ptr >>> 0, 1));
|
|
130
376
|
/**
|
|
131
377
|
* One Client FROST share created from activated Yao material.
|
|
132
378
|
*/
|
|
133
379
|
var WasmClientSigningShareV1 = class WasmClientSigningShareV1 {
|
|
134
380
|
static __wrap(ptr) {
|
|
381
|
+
ptr = ptr >>> 0;
|
|
135
382
|
const obj = Object.create(WasmClientSigningShareV1.prototype);
|
|
136
383
|
obj.__wbg_ptr = ptr;
|
|
137
384
|
WasmClientSigningShareV1Finalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -148,6 +395,16 @@ var WasmClientSigningShareV1 = class WasmClientSigningShareV1 {
|
|
|
148
395
|
wasm.__wbg_wasmclientsigningsharev1_free(ptr, 0);
|
|
149
396
|
}
|
|
150
397
|
/**
|
|
398
|
+
* Returns the public Client verifying share.
|
|
399
|
+
* @returns {Uint8Array}
|
|
400
|
+
*/
|
|
401
|
+
client_verifying_share() {
|
|
402
|
+
const ret = wasm.wasmclientsigningsharev1_client_verifying_share(this.__wbg_ptr);
|
|
403
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
404
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
405
|
+
return v1;
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
151
408
|
* Returns the Client FROST commitments as canonical JSON.
|
|
152
409
|
* @returns {string}
|
|
153
410
|
*/
|
|
@@ -179,18 +436,11 @@ var WasmClientSigningShareV1 = class WasmClientSigningShareV1 {
|
|
|
179
436
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
180
437
|
}
|
|
181
438
|
}
|
|
182
|
-
/**
|
|
183
|
-
* Returns the public Client verifying share.
|
|
184
|
-
* @returns {Uint8Array}
|
|
185
|
-
*/
|
|
186
|
-
client_verifying_share() {
|
|
187
|
-
const ret = wasm.wasmclientsigningsharev1_client_verifying_share(this.__wbg_ptr);
|
|
188
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
189
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
190
|
-
return v1;
|
|
191
|
-
}
|
|
192
439
|
};
|
|
193
|
-
|
|
440
|
+
const WasmEd25519YaoClientRootExportSessionV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
441
|
+
register: () => {},
|
|
442
|
+
unregister: () => {}
|
|
443
|
+
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmed25519yaoclientrootexportsessionv1_free(ptr >>> 0, 1));
|
|
194
444
|
/**
|
|
195
445
|
* One-use explicit export session opened from a factor-sealed Ed25519 Yao
|
|
196
446
|
* Client root.
|
|
@@ -210,18 +460,6 @@ var WasmEd25519YaoClientRootExportSessionV1 = class {
|
|
|
210
460
|
wasm.__wbg_wasmed25519yaoclientrootexportsessionv1_free(ptr, 0);
|
|
211
461
|
}
|
|
212
462
|
/**
|
|
213
|
-
* Consumes the session and returns the verified exported seed.
|
|
214
|
-
* @param {string} result_json
|
|
215
|
-
* @returns {WasmExportedEd25519SeedV1}
|
|
216
|
-
*/
|
|
217
|
-
complete(result_json) {
|
|
218
|
-
const ptr0 = passStringToWasm0(result_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
219
|
-
const len0 = WASM_VECTOR_LEN;
|
|
220
|
-
const ret = wasm.wasmed25519yaoclientrootexportsessionv1_complete(this.__wbg_ptr, ptr0, len0);
|
|
221
|
-
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
222
|
-
return WasmExportedEd25519SeedV1.__wrap(ret[0]);
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
463
|
* Returns the serialized request to execute through the Router A/B export protocol.
|
|
226
464
|
* @returns {string}
|
|
227
465
|
*/
|
|
@@ -278,12 +516,27 @@ var WasmEd25519YaoClientRootExportSessionV1 = class {
|
|
|
278
516
|
const len10 = WASM_VECTOR_LEN;
|
|
279
517
|
const ret = wasm.wasmed25519yaoclientrootexportsessionv1_new(ptr0, len0, ptr1, len1, client_participant_id, signing_worker_participant_id, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7, ptr8, len8, ptr9, len9, ptr10, len10);
|
|
280
518
|
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
281
|
-
this.__wbg_ptr = ret[0];
|
|
519
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
282
520
|
WasmEd25519YaoClientRootExportSessionV1Finalization.register(this, this.__wbg_ptr, this);
|
|
283
521
|
return this;
|
|
284
522
|
}
|
|
523
|
+
/**
|
|
524
|
+
* Consumes the session and returns the verified exported seed.
|
|
525
|
+
* @param {string} result_json
|
|
526
|
+
* @returns {WasmExportedEd25519SeedV1}
|
|
527
|
+
*/
|
|
528
|
+
complete(result_json) {
|
|
529
|
+
const ptr0 = passStringToWasm0(result_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
530
|
+
const len0 = WASM_VECTOR_LEN;
|
|
531
|
+
const ret = wasm.wasmed25519yaoclientrootexportsessionv1_complete(this.__wbg_ptr, ptr0, len0);
|
|
532
|
+
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
533
|
+
return WasmExportedEd25519SeedV1.__wrap(ret[0]);
|
|
534
|
+
}
|
|
285
535
|
};
|
|
286
|
-
|
|
536
|
+
const WasmEd25519YaoLaneClientV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
537
|
+
register: () => {},
|
|
538
|
+
unregister: () => {}
|
|
539
|
+
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmed25519yaolaneclientv1_free(ptr >>> 0, 1));
|
|
287
540
|
/**
|
|
288
541
|
* One-use WASM typestate client for Ed25519 Yao lane provisioning/refresh.
|
|
289
542
|
*
|
|
@@ -302,17 +555,6 @@ var WasmEd25519YaoLaneClientV1 = class {
|
|
|
302
555
|
wasm.__wbg_wasmed25519yaolaneclientv1_free(ptr, 0);
|
|
303
556
|
}
|
|
304
557
|
/**
|
|
305
|
-
* Consumes the one-use state and returns the immutable receipt plus the
|
|
306
|
-
* opaque holder package set required for later delivery.
|
|
307
|
-
* @param {any} result_input
|
|
308
|
-
* @returns {any}
|
|
309
|
-
*/
|
|
310
|
-
complete(result_input) {
|
|
311
|
-
const ret = wasm.wasmed25519yaolaneclientv1_complete(this.__wbg_ptr, result_input);
|
|
312
|
-
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
313
|
-
return takeFromExternrefTable0(ret[0]);
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
558
|
* Returns the prepared request JSON for callers that use the Rust-style
|
|
317
559
|
* getter convention.
|
|
318
560
|
* @returns {string}
|
|
@@ -340,7 +582,7 @@ var WasmEd25519YaoLaneClientV1 = class {
|
|
|
340
582
|
* Creates an empty one-use lane client.
|
|
341
583
|
*/
|
|
342
584
|
constructor() {
|
|
343
|
-
this.__wbg_ptr = wasm.wasmed25519yaolaneclientv1_new();
|
|
585
|
+
this.__wbg_ptr = wasm.wasmed25519yaolaneclientv1_new() >>> 0;
|
|
344
586
|
WasmEd25519YaoLaneClientV1Finalization.register(this, this.__wbg_ptr, this);
|
|
345
587
|
return this;
|
|
346
588
|
}
|
|
@@ -373,8 +615,22 @@ var WasmEd25519YaoLaneClientV1 = class {
|
|
|
373
615
|
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
374
616
|
return takeFromExternrefTable0(ret[0]);
|
|
375
617
|
}
|
|
618
|
+
/**
|
|
619
|
+
* Consumes the one-use state and returns the immutable receipt plus the
|
|
620
|
+
* opaque holder package set required for later delivery.
|
|
621
|
+
* @param {any} result_input
|
|
622
|
+
* @returns {any}
|
|
623
|
+
*/
|
|
624
|
+
complete(result_input) {
|
|
625
|
+
const ret = wasm.wasmed25519yaolaneclientv1_complete(this.__wbg_ptr, result_input);
|
|
626
|
+
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
627
|
+
return takeFromExternrefTable0(ret[0]);
|
|
628
|
+
}
|
|
376
629
|
};
|
|
377
|
-
|
|
630
|
+
const WasmEd25519YaoLaneSourceV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
631
|
+
register: () => {},
|
|
632
|
+
unregister: () => {}
|
|
633
|
+
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmed25519yaolanesourcev1_free(ptr >>> 0, 1));
|
|
378
634
|
/**
|
|
379
635
|
* Opaque wallet-custody source for Ed25519 Yao lane preparation.
|
|
380
636
|
*
|
|
@@ -383,6 +639,7 @@ if (Symbol.dispose) WasmEd25519YaoLaneClientV1.prototype[Symbol.dispose] = WasmE
|
|
|
383
639
|
*/
|
|
384
640
|
var WasmEd25519YaoLaneSourceV1 = class WasmEd25519YaoLaneSourceV1 {
|
|
385
641
|
static __wrap(ptr) {
|
|
642
|
+
ptr = ptr >>> 0;
|
|
386
643
|
const obj = Object.create(WasmEd25519YaoLaneSourceV1.prototype);
|
|
387
644
|
obj.__wbg_ptr = ptr;
|
|
388
645
|
WasmEd25519YaoLaneSourceV1Finalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -422,12 +679,15 @@ var WasmEd25519YaoLaneSourceV1 = class WasmEd25519YaoLaneSourceV1 {
|
|
|
422
679
|
const len5 = WASM_VECTOR_LEN;
|
|
423
680
|
const ret = wasm.wasmed25519yaolanesourcev1_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5);
|
|
424
681
|
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
425
|
-
this.__wbg_ptr = ret[0];
|
|
682
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
426
683
|
WasmEd25519YaoLaneSourceV1Finalization.register(this, this.__wbg_ptr, this);
|
|
427
684
|
return this;
|
|
428
685
|
}
|
|
429
686
|
};
|
|
430
|
-
|
|
687
|
+
const WasmEd25519YaoSourcePreservingRegistrationSessionV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
688
|
+
register: () => {},
|
|
689
|
+
unregister: () => {}
|
|
690
|
+
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmed25519yaosourcepreservingregistrationsessionv1_free(ptr >>> 0, 1));
|
|
431
691
|
/**
|
|
432
692
|
* One-use source-preserving registration request prepared from an opaque
|
|
433
693
|
* owner source. The root is borrowed only while the request is sealed and is
|
|
@@ -445,6 +705,29 @@ var WasmEd25519YaoSourcePreservingRegistrationSessionV1 = class {
|
|
|
445
705
|
wasm.__wbg_wasmed25519yaosourcepreservingregistrationsessionv1_free(ptr, 0);
|
|
446
706
|
}
|
|
447
707
|
/**
|
|
708
|
+
* Consumes the one-use session and returns the opaque Router request JSON.
|
|
709
|
+
* @returns {string}
|
|
710
|
+
*/
|
|
711
|
+
take_execute_request_json() {
|
|
712
|
+
let deferred2_0;
|
|
713
|
+
let deferred2_1;
|
|
714
|
+
try {
|
|
715
|
+
const ret = wasm.wasmed25519yaosourcepreservingregistrationsessionv1_take_execute_request_json(this.__wbg_ptr);
|
|
716
|
+
var ptr1 = ret[0];
|
|
717
|
+
var len1 = ret[1];
|
|
718
|
+
if (ret[3]) {
|
|
719
|
+
ptr1 = 0;
|
|
720
|
+
len1 = 0;
|
|
721
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
722
|
+
}
|
|
723
|
+
deferred2_0 = ptr1;
|
|
724
|
+
deferred2_1 = len1;
|
|
725
|
+
return getStringFromWasm0(ptr1, len1);
|
|
726
|
+
} finally {
|
|
727
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
/**
|
|
448
731
|
* Seals one target registration request to Device 2's recipient key.
|
|
449
732
|
* @param {any} admission_input
|
|
450
733
|
* @param {any} application_input
|
|
@@ -468,40 +751,21 @@ var WasmEd25519YaoSourcePreservingRegistrationSessionV1 = class {
|
|
|
468
751
|
const len3 = WASM_VECTOR_LEN;
|
|
469
752
|
const ret = wasm.wasmed25519yaosourcepreservingregistrationsessionv1_new(admission_input, application_input, client_participant_id, signing_worker_participant_id, source.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
470
753
|
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
471
|
-
this.__wbg_ptr = ret[0];
|
|
754
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
472
755
|
WasmEd25519YaoSourcePreservingRegistrationSessionV1Finalization.register(this, this.__wbg_ptr, this);
|
|
473
756
|
return this;
|
|
474
757
|
}
|
|
475
|
-
/**
|
|
476
|
-
* Consumes the one-use session and returns the opaque Router request JSON.
|
|
477
|
-
* @returns {string}
|
|
478
|
-
*/
|
|
479
|
-
take_execute_request_json() {
|
|
480
|
-
let deferred2_0;
|
|
481
|
-
let deferred2_1;
|
|
482
|
-
try {
|
|
483
|
-
const ret = wasm.wasmed25519yaosourcepreservingregistrationsessionv1_take_execute_request_json(this.__wbg_ptr);
|
|
484
|
-
var ptr1 = ret[0];
|
|
485
|
-
var len1 = ret[1];
|
|
486
|
-
if (ret[3]) {
|
|
487
|
-
ptr1 = 0;
|
|
488
|
-
len1 = 0;
|
|
489
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
490
|
-
}
|
|
491
|
-
deferred2_0 = ptr1;
|
|
492
|
-
deferred2_1 = len1;
|
|
493
|
-
return getStringFromWasm0(ptr1, len1);
|
|
494
|
-
} finally {
|
|
495
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
758
|
};
|
|
499
|
-
|
|
759
|
+
const WasmExportedEd25519SeedV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
760
|
+
register: () => {},
|
|
761
|
+
unregister: () => {}
|
|
762
|
+
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmexporteded25519seedv1_free(ptr >>> 0, 1));
|
|
500
763
|
/**
|
|
501
764
|
* One-use verified Ed25519 seed returned to the secure export viewer boundary.
|
|
502
765
|
*/
|
|
503
766
|
var WasmExportedEd25519SeedV1 = class WasmExportedEd25519SeedV1 {
|
|
504
767
|
static __wrap(ptr) {
|
|
768
|
+
ptr = ptr >>> 0;
|
|
505
769
|
const obj = Object.create(WasmExportedEd25519SeedV1.prototype);
|
|
506
770
|
obj.__wbg_ptr = ptr;
|
|
507
771
|
WasmExportedEd25519SeedV1Finalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -541,7 +805,10 @@ var WasmExportedEd25519SeedV1 = class WasmExportedEd25519SeedV1 {
|
|
|
541
805
|
}
|
|
542
806
|
}
|
|
543
807
|
};
|
|
544
|
-
|
|
808
|
+
const WasmOrdinaryEd25519ActivationClientMaterialV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
809
|
+
register: () => {},
|
|
810
|
+
unregister: () => {}
|
|
811
|
+
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmordinaryed25519activationclientmaterialv1_free(ptr >>> 0, 1));
|
|
545
812
|
/**
|
|
546
813
|
* Worker-owned Client material completed from one exact ordinary activation.
|
|
547
814
|
*
|
|
@@ -560,10 +827,15 @@ var WasmOrdinaryEd25519ActivationClientMaterialV1 = class {
|
|
|
560
827
|
wasm.__wbg_wasmordinaryed25519activationclientmaterialv1_free(ptr, 0);
|
|
561
828
|
}
|
|
562
829
|
/**
|
|
563
|
-
*
|
|
830
|
+
* Consumes the local scalar for the worker's factor-sealing primitive.
|
|
831
|
+
* @returns {Uint8Array}
|
|
564
832
|
*/
|
|
565
|
-
|
|
566
|
-
wasm.
|
|
833
|
+
take_client_material() {
|
|
834
|
+
const ret = wasm.wasmordinaryed25519activationclientmaterialv1_take_client_material(this.__wbg_ptr);
|
|
835
|
+
if (ret[3]) throw takeFromExternrefTable0(ret[2]);
|
|
836
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
837
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
838
|
+
return v1;
|
|
567
839
|
}
|
|
568
840
|
/**
|
|
569
841
|
* Opens and combines the two Client packages for one admitted activation.
|
|
@@ -592,23 +864,21 @@ var WasmOrdinaryEd25519ActivationClientMaterialV1 = class {
|
|
|
592
864
|
const len5 = WASM_VECTOR_LEN;
|
|
593
865
|
const ret = wasm.wasmordinaryed25519activationclientmaterialv1_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5);
|
|
594
866
|
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
595
|
-
this.__wbg_ptr = ret[0];
|
|
867
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
596
868
|
WasmOrdinaryEd25519ActivationClientMaterialV1Finalization.register(this, this.__wbg_ptr, this);
|
|
597
869
|
return this;
|
|
598
870
|
}
|
|
599
871
|
/**
|
|
600
|
-
*
|
|
601
|
-
* @returns {Uint8Array}
|
|
872
|
+
* Zeroizes the retained Client share before normal object collection.
|
|
602
873
|
*/
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
if (ret[3]) throw takeFromExternrefTable0(ret[2]);
|
|
606
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
607
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
608
|
-
return v1;
|
|
874
|
+
destroy() {
|
|
875
|
+
wasm.wasmordinaryed25519activationclientmaterialv1_destroy(this.__wbg_ptr);
|
|
609
876
|
}
|
|
610
877
|
};
|
|
611
|
-
|
|
878
|
+
const WasmWalletCustodySeedExportSessionV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
879
|
+
register: () => {},
|
|
880
|
+
unregister: () => {}
|
|
881
|
+
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmwalletcustodyseedexportsessionv1_free(ptr >>> 0, 1));
|
|
612
882
|
/**
|
|
613
883
|
* One-use owner export session opened from a factor-sealed wallet custody
|
|
614
884
|
* seed. Linked-device export uses the dedicated Client-root session below.
|
|
@@ -625,18 +895,6 @@ var WasmWalletCustodySeedExportSessionV1 = class {
|
|
|
625
895
|
wasm.__wbg_wasmwalletcustodyseedexportsessionv1_free(ptr, 0);
|
|
626
896
|
}
|
|
627
897
|
/**
|
|
628
|
-
* Consumes the session and returns the verified exported seed.
|
|
629
|
-
* @param {string} result_json
|
|
630
|
-
* @returns {WasmExportedEd25519SeedV1}
|
|
631
|
-
*/
|
|
632
|
-
complete(result_json) {
|
|
633
|
-
const ptr0 = passStringToWasm0(result_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
634
|
-
const len0 = WASM_VECTOR_LEN;
|
|
635
|
-
const ret = wasm.wasmwalletcustodyseedexportsessionv1_complete(this.__wbg_ptr, ptr0, len0);
|
|
636
|
-
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
637
|
-
return WasmExportedEd25519SeedV1.__wrap(ret[0]);
|
|
638
|
-
}
|
|
639
|
-
/**
|
|
640
898
|
* Returns the serialized request to execute through the Router A/B export protocol.
|
|
641
899
|
* @returns {string}
|
|
642
900
|
*/
|
|
@@ -693,566 +951,29 @@ var WasmWalletCustodySeedExportSessionV1 = class {
|
|
|
693
951
|
const len10 = WASM_VECTOR_LEN;
|
|
694
952
|
const ret = wasm.wasmwalletcustodyseedexportsessionv1_new(ptr0, len0, ptr1, len1, client_participant_id, signing_worker_participant_id, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7, ptr8, len8, ptr9, len9, ptr10, len10);
|
|
695
953
|
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
696
|
-
this.__wbg_ptr = ret[0];
|
|
954
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
697
955
|
WasmWalletCustodySeedExportSessionV1Finalization.register(this, this.__wbg_ptr, this);
|
|
698
956
|
return this;
|
|
699
957
|
}
|
|
958
|
+
/**
|
|
959
|
+
* Consumes the session and returns the verified exported seed.
|
|
960
|
+
* @param {string} result_json
|
|
961
|
+
* @returns {WasmExportedEd25519SeedV1}
|
|
962
|
+
*/
|
|
963
|
+
complete(result_json) {
|
|
964
|
+
const ptr0 = passStringToWasm0(result_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
965
|
+
const len0 = WASM_VECTOR_LEN;
|
|
966
|
+
const ret = wasm.wasmwalletcustodyseedexportsessionv1_complete(this.__wbg_ptr, ptr0, len0);
|
|
967
|
+
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
968
|
+
return WasmExportedEd25519SeedV1.__wrap(ret[0]);
|
|
969
|
+
}
|
|
700
970
|
};
|
|
701
|
-
if (Symbol.dispose) WasmWalletCustodySeedExportSessionV1.prototype[Symbol.dispose] = WasmWalletCustodySeedExportSessionV1.prototype.free;
|
|
702
|
-
/**
|
|
703
|
-
* Opens a verified owner custody-seed envelope and derives the exact Client
|
|
704
|
-
* root for an approved lane job. This is the owner-capability branch; ordinary
|
|
705
|
-
* factor opens continue to require a dedicated Client-root envelope.
|
|
706
|
-
* @param {Uint8Array} factor_secret
|
|
707
|
-
* @param {string} envelope_binding_json
|
|
708
|
-
* @param {Uint8Array} envelope_nonce
|
|
709
|
-
* @param {Uint8Array} envelope_ciphertext
|
|
710
|
-
* @param {Uint8Array} envelope_aad_hash
|
|
711
|
-
* @param {Uint8Array} envelope_ciphertext_digest
|
|
712
|
-
* @param {Uint8Array} application_binding_digest
|
|
713
|
-
* @param {string} wallet_key_id
|
|
714
|
-
* @param {string} enrollment_id
|
|
715
|
-
* @param {bigint} revocation_epoch
|
|
716
|
-
* @param {Uint8Array} registered_public_key
|
|
717
|
-
* @returns {WasmEd25519YaoLaneSourceV1}
|
|
718
|
-
*/
|
|
719
|
-
function ed25519_yao_lane_source_from_wallet_seed_v1(factor_secret, envelope_binding_json, envelope_nonce, envelope_ciphertext, envelope_aad_hash, envelope_ciphertext_digest, application_binding_digest, wallet_key_id, enrollment_id, revocation_epoch, registered_public_key) {
|
|
720
|
-
const ptr0 = passArray8ToWasm0(factor_secret, wasm.__wbindgen_malloc);
|
|
721
|
-
const len0 = WASM_VECTOR_LEN;
|
|
722
|
-
const ptr1 = passStringToWasm0(envelope_binding_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
723
|
-
const len1 = WASM_VECTOR_LEN;
|
|
724
|
-
const ptr2 = passArray8ToWasm0(envelope_nonce, wasm.__wbindgen_malloc);
|
|
725
|
-
const len2 = WASM_VECTOR_LEN;
|
|
726
|
-
const ptr3 = passArray8ToWasm0(envelope_ciphertext, wasm.__wbindgen_malloc);
|
|
727
|
-
const len3 = WASM_VECTOR_LEN;
|
|
728
|
-
const ptr4 = passArray8ToWasm0(envelope_aad_hash, wasm.__wbindgen_malloc);
|
|
729
|
-
const len4 = WASM_VECTOR_LEN;
|
|
730
|
-
const ptr5 = passArray8ToWasm0(envelope_ciphertext_digest, wasm.__wbindgen_malloc);
|
|
731
|
-
const len5 = WASM_VECTOR_LEN;
|
|
732
|
-
const ptr6 = passArray8ToWasm0(application_binding_digest, wasm.__wbindgen_malloc);
|
|
733
|
-
const len6 = WASM_VECTOR_LEN;
|
|
734
|
-
const ptr7 = passStringToWasm0(wallet_key_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
735
|
-
const len7 = WASM_VECTOR_LEN;
|
|
736
|
-
const ptr8 = passStringToWasm0(enrollment_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
737
|
-
const len8 = WASM_VECTOR_LEN;
|
|
738
|
-
const ptr9 = passArray8ToWasm0(registered_public_key, wasm.__wbindgen_malloc);
|
|
739
|
-
const len9 = WASM_VECTOR_LEN;
|
|
740
|
-
const ret = wasm.ed25519_yao_lane_source_from_wallet_seed_v1(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7, ptr8, len8, revocation_epoch, ptr9, len9);
|
|
741
|
-
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
742
|
-
return WasmEd25519YaoLaneSourceV1.__wrap(ret[0]);
|
|
743
|
-
}
|
|
744
|
-
/**
|
|
745
|
-
* Opens the wallet's Ed25519 continuity cache with any enrolled factor.
|
|
746
|
-
*
|
|
747
|
-
* **The unlock read side, and deliberately one call.** The custody seed
|
|
748
|
-
* exists only between opening the envelope and deriving the cache key.
|
|
749
|
-
* Splitting this into "open the envelope" and "open the cache" would put the
|
|
750
|
-
* seed in a caller's hands, and every caller here is JavaScript.
|
|
751
|
-
*
|
|
752
|
-
* Exported from *this* module rather than the ceremony's because the handle
|
|
753
|
-
* it returns has to be the one the signing path already uses: two wasm
|
|
754
|
-
* modules each define their own `WasmActivatedClientV1`, and a handle from
|
|
755
|
-
* the wrong module cannot sign.
|
|
756
|
-
*
|
|
757
|
-
* The caller never assembles the cache seal binding. It is rebuilt here from
|
|
758
|
-
* the record's own fields, because it is both HKDF input and AEAD associated
|
|
759
|
-
* data — a caller that assembled it even slightly differently would hold a
|
|
760
|
-
* record that never opens, and the failure would read as a bad factor.
|
|
761
|
-
*
|
|
762
|
-
* Any factor works, which is the point of sealing under the seed: a passkey
|
|
763
|
-
* enrolled long after registration opens the cache the Email OTP enrollment
|
|
764
|
-
* wrote, and the reverse.
|
|
765
|
-
* @param {Uint8Array} factor_secret
|
|
766
|
-
* @param {string} envelope_binding_json
|
|
767
|
-
* @param {Uint8Array} envelope_nonce
|
|
768
|
-
* @param {Uint8Array} envelope_ciphertext
|
|
769
|
-
* @param {Uint8Array} envelope_aad_hash
|
|
770
|
-
* @param {Uint8Array} envelope_ciphertext_digest
|
|
771
|
-
* @param {Uint8Array} application_binding_digest
|
|
772
|
-
* @param {Uint8Array} registered_public_key
|
|
773
|
-
* @param {bigint} state_epoch
|
|
774
|
-
* @param {number} client_participant_id
|
|
775
|
-
* @param {number} signing_worker_participant_id
|
|
776
|
-
* @param {Uint8Array} signing_worker_verifying_share
|
|
777
|
-
* @param {Uint8Array} cache_nonce
|
|
778
|
-
* @param {Uint8Array} cache_ciphertext
|
|
779
|
-
* @returns {WasmActivatedClientV1}
|
|
780
|
-
*/
|
|
781
|
-
function openWalletCustodyEd25519MaterialV1(factor_secret, envelope_binding_json, envelope_nonce, envelope_ciphertext, envelope_aad_hash, envelope_ciphertext_digest, application_binding_digest, registered_public_key, state_epoch, client_participant_id, signing_worker_participant_id, signing_worker_verifying_share, cache_nonce, cache_ciphertext) {
|
|
782
|
-
const ptr0 = passArray8ToWasm0(factor_secret, wasm.__wbindgen_malloc);
|
|
783
|
-
const len0 = WASM_VECTOR_LEN;
|
|
784
|
-
const ptr1 = passStringToWasm0(envelope_binding_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
785
|
-
const len1 = WASM_VECTOR_LEN;
|
|
786
|
-
const ptr2 = passArray8ToWasm0(envelope_nonce, wasm.__wbindgen_malloc);
|
|
787
|
-
const len2 = WASM_VECTOR_LEN;
|
|
788
|
-
const ptr3 = passArray8ToWasm0(envelope_ciphertext, wasm.__wbindgen_malloc);
|
|
789
|
-
const len3 = WASM_VECTOR_LEN;
|
|
790
|
-
const ptr4 = passArray8ToWasm0(envelope_aad_hash, wasm.__wbindgen_malloc);
|
|
791
|
-
const len4 = WASM_VECTOR_LEN;
|
|
792
|
-
const ptr5 = passArray8ToWasm0(envelope_ciphertext_digest, wasm.__wbindgen_malloc);
|
|
793
|
-
const len5 = WASM_VECTOR_LEN;
|
|
794
|
-
const ptr6 = passArray8ToWasm0(application_binding_digest, wasm.__wbindgen_malloc);
|
|
795
|
-
const len6 = WASM_VECTOR_LEN;
|
|
796
|
-
const ptr7 = passArray8ToWasm0(registered_public_key, wasm.__wbindgen_malloc);
|
|
797
|
-
const len7 = WASM_VECTOR_LEN;
|
|
798
|
-
const ptr8 = passArray8ToWasm0(signing_worker_verifying_share, wasm.__wbindgen_malloc);
|
|
799
|
-
const len8 = WASM_VECTOR_LEN;
|
|
800
|
-
const ptr9 = passArray8ToWasm0(cache_nonce, wasm.__wbindgen_malloc);
|
|
801
|
-
const len9 = WASM_VECTOR_LEN;
|
|
802
|
-
const ptr10 = passArray8ToWasm0(cache_ciphertext, wasm.__wbindgen_malloc);
|
|
803
|
-
const len10 = WASM_VECTOR_LEN;
|
|
804
|
-
const ret = wasm.openWalletCustodyEd25519MaterialV1(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7, state_epoch, client_participant_id, signing_worker_participant_id, ptr8, len8, ptr9, len9, ptr10, len10);
|
|
805
|
-
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
806
|
-
return WasmActivatedClientV1.__wrap(ret[0]);
|
|
807
|
-
}
|
|
808
|
-
function __wbg_get_imports() {
|
|
809
|
-
const import0 = {
|
|
810
|
-
__proto__: null,
|
|
811
|
-
__wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
|
|
812
|
-
return Error(getStringFromWasm0(arg0, arg1));
|
|
813
|
-
},
|
|
814
|
-
__wbg_Number_9a4e0ecb0fa16705: function(arg0) {
|
|
815
|
-
return Number(arg0);
|
|
816
|
-
},
|
|
817
|
-
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
818
|
-
const ptr1 = passStringToWasm0(String(arg1), wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
819
|
-
const len1 = WASM_VECTOR_LEN;
|
|
820
|
-
getDataViewMemory0().setInt32(arg0 + 4, len1, true);
|
|
821
|
-
getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
|
|
822
|
-
},
|
|
823
|
-
__wbg___wbindgen_bigint_get_as_i64_d968e41184ae354f: function(arg0, arg1) {
|
|
824
|
-
const v = arg1;
|
|
825
|
-
const ret = typeof v === "bigint" ? v : void 0;
|
|
826
|
-
getDataViewMemory0().setBigInt64(arg0 + 8, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
827
|
-
getDataViewMemory0().setInt32(arg0 + 0, !isLikeNone(ret), true);
|
|
828
|
-
},
|
|
829
|
-
__wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function(arg0) {
|
|
830
|
-
const v = arg0;
|
|
831
|
-
const ret = typeof v === "boolean" ? v : void 0;
|
|
832
|
-
return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
|
|
833
|
-
},
|
|
834
|
-
__wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
|
|
835
|
-
const ptr1 = passStringToWasm0(debugString(arg1), wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
836
|
-
const len1 = WASM_VECTOR_LEN;
|
|
837
|
-
getDataViewMemory0().setInt32(arg0 + 4, len1, true);
|
|
838
|
-
getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
|
|
839
|
-
},
|
|
840
|
-
__wbg___wbindgen_in_aca499c5de7ff5e5: function(arg0, arg1) {
|
|
841
|
-
return arg0 in arg1;
|
|
842
|
-
},
|
|
843
|
-
__wbg___wbindgen_is_bigint_2f76dc55065b4273: function(arg0) {
|
|
844
|
-
return typeof arg0 === "bigint";
|
|
845
|
-
},
|
|
846
|
-
__wbg___wbindgen_is_function_1ff95bcc5517c252: function(arg0) {
|
|
847
|
-
return typeof arg0 === "function";
|
|
848
|
-
},
|
|
849
|
-
__wbg___wbindgen_is_object_a27215656b807791: function(arg0) {
|
|
850
|
-
const val = arg0;
|
|
851
|
-
return typeof val === "object" && val !== null;
|
|
852
|
-
},
|
|
853
|
-
__wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
|
|
854
|
-
return typeof arg0 === "string";
|
|
855
|
-
},
|
|
856
|
-
__wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
|
|
857
|
-
return arg0 === void 0;
|
|
858
|
-
},
|
|
859
|
-
__wbg___wbindgen_jsval_eq_e659fcf7b0e32763: function(arg0, arg1) {
|
|
860
|
-
return arg0 === arg1;
|
|
861
|
-
},
|
|
862
|
-
__wbg___wbindgen_jsval_loose_eq_db4c3b15f63fc170: function(arg0, arg1) {
|
|
863
|
-
return arg0 == arg1;
|
|
864
|
-
},
|
|
865
|
-
__wbg___wbindgen_number_get_394265ed1e1b84ee: function(arg0, arg1) {
|
|
866
|
-
const obj = arg1;
|
|
867
|
-
const ret = typeof obj === "number" ? obj : void 0;
|
|
868
|
-
getDataViewMemory0().setFloat64(arg0 + 8, isLikeNone(ret) ? 0 : ret, true);
|
|
869
|
-
getDataViewMemory0().setInt32(arg0 + 0, !isLikeNone(ret), true);
|
|
870
|
-
},
|
|
871
|
-
__wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
|
|
872
|
-
const obj = arg1;
|
|
873
|
-
const ret = typeof obj === "string" ? obj : void 0;
|
|
874
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
875
|
-
var len1 = WASM_VECTOR_LEN;
|
|
876
|
-
getDataViewMemory0().setInt32(arg0 + 4, len1, true);
|
|
877
|
-
getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
|
|
878
|
-
},
|
|
879
|
-
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
|
|
880
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
881
|
-
},
|
|
882
|
-
__wbg_call_8a2dd23819f8a60a: function() {
|
|
883
|
-
return handleError(function(arg0, arg1) {
|
|
884
|
-
return arg0.call(arg1);
|
|
885
|
-
}, arguments);
|
|
886
|
-
},
|
|
887
|
-
__wbg_call_a6e5c5dce5018821: function() {
|
|
888
|
-
return handleError(function(arg0, arg1, arg2) {
|
|
889
|
-
return arg0.call(arg1, arg2);
|
|
890
|
-
}, arguments);
|
|
891
|
-
},
|
|
892
|
-
__wbg_crypto_38df2bab126b63dc: function(arg0) {
|
|
893
|
-
return arg0.crypto;
|
|
894
|
-
},
|
|
895
|
-
__wbg_done_89b2b13e91a60321: function(arg0) {
|
|
896
|
-
return arg0.done;
|
|
897
|
-
},
|
|
898
|
-
__wbg_entries_015dc610cd81ede0: function(arg0) {
|
|
899
|
-
return Object.entries(arg0);
|
|
900
|
-
},
|
|
901
|
-
__wbg_getRandomValues_c44a50d8cfdaebeb: function() {
|
|
902
|
-
return handleError(function(arg0, arg1) {
|
|
903
|
-
arg0.getRandomValues(arg1);
|
|
904
|
-
}, arguments);
|
|
905
|
-
},
|
|
906
|
-
__wbg_get_507a50627bffa49b: function(arg0, arg1) {
|
|
907
|
-
return arg0[arg1 >>> 0];
|
|
908
|
-
},
|
|
909
|
-
__wbg_get_78f252d074a84d0b: function() {
|
|
910
|
-
return handleError(function(arg0, arg1) {
|
|
911
|
-
return Reflect.get(arg0, arg1);
|
|
912
|
-
}, arguments);
|
|
913
|
-
},
|
|
914
|
-
__wbg_get_c7eb1f358a7654df: function() {
|
|
915
|
-
return handleError(function(arg0, arg1) {
|
|
916
|
-
return Reflect.get(arg0, arg1);
|
|
917
|
-
}, arguments);
|
|
918
|
-
},
|
|
919
|
-
__wbg_get_unchecked_6e0ad6d2a41b06f6: function(arg0, arg1) {
|
|
920
|
-
return arg0[arg1 >>> 0];
|
|
921
|
-
},
|
|
922
|
-
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
923
|
-
return arg0[arg1];
|
|
924
|
-
},
|
|
925
|
-
__wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
|
|
926
|
-
let result;
|
|
927
|
-
try {
|
|
928
|
-
result = arg0 instanceof ArrayBuffer;
|
|
929
|
-
} catch (_) {
|
|
930
|
-
result = false;
|
|
931
|
-
}
|
|
932
|
-
return result;
|
|
933
|
-
},
|
|
934
|
-
__wbg_instanceof_Map_e5b5e3db98422fcc: function(arg0) {
|
|
935
|
-
let result;
|
|
936
|
-
try {
|
|
937
|
-
result = arg0 instanceof Map;
|
|
938
|
-
} catch (_) {
|
|
939
|
-
result = false;
|
|
940
|
-
}
|
|
941
|
-
return result;
|
|
942
|
-
},
|
|
943
|
-
__wbg_instanceof_Uint8Array_309b927aaf7a3fc7: function(arg0) {
|
|
944
|
-
let result;
|
|
945
|
-
try {
|
|
946
|
-
result = arg0 instanceof Uint8Array;
|
|
947
|
-
} catch (_) {
|
|
948
|
-
result = false;
|
|
949
|
-
}
|
|
950
|
-
return result;
|
|
951
|
-
},
|
|
952
|
-
__wbg_isArray_0677c962b281d01a: function(arg0) {
|
|
953
|
-
return Array.isArray(arg0);
|
|
954
|
-
},
|
|
955
|
-
__wbg_isSafeInteger_04f36e4056f1b851: function(arg0) {
|
|
956
|
-
return Number.isSafeInteger(arg0);
|
|
957
|
-
},
|
|
958
|
-
__wbg_iterator_6f722e4a93058b71: function() {
|
|
959
|
-
return Symbol.iterator;
|
|
960
|
-
},
|
|
961
|
-
__wbg_length_1f0964f4a5e2c6d8: function(arg0) {
|
|
962
|
-
return arg0.length;
|
|
963
|
-
},
|
|
964
|
-
__wbg_length_370319915dc99107: function(arg0) {
|
|
965
|
-
return arg0.length;
|
|
966
|
-
},
|
|
967
|
-
__wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
|
|
968
|
-
return arg0.msCrypto;
|
|
969
|
-
},
|
|
970
|
-
__wbg_new_cd45aabdf6073e84: function(arg0) {
|
|
971
|
-
return new Uint8Array(arg0);
|
|
972
|
-
},
|
|
973
|
-
__wbg_new_da52cf8fe3429cb2: function() {
|
|
974
|
-
return /* @__PURE__ */ new Object();
|
|
975
|
-
},
|
|
976
|
-
__wbg_new_with_length_e6785c33c8e4cce8: function(arg0) {
|
|
977
|
-
return new Uint8Array(arg0 >>> 0);
|
|
978
|
-
},
|
|
979
|
-
__wbg_next_6dbf2c0ac8cde20f: function(arg0) {
|
|
980
|
-
return arg0.next;
|
|
981
|
-
},
|
|
982
|
-
__wbg_next_71f2aa1cb3d1e37e: function() {
|
|
983
|
-
return handleError(function(arg0) {
|
|
984
|
-
return arg0.next();
|
|
985
|
-
}, arguments);
|
|
986
|
-
},
|
|
987
|
-
__wbg_node_84ea875411254db1: function(arg0) {
|
|
988
|
-
return arg0.node;
|
|
989
|
-
},
|
|
990
|
-
__wbg_process_44c7a14e11e9f69e: function(arg0) {
|
|
991
|
-
return arg0.process;
|
|
992
|
-
},
|
|
993
|
-
__wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
|
|
994
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
995
|
-
},
|
|
996
|
-
__wbg_randomFillSync_6c25eac9869eb53c: function() {
|
|
997
|
-
return handleError(function(arg0, arg1) {
|
|
998
|
-
arg0.randomFillSync(arg1);
|
|
999
|
-
}, arguments);
|
|
1000
|
-
},
|
|
1001
|
-
__wbg_require_b4edbdcf3e2a1ef0: function() {
|
|
1002
|
-
return handleError(function() {
|
|
1003
|
-
return module.require;
|
|
1004
|
-
}, arguments);
|
|
1005
|
-
},
|
|
1006
|
-
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
1007
|
-
arg0[arg1] = arg2;
|
|
1008
|
-
},
|
|
1009
|
-
__wbg_set_8535240470bf2500: function() {
|
|
1010
|
-
return handleError(function(arg0, arg1, arg2) {
|
|
1011
|
-
return Reflect.set(arg0, arg1, arg2);
|
|
1012
|
-
}, arguments);
|
|
1013
|
-
},
|
|
1014
|
-
__wbg_static_accessor_GLOBAL_4ef717fb391d88b7: function() {
|
|
1015
|
-
const ret = typeof global === "undefined" ? null : global;
|
|
1016
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1017
|
-
},
|
|
1018
|
-
__wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4: function() {
|
|
1019
|
-
const ret = typeof globalThis === "undefined" ? null : globalThis;
|
|
1020
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1021
|
-
},
|
|
1022
|
-
__wbg_static_accessor_SELF_146583524fe1469b: function() {
|
|
1023
|
-
const ret = typeof self === "undefined" ? null : self;
|
|
1024
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1025
|
-
},
|
|
1026
|
-
__wbg_static_accessor_WINDOW_f2829a2234d7819e: function() {
|
|
1027
|
-
const ret = typeof window === "undefined" ? null : window;
|
|
1028
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1029
|
-
},
|
|
1030
|
-
__wbg_subarray_3ed232c8a6baee09: function(arg0, arg1, arg2) {
|
|
1031
|
-
return arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1032
|
-
},
|
|
1033
|
-
__wbg_value_a5d5488a9589444a: function(arg0) {
|
|
1034
|
-
return arg0.value;
|
|
1035
|
-
},
|
|
1036
|
-
__wbg_versions_276b2795b1c6a219: function(arg0) {
|
|
1037
|
-
return arg0.versions;
|
|
1038
|
-
},
|
|
1039
|
-
__wbindgen_cast_0000000000000001: function(arg0) {
|
|
1040
|
-
return arg0;
|
|
1041
|
-
},
|
|
1042
|
-
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
1043
|
-
return arg0;
|
|
1044
|
-
},
|
|
1045
|
-
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
1046
|
-
return getArrayU8FromWasm0(arg0, arg1);
|
|
1047
|
-
},
|
|
1048
|
-
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
1049
|
-
return getStringFromWasm0(arg0, arg1);
|
|
1050
|
-
},
|
|
1051
|
-
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
1052
|
-
return BigInt.asUintN(64, arg0);
|
|
1053
|
-
},
|
|
1054
|
-
__wbindgen_init_externref_table: function() {
|
|
1055
|
-
const table = wasm.__wbindgen_externrefs;
|
|
1056
|
-
const offset = table.grow(4);
|
|
1057
|
-
table.set(0, void 0);
|
|
1058
|
-
table.set(offset + 0, void 0);
|
|
1059
|
-
table.set(offset + 1, null);
|
|
1060
|
-
table.set(offset + 2, true);
|
|
1061
|
-
table.set(offset + 3, false);
|
|
1062
|
-
}
|
|
1063
|
-
};
|
|
1064
|
-
return {
|
|
1065
|
-
__proto__: null,
|
|
1066
|
-
"./router_ab_ed25519_yao_client_bg.js": import0
|
|
1067
|
-
};
|
|
1068
|
-
}
|
|
1069
|
-
const WasmActivatedClientV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
1070
|
-
register: () => {},
|
|
1071
|
-
unregister: () => {}
|
|
1072
|
-
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmactivatedclientv1_free(ptr, 1));
|
|
1073
|
-
const WasmClientSigningShareV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
1074
|
-
register: () => {},
|
|
1075
|
-
unregister: () => {}
|
|
1076
|
-
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmclientsigningsharev1_free(ptr, 1));
|
|
1077
|
-
const WasmEd25519YaoClientRootExportSessionV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
1078
|
-
register: () => {},
|
|
1079
|
-
unregister: () => {}
|
|
1080
|
-
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmed25519yaoclientrootexportsessionv1_free(ptr, 1));
|
|
1081
|
-
const WasmEd25519YaoLaneClientV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
1082
|
-
register: () => {},
|
|
1083
|
-
unregister: () => {}
|
|
1084
|
-
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmed25519yaolaneclientv1_free(ptr, 1));
|
|
1085
|
-
const WasmEd25519YaoLaneSourceV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
1086
|
-
register: () => {},
|
|
1087
|
-
unregister: () => {}
|
|
1088
|
-
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmed25519yaolanesourcev1_free(ptr, 1));
|
|
1089
|
-
const WasmEd25519YaoSourcePreservingRegistrationSessionV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
1090
|
-
register: () => {},
|
|
1091
|
-
unregister: () => {}
|
|
1092
|
-
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmed25519yaosourcepreservingregistrationsessionv1_free(ptr, 1));
|
|
1093
|
-
const WasmExportedEd25519SeedV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
1094
|
-
register: () => {},
|
|
1095
|
-
unregister: () => {}
|
|
1096
|
-
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmexporteded25519seedv1_free(ptr, 1));
|
|
1097
|
-
const WasmOrdinaryEd25519ActivationClientMaterialV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
1098
|
-
register: () => {},
|
|
1099
|
-
unregister: () => {}
|
|
1100
|
-
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmordinaryed25519activationclientmaterialv1_free(ptr, 1));
|
|
1101
|
-
const WasmWalletCustodySeedExportSessionV1Finalization = typeof FinalizationRegistry === "undefined" ? {
|
|
1102
|
-
register: () => {},
|
|
1103
|
-
unregister: () => {}
|
|
1104
|
-
} : new FinalizationRegistry((ptr) => wasm.__wbg_wasmwalletcustodyseedexportsessionv1_free(ptr, 1));
|
|
1105
|
-
function addToExternrefTable0(obj) {
|
|
1106
|
-
const idx = wasm.__externref_table_alloc();
|
|
1107
|
-
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
1108
|
-
return idx;
|
|
1109
|
-
}
|
|
1110
|
-
function _assertClass(instance, klass) {
|
|
1111
|
-
if (!(instance instanceof klass)) throw new Error(`expected instance of ${klass.name}`);
|
|
1112
|
-
}
|
|
1113
|
-
function debugString(val) {
|
|
1114
|
-
const type = typeof val;
|
|
1115
|
-
if (type == "number" || type == "boolean" || val == null) return `${val}`;
|
|
1116
|
-
if (type == "string") return `"${val}"`;
|
|
1117
|
-
if (type == "symbol") {
|
|
1118
|
-
const description = val.description;
|
|
1119
|
-
if (description == null) return "Symbol";
|
|
1120
|
-
else return `Symbol(${description})`;
|
|
1121
|
-
}
|
|
1122
|
-
if (type == "function") {
|
|
1123
|
-
const name = val.name;
|
|
1124
|
-
if (typeof name == "string" && name.length > 0) return `Function(${name})`;
|
|
1125
|
-
else return "Function";
|
|
1126
|
-
}
|
|
1127
|
-
if (Array.isArray(val)) {
|
|
1128
|
-
const length = val.length;
|
|
1129
|
-
let debug = "[";
|
|
1130
|
-
if (length > 0) debug += debugString(val[0]);
|
|
1131
|
-
for (let i = 1; i < length; i++) debug += ", " + debugString(val[i]);
|
|
1132
|
-
debug += "]";
|
|
1133
|
-
return debug;
|
|
1134
|
-
}
|
|
1135
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
1136
|
-
let className;
|
|
1137
|
-
if (builtInMatches && builtInMatches.length > 1) className = builtInMatches[1];
|
|
1138
|
-
else return toString.call(val);
|
|
1139
|
-
if (className == "Object") try {
|
|
1140
|
-
return "Object(" + JSON.stringify(val) + ")";
|
|
1141
|
-
} catch (_) {
|
|
1142
|
-
return "Object";
|
|
1143
|
-
}
|
|
1144
|
-
if (val instanceof Error) return `${val.name}: ${val.message}\n${val.stack}`;
|
|
1145
|
-
return className;
|
|
1146
|
-
}
|
|
1147
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
1148
|
-
ptr = ptr >>> 0;
|
|
1149
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
1150
|
-
}
|
|
1151
|
-
let cachedDataViewMemory0 = null;
|
|
1152
|
-
function getDataViewMemory0() {
|
|
1153
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
1154
|
-
return cachedDataViewMemory0;
|
|
1155
|
-
}
|
|
1156
|
-
function getStringFromWasm0(ptr, len) {
|
|
1157
|
-
return decodeText(ptr >>> 0, len);
|
|
1158
|
-
}
|
|
1159
|
-
let cachedUint8ArrayMemory0 = null;
|
|
1160
|
-
function getUint8ArrayMemory0() {
|
|
1161
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
1162
|
-
return cachedUint8ArrayMemory0;
|
|
1163
|
-
}
|
|
1164
|
-
function handleError(f, args) {
|
|
1165
|
-
try {
|
|
1166
|
-
return f.apply(this, args);
|
|
1167
|
-
} catch (e) {
|
|
1168
|
-
const idx = addToExternrefTable0(e);
|
|
1169
|
-
wasm.__wbindgen_exn_store(idx);
|
|
1170
|
-
}
|
|
1171
|
-
}
|
|
1172
|
-
function isLikeNone(x) {
|
|
1173
|
-
return x === void 0 || x === null;
|
|
1174
|
-
}
|
|
1175
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
1176
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
1177
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
1178
|
-
WASM_VECTOR_LEN = arg.length;
|
|
1179
|
-
return ptr;
|
|
1180
|
-
}
|
|
1181
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
1182
|
-
if (realloc === void 0) {
|
|
1183
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
1184
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
1185
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
1186
|
-
WASM_VECTOR_LEN = buf.length;
|
|
1187
|
-
return ptr;
|
|
1188
|
-
}
|
|
1189
|
-
let len = arg.length;
|
|
1190
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
1191
|
-
const mem = getUint8ArrayMemory0();
|
|
1192
|
-
let offset = 0;
|
|
1193
|
-
for (; offset < len; offset++) {
|
|
1194
|
-
const code = arg.charCodeAt(offset);
|
|
1195
|
-
if (code > 127) break;
|
|
1196
|
-
mem[ptr + offset] = code;
|
|
1197
|
-
}
|
|
1198
|
-
if (offset !== len) {
|
|
1199
|
-
if (offset !== 0) arg = arg.slice(offset);
|
|
1200
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
1201
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
1202
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
1203
|
-
offset += ret.written;
|
|
1204
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
1205
|
-
}
|
|
1206
|
-
WASM_VECTOR_LEN = offset;
|
|
1207
|
-
return ptr;
|
|
1208
|
-
}
|
|
1209
|
-
function takeFromExternrefTable0(idx) {
|
|
1210
|
-
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
1211
|
-
wasm.__externref_table_dealloc(idx);
|
|
1212
|
-
return value;
|
|
1213
|
-
}
|
|
1214
|
-
let cachedTextDecoder = new TextDecoder("utf-8", {
|
|
1215
|
-
ignoreBOM: true,
|
|
1216
|
-
fatal: true
|
|
1217
|
-
});
|
|
1218
|
-
cachedTextDecoder.decode();
|
|
1219
|
-
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
1220
|
-
let numBytesDecoded = 0;
|
|
1221
|
-
function decodeText(ptr, len) {
|
|
1222
|
-
numBytesDecoded += len;
|
|
1223
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
1224
|
-
cachedTextDecoder = new TextDecoder("utf-8", {
|
|
1225
|
-
ignoreBOM: true,
|
|
1226
|
-
fatal: true
|
|
1227
|
-
});
|
|
1228
|
-
cachedTextDecoder.decode();
|
|
1229
|
-
numBytesDecoded = len;
|
|
1230
|
-
}
|
|
1231
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
1232
|
-
}
|
|
1233
|
-
const cachedTextEncoder = new TextEncoder();
|
|
1234
|
-
if (!("encodeInto" in cachedTextEncoder)) cachedTextEncoder.encodeInto = function(arg, view) {
|
|
1235
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
1236
|
-
view.set(buf);
|
|
1237
|
-
return {
|
|
1238
|
-
read: arg.length,
|
|
1239
|
-
written: buf.length
|
|
1240
|
-
};
|
|
1241
|
-
};
|
|
1242
|
-
let WASM_VECTOR_LEN = 0, wasm;
|
|
1243
|
-
function __wbg_finalize_init(instance, module) {
|
|
1244
|
-
wasm = instance.exports;
|
|
1245
|
-
cachedDataViewMemory0 = null;
|
|
1246
|
-
cachedUint8ArrayMemory0 = null;
|
|
1247
|
-
wasm.__wbindgen_start();
|
|
1248
|
-
return wasm;
|
|
1249
|
-
}
|
|
1250
971
|
async function __wbg_load(module, imports) {
|
|
1251
972
|
if (typeof Response === "function" && module instanceof Response) {
|
|
1252
973
|
if (typeof WebAssembly.instantiateStreaming === "function") try {
|
|
1253
974
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
1254
975
|
} catch (e) {
|
|
1255
|
-
if (module.
|
|
976
|
+
if (module.headers.get("Content-Type") != "application/wasm") 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);
|
|
1256
977
|
else throw e;
|
|
1257
978
|
}
|
|
1258
979
|
const bytes = await module.arrayBuffer();
|
|
@@ -1265,30 +986,290 @@ async function __wbg_load(module, imports) {
|
|
|
1265
986
|
};
|
|
1266
987
|
else return instance;
|
|
1267
988
|
}
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
989
|
+
}
|
|
990
|
+
function __wbg_get_imports() {
|
|
991
|
+
const imports = {};
|
|
992
|
+
imports.wbg = {};
|
|
993
|
+
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
994
|
+
const ptr1 = passStringToWasm0(String(arg1), wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
995
|
+
const len1 = WASM_VECTOR_LEN;
|
|
996
|
+
getDataViewMemory0().setInt32(arg0 + 4, len1, true);
|
|
997
|
+
getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
|
|
998
|
+
};
|
|
999
|
+
imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
|
|
1000
|
+
return arg0.buffer;
|
|
1001
|
+
};
|
|
1002
|
+
imports.wbg.__wbg_call_672a4d21634d4a24 = function() {
|
|
1003
|
+
return handleError(function(arg0, arg1) {
|
|
1004
|
+
return arg0.call(arg1);
|
|
1005
|
+
}, arguments);
|
|
1006
|
+
};
|
|
1007
|
+
imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() {
|
|
1008
|
+
return handleError(function(arg0, arg1, arg2) {
|
|
1009
|
+
return arg0.call(arg1, arg2);
|
|
1010
|
+
}, arguments);
|
|
1011
|
+
};
|
|
1012
|
+
imports.wbg.__wbg_crypto_86f2631e91b51511 = function(arg0) {
|
|
1013
|
+
return arg0.crypto;
|
|
1014
|
+
};
|
|
1015
|
+
imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
|
|
1016
|
+
return arg0.done;
|
|
1017
|
+
};
|
|
1018
|
+
imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
|
|
1019
|
+
return Object.entries(arg0);
|
|
1020
|
+
};
|
|
1021
|
+
imports.wbg.__wbg_getRandomValues_b3f15fcbfabb0f8b = function() {
|
|
1022
|
+
return handleError(function(arg0, arg1) {
|
|
1023
|
+
arg0.getRandomValues(arg1);
|
|
1024
|
+
}, arguments);
|
|
1025
|
+
};
|
|
1026
|
+
imports.wbg.__wbg_get_67b2ba62fc30de12 = function() {
|
|
1027
|
+
return handleError(function(arg0, arg1) {
|
|
1028
|
+
return Reflect.get(arg0, arg1);
|
|
1029
|
+
}, arguments);
|
|
1030
|
+
};
|
|
1031
|
+
imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
1032
|
+
return arg0[arg1 >>> 0];
|
|
1033
|
+
};
|
|
1034
|
+
imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
|
|
1035
|
+
return arg0[arg1];
|
|
1036
|
+
};
|
|
1037
|
+
imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
|
|
1038
|
+
let result;
|
|
1039
|
+
try {
|
|
1040
|
+
result = arg0 instanceof ArrayBuffer;
|
|
1041
|
+
} catch (_) {
|
|
1042
|
+
result = false;
|
|
1273
1043
|
}
|
|
1274
|
-
return
|
|
1275
|
-
}
|
|
1044
|
+
return result;
|
|
1045
|
+
};
|
|
1046
|
+
imports.wbg.__wbg_instanceof_Map_f3469ce2244d2430 = function(arg0) {
|
|
1047
|
+
let result;
|
|
1048
|
+
try {
|
|
1049
|
+
result = arg0 instanceof Map;
|
|
1050
|
+
} catch (_) {
|
|
1051
|
+
result = false;
|
|
1052
|
+
}
|
|
1053
|
+
return result;
|
|
1054
|
+
};
|
|
1055
|
+
imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
|
|
1056
|
+
let result;
|
|
1057
|
+
try {
|
|
1058
|
+
result = arg0 instanceof Uint8Array;
|
|
1059
|
+
} catch (_) {
|
|
1060
|
+
result = false;
|
|
1061
|
+
}
|
|
1062
|
+
return result;
|
|
1063
|
+
};
|
|
1064
|
+
imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
|
1065
|
+
return Array.isArray(arg0);
|
|
1066
|
+
};
|
|
1067
|
+
imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
|
|
1068
|
+
return Number.isSafeInteger(arg0);
|
|
1069
|
+
};
|
|
1070
|
+
imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
|
|
1071
|
+
return Symbol.iterator;
|
|
1072
|
+
};
|
|
1073
|
+
imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
|
|
1074
|
+
return arg0.length;
|
|
1075
|
+
};
|
|
1076
|
+
imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
|
|
1077
|
+
return arg0.length;
|
|
1078
|
+
};
|
|
1079
|
+
imports.wbg.__wbg_msCrypto_d562bbe83e0d4b91 = function(arg0) {
|
|
1080
|
+
return arg0.msCrypto;
|
|
1081
|
+
};
|
|
1082
|
+
imports.wbg.__wbg_new_405e22f390576ce2 = function() {
|
|
1083
|
+
return /* @__PURE__ */ new Object();
|
|
1084
|
+
};
|
|
1085
|
+
imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
|
|
1086
|
+
return new Uint8Array(arg0);
|
|
1087
|
+
};
|
|
1088
|
+
imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
|
|
1089
|
+
return new Function(getStringFromWasm0(arg0, arg1));
|
|
1090
|
+
};
|
|
1091
|
+
imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
|
|
1092
|
+
return new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
1093
|
+
};
|
|
1094
|
+
imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
|
|
1095
|
+
return new Uint8Array(arg0 >>> 0);
|
|
1096
|
+
};
|
|
1097
|
+
imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
|
|
1098
|
+
return arg0.next;
|
|
1099
|
+
};
|
|
1100
|
+
imports.wbg.__wbg_next_6574e1a8a62d1055 = function() {
|
|
1101
|
+
return handleError(function(arg0) {
|
|
1102
|
+
return arg0.next();
|
|
1103
|
+
}, arguments);
|
|
1104
|
+
};
|
|
1105
|
+
imports.wbg.__wbg_node_e1f24f89a7336c2e = function(arg0) {
|
|
1106
|
+
return arg0.node;
|
|
1107
|
+
};
|
|
1108
|
+
imports.wbg.__wbg_process_3975fd6c72f520aa = function(arg0) {
|
|
1109
|
+
return arg0.process;
|
|
1110
|
+
};
|
|
1111
|
+
imports.wbg.__wbg_randomFillSync_f8c153b79f285817 = function() {
|
|
1112
|
+
return handleError(function(arg0, arg1) {
|
|
1113
|
+
arg0.randomFillSync(arg1);
|
|
1114
|
+
}, arguments);
|
|
1115
|
+
};
|
|
1116
|
+
imports.wbg.__wbg_require_b74f47fc2d022fd6 = function() {
|
|
1117
|
+
return handleError(function() {
|
|
1118
|
+
return module.require;
|
|
1119
|
+
}, arguments);
|
|
1120
|
+
};
|
|
1121
|
+
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
1122
|
+
arg0[arg1] = arg2;
|
|
1123
|
+
};
|
|
1124
|
+
imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
|
|
1125
|
+
arg0.set(arg1, arg2 >>> 0);
|
|
1126
|
+
};
|
|
1127
|
+
imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() {
|
|
1128
|
+
return handleError(function(arg0, arg1, arg2) {
|
|
1129
|
+
return Reflect.set(arg0, arg1, arg2);
|
|
1130
|
+
}, arguments);
|
|
1131
|
+
};
|
|
1132
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
|
|
1133
|
+
const ret = typeof global === "undefined" ? null : global;
|
|
1134
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1135
|
+
};
|
|
1136
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
|
|
1137
|
+
const ret = typeof globalThis === "undefined" ? null : globalThis;
|
|
1138
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1139
|
+
};
|
|
1140
|
+
imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
|
|
1141
|
+
const ret = typeof self === "undefined" ? null : self;
|
|
1142
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1143
|
+
};
|
|
1144
|
+
imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
|
|
1145
|
+
const ret = typeof window === "undefined" ? null : window;
|
|
1146
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1147
|
+
};
|
|
1148
|
+
imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
|
|
1149
|
+
return arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1150
|
+
};
|
|
1151
|
+
imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
|
|
1152
|
+
return arg0.value;
|
|
1153
|
+
};
|
|
1154
|
+
imports.wbg.__wbg_versions_4e31226f5e8dc909 = function(arg0) {
|
|
1155
|
+
return arg0.versions;
|
|
1156
|
+
};
|
|
1157
|
+
imports.wbg.__wbindgen_as_number = function(arg0) {
|
|
1158
|
+
return +arg0;
|
|
1159
|
+
};
|
|
1160
|
+
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
1161
|
+
return arg0;
|
|
1162
|
+
};
|
|
1163
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
1164
|
+
return BigInt.asUintN(64, arg0);
|
|
1165
|
+
};
|
|
1166
|
+
imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
1167
|
+
const v = arg1;
|
|
1168
|
+
const ret = typeof v === "bigint" ? v : void 0;
|
|
1169
|
+
getDataViewMemory0().setBigInt64(arg0 + 8, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
1170
|
+
getDataViewMemory0().setInt32(arg0 + 0, !isLikeNone(ret), true);
|
|
1171
|
+
};
|
|
1172
|
+
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
1173
|
+
const v = arg0;
|
|
1174
|
+
return typeof v === "boolean" ? v ? 1 : 0 : 2;
|
|
1175
|
+
};
|
|
1176
|
+
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
1177
|
+
const ptr1 = passStringToWasm0(debugString(arg1), wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1178
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1179
|
+
getDataViewMemory0().setInt32(arg0 + 4, len1, true);
|
|
1180
|
+
getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
|
|
1181
|
+
};
|
|
1182
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
1183
|
+
return new Error(getStringFromWasm0(arg0, arg1));
|
|
1184
|
+
};
|
|
1185
|
+
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
1186
|
+
return arg0 in arg1;
|
|
1187
|
+
};
|
|
1188
|
+
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
1189
|
+
const table = wasm.__wbindgen_export_4;
|
|
1190
|
+
const offset = table.grow(4);
|
|
1191
|
+
table.set(0, void 0);
|
|
1192
|
+
table.set(offset + 0, void 0);
|
|
1193
|
+
table.set(offset + 1, null);
|
|
1194
|
+
table.set(offset + 2, true);
|
|
1195
|
+
table.set(offset + 3, false);
|
|
1196
|
+
};
|
|
1197
|
+
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
1198
|
+
return typeof arg0 === "bigint";
|
|
1199
|
+
};
|
|
1200
|
+
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
1201
|
+
return typeof arg0 === "function";
|
|
1202
|
+
};
|
|
1203
|
+
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
1204
|
+
const val = arg0;
|
|
1205
|
+
return typeof val === "object" && val !== null;
|
|
1206
|
+
};
|
|
1207
|
+
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
1208
|
+
return typeof arg0 === "string";
|
|
1209
|
+
};
|
|
1210
|
+
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
1211
|
+
return arg0 === void 0;
|
|
1212
|
+
};
|
|
1213
|
+
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
1214
|
+
return arg0 === arg1;
|
|
1215
|
+
};
|
|
1216
|
+
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
1217
|
+
return arg0 == arg1;
|
|
1218
|
+
};
|
|
1219
|
+
imports.wbg.__wbindgen_memory = function() {
|
|
1220
|
+
return wasm.memory;
|
|
1221
|
+
};
|
|
1222
|
+
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
1223
|
+
const obj = arg1;
|
|
1224
|
+
const ret = typeof obj === "number" ? obj : void 0;
|
|
1225
|
+
getDataViewMemory0().setFloat64(arg0 + 8, isLikeNone(ret) ? 0 : ret, true);
|
|
1226
|
+
getDataViewMemory0().setInt32(arg0 + 0, !isLikeNone(ret), true);
|
|
1227
|
+
};
|
|
1228
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
1229
|
+
return arg0;
|
|
1230
|
+
};
|
|
1231
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
1232
|
+
const obj = arg1;
|
|
1233
|
+
const ret = typeof obj === "string" ? obj : void 0;
|
|
1234
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1235
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1236
|
+
getDataViewMemory0().setInt32(arg0 + 4, len1, true);
|
|
1237
|
+
getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
|
|
1238
|
+
};
|
|
1239
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
1240
|
+
return getStringFromWasm0(arg0, arg1);
|
|
1241
|
+
};
|
|
1242
|
+
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
1243
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1244
|
+
};
|
|
1245
|
+
return imports;
|
|
1246
|
+
}
|
|
1247
|
+
function __wbg_init_memory(imports, memory) {}
|
|
1248
|
+
function __wbg_finalize_init(instance, module) {
|
|
1249
|
+
wasm = instance.exports;
|
|
1250
|
+
__wbg_init.__wbindgen_wasm_module = module;
|
|
1251
|
+
cachedDataViewMemory0 = null;
|
|
1252
|
+
cachedUint8ArrayMemory0 = null;
|
|
1253
|
+
wasm.__wbindgen_start();
|
|
1254
|
+
return wasm;
|
|
1276
1255
|
}
|
|
1277
1256
|
function initSync(module) {
|
|
1278
1257
|
if (wasm !== void 0) return wasm;
|
|
1279
|
-
if (module !==
|
|
1258
|
+
if (typeof module !== "undefined") if (Object.getPrototypeOf(module) === Object.prototype) ({module} = module);
|
|
1280
1259
|
else console.warn("using deprecated parameters for `initSync()`; pass a single object instead");
|
|
1281
1260
|
const imports = __wbg_get_imports();
|
|
1261
|
+
__wbg_init_memory(imports);
|
|
1282
1262
|
if (!(module instanceof WebAssembly.Module)) module = new WebAssembly.Module(module);
|
|
1283
1263
|
return __wbg_finalize_init(new WebAssembly.Instance(module, imports), module);
|
|
1284
1264
|
}
|
|
1285
1265
|
async function __wbg_init(module_or_path) {
|
|
1286
1266
|
if (wasm !== void 0) return wasm;
|
|
1287
|
-
if (module_or_path !==
|
|
1267
|
+
if (typeof module_or_path !== "undefined") if (Object.getPrototypeOf(module_or_path) === Object.prototype) ({module_or_path} = module_or_path);
|
|
1288
1268
|
else console.warn("using deprecated parameters for the initialization function; pass a single object instead");
|
|
1289
|
-
if (module_or_path ===
|
|
1269
|
+
if (typeof module_or_path === "undefined") module_or_path = new URL("router_ab_ed25519_yao_client_bg.wasm", import.meta.url);
|
|
1290
1270
|
const imports = __wbg_get_imports();
|
|
1291
1271
|
if (typeof module_or_path === "string" || typeof Request === "function" && module_or_path instanceof Request || typeof URL === "function" && module_or_path instanceof URL) module_or_path = fetch(module_or_path);
|
|
1272
|
+
__wbg_init_memory(imports);
|
|
1292
1273
|
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
1293
1274
|
return __wbg_finalize_init(instance, module);
|
|
1294
1275
|
}
|