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