@tempoxyz/id 0.0.0-pr-841.sha-4fcd3df → 0.0.0-pr-1124.sha-9d4078b
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/dist/{AccessToken-ZMG3EHQV.js → AccessToken-LVQAS5NS.js} +2 -2
- package/dist/{Connections-S4GKCKPQ.js → Connections-WZLJRN7E.js} +3 -3
- package/dist/{Server-CZET7IQA.js → Server-NCF5HP6A.js} +2 -2
- package/dist/{Sheet-THHLTOB3.js → Sheet-EJTFAXKB.js} +2 -2
- package/dist/{chunk-RCSMITRU.js → chunk-BOTJO5RG.js} +1 -1
- package/dist/{chunk-QC5GAAV4.js → chunk-CLKLLRBJ.js} +4 -4
- package/dist/{chunk-7XUABS62.js → chunk-D7YBKC26.js} +6 -6
- package/dist/{chunk-HDVRPL6Y.js → chunk-E5S7SHPO.js} +1 -1
- package/dist/{chunk-S2A4OBMV.js → chunk-FY5RKWB4.js} +9 -13
- package/dist/{chunk-Q5ILJBD4.js → chunk-LVTGRPQI.js} +53 -90
- package/dist/{chunk-X2ANCSIT.js → chunk-LXPRP654.js} +1 -1
- package/dist/{chunk-VCE66PWN.js → chunk-PQFEF7MO.js} +1 -1
- package/dist/{chunk-FV7W2NEG.js → chunk-USRC6PG4.js} +2 -2
- package/dist/commands/login.js +9 -10
- package/dist/commands/logout.js +9 -10
- package/dist/commands/whoami.js +9 -10
- package/dist/{dialog-B6L4Z7XO.js → dialog-73OSVYQ2.js} +5 -5
- package/dist/{dialog-23IPMHKT.js → dialog-DRQ2VP7W.js} +5 -5
- package/dist/{funding-IKPDXFHO.js → funding-BC2XTB6L.js} +2 -2
- package/dist/{mpp-YWVLLGTS.js → mpp-VTCSX5BG.js} +81 -81
- package/dist/{passkey-KEJX5L4Q.js → passkey-7HXUAWNB.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-XSG4VPAK.js +0 -537
- package/dist/guest-ENU3ZVH5.js +0 -17
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
create,
|
|
4
4
|
includes,
|
|
5
5
|
verifyRequest
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LXPRP654.js";
|
|
7
7
|
import "./chunk-DW2VLCLG.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-LVTGRPQI.js";
|
|
9
9
|
import "./chunk-TEQAH4BN.js";
|
|
10
10
|
import "./chunk-MLKGABMK.js";
|
|
11
11
|
export {
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
attach,
|
|
3
3
|
create,
|
|
4
4
|
pending
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-USRC6PG4.js";
|
|
6
|
+
import "./chunk-LXPRP654.js";
|
|
7
7
|
import "./chunk-DW2VLCLG.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-LVTGRPQI.js";
|
|
9
9
|
import "./chunk-TEQAH4BN.js";
|
|
10
10
|
import "./chunk-MLKGABMK.js";
|
|
11
11
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
InvalidError
|
|
3
3
|
} from "./chunk-QI2MEU2T.js";
|
|
4
|
-
import "./chunk-
|
|
4
|
+
import "./chunk-E5S7SHPO.js";
|
|
5
5
|
import "./chunk-DW2VLCLG.js";
|
|
6
6
|
import {
|
|
7
7
|
PendingNotFoundError,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
key,
|
|
13
13
|
permissions,
|
|
14
14
|
siwe
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LVTGRPQI.js";
|
|
16
16
|
import "./chunk-TEQAH4BN.js";
|
|
17
17
|
import "./chunk-MLKGABMK.js";
|
|
18
18
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleCallback,
|
|
3
3
|
handleResult
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-E5S7SHPO.js";
|
|
5
5
|
import {
|
|
6
6
|
open
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-D7YBKC26.js";
|
|
8
8
|
import {
|
|
9
9
|
create,
|
|
10
10
|
prompt,
|
|
11
11
|
waiting
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BOTJO5RG.js";
|
|
13
13
|
import {
|
|
14
14
|
RequestError,
|
|
15
15
|
activated,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
revoke,
|
|
34
34
|
signedIn,
|
|
35
35
|
watchPopup
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-LVTGRPQI.js";
|
|
37
37
|
import {
|
|
38
38
|
__export
|
|
39
39
|
} from "./chunk-MLKGABMK.js";
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
coinflow,
|
|
4
4
|
frames,
|
|
5
5
|
openPopup,
|
|
6
|
-
|
|
6
|
+
parameter,
|
|
7
7
|
watchPopup
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LVTGRPQI.js";
|
|
9
9
|
import {
|
|
10
10
|
__export
|
|
11
11
|
} from "./chunk-MLKGABMK.js";
|
|
@@ -119,7 +119,7 @@ async function open(auth, options) {
|
|
|
119
119
|
throw new OriginError({ origin: window.location.origin, redirectUri });
|
|
120
120
|
if (mode === "popup" && options.mode !== "popup" && !activated()) {
|
|
121
121
|
const address = await abortable(read(), { signal });
|
|
122
|
-
const Sheet = await import("./Sheet-
|
|
122
|
+
const Sheet = await import("./Sheet-EJTFAXKB.js");
|
|
123
123
|
return await new Promise((resolve, reject) => {
|
|
124
124
|
const abort = () => {
|
|
125
125
|
close();
|
|
@@ -182,7 +182,7 @@ async function preload(auth, options) {
|
|
|
182
182
|
const entry = { ready: Promise.resolve(), sheet: void 0, url };
|
|
183
183
|
preloads.set(auth, entry);
|
|
184
184
|
entry.ready = (async () => {
|
|
185
|
-
const Sheet = await import("./Sheet-
|
|
185
|
+
const Sheet = await import("./Sheet-EJTFAXKB.js").catch(() => void 0);
|
|
186
186
|
if (!document.body)
|
|
187
187
|
await new Promise(
|
|
188
188
|
(resolve) => document.addEventListener("DOMContentLoaded", resolve, {
|
|
@@ -208,7 +208,7 @@ async function watch(auth, options) {
|
|
|
208
208
|
try {
|
|
209
209
|
return await new Promise(
|
|
210
210
|
(resolve, reject) => {
|
|
211
|
-
void import("./Sheet-
|
|
211
|
+
void import("./Sheet-EJTFAXKB.js").then(
|
|
212
212
|
(Sheet) => {
|
|
213
213
|
if (settled) return;
|
|
214
214
|
unblock = Sheet.waiting({
|
|
@@ -310,7 +310,7 @@ var decimal = /^(?:0|[1-9]\d{0,17})(?:\.\d{1,18})?$/;
|
|
|
310
310
|
async function frame(auth, options) {
|
|
311
311
|
const { redirectUri, signal, toUrl } = options;
|
|
312
312
|
const address = await abortable(options.address, { signal });
|
|
313
|
-
const Sheet = await import("./Sheet-
|
|
313
|
+
const Sheet = await import("./Sheet-EJTFAXKB.js");
|
|
314
314
|
signal?.throwIfAborted();
|
|
315
315
|
const url = toUrl(address);
|
|
316
316
|
const held = preloads.get(auth);
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
guest_exports
|
|
3
|
-
} from "./chunk-XSG4VPAK.js";
|
|
4
1
|
import {
|
|
5
2
|
dialog_exports
|
|
6
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CLKLLRBJ.js";
|
|
7
4
|
import {
|
|
8
5
|
redirect_exports
|
|
9
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-E5S7SHPO.js";
|
|
10
7
|
import {
|
|
11
8
|
complete as complete2,
|
|
12
9
|
discard,
|
|
13
10
|
funding_exports,
|
|
14
11
|
open,
|
|
15
12
|
preload
|
|
16
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-D7YBKC26.js";
|
|
17
14
|
import {
|
|
18
15
|
deferred
|
|
19
16
|
} from "./chunk-YOAFE7CM.js";
|
|
@@ -21,10 +18,10 @@ import {
|
|
|
21
18
|
bind,
|
|
22
19
|
from as from3,
|
|
23
20
|
passkey_exports
|
|
24
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PQFEF7MO.js";
|
|
25
22
|
import {
|
|
26
23
|
connections_exports
|
|
27
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-USRC6PG4.js";
|
|
28
25
|
import {
|
|
29
26
|
AccessKeyRequiredError,
|
|
30
27
|
AccessKey_exports,
|
|
@@ -89,7 +86,7 @@ import {
|
|
|
89
86
|
unlisted,
|
|
90
87
|
user,
|
|
91
88
|
withoutAccessKey
|
|
92
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-LVTGRPQI.js";
|
|
93
90
|
import {
|
|
94
91
|
__export
|
|
95
92
|
} from "./chunk-MLKGABMK.js";
|
|
@@ -298,7 +295,7 @@ function plugin() {
|
|
|
298
295
|
let loading;
|
|
299
296
|
let loaded_plugin;
|
|
300
297
|
function load() {
|
|
301
|
-
loading ??= import("./dialog-
|
|
298
|
+
loading ??= import("./dialog-73OSVYQ2.js").then((module) => loaded_plugin = module.dialog()).catch((error2) => {
|
|
302
299
|
loading = void 0;
|
|
303
300
|
throw error2;
|
|
304
301
|
});
|
|
@@ -394,7 +391,7 @@ function plugin2() {
|
|
|
394
391
|
extend(instance, context) {
|
|
395
392
|
let loading;
|
|
396
393
|
function load() {
|
|
397
|
-
loading ??= import("./mpp-
|
|
394
|
+
loading ??= import("./mpp-VTCSX5BG.js").then((module) => {
|
|
398
395
|
const loaded = module.mpp();
|
|
399
396
|
loaded.setup?.(context);
|
|
400
397
|
return loaded.extend(instance, context);
|
|
@@ -473,7 +470,6 @@ __export(actions_exports, {
|
|
|
473
470
|
email: () => email_exports2,
|
|
474
471
|
fetch: () => fetch2,
|
|
475
472
|
funding: () => funding_exports,
|
|
476
|
-
guest: () => guest_exports,
|
|
477
473
|
oauth: () => oauth_exports,
|
|
478
474
|
passkey: () => passkey_exports,
|
|
479
475
|
realm: () => realm_exports,
|
|
@@ -904,7 +900,7 @@ async function signIn2(auth2, options) {
|
|
|
904
900
|
return { ...next, options: next.options };
|
|
905
901
|
})();
|
|
906
902
|
if (creation && prepared.accessKey && options.accessKey) {
|
|
907
|
-
const { register } = await import("./passkey-
|
|
903
|
+
const { register } = await import("./passkey-7HXUAWNB.js");
|
|
908
904
|
const registered = await register(auth2, {
|
|
909
905
|
accessKey: { ...options.accessKey, account: prepared.accessKey.signer },
|
|
910
906
|
challenge: options.challenge,
|
|
@@ -114,7 +114,7 @@ var AddressMismatchError = Account.AddressMismatchError;
|
|
|
114
114
|
function deserialize(value, options = {}) {
|
|
115
115
|
const { address, config, keys, owner, realm } = value;
|
|
116
116
|
const credentials = keys.flatMap(
|
|
117
|
-
(
|
|
117
|
+
(key2) => key2.credential ? [key2.credential] : []
|
|
118
118
|
);
|
|
119
119
|
const account2 = Account.deserialize(
|
|
120
120
|
{ address, ...config ? { config } : {} },
|
|
@@ -726,7 +726,7 @@ var devIds = { devnet: 31318, localnet: 1337 };
|
|
|
726
726
|
var ids = { mainnet: 4217, testnet: 42431 };
|
|
727
727
|
function parameter2(options) {
|
|
728
728
|
const name = Object.keys(ids).find(
|
|
729
|
-
(
|
|
729
|
+
(key2) => ids[key2] === options.chainId
|
|
730
730
|
);
|
|
731
731
|
return name ?? String(options.chainId);
|
|
732
732
|
}
|
|
@@ -909,8 +909,6 @@ var PageRequiredError = class extends Error {
|
|
|
909
909
|
constructor(options = {}) {
|
|
910
910
|
super(
|
|
911
911
|
(() => {
|
|
912
|
-
if (options.guest)
|
|
913
|
-
return "No browser window: the purchase page of a guest payment opens only from a page. Pay as a guest from a page, or with a balance that holds the payment.";
|
|
914
912
|
if (!options.payment)
|
|
915
913
|
return "No browser window: the approval page opens in a frame or a popup only from a page. Open it through a redirect instead.";
|
|
916
914
|
if (options.sender === false)
|
|
@@ -1368,7 +1366,7 @@ async function approve(auth, options) {
|
|
|
1368
1366
|
let unwatch;
|
|
1369
1367
|
try {
|
|
1370
1368
|
return await new Promise((resolve3, reject) => {
|
|
1371
|
-
void import("./Sheet-
|
|
1369
|
+
void import("./Sheet-EJTFAXKB.js").then(
|
|
1372
1370
|
(Sheet2) => {
|
|
1373
1371
|
if (settled) return;
|
|
1374
1372
|
unblock = Sheet2.waiting({
|
|
@@ -1423,7 +1421,7 @@ async function approve(auth, options) {
|
|
|
1423
1421
|
}
|
|
1424
1422
|
}
|
|
1425
1423
|
const covering = direct ? void 0 : hold;
|
|
1426
|
-
const Sheet = await import("./Sheet-
|
|
1424
|
+
const Sheet = await import("./Sheet-EJTFAXKB.js");
|
|
1427
1425
|
signal?.throwIfAborted();
|
|
1428
1426
|
const sheet = Sheet.load({
|
|
1429
1427
|
// The page runs the passkey ceremony of the account's owner, for Tempo ID's origin. The payment
|
|
@@ -1993,12 +1991,12 @@ function permissions(auth, options) {
|
|
|
1993
1991
|
const repeated = scopes.map((scope, index) => ({ index, scope })).find((item) => {
|
|
1994
1992
|
const { address } = item.scope;
|
|
1995
1993
|
if (!Address6.validate(address, { strict: false })) return false;
|
|
1996
|
-
const
|
|
1994
|
+
const key2 = address.toLowerCase();
|
|
1997
1995
|
const call = item.scope.selector === void 0 ? void 0 : selector(item.scope.selector);
|
|
1998
|
-
const named = rules.get(
|
|
1996
|
+
const named = rules.get(key2);
|
|
1999
1997
|
if (named && (call === void 0 || named.has(void 0) || named.has(call)))
|
|
2000
1998
|
return true;
|
|
2001
|
-
rules.set(
|
|
1999
|
+
rules.set(key2, (named ?? /* @__PURE__ */ new Set()).add(call));
|
|
2002
2000
|
return false;
|
|
2003
2001
|
});
|
|
2004
2002
|
if (repeated)
|
|
@@ -2495,12 +2493,12 @@ function get2(clientId) {
|
|
|
2495
2493
|
return loading;
|
|
2496
2494
|
}
|
|
2497
2495
|
return {
|
|
2498
|
-
getItem: async (
|
|
2496
|
+
getItem: async (key2) => (await load()).getItem(key2),
|
|
2499
2497
|
// The CLIs of the user share the file, so their refreshes order through its lock.
|
|
2500
|
-
lock: async (
|
|
2501
|
-
removeItem: async (
|
|
2502
|
-
setItem: async (
|
|
2503
|
-
takeItem: async (
|
|
2498
|
+
lock: async (key2, fn) => (await load()).lock(key2, fn),
|
|
2499
|
+
removeItem: async (key2) => (await load()).removeItem(key2),
|
|
2500
|
+
setItem: async (key2, value, options) => (await load()).setItem(key2, value, options),
|
|
2501
|
+
takeItem: async (key2) => (await load()).takeItem?.(key2)
|
|
2504
2502
|
};
|
|
2505
2503
|
}
|
|
2506
2504
|
|
|
@@ -2762,20 +2760,20 @@ function create2(options) {
|
|
|
2762
2760
|
exclusives -= 1;
|
|
2763
2761
|
}
|
|
2764
2762
|
};
|
|
2765
|
-
const
|
|
2763
|
+
const key2 = `${name}:store`;
|
|
2766
2764
|
if (!locks && fallback)
|
|
2767
|
-
return fallback(
|
|
2765
|
+
return fallback(key2, async () => {
|
|
2768
2766
|
let started = false;
|
|
2769
2767
|
const run2 = () => {
|
|
2770
2768
|
started = true;
|
|
2771
2769
|
return counted();
|
|
2772
2770
|
};
|
|
2773
|
-
return await lock(
|
|
2771
|
+
return await lock(key2, run2).catch((error3) => {
|
|
2774
2772
|
if (started) throw error3;
|
|
2775
2773
|
return counted();
|
|
2776
2774
|
});
|
|
2777
2775
|
});
|
|
2778
|
-
if (!locks) return lock(
|
|
2776
|
+
if (!locks) return lock(key2, counted);
|
|
2779
2777
|
if (!store3?.lock || store3.local)
|
|
2780
2778
|
return locks.request(`${name}:exclusive`, counted);
|
|
2781
2779
|
return locks.request(`${name}:exclusive`, async () => {
|
|
@@ -2784,7 +2782,7 @@ function create2(options) {
|
|
|
2784
2782
|
started = true;
|
|
2785
2783
|
return counted();
|
|
2786
2784
|
};
|
|
2787
|
-
return await lock(
|
|
2785
|
+
return await lock(key2, run2).catch((error3) => {
|
|
2788
2786
|
if (started) throw error3;
|
|
2789
2787
|
return counted();
|
|
2790
2788
|
});
|
|
@@ -2849,7 +2847,7 @@ function create2(options) {
|
|
|
2849
2847
|
chainLoaded(),
|
|
2850
2848
|
options2.marked ? Promise.all(
|
|
2851
2849
|
[`${name}:signed-out`, `${name}:signed-out:logout`].map(
|
|
2852
|
-
(
|
|
2850
|
+
(key2) => (async () => store3?.getItem(key2))().then(
|
|
2853
2851
|
(value) => value === true || typeof value === "string",
|
|
2854
2852
|
() => true
|
|
2855
2853
|
)
|
|
@@ -2921,10 +2919,10 @@ function create2(options) {
|
|
|
2921
2919
|
* or `undefined` when the store refused it.
|
|
2922
2920
|
*/
|
|
2923
2921
|
async write(tokens3) {
|
|
2924
|
-
const
|
|
2922
|
+
const key2 = `${name}:unanswered`;
|
|
2925
2923
|
const held3 = tokens3.slice(-16);
|
|
2926
2924
|
return (async () => {
|
|
2927
|
-
await (held3.length === 0 ? store3?.removeItem(
|
|
2925
|
+
await (held3.length === 0 ? store3?.removeItem(key2) : store3?.setItem(key2, held3));
|
|
2928
2926
|
return held3;
|
|
2929
2927
|
})().catch(() => void 0);
|
|
2930
2928
|
}
|
|
@@ -2987,13 +2985,13 @@ function create2(options) {
|
|
|
2987
2985
|
*/
|
|
2988
2986
|
async write(entries, options2) {
|
|
2989
2987
|
const { expiresAt, from: from9, to: to2 } = options2;
|
|
2990
|
-
const
|
|
2988
|
+
const key2 = digest(from9);
|
|
2991
2989
|
const [first, ...rest] = [
|
|
2992
|
-
...(entries ?? []).filter((entry) => entry.from !==
|
|
2990
|
+
...(entries ?? []).filter((entry) => entry.from !== key2),
|
|
2993
2991
|
{
|
|
2994
2992
|
at: Date.now(),
|
|
2995
2993
|
...to2 && expiresAt ? { expiresAt } : {},
|
|
2996
|
-
from:
|
|
2994
|
+
from: key2,
|
|
2997
2995
|
...to2 ? { to: to2 } : {}
|
|
2998
2996
|
}
|
|
2999
2997
|
].slice(-rotationLimit);
|
|
@@ -3251,9 +3249,9 @@ function create2(options) {
|
|
|
3251
3249
|
return Hash3.sha256(Bytes3.fromString(token2), { as: "Hex" });
|
|
3252
3250
|
}
|
|
3253
3251
|
async function mark(value) {
|
|
3254
|
-
const
|
|
3252
|
+
const key2 = `${name}:signed-out`;
|
|
3255
3253
|
await Promise.all([
|
|
3256
|
-
(async () => value ? store3?.setItem(
|
|
3254
|
+
(async () => value ? store3?.setItem(key2, true) : store3?.removeItem(key2))().catch(
|
|
3257
3255
|
() => void 0
|
|
3258
3256
|
),
|
|
3259
3257
|
value ? void 0 : unmark()
|
|
@@ -3270,10 +3268,10 @@ function create2(options) {
|
|
|
3270
3268
|
]);
|
|
3271
3269
|
}
|
|
3272
3270
|
async function unmark(id) {
|
|
3273
|
-
const
|
|
3271
|
+
const key2 = `${name}:signed-out:logout`;
|
|
3274
3272
|
await (async () => {
|
|
3275
|
-
if (id !== void 0 && await store3?.getItem(
|
|
3276
|
-
await store3?.removeItem(
|
|
3273
|
+
if (id !== void 0 && await store3?.getItem(key2) !== id) return;
|
|
3274
|
+
await store3?.removeItem(key2);
|
|
3277
3275
|
})().catch(() => void 0);
|
|
3278
3276
|
}
|
|
3279
3277
|
async function read3(options2 = {}) {
|
|
@@ -3318,14 +3316,14 @@ function create2(options) {
|
|
|
3318
3316
|
function serialized(fn) {
|
|
3319
3317
|
const locks = globalThis.navigator?.locks;
|
|
3320
3318
|
if (!locks || !writes) return fn();
|
|
3321
|
-
const
|
|
3322
|
-
return locks.request(
|
|
3319
|
+
const key2 = `${name}:authorize`;
|
|
3320
|
+
return locks.request(key2, { ifAvailable: true }, async (held3) => {
|
|
3323
3321
|
if (held3) return await fn();
|
|
3324
3322
|
await hydrate().catch(() => void 0);
|
|
3325
3323
|
const current = context().session;
|
|
3326
3324
|
if (current && !expired3(current)) return await fn();
|
|
3327
3325
|
const signal = AbortSignal.timeout(authorizeWait);
|
|
3328
|
-
return await locks.request(
|
|
3326
|
+
return await locks.request(key2, { signal }, async () => {
|
|
3329
3327
|
await reload({ hooks: true }).catch(() => void 0);
|
|
3330
3328
|
return await fn();
|
|
3331
3329
|
}).catch((error3) => {
|
|
@@ -3659,7 +3657,7 @@ function create2(options) {
|
|
|
3659
3657
|
}
|
|
3660
3658
|
const [stored, logout] = await Promise.all(
|
|
3661
3659
|
[`${name}:signed-out`, `${name}:signed-out:logout`].map(
|
|
3662
|
-
(
|
|
3660
|
+
(key2) => (async () => store3?.getItem(key2))().catch(() => void 0)
|
|
3663
3661
|
)
|
|
3664
3662
|
);
|
|
3665
3663
|
return stored === true || typeof logout === "string";
|
|
@@ -4754,7 +4752,7 @@ var machines2;
|
|
|
4754
4752
|
const times = [
|
|
4755
4753
|
...session2.accessKey ? [session2.accessKey] : [],
|
|
4756
4754
|
...session2.accessKeys ?? []
|
|
4757
|
-
].map((
|
|
4755
|
+
].map((key2) => expiry(key2) ?? Infinity);
|
|
4758
4756
|
if (!session2.accessKey && !local(session2))
|
|
4759
4757
|
times.push(session2.refreshToken ? Infinity : session2.expiresAt);
|
|
4760
4758
|
return Math.max(0, ...times);
|
|
@@ -5204,12 +5202,12 @@ function create3() {
|
|
|
5204
5202
|
});
|
|
5205
5203
|
}
|
|
5206
5204
|
return {
|
|
5207
|
-
getItem: (
|
|
5208
|
-
async removeItem(
|
|
5209
|
-
await run2("readwrite", (objectStore) => objectStore.delete(
|
|
5205
|
+
getItem: (key2) => run2("readonly", (objectStore) => objectStore.get(key2)),
|
|
5206
|
+
async removeItem(key2) {
|
|
5207
|
+
await run2("readwrite", (objectStore) => objectStore.delete(key2));
|
|
5210
5208
|
},
|
|
5211
|
-
async setItem(
|
|
5212
|
-
await run2("readwrite", (objectStore) => objectStore.put(value,
|
|
5209
|
+
async setItem(key2, value) {
|
|
5210
|
+
await run2("readwrite", (objectStore) => objectStore.put(value, key2));
|
|
5213
5211
|
}
|
|
5214
5212
|
};
|
|
5215
5213
|
}
|
|
@@ -5237,7 +5235,7 @@ function serialize2(options = {}) {
|
|
|
5237
5235
|
var configured = /* @__PURE__ */ Symbol("chain.configured");
|
|
5238
5236
|
function create4(options) {
|
|
5239
5237
|
const { name, store: store3 } = options;
|
|
5240
|
-
const
|
|
5238
|
+
const key2 = `${name}:chain`;
|
|
5241
5239
|
const chains = served(options);
|
|
5242
5240
|
const listeners = /* @__PURE__ */ new Set();
|
|
5243
5241
|
let chainId = options.chainId;
|
|
@@ -5249,7 +5247,7 @@ function create4(options) {
|
|
|
5249
5247
|
for (const listener of listeners) listener(next, previous);
|
|
5250
5248
|
}
|
|
5251
5249
|
async function read3() {
|
|
5252
|
-
const stored = await store3?.getItem(
|
|
5250
|
+
const stored = await store3?.getItem(key2);
|
|
5253
5251
|
if (typeof stored === "number" && Number.isSafeInteger(stored) && chains.includes(stored))
|
|
5254
5252
|
return stored;
|
|
5255
5253
|
return void 0;
|
|
@@ -5272,7 +5270,7 @@ function create4(options) {
|
|
|
5272
5270
|
stored: async () => await read3() ?? options.chainId,
|
|
5273
5271
|
async set(next) {
|
|
5274
5272
|
await load().catch(() => void 0);
|
|
5275
|
-
await store3?.setItem(
|
|
5273
|
+
await store3?.setItem(key2, next);
|
|
5276
5274
|
apply(next);
|
|
5277
5275
|
},
|
|
5278
5276
|
subscribe(listener) {
|
|
@@ -5290,9 +5288,6 @@ function served(options) {
|
|
|
5290
5288
|
return chains.includes(chainId) ? chains : [chainId, ...chains];
|
|
5291
5289
|
}
|
|
5292
5290
|
|
|
5293
|
-
// ../../accounts/src/internal/viem/Settings.ts
|
|
5294
|
-
var key2 = /* @__PURE__ */ Symbol("viem.settings");
|
|
5295
|
-
|
|
5296
5291
|
// ../../accounts/src/Plugin.ts
|
|
5297
5292
|
function from7(plugin) {
|
|
5298
5293
|
return plugin;
|
|
@@ -5492,16 +5487,16 @@ function from8(options = {}) {
|
|
|
5492
5487
|
function redactThis() {
|
|
5493
5488
|
if (this.clientSecret === void 0 && this.dpop === void 0) return this;
|
|
5494
5489
|
const copy = {};
|
|
5495
|
-
for (const [
|
|
5490
|
+
for (const [key2, value] of Object.entries(this)) {
|
|
5496
5491
|
const projected = (() => {
|
|
5497
5492
|
if (value === this) return copy;
|
|
5498
|
-
if (
|
|
5499
|
-
if (
|
|
5493
|
+
if (key2 === "clientSecret" && value !== void 0) return "[redacted]";
|
|
5494
|
+
if (key2 !== "dpop" || !value) return value;
|
|
5500
5495
|
const dpop2 = value;
|
|
5501
5496
|
const { crv, kty, x, y } = dpop2.jwk;
|
|
5502
5497
|
return { jwk: { crv, kty, x, y }, privateKey: dpop2.privateKey };
|
|
5503
5498
|
})();
|
|
5504
|
-
Object.defineProperty(copy,
|
|
5499
|
+
Object.defineProperty(copy, key2, {
|
|
5505
5500
|
configurable: true,
|
|
5506
5501
|
enumerable: true,
|
|
5507
5502
|
value: projected,
|
|
@@ -5818,7 +5813,7 @@ function create5(options = {}) {
|
|
|
5818
5813
|
function connections2() {
|
|
5819
5814
|
if (!connectionsOptions)
|
|
5820
5815
|
return Promise.reject(new ConnectionsRequiredError());
|
|
5821
|
-
attached ??= import("./Connections-
|
|
5816
|
+
attached ??= import("./Connections-WZLJRN7E.js").then(
|
|
5822
5817
|
(module) => module.attach(config, connectionsOptions)
|
|
5823
5818
|
);
|
|
5824
5819
|
return attached;
|
|
@@ -5873,15 +5868,9 @@ function create5(options = {}) {
|
|
|
5873
5868
|
revoke: async (parameters) => (await connections2()).revoke(parameters),
|
|
5874
5869
|
revokeAccessKey: async (parameters) => (await connections2()).revokeAccessKey(parameters)
|
|
5875
5870
|
},
|
|
5876
|
-
// The guest's module loads from a chunk of its own, so an app that pays no guest bundles none of
|
|
5877
|
-
// it.
|
|
5878
|
-
guest: {
|
|
5879
|
-
disconnect: async () => (await import("./guest-ENU3ZVH5.js")).disconnect(config),
|
|
5880
|
-
get: async () => (await import("./guest-ENU3ZVH5.js")).get(config)
|
|
5881
|
-
},
|
|
5882
5871
|
handler: {
|
|
5883
5872
|
async fetch(request2) {
|
|
5884
|
-
server ??= import("./Server-
|
|
5873
|
+
server ??= import("./Server-NCF5HP6A.js").then(
|
|
5885
5874
|
(module) => module.create({
|
|
5886
5875
|
accessKeys: connectionsOptions ? async () => (await connections2()).accessKeyEndpoint : void 0,
|
|
5887
5876
|
// The `backend` plugin's actions sit on the instance under its `id`.
|
|
@@ -5911,22 +5900,6 @@ function create5(options = {}) {
|
|
|
5911
5900
|
amount(parameters.amount);
|
|
5912
5901
|
to(parameters.to);
|
|
5913
5902
|
const memo2 = parameters.memo === void 0 ? void 0 : memo(parameters.memo);
|
|
5914
|
-
if (parameters.guest && parameters.challenge === void 0 && !fixed && !(context.session.get() ?? await context.session.load())) {
|
|
5915
|
-
const chainId2 = chainOf();
|
|
5916
|
-
const settings = instance.viem?.[key2];
|
|
5917
|
-
const rpc = settings?.rpc(chainId2);
|
|
5918
|
-
const chain2 = settings?.chain(chainId2);
|
|
5919
|
-
return await (await import("./guest-ENU3ZVH5.js")).pay(config, {
|
|
5920
|
-
amount: parameters.amount,
|
|
5921
|
-
chainId: chainId2,
|
|
5922
|
-
memo: parameters.memo,
|
|
5923
|
-
redirectUri: parameters.redirectUri,
|
|
5924
|
-
signal: parameters.signal,
|
|
5925
|
-
to: parameters.to,
|
|
5926
|
-
token: parameters.token,
|
|
5927
|
-
transport: rpc && ((options3) => rpc({ ...options3, chain: options3.chain ?? chain2 }))
|
|
5928
|
-
});
|
|
5929
|
-
}
|
|
5930
5903
|
if (parameters.challenge !== void 0)
|
|
5931
5904
|
return await pay(config, {
|
|
5932
5905
|
...parameters,
|
|
@@ -5936,10 +5909,10 @@ function create5(options = {}) {
|
|
|
5936
5909
|
const named2 = () => {
|
|
5937
5910
|
if (!fixed) return void 0;
|
|
5938
5911
|
const chainId2 = chainOf();
|
|
5939
|
-
const
|
|
5912
|
+
const key2 = [fixed.accessKey, ...fixed.accessKeys ?? []].find(
|
|
5940
5913
|
(entry) => entry && Number(entry.chainId) === chainId2 && !expired2(entry)
|
|
5941
5914
|
);
|
|
5942
|
-
if (!
|
|
5915
|
+
if (!key2) {
|
|
5943
5916
|
const held3 = [fixed.accessKey, ...fixed.accessKeys ?? []].filter(
|
|
5944
5917
|
(entry) => entry !== void 0
|
|
5945
5918
|
);
|
|
@@ -5947,7 +5920,7 @@ function create5(options = {}) {
|
|
|
5947
5920
|
throw new SignedOutError();
|
|
5948
5921
|
throw new AccessKeyRequiredError();
|
|
5949
5922
|
}
|
|
5950
|
-
if (parameters.account !== void 0 && parameters.account.toLowerCase() !==
|
|
5923
|
+
if (parameters.account !== void 0 && parameters.account.toLowerCase() !== key2.account.toLowerCase())
|
|
5951
5924
|
throw new RequestError({
|
|
5952
5925
|
code: "invalid_request",
|
|
5953
5926
|
field: "account",
|
|
@@ -5955,7 +5928,7 @@ function create5(options = {}) {
|
|
|
5955
5928
|
reason: "invalid_field",
|
|
5956
5929
|
status: 0
|
|
5957
5930
|
});
|
|
5958
|
-
return
|
|
5931
|
+
return key2.account;
|
|
5959
5932
|
};
|
|
5960
5933
|
const own2 = () => {
|
|
5961
5934
|
const held3 = context.session.get();
|
|
@@ -6242,7 +6215,6 @@ var reserved = /* @__PURE__ */ new Set([
|
|
|
6242
6215
|
"config",
|
|
6243
6216
|
"connection",
|
|
6244
6217
|
"connections",
|
|
6245
|
-
"guest",
|
|
6246
6218
|
"handler",
|
|
6247
6219
|
"pay",
|
|
6248
6220
|
"session",
|
|
@@ -6414,24 +6386,16 @@ export {
|
|
|
6414
6386
|
received,
|
|
6415
6387
|
checkState,
|
|
6416
6388
|
error2,
|
|
6417
|
-
parameter,
|
|
6418
6389
|
url,
|
|
6419
6390
|
frames,
|
|
6420
6391
|
read,
|
|
6421
6392
|
register,
|
|
6422
|
-
|
|
6423
|
-
memo,
|
|
6424
|
-
to,
|
|
6425
|
-
devIds,
|
|
6426
|
-
ids,
|
|
6427
|
-
parameter2,
|
|
6393
|
+
parameter2 as parameter,
|
|
6428
6394
|
openPopup,
|
|
6429
6395
|
watchPopup,
|
|
6430
6396
|
coinflow,
|
|
6431
6397
|
activated,
|
|
6432
6398
|
http,
|
|
6433
|
-
BlockedError,
|
|
6434
|
-
OriginError,
|
|
6435
6399
|
PageRequiredError,
|
|
6436
6400
|
get,
|
|
6437
6401
|
pay,
|
|
@@ -6442,7 +6406,7 @@ export {
|
|
|
6442
6406
|
account_exports,
|
|
6443
6407
|
cli,
|
|
6444
6408
|
thirdParty,
|
|
6445
|
-
amount2,
|
|
6409
|
+
amount2 as amount,
|
|
6446
6410
|
of,
|
|
6447
6411
|
from4 as from2,
|
|
6448
6412
|
resolve as resolve2,
|
|
@@ -6483,7 +6447,6 @@ export {
|
|
|
6483
6447
|
getAccount,
|
|
6484
6448
|
get3 as get2,
|
|
6485
6449
|
configured,
|
|
6486
|
-
key2,
|
|
6487
6450
|
from7 as from4,
|
|
6488
6451
|
flatten,
|
|
6489
6452
|
AccessKeyRequiredError,
|