@tempoxyz/id 0.0.0-pr-723.sha-4442437 → 0.0.0-pr-733.sha-e545d6e
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/{Connections-DSJQ7HJR.js → Connections-FMSXLTDQ.js} +2 -2
- package/dist/{Sheet-BDE6H6G7.js → Sheet-NWJMJ4Y6.js} +1 -1
- package/dist/{chunk-6BI5RYRU.js → chunk-IVSEEABZ.js} +1 -1
- package/dist/{chunk-ST6NQBMT.js → chunk-OWN434NG.js} +21 -52
- package/dist/{chunk-FUBHMKQE.js → chunk-SQYUAMGZ.js} +1 -1
- package/dist/commands/login.js +3 -3
- package/dist/commands/logout.js +3 -3
- package/dist/commands/whoami.js +3 -3
- package/dist/{dialog-77GKVXR7.js → dialog-YGV3SM4O.js} +1 -1
- package/package.json +1 -1
|
@@ -1026,9 +1026,9 @@ async function authorizeUrl(auth, options) {
|
|
|
1026
1026
|
if (!accessKey2 && options.challenge !== void 0)
|
|
1027
1027
|
throw new ChallengeWithoutKeyError();
|
|
1028
1028
|
const redirectUri = options.redirectUri ?? auth.redirectUri ?? `${window.location.origin}/`;
|
|
1029
|
-
const key = accessKey2
|
|
1029
|
+
const key = accessKey2 ? await resolve(accessKey2) : void 0;
|
|
1030
1030
|
const pending = from2({
|
|
1031
|
-
...key ? key.material :
|
|
1031
|
+
...key ? key.material : { key: false },
|
|
1032
1032
|
chainId: auth.chainId,
|
|
1033
1033
|
clientId: auth.clientId,
|
|
1034
1034
|
redirectUri,
|
|
@@ -1036,13 +1036,9 @@ async function authorizeUrl(auth, options) {
|
|
|
1036
1036
|
state: Base644.fromBytes(Bytes2.random(16), base64url),
|
|
1037
1037
|
verifier: Base644.fromBytes(Bytes2.random(32), base64url)
|
|
1038
1038
|
});
|
|
1039
|
-
const authorization2 = (
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
return keyAuthorization(auth, {
|
|
1043
|
-
accessKey: { ...accessKey2, account: key.accessKey }
|
|
1044
|
-
});
|
|
1045
|
-
})();
|
|
1039
|
+
const authorization2 = key && accessKey2 ? keyAuthorization(auth, {
|
|
1040
|
+
accessKey: { ...accessKey2, account: key.accessKey }
|
|
1041
|
+
}) : void 0;
|
|
1046
1042
|
const url = new URL("/oauth2/authorize", auth.url);
|
|
1047
1043
|
const parameters = new URLSearchParams({
|
|
1048
1044
|
...options.challenge === void 0 ? {} : { challenge: options.challenge },
|
|
@@ -1099,38 +1095,22 @@ function request(auth, options) {
|
|
|
1099
1095
|
};
|
|
1100
1096
|
}
|
|
1101
1097
|
function keyAuthorization(auth, options) {
|
|
1102
|
-
const {
|
|
1103
|
-
const permissions2 = resolve2(
|
|
1098
|
+
const { account: signer } = options.accessKey;
|
|
1099
|
+
const permissions2 = resolve2(options.accessKey, {
|
|
1104
1100
|
chainId: auth.chainId
|
|
1105
1101
|
});
|
|
1106
|
-
const
|
|
1107
|
-
if ("address" in accessKey2)
|
|
1108
|
-
return {
|
|
1109
|
-
account: options.account ?? accessKey2.access,
|
|
1110
|
-
address: accessKey2.address,
|
|
1111
|
-
keyType: accessKey2.type ?? "secp256k1",
|
|
1112
|
-
preimage: accessKey2.preimage
|
|
1113
|
-
};
|
|
1114
|
-
const { account: signer } = accessKey2;
|
|
1115
|
-
return {
|
|
1116
|
-
account: options.account ?? (signer.accessKeyAddress ? signer.address : void 0),
|
|
1117
|
-
address: signer.accessKeyAddress ?? signer.address,
|
|
1118
|
-
keyType: signer.keyType,
|
|
1119
|
-
preimage: void 0
|
|
1120
|
-
};
|
|
1121
|
-
})();
|
|
1102
|
+
const account2 = options.account ?? (signer.accessKeyAddress ? signer.address : void 0);
|
|
1122
1103
|
return {
|
|
1123
|
-
...
|
|
1124
|
-
address:
|
|
1104
|
+
...account2 ? { account: account2 } : {},
|
|
1105
|
+
address: signer.accessKeyAddress ?? signer.address,
|
|
1125
1106
|
chainId: Hex2.fromNumber(permissions2.chainId),
|
|
1126
1107
|
expiry: permissions2.expiry,
|
|
1127
|
-
keyType:
|
|
1108
|
+
keyType: signer.keyType,
|
|
1128
1109
|
limits: permissions2.limits?.map(({ limit, period, token: token2 }) => ({
|
|
1129
1110
|
limit: Hex2.fromNumber(limit),
|
|
1130
1111
|
...period ? { period } : {},
|
|
1131
1112
|
token: token2
|
|
1132
1113
|
})),
|
|
1133
|
-
...named.preimage ? { preimage: named.preimage } : {},
|
|
1134
1114
|
scopes: permissions2.scopes
|
|
1135
1115
|
};
|
|
1136
1116
|
}
|
|
@@ -1820,7 +1800,7 @@ async function open(auth, options) {
|
|
|
1820
1800
|
throw new OriginError({ origin: window.location.origin, redirectUri });
|
|
1821
1801
|
if (mode === "popup" && options.mode !== "popup" && !activated()) {
|
|
1822
1802
|
const address2 = await abortable(read2(), { signal });
|
|
1823
|
-
const Sheet = await import("./Sheet-
|
|
1803
|
+
const Sheet = await import("./Sheet-NWJMJ4Y6.js");
|
|
1824
1804
|
return await new Promise((resolve3, reject) => {
|
|
1825
1805
|
const abort = () => {
|
|
1826
1806
|
close();
|
|
@@ -1871,7 +1851,7 @@ async function watch(auth, options) {
|
|
|
1871
1851
|
try {
|
|
1872
1852
|
return await new Promise(
|
|
1873
1853
|
(resolve3, reject) => {
|
|
1874
|
-
void import("./Sheet-
|
|
1854
|
+
void import("./Sheet-NWJMJ4Y6.js").then(
|
|
1875
1855
|
(Sheet) => {
|
|
1876
1856
|
if (settled) return;
|
|
1877
1857
|
unblock = Sheet.waiting({
|
|
@@ -1936,7 +1916,7 @@ function parse(url, options) {
|
|
|
1936
1916
|
async function frame(auth, options) {
|
|
1937
1917
|
const { redirectUri, signal, toUrl } = options;
|
|
1938
1918
|
const address2 = await abortable(options.address, { signal });
|
|
1939
|
-
const Sheet = await import("./Sheet-
|
|
1919
|
+
const Sheet = await import("./Sheet-NWJMJ4Y6.js");
|
|
1940
1920
|
signal?.throwIfAborted();
|
|
1941
1921
|
let close;
|
|
1942
1922
|
let abort;
|
|
@@ -2104,7 +2084,7 @@ function complete3(auth, options = {}) {
|
|
|
2104
2084
|
removed
|
|
2105
2085
|
]);
|
|
2106
2086
|
return finish({
|
|
2107
|
-
accessKey: options.accessKey,
|
|
2087
|
+
accessKey: own(options.accessKey),
|
|
2108
2088
|
body,
|
|
2109
2089
|
pending: stored
|
|
2110
2090
|
});
|
|
@@ -2117,7 +2097,7 @@ async function createUrl(auth, options = {}) {
|
|
|
2117
2097
|
}
|
|
2118
2098
|
async function handleCallback(auth, options) {
|
|
2119
2099
|
return finish({
|
|
2120
|
-
accessKey: options.accessKey,
|
|
2100
|
+
accessKey: own(options.accessKey),
|
|
2121
2101
|
body: await redeem(auth, {
|
|
2122
2102
|
pending: options.pending,
|
|
2123
2103
|
url: new URL(options.url)
|
|
@@ -2146,7 +2126,7 @@ function handleResult(options) {
|
|
|
2146
2126
|
status: 400
|
|
2147
2127
|
});
|
|
2148
2128
|
return finish({
|
|
2149
|
-
accessKey: options.accessKey,
|
|
2129
|
+
accessKey: own(options.accessKey),
|
|
2150
2130
|
body: authorization2,
|
|
2151
2131
|
pending: options.pending
|
|
2152
2132
|
});
|
|
@@ -2224,24 +2204,13 @@ function finish(options) {
|
|
|
2224
2204
|
signedIn: true,
|
|
2225
2205
|
status: 400
|
|
2226
2206
|
});
|
|
2227
|
-
if (options.accessKey && "address" in options.accessKey) {
|
|
2228
|
-
const tokens3 = tokens(body);
|
|
2229
|
-
return {
|
|
2230
|
-
...tokens3,
|
|
2231
|
-
key: from({
|
|
2232
|
-
account: body.account,
|
|
2233
|
-
keyAuthorization: body.key_authorization
|
|
2234
|
-
}),
|
|
2235
|
-
user: user(tokens3)
|
|
2236
|
-
};
|
|
2237
|
-
}
|
|
2238
2207
|
return authorization(
|
|
2239
2208
|
{
|
|
2240
2209
|
account: body.account,
|
|
2241
2210
|
key_authorization: body.key_authorization,
|
|
2242
2211
|
tokens: body
|
|
2243
2212
|
},
|
|
2244
|
-
{ accessKey:
|
|
2213
|
+
{ accessKey: options.accessKey, material }
|
|
2245
2214
|
);
|
|
2246
2215
|
}
|
|
2247
2216
|
async function prefetch(auth) {
|
|
@@ -4967,7 +4936,7 @@ var signInIds = /* @__PURE__ */ new Set([
|
|
|
4967
4936
|
function plugin() {
|
|
4968
4937
|
let loading;
|
|
4969
4938
|
function load() {
|
|
4970
|
-
loading ??= import("./dialog-
|
|
4939
|
+
loading ??= import("./dialog-YGV3SM4O.js").then((module) => module.dialog()).catch((error3) => {
|
|
4971
4940
|
loading = void 0;
|
|
4972
4941
|
throw error3;
|
|
4973
4942
|
});
|
|
@@ -5464,7 +5433,7 @@ function create5(options = {}) {
|
|
|
5464
5433
|
function connections2() {
|
|
5465
5434
|
if (!connectionsOptions)
|
|
5466
5435
|
return Promise.reject(new ConnectionsRequiredError());
|
|
5467
|
-
attached ??= import("./Connections-
|
|
5436
|
+
attached ??= import("./Connections-FMSXLTDQ.js").then(
|
|
5468
5437
|
(module) => module.attach(config, connectionsOptions)
|
|
5469
5438
|
);
|
|
5470
5439
|
return attached;
|
|
@@ -5517,7 +5486,7 @@ function create5(options = {}) {
|
|
|
5517
5486
|
(module) => module.create({
|
|
5518
5487
|
accessKeys: connectionsOptions ? async () => (await connections2()).keyEndpoint : void 0,
|
|
5519
5488
|
basePath: handlerOptions.basePath,
|
|
5520
|
-
// The relay
|
|
5489
|
+
// The relay checks no caller, so it is served only on request. The `relay` plugin's
|
|
5521
5490
|
// `extend` adds its route to the instance after this object.
|
|
5522
5491
|
relay: handlerOptions.relay && relaying ? () => instance.relay : void 0
|
|
5523
5492
|
})
|
package/dist/commands/login.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
env,
|
|
3
3
|
login
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-SQYUAMGZ.js";
|
|
5
|
+
import "../chunk-IVSEEABZ.js";
|
|
6
|
+
import "../chunk-OWN434NG.js";
|
|
7
7
|
import "../chunk-YW5DUQT3.js";
|
|
8
8
|
import "../chunk-MLKGABMK.js";
|
|
9
9
|
|
package/dist/commands/logout.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
env,
|
|
3
3
|
remove
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-SQYUAMGZ.js";
|
|
5
|
+
import "../chunk-IVSEEABZ.js";
|
|
6
|
+
import "../chunk-OWN434NG.js";
|
|
7
7
|
import "../chunk-YW5DUQT3.js";
|
|
8
8
|
import "../chunk-MLKGABMK.js";
|
|
9
9
|
|
package/dist/commands/whoami.js
CHANGED
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
env,
|
|
3
3
|
signedOut,
|
|
4
4
|
whoami
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-SQYUAMGZ.js";
|
|
6
|
+
import "../chunk-IVSEEABZ.js";
|
|
7
|
+
import "../chunk-OWN434NG.js";
|
|
8
8
|
import "../chunk-YW5DUQT3.js";
|
|
9
9
|
import "../chunk-MLKGABMK.js";
|
|
10
10
|
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"node": ">=24.21"
|
|
10
10
|
},
|
|
11
11
|
"name": "@tempoxyz/id",
|
|
12
|
-
"version": "0.0.0-pr-
|
|
12
|
+
"version": "0.0.0-pr-733.sha-e545d6e",
|
|
13
13
|
"description": "The tempo-id CLI: sign in to Tempo ID, and call its API and the Admin API.",
|
|
14
14
|
"type": "module",
|
|
15
15
|
"bin": {
|