@etherplay/dev-wallet-host 0.2.0 → 0.4.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/package.json +1 -1
- package/site/assets/{App-xSBx5ak5.js → App-D0QkDuoP.js} +64 -63
- package/site/assets/App-D0QkDuoP.js.map +1 -0
- package/site/assets/{bignumbers-C7-lnukQ.js → bignumbers-BGIGSjwl.js} +2 -2
- package/site/assets/{bignumbers-C7-lnukQ.js.map → bignumbers-BGIGSjwl.js.map} +1 -1
- package/site/assets/{index-IIDV-e6n.js → index-8gYgsO00.js} +6 -6
- package/site/assets/{index-IIDV-e6n.js.map → index-8gYgsO00.js.map} +1 -1
- package/site/assets/{index-CkvCbn7v.js → index-B6H9q3i4.js} +2 -2
- package/site/assets/{index-CkvCbn7v.js.map → index-B6H9q3i4.js.map} +1 -1
- package/site/assets/{index-LN4UBwKA.js → index-CZi5KT9y.js} +6 -6
- package/site/assets/{index-LN4UBwKA.js.map → index-CZi5KT9y.js.map} +1 -1
- package/site/assets/{index-B_E-HnzD.js → index-DnlmYyqP.js} +8 -8
- package/site/assets/{index-B_E-HnzD.js.map → index-DnlmYyqP.js.map} +1 -1
- package/site/assets/{index-Bz0M5Gj5.js → index-Z023RREk.js} +4 -4
- package/site/assets/{index-Bz0M5Gj5.js.map → index-Z023RREk.js.map} +1 -1
- package/site/assets/{index-BSfEJRCZ.js → index-quu2OWZ0.js} +3 -3
- package/site/assets/{index-BSfEJRCZ.js.map → index-quu2OWZ0.js.map} +1 -1
- package/site/assets/{login-CT3CiPqL.js → login-FHGSC3BX.js} +3 -3
- package/site/assets/{login-CT3CiPqL.js.map → login-FHGSC3BX.js.map} +1 -1
- package/site/assets/{typed-data-kK2YTiXf.js → typed-data-Bvq38f41.js} +4 -4
- package/site/assets/{typed-data-kK2YTiXf.js.map → typed-data-Bvq38f41.js.map} +1 -1
- package/site/assets/{utf8-DUBJCSEI.js → utf8-DPK3Cnp_.js} +2 -2
- package/site/assets/{utf8-DUBJCSEI.js.map → utf8-DPK3Cnp_.js.map} +1 -1
- package/site/login/index.html +1 -1
- package/site/assets/App-xSBx5ak5.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etherplay/dev-wallet-host",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "The Etherplay sign-in host, prebuilt, for DEVELOPMENT and e2e only - run it next to your app the way you run a faucet. Unfit for real accounts by construction.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"etherplay",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-quu2OWZ0.js","assets/index-client-8kPxwRn_.js","assets/login-FHGSC3BX.js","assets/login-Dm0rG43D.css","assets/index-8gYgsO00.js","assets/typed-data-Bvq38f41.js","assets/utf8-DPK3Cnp_.js","assets/index-B6H9q3i4.js","assets/index-CZi5KT9y.js","assets/bignumbers-BGIGSjwl.js","assets/index-DnlmYyqP.js","assets/index-Z023RREk.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __typeError = (msg) => {
|
|
4
4
|
throw TypeError(msg);
|
|
@@ -20,7 +20,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
20
20
|
});
|
|
21
21
|
var _a, _b, _c, _d, _e, _t, _e2, _s, _a2, _i, _r, _o, _n, _h, _d2, _c2, _p, _E_instances, m_fn, _f, _e3, _s2, _t2, _i2, _o2, _r2, _n2, _a3, _c3, _g2, _h2, _d3, _l, _g, _h3;
|
|
22
22
|
import { i as is_array, g as get_prototype_of, o as object_prototype, c as create_text, a as active_effect, b as get_first_child, d as is_firefox, T as TEMPLATE_FRAGMENT, e as TEMPLATE_USE_IMPORT_NODE, f as block, E as EFFECT_TRANSPARENT, r as resume_effect, h as branch, p as pause_effect, U as UNINITIALIZED, j as get$2, k as derived_safe_equal, I as INERT, l as array_from, m as mutable_source, s as source$1, n as internal_set, q as pause_children, t as clear_text_content, u as run_out_transitions, v as destroy_effect, w as EACH_INDEX_REACTIVE, x as EACH_ITEM_REACTIVE, y as EACH_ITEM_IMMUTABLE, z as get_next_sibling, A as EACH_IS_CONTROLLED, B as queue_micro_task, C as EACH_IS_ANIMATED, D as effect, F as untrack, G as render_effect, H as deep_read_state, J as safe_not_equal$1, L as LOADING_ATTR_SYMBOL, N as NAMESPACE_HTML, K as get_descriptors, S as STATE_SYMBOL, M as component_context, O as user_pre_effect, P as user_effect, Q as run_all, R as run, V as derived, W as noop$3, X as teardown, Y as define_property, Z as set, _ as proxy, $ as get_descriptor, a0 as props_invalid_value, a1 as LEGACY_DERIVED_PROP, a2 as PROPS_IS_UPDATED, a3 as safe_equals, a4 as PROPS_IS_BINDABLE, a5 as LEGACY_PROPS, a6 as PROPS_IS_LAZY_INITIAL, a7 as legacy_mode_flag, a8 as PROPS_IS_RUNES, a9 as PROPS_IS_IMMUTABLE, aa as enable_legacy_mode_flag, ab as delegate, ac as push, ad as user_derived, ae as sibling, af as pop, ag as child, ah as template_effect, ai as set_text, aj as first_child, ak as onMount, al as event, am as state } from "./index-client-8kPxwRn_.js";
|
|
23
|
-
import { _ as __vitePreload, h as hostConfig } from "./login-
|
|
23
|
+
import { _ as __vitePreload, h as hostConfig } from "./login-FHGSC3BX.js";
|
|
24
24
|
const empty = [];
|
|
25
25
|
function snapshot(value, skip_warning = false) {
|
|
26
26
|
return clone(value, /* @__PURE__ */ new Map(), "", empty);
|
|
@@ -1535,11 +1535,9 @@ function OTP($$anchor, $$props) {
|
|
|
1535
1535
|
let otpInputs = [];
|
|
1536
1536
|
function onPaste(event2) {
|
|
1537
1537
|
var _a4;
|
|
1538
|
-
console.log(event2);
|
|
1539
1538
|
event2.preventDefault();
|
|
1540
1539
|
const text2 = (_a4 = event2.clipboardData) == null ? void 0 : _a4.getData("text");
|
|
1541
1540
|
const numerals = text2.replace(/\D/g, "");
|
|
1542
|
-
console.log({ numerals });
|
|
1543
1541
|
const currentIndex = Number(event2.target.dataset.index);
|
|
1544
1542
|
$$props.onAcknowledge();
|
|
1545
1543
|
let startIndex = otpInputs.findIndex((input, index2) => index2 < currentIndex && !input.value);
|
|
@@ -1581,7 +1579,6 @@ function OTP($$anchor, $$props) {
|
|
|
1581
1579
|
}
|
|
1582
1580
|
function onChange(event2) {
|
|
1583
1581
|
const val = event2.target.value;
|
|
1584
|
-
console.log({ val });
|
|
1585
1582
|
if (!val) {
|
|
1586
1583
|
event2.preventDefault();
|
|
1587
1584
|
return;
|
|
@@ -1600,7 +1597,6 @@ function OTP($$anchor, $$props) {
|
|
|
1600
1597
|
if (value) {
|
|
1601
1598
|
$$props.onAcknowledge();
|
|
1602
1599
|
}
|
|
1603
|
-
console.log({ target, value });
|
|
1604
1600
|
toggleFilledClass(target);
|
|
1605
1601
|
if (target.nextElementSibling) {
|
|
1606
1602
|
if ("focus" in target.nextElementSibling && target.nextElementSibling.focus) {
|
|
@@ -1651,7 +1647,6 @@ function Email($$anchor, $$props) {
|
|
|
1651
1647
|
let otp = state(void 0);
|
|
1652
1648
|
async function _submitOTP(text2) {
|
|
1653
1649
|
var _a4;
|
|
1654
|
-
console.log({ otpCode: text2 });
|
|
1655
1650
|
try {
|
|
1656
1651
|
await $$props.authProvider.provideOTP(text2);
|
|
1657
1652
|
} catch (error) {
|
|
@@ -5794,6 +5789,39 @@ let Keccak$1 = class Keccak extends Hash$1 {
|
|
|
5794
5789
|
};
|
|
5795
5790
|
const gen$1 = (suffix, blockLen, outputLen) => createHasher(() => new Keccak$1(blockLen, suffix, outputLen));
|
|
5796
5791
|
const keccak_256$1 = /* @__PURE__ */ (() => gen$1(1, 136, 256 / 8))();
|
|
5792
|
+
function extract(hash, ikm, salt) {
|
|
5793
|
+
ahash$1(hash);
|
|
5794
|
+
if (salt === void 0)
|
|
5795
|
+
salt = new Uint8Array(hash.outputLen);
|
|
5796
|
+
return hmac$1(hash, toBytes$1(salt), toBytes$1(ikm));
|
|
5797
|
+
}
|
|
5798
|
+
const HKDF_COUNTER = /* @__PURE__ */ Uint8Array.from([0]);
|
|
5799
|
+
const EMPTY_BUFFER = /* @__PURE__ */ Uint8Array.of();
|
|
5800
|
+
function expand(hash, prk, info, length = 32) {
|
|
5801
|
+
ahash$1(hash);
|
|
5802
|
+
anumber$3(length);
|
|
5803
|
+
const olen = hash.outputLen;
|
|
5804
|
+
if (length > 255 * olen)
|
|
5805
|
+
throw new Error("Length should be <= 255*HashLen");
|
|
5806
|
+
const blocks = Math.ceil(length / olen);
|
|
5807
|
+
if (info === void 0)
|
|
5808
|
+
info = EMPTY_BUFFER;
|
|
5809
|
+
const okm = new Uint8Array(blocks * olen);
|
|
5810
|
+
const HMAC3 = hmac$1.create(hash, prk);
|
|
5811
|
+
const HMACTmp = HMAC3._cloneInto();
|
|
5812
|
+
const T3 = new Uint8Array(HMAC3.outputLen);
|
|
5813
|
+
for (let counter = 0; counter < blocks; counter++) {
|
|
5814
|
+
HKDF_COUNTER[0] = counter + 1;
|
|
5815
|
+
HMACTmp.update(counter === 0 ? EMPTY_BUFFER : T3).update(info).update(HKDF_COUNTER).digestInto(T3);
|
|
5816
|
+
okm.set(T3, olen * counter);
|
|
5817
|
+
HMAC3._cloneInto(HMACTmp);
|
|
5818
|
+
}
|
|
5819
|
+
HMAC3.destroy();
|
|
5820
|
+
HMACTmp.destroy();
|
|
5821
|
+
clean(T3, HKDF_COUNTER);
|
|
5822
|
+
return okm.slice(0, length);
|
|
5823
|
+
}
|
|
5824
|
+
const hkdf = (hash, ikm, salt, info, length) => expand(hash, extract(hash, ikm, salt), info, length);
|
|
5797
5825
|
function anumber$1(n4) {
|
|
5798
5826
|
if (!Number.isSafeInteger(n4) || n4 < 0)
|
|
5799
5827
|
throw new Error("positive integer expected, got " + n4);
|
|
@@ -8967,39 +8995,6 @@ const x25519 = /* @__PURE__ */ (() => {
|
|
|
8967
8995
|
adjustScalarBytes
|
|
8968
8996
|
});
|
|
8969
8997
|
})();
|
|
8970
|
-
function extract(hash, ikm, salt) {
|
|
8971
|
-
ahash$1(hash);
|
|
8972
|
-
if (salt === void 0)
|
|
8973
|
-
salt = new Uint8Array(hash.outputLen);
|
|
8974
|
-
return hmac$1(hash, toBytes$1(salt), toBytes$1(ikm));
|
|
8975
|
-
}
|
|
8976
|
-
const HKDF_COUNTER = /* @__PURE__ */ Uint8Array.from([0]);
|
|
8977
|
-
const EMPTY_BUFFER = /* @__PURE__ */ Uint8Array.of();
|
|
8978
|
-
function expand(hash, prk, info, length = 32) {
|
|
8979
|
-
ahash$1(hash);
|
|
8980
|
-
anumber$3(length);
|
|
8981
|
-
const olen = hash.outputLen;
|
|
8982
|
-
if (length > 255 * olen)
|
|
8983
|
-
throw new Error("Length should be <= 255*HashLen");
|
|
8984
|
-
const blocks = Math.ceil(length / olen);
|
|
8985
|
-
if (info === void 0)
|
|
8986
|
-
info = EMPTY_BUFFER;
|
|
8987
|
-
const okm = new Uint8Array(blocks * olen);
|
|
8988
|
-
const HMAC3 = hmac$1.create(hash, prk);
|
|
8989
|
-
const HMACTmp = HMAC3._cloneInto();
|
|
8990
|
-
const T3 = new Uint8Array(HMAC3.outputLen);
|
|
8991
|
-
for (let counter = 0; counter < blocks; counter++) {
|
|
8992
|
-
HKDF_COUNTER[0] = counter + 1;
|
|
8993
|
-
HMACTmp.update(counter === 0 ? EMPTY_BUFFER : T3).update(info).update(HKDF_COUNTER).digestInto(T3);
|
|
8994
|
-
okm.set(T3, olen * counter);
|
|
8995
|
-
HMAC3._cloneInto(HMACTmp);
|
|
8996
|
-
}
|
|
8997
|
-
HMAC3.destroy();
|
|
8998
|
-
HMACTmp.destroy();
|
|
8999
|
-
clean(T3, HKDF_COUNTER);
|
|
9000
|
-
return okm.slice(0, length);
|
|
9001
|
-
}
|
|
9002
|
-
const hkdf = (hash, ikm, salt, info, length) => expand(hash, extract(hash, ikm, salt), info, length);
|
|
9003
8998
|
function hkdfSha256(ikm, info, length) {
|
|
9004
8999
|
return hkdf(sha256$1, ikm, new Uint8Array(0), info, length);
|
|
9005
9000
|
}
|
|
@@ -9438,6 +9433,21 @@ function fromSignatureToKey(signature) {
|
|
|
9438
9433
|
const hash = keccak_256$1(hexToBytes$2(signature.slice(2)));
|
|
9439
9434
|
return `0x${bytesToHex$2(hash)}`;
|
|
9440
9435
|
}
|
|
9436
|
+
const ORIGIN_DATA_SECRET_LABEL = "etherplay-connect origin data secret";
|
|
9437
|
+
function deriveDataSecret(originKey) {
|
|
9438
|
+
const ikm = hexToBytes$2(originKey.slice(2));
|
|
9439
|
+
if (ikm.length !== 32) {
|
|
9440
|
+
throw new Error("the origin entropy must be 32 bytes");
|
|
9441
|
+
}
|
|
9442
|
+
return `0x${bytesToHex$2(hkdf(sha256$1, ikm, new Uint8Array(0), ORIGIN_DATA_SECRET_LABEL, 32))}`;
|
|
9443
|
+
}
|
|
9444
|
+
function deriveOriginKeys(originKeySignature, accountGenerator2) {
|
|
9445
|
+
const originKey = fromSignatureToKey(originKeySignature);
|
|
9446
|
+
const originAccount = accountGenerator2.fromMnemonicToAccount(fromEntropyKeyToMnemonic(originKey), 0);
|
|
9447
|
+
const keySet = deriveKeySet(originKey);
|
|
9448
|
+
const dataSecret = deriveDataSecret(originKey);
|
|
9449
|
+
return { originAccount, keySet, dataSecret };
|
|
9450
|
+
}
|
|
9441
9451
|
function deriveEtherplayAccount(key, mechanism2, accountGenerator2) {
|
|
9442
9452
|
const mnemonic = fromEntropyKeyToMnemonic(key);
|
|
9443
9453
|
return {
|
|
@@ -9456,10 +9466,7 @@ async function deriveOriginAccount(origin2, account, accountGenerator2, granted)
|
|
|
9456
9466
|
const accountMnemonic = fromEntropyKeyToMnemonic(account.localAccount.key);
|
|
9457
9467
|
const accountObject = accountGenerator2.fromMnemonicToAccount(accountMnemonic, account.localAccount.index);
|
|
9458
9468
|
const originKeySignature = await accountGenerator2.signTextMessage(originKeyMessage(origin2), accountObject.privateKey);
|
|
9459
|
-
const
|
|
9460
|
-
const originMnemonic = fromEntropyKeyToMnemonic(originKey);
|
|
9461
|
-
const originAccount = accountGenerator2.fromMnemonicToAccount(originMnemonic, 0);
|
|
9462
|
-
const keySet = deriveKeySet(originAccount.privateKey);
|
|
9469
|
+
const { originAccount, keySet, dataSecret } = deriveOriginKeys(originKeySignature, accountGenerator2);
|
|
9463
9470
|
const savedPublicKeyPublicationSignature = await accountGenerator2.signTextMessage(originPublicKeyPublicationMessage(origin2, keySet), accountObject.privateKey);
|
|
9464
9471
|
const savedDelegations = [];
|
|
9465
9472
|
for (const delegation of (granted == null ? void 0 : granted.delegations) || []) {
|
|
@@ -9486,6 +9493,7 @@ async function deriveOriginAccount(origin2, account, accountGenerator2, granted)
|
|
|
9486
9493
|
privateKey: originAccount.privateKey
|
|
9487
9494
|
},
|
|
9488
9495
|
keySet,
|
|
9496
|
+
dataSecret,
|
|
9489
9497
|
metadata: {},
|
|
9490
9498
|
mechanismUsed: account.signer.mechanismUsed,
|
|
9491
9499
|
savedPublicKeyPublicationSignature,
|
|
@@ -17219,7 +17227,7 @@ let n$9 = (_e = class {
|
|
|
17219
17227
|
}
|
|
17220
17228
|
static async init({ sentry: e4, configuration: o5 }) {
|
|
17221
17229
|
if (e4) return void (_e.sentry = e4);
|
|
17222
|
-
const a5 = await __vitePreload(() => import("./index-
|
|
17230
|
+
const a5 = await __vitePreload(() => import("./index-quu2OWZ0.js"), true ? __vite__mapDeps([0,1,2,3]) : void 0);
|
|
17223
17231
|
_e.sentry = new a5.BrowserClient({ dsn: r$a, integrations: [], stackParser: a5.defaultStackParser, transport: a5.makeFetchTransport }), _e.baseTags = { projectId: (o5 == null ? void 0 : o5.baseConfiguration.publishableKey) ?? "", sdk: t$d, sdkVersion: o$9 }, _e.processQueuedCalls();
|
|
17224
17232
|
}
|
|
17225
17233
|
static processQueuedCalls() {
|
|
@@ -17612,15 +17620,15 @@ const t$8 = async (t6) => {
|
|
|
17612
17620
|
let g2 = a5;
|
|
17613
17621
|
if ([T$1.UPGRADEABLE_V5, T$1.UPGRADEABLE_V6].includes(d2)) {
|
|
17614
17622
|
const e4 = { name: "Openfort", version: "0.5", chainId: Number(o5), verifyingContract: c3 }, t7 = { OpenfortMessage: [{ name: "hashedMessage", type: "bytes32" }] }, a6 = { hashedMessage: g2 }, { _TypedDataEncoder: s6 } = await __vitePreload(async () => {
|
|
17615
|
-
const { _TypedDataEncoder: s7 } = await import("./index-
|
|
17623
|
+
const { _TypedDataEncoder: s7 } = await import("./index-8gYgsO00.js");
|
|
17616
17624
|
return { _TypedDataEncoder: s7 };
|
|
17617
17625
|
}, true ? __vite__mapDeps([4,5,6,7,1,2,3]) : void 0);
|
|
17618
17626
|
g2 = s6.hash(e4, t7, a6);
|
|
17619
17627
|
}
|
|
17620
17628
|
const P2 = await s5.sign(g2, false, false);
|
|
17621
17629
|
if (i3 && n4 && [T$1.UPGRADEABLE_V5, T$1.UPGRADEABLE_V6].includes(d2)) {
|
|
17622
|
-
const { id: e4 } = await __vitePreload(() => import("./index-
|
|
17623
|
-
const { defaultAbiCoder: t8 } = await import("./index-
|
|
17630
|
+
const { id: e4 } = await __vitePreload(() => import("./index-8gYgsO00.js"), true ? __vite__mapDeps([4,5,6,7,1,2,3]) : void 0), { defaultAbiCoder: t7 } = await __vitePreload(async () => {
|
|
17631
|
+
const { defaultAbiCoder: t8 } = await import("./index-CZi5KT9y.js");
|
|
17624
17632
|
return { defaultAbiCoder: t8 };
|
|
17625
17633
|
}, true ? __vite__mapDeps([8,7,9,6,1,2,3]) : void 0), { hexConcat: a6 } = await __vitePreload(async () => {
|
|
17626
17634
|
const { hexConcat: a7 } = await Promise.resolve().then(() => index$1);
|
|
@@ -17666,7 +17674,7 @@ const t$7 = async ({ params: t6, signer: o5, account: n4 }) => {
|
|
|
17666
17674
|
const i3 = t6[0], d2 = t6[1];
|
|
17667
17675
|
if (!d2 || !i3) throw new A$1(E$2.INVALID_PARAMS, "personal_sign requires an address and a message");
|
|
17668
17676
|
if (d2.toLowerCase() !== n4.address.toLowerCase()) throw new A$1(E$2.INVALID_PARAMS, "personal_sign requires the signer to be the from address");
|
|
17669
|
-
const { hashMessage: p5 } = await __vitePreload(() => import("./index-
|
|
17677
|
+
const { hashMessage: p5 } = await __vitePreload(() => import("./index-8gYgsO00.js"), true ? __vite__mapDeps([4,5,6,7,1,2,3]) : void 0);
|
|
17670
17678
|
return await t$8({ hash: p5(n$a(i3)), implementationType: n4.implementationType || n4.type, chainId: Number(n4.chainId), signer: o5, address: d2, salt: n4.salt, factoryAddress: n4.factoryAddress, ownerAddress: n4.ownerAddress });
|
|
17671
17679
|
};
|
|
17672
17680
|
function a$6(t6) {
|
|
@@ -19156,7 +19164,7 @@ const r$5 = ["types", "domain", "primaryType", "message"], n$5 = (a5, n4) => {
|
|
|
19156
19164
|
if (!c3 || !h2) throw new A$1(E$2.INVALID_PARAMS, `${s5} requires an address and a typed data JSON`);
|
|
19157
19165
|
const { chainId: m2 } = await o5.detectNetwork(), I2 = n$5(h2, m2), y3 = { ...I2.types };
|
|
19158
19166
|
delete y3.EIP712Domain;
|
|
19159
|
-
const { _TypedDataEncoder: A3 } = await __vitePreload(() => import("./index-
|
|
19167
|
+
const { _TypedDataEncoder: A3 } = await __vitePreload(() => import("./index-8gYgsO00.js"), true ? __vite__mapDeps([4,5,6,7,1,2,3]) : void 0), w2 = A3.hash(I2.domain, y3, I2.message);
|
|
19160
19168
|
return await t$8({ hash: w2, implementationType: i3, chainId: m2, signer: d2, address: c3, ownerAddress: p5.ownerAddress, factoryAddress: p5.factoryAddress, salt: p5.salt });
|
|
19161
19169
|
};
|
|
19162
19170
|
var C$1;
|
|
@@ -19191,7 +19199,7 @@ let E$1 = (_f = class {
|
|
|
19191
19199
|
async getRpcProvider() {
|
|
19192
19200
|
if (!__privateGet(this, _o)) {
|
|
19193
19201
|
const e4 = await s$9.fromStorage(__privateGet(this, _t)), s5 = (e4 == null ? void 0 : e4.chainId) || (__privateGet(this, _s) ? Number(Object.keys(__privateGet(this, _s))[0]) : void 0) || 8453;
|
|
19194
|
-
await __vitePreload(() => import("./index-
|
|
19202
|
+
await __vitePreload(() => import("./index-DnlmYyqP.js"), true ? __vite__mapDeps([10,7,5,6,11,9,1,2,3]) : void 0).then((t6) => {
|
|
19195
19203
|
const e5 = __privateGet(this, _s) ? __privateGet(this, _s)[s5] : void 0;
|
|
19196
19204
|
__privateSet(this, _o, new t6.StaticJsonRpcProvider(e5 ?? t$a[s5]));
|
|
19197
19205
|
});
|
|
@@ -19235,7 +19243,7 @@ let E$1 = (_f = class {
|
|
|
19235
19243
|
const o5 = await this.getRpcProvider(), { chainId: n4 } = await o5.detectNetwork(), [h2] = s5.params || [];
|
|
19236
19244
|
h2.chainId || (h2.chainId = n4.toString());
|
|
19237
19245
|
const c3 = s$8(h2), { serialize: p5 } = await __vitePreload(async () => {
|
|
19238
|
-
const { serialize: p6 } = await import("./index-
|
|
19246
|
+
const { serialize: p6 } = await import("./index-Z023RREk.js").then((n5) => n5.i);
|
|
19239
19247
|
return { serialize: p6 };
|
|
19240
19248
|
}, true ? __vite__mapDeps([11,7,9]) : void 0), w2 = (t6) => ({ legacy: 0, eip2930: 1, eip1559: 2 })[t6], { gas: u4, ...l3 } = c3, g2 = { ...l3, gasLimit: u4, to: c3.to ?? void 0, type: w2(c3.type) }, f3 = p5(g2), { keccak256: S2 } = await __vitePreload(async () => {
|
|
19241
19249
|
const { keccak256: S3 } = await Promise.resolve().then(() => index);
|
|
@@ -19292,7 +19300,7 @@ let E$1 = (_f = class {
|
|
|
19292
19300
|
await __privateGet(this, _i).call(this);
|
|
19293
19301
|
try {
|
|
19294
19302
|
const e4 = parseInt(s5.params[0].chainId, 16);
|
|
19295
|
-
await t6.switchChain({ chainId: e4 }), await __vitePreload(() => import("./index-
|
|
19303
|
+
await t6.switchChain({ chainId: e4 }), await __vitePreload(() => import("./index-DnlmYyqP.js"), true ? __vite__mapDeps([10,7,5,6,11,9,1,2,3]) : void 0).then((t7) => {
|
|
19296
19304
|
const s6 = __privateGet(this, _s) ? __privateGet(this, _s)[e4] : void 0;
|
|
19297
19305
|
__privateSet(this, _o, new t7.StaticJsonRpcProvider(s6 ?? t$a[e4]));
|
|
19298
19306
|
}), __privateGet(this, _r).emit(C$1.CHAIN_CHANGED, r$b(e4));
|
|
@@ -20163,7 +20171,7 @@ class k {
|
|
|
20163
20171
|
if (!i3) throw new s$b(E$4.MISSING_SIGNER, "No account found");
|
|
20164
20172
|
const n4 = { ...r7 };
|
|
20165
20173
|
delete n4.EIP712Domain;
|
|
20166
|
-
const { _TypedDataEncoder: d2 } = await __vitePreload(() => import("./index-
|
|
20174
|
+
const { _TypedDataEncoder: d2 } = await __vitePreload(() => import("./index-8gYgsO00.js"), true ? __vite__mapDeps([4,5,6,7,1,2,3]) : void 0), h2 = d2.hash(e4, n4, t6);
|
|
20167
20175
|
return await t$8({ hash: h2, implementationType: i3.implementationType || i3.type, chainId: Number(i3.chainId), signer: s5, address: i3.address, ownerAddress: i3.ownerAddress, factoryAddress: i3.factoryAddress, salt: i3.salt });
|
|
20168
20176
|
}
|
|
20169
20177
|
async exportPrivateKey() {
|
|
@@ -20874,8 +20882,7 @@ function createOpenfortProvider(settings) {
|
|
|
20874
20882
|
const email2 = currentMechanism.email;
|
|
20875
20883
|
store.set({ step: "VerifyingOTP", mechanism: currentMechanism });
|
|
20876
20884
|
try {
|
|
20877
|
-
|
|
20878
|
-
console.log({ resultFromLoginWithOTP });
|
|
20885
|
+
await openfortInstance.auth.logInWithEmailOtp({ email: email2, otp });
|
|
20879
20886
|
await completeLogin(currentMechanism);
|
|
20880
20887
|
} catch (err2) {
|
|
20881
20888
|
const message = "failed to generate account after OTP";
|
|
@@ -20959,12 +20966,6 @@ function createOpenfortProvider(settings) {
|
|
|
20959
20966
|
throw new Error("Openfort not initialized");
|
|
20960
20967
|
}
|
|
20961
20968
|
const signature = await openfortInstance.embeddedWallet.signMessage(message);
|
|
20962
|
-
const signatureUsingMessageHash = await openfortInstance.embeddedWallet.signMessage(message, { hashMessage: true });
|
|
20963
|
-
console.log({
|
|
20964
|
-
signature,
|
|
20965
|
-
signatureUsingMessageHash,
|
|
20966
|
-
privateKey: await openfortInstance.embeddedWallet.exportPrivateKey()
|
|
20967
|
-
});
|
|
20968
20969
|
return fromSignatureToKey(signature);
|
|
20969
20970
|
}
|
|
20970
20971
|
async function generateAccount({ key, mechanism: mechanism2 }) {
|
|
@@ -23040,4 +23041,4 @@ export {
|
|
|
23040
23041
|
process$1 as p,
|
|
23041
23042
|
splitSignature as s
|
|
23042
23043
|
};
|
|
23043
|
-
//# sourceMappingURL=App-
|
|
23044
|
+
//# sourceMappingURL=App-D0QkDuoP.js.map
|