@tempoxyz/id 0.0.0-pr-727.sha-fe7dfac → 0.0.0-pr-723.sha-48cbc94
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-S4VC7KL2.js → Connections-GTESLWTN.js} +2 -2
- package/dist/{Sheet-6E5S5QD7.js → Sheet-GQPH2MUR.js} +1 -1
- package/dist/{chunk-AAKKG4UU.js → chunk-AOIGHDXR.js} +53 -25
- package/dist/{chunk-BX7NKVFJ.js → chunk-DN57D5UC.js} +1 -1
- package/dist/{chunk-FS5AYDBL.js → chunk-K4WPSEXZ.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-G6ERIFYQ.js → dialog-TGNSW7U4.js} +1 -1
- package/package.json +1 -1
|
@@ -1025,9 +1025,9 @@ async function authorizeUrl(auth, options) {
|
|
|
1025
1025
|
if (!accessKey2 && options.challenge !== void 0)
|
|
1026
1026
|
throw new ChallengeWithoutKeyError();
|
|
1027
1027
|
const redirectUri = options.redirectUri ?? auth.redirectUri ?? `${window.location.origin}/`;
|
|
1028
|
-
const key = accessKey2 ? await resolve(accessKey2) : void 0;
|
|
1028
|
+
const key = accessKey2 && !("address" in accessKey2) ? await resolve(accessKey2) : void 0;
|
|
1029
1029
|
const pending = from2({
|
|
1030
|
-
...key ? key.material : { key: false },
|
|
1030
|
+
...key ? key.material : accessKey2 ? {} : { key: false },
|
|
1031
1031
|
chainId: auth.chainId,
|
|
1032
1032
|
clientId: auth.clientId,
|
|
1033
1033
|
redirectUri,
|
|
@@ -1035,9 +1035,13 @@ async function authorizeUrl(auth, options) {
|
|
|
1035
1035
|
state: Base644.fromBytes(Bytes2.random(16), base64url),
|
|
1036
1036
|
verifier: Base644.fromBytes(Bytes2.random(32), base64url)
|
|
1037
1037
|
});
|
|
1038
|
-
const authorization2 =
|
|
1039
|
-
|
|
1040
|
-
|
|
1038
|
+
const authorization2 = (() => {
|
|
1039
|
+
if (!accessKey2) return void 0;
|
|
1040
|
+
if ("address" in accessKey2) return keyAuthorization(auth, { accessKey: accessKey2 });
|
|
1041
|
+
return keyAuthorization(auth, {
|
|
1042
|
+
accessKey: { ...accessKey2, account: key.accessKey }
|
|
1043
|
+
});
|
|
1044
|
+
})();
|
|
1041
1045
|
const url = new URL("/oauth2/authorize", auth.url);
|
|
1042
1046
|
const parameters = new URLSearchParams({
|
|
1043
1047
|
...options.challenge === void 0 ? {} : { challenge: options.challenge },
|
|
@@ -1094,23 +1098,39 @@ function request(auth, options) {
|
|
|
1094
1098
|
};
|
|
1095
1099
|
}
|
|
1096
1100
|
function keyAuthorization(auth, options) {
|
|
1097
|
-
const {
|
|
1098
|
-
const permissions2 = resolve2(
|
|
1101
|
+
const { accessKey: accessKey2 } = options;
|
|
1102
|
+
const permissions2 = resolve2(accessKey2, {
|
|
1099
1103
|
chainId: auth.chainId
|
|
1100
1104
|
});
|
|
1101
|
-
const
|
|
1105
|
+
const named = (() => {
|
|
1106
|
+
if ("address" in accessKey2)
|
|
1107
|
+
return {
|
|
1108
|
+
account: options.account ?? accessKey2.access,
|
|
1109
|
+
address: accessKey2.address,
|
|
1110
|
+
keyType: accessKey2.type ?? "secp256k1",
|
|
1111
|
+
witness: accessKey2.witness
|
|
1112
|
+
};
|
|
1113
|
+
const { account: signer } = accessKey2;
|
|
1114
|
+
return {
|
|
1115
|
+
account: options.account ?? (signer.accessKeyAddress ? signer.address : void 0),
|
|
1116
|
+
address: signer.accessKeyAddress ?? signer.address,
|
|
1117
|
+
keyType: signer.keyType,
|
|
1118
|
+
witness: void 0
|
|
1119
|
+
};
|
|
1120
|
+
})();
|
|
1102
1121
|
return {
|
|
1103
|
-
...
|
|
1104
|
-
address:
|
|
1122
|
+
...named.account ? { account: named.account } : {},
|
|
1123
|
+
address: named.address,
|
|
1105
1124
|
chainId: Hex2.fromNumber(permissions2.chainId),
|
|
1106
1125
|
expiry: permissions2.expiry,
|
|
1107
|
-
keyType:
|
|
1126
|
+
keyType: named.keyType,
|
|
1108
1127
|
limits: permissions2.limits?.map(({ limit, period, token: token2 }) => ({
|
|
1109
1128
|
limit: Hex2.fromNumber(limit),
|
|
1110
1129
|
...period ? { period } : {},
|
|
1111
1130
|
token: token2
|
|
1112
1131
|
})),
|
|
1113
|
-
scopes: permissions2.scopes
|
|
1132
|
+
scopes: permissions2.scopes,
|
|
1133
|
+
...named.witness ? { witness: named.witness } : {}
|
|
1114
1134
|
};
|
|
1115
1135
|
}
|
|
1116
1136
|
function funding(options) {
|
|
@@ -1799,7 +1819,7 @@ async function open(auth, options) {
|
|
|
1799
1819
|
throw new OriginError({ origin: window.location.origin, redirectUri });
|
|
1800
1820
|
if (mode === "popup" && options.mode !== "popup" && !activated()) {
|
|
1801
1821
|
const address2 = await abortable(read2(), { signal });
|
|
1802
|
-
const Sheet = await import("./Sheet-
|
|
1822
|
+
const Sheet = await import("./Sheet-GQPH2MUR.js");
|
|
1803
1823
|
return await new Promise((resolve3, reject) => {
|
|
1804
1824
|
const abort = () => {
|
|
1805
1825
|
close();
|
|
@@ -1850,7 +1870,7 @@ async function watch(auth, options) {
|
|
|
1850
1870
|
try {
|
|
1851
1871
|
return await new Promise(
|
|
1852
1872
|
(resolve3, reject) => {
|
|
1853
|
-
void import("./Sheet-
|
|
1873
|
+
void import("./Sheet-GQPH2MUR.js").then(
|
|
1854
1874
|
(Sheet) => {
|
|
1855
1875
|
if (settled) return;
|
|
1856
1876
|
unblock = Sheet.waiting({
|
|
@@ -1915,7 +1935,7 @@ function parse(url, options) {
|
|
|
1915
1935
|
async function frame(auth, options) {
|
|
1916
1936
|
const { redirectUri, signal, toUrl } = options;
|
|
1917
1937
|
const address2 = await abortable(options.address, { signal });
|
|
1918
|
-
const Sheet = await import("./Sheet-
|
|
1938
|
+
const Sheet = await import("./Sheet-GQPH2MUR.js");
|
|
1919
1939
|
signal?.throwIfAborted();
|
|
1920
1940
|
let close;
|
|
1921
1941
|
let abort;
|
|
@@ -2083,7 +2103,7 @@ function complete3(auth, options = {}) {
|
|
|
2083
2103
|
removed
|
|
2084
2104
|
]);
|
|
2085
2105
|
return finish({
|
|
2086
|
-
accessKey:
|
|
2106
|
+
accessKey: options.accessKey,
|
|
2087
2107
|
body,
|
|
2088
2108
|
pending: stored
|
|
2089
2109
|
});
|
|
@@ -2096,7 +2116,7 @@ async function createUrl(auth, options = {}) {
|
|
|
2096
2116
|
}
|
|
2097
2117
|
async function handleCallback(auth, options) {
|
|
2098
2118
|
return finish({
|
|
2099
|
-
accessKey:
|
|
2119
|
+
accessKey: options.accessKey,
|
|
2100
2120
|
body: await redeem(auth, {
|
|
2101
2121
|
pending: options.pending,
|
|
2102
2122
|
url: new URL(options.url)
|
|
@@ -2125,7 +2145,7 @@ function handleResult(options) {
|
|
|
2125
2145
|
status: 400
|
|
2126
2146
|
});
|
|
2127
2147
|
return finish({
|
|
2128
|
-
accessKey:
|
|
2148
|
+
accessKey: options.accessKey,
|
|
2129
2149
|
body: authorization2,
|
|
2130
2150
|
pending: options.pending
|
|
2131
2151
|
});
|
|
@@ -2203,13 +2223,24 @@ function finish(options) {
|
|
|
2203
2223
|
signedIn: true,
|
|
2204
2224
|
status: 400
|
|
2205
2225
|
});
|
|
2226
|
+
if (options.accessKey && "address" in options.accessKey) {
|
|
2227
|
+
const tokens3 = tokens(body);
|
|
2228
|
+
return {
|
|
2229
|
+
...tokens3,
|
|
2230
|
+
key: from({
|
|
2231
|
+
account: body.account,
|
|
2232
|
+
keyAuthorization: body.key_authorization
|
|
2233
|
+
}),
|
|
2234
|
+
user: user(tokens3)
|
|
2235
|
+
};
|
|
2236
|
+
}
|
|
2206
2237
|
return authorization(
|
|
2207
2238
|
{
|
|
2208
2239
|
account: body.account,
|
|
2209
2240
|
key_authorization: body.key_authorization,
|
|
2210
2241
|
tokens: body
|
|
2211
2242
|
},
|
|
2212
|
-
{ accessKey: options.accessKey, material }
|
|
2243
|
+
{ accessKey: own(options.accessKey), material }
|
|
2213
2244
|
);
|
|
2214
2245
|
}
|
|
2215
2246
|
async function prefetch(auth) {
|
|
@@ -4877,7 +4908,7 @@ var signInIds = /* @__PURE__ */ new Set([
|
|
|
4877
4908
|
function plugin() {
|
|
4878
4909
|
let loading;
|
|
4879
4910
|
function load() {
|
|
4880
|
-
loading ??= import("./dialog-
|
|
4911
|
+
loading ??= import("./dialog-TGNSW7U4.js").then((module) => module.dialog()).catch((error3) => {
|
|
4881
4912
|
loading = void 0;
|
|
4882
4913
|
throw error3;
|
|
4883
4914
|
});
|
|
@@ -5290,7 +5321,7 @@ function create4(options = {}) {
|
|
|
5290
5321
|
function connections2() {
|
|
5291
5322
|
if (!connectionsOptions)
|
|
5292
5323
|
return Promise.reject(new ConnectionsRequiredError());
|
|
5293
|
-
attached ??= import("./Connections-
|
|
5324
|
+
attached ??= import("./Connections-GTESLWTN.js").then(
|
|
5294
5325
|
(module) => module.attach(config, connectionsOptions)
|
|
5295
5326
|
);
|
|
5296
5327
|
return attached;
|
|
@@ -5643,10 +5674,7 @@ function create2(options) {
|
|
|
5643
5674
|
dialog.setAttribute("aria-hidden", "true");
|
|
5644
5675
|
dialog.inert = true;
|
|
5645
5676
|
const frame3 = document.createElement("iframe");
|
|
5646
|
-
frame3.setAttribute(
|
|
5647
|
-
"allow",
|
|
5648
|
-
`publickey-credentials-create ${origin}; publickey-credentials-get ${origin}`
|
|
5649
|
-
);
|
|
5677
|
+
frame3.setAttribute("allow", `publickey-credentials-get ${origin}`);
|
|
5650
5678
|
frame3.setAttribute("sandbox", "allow-forms allow-same-origin allow-scripts");
|
|
5651
5679
|
frame3.setAttribute("title", "Sign in with Tempo");
|
|
5652
5680
|
frame3.style.height = "376px";
|
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-DN57D5UC.js";
|
|
5
|
+
import "../chunk-K4WPSEXZ.js";
|
|
6
|
+
import "../chunk-AOIGHDXR.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-DN57D5UC.js";
|
|
5
|
+
import "../chunk-K4WPSEXZ.js";
|
|
6
|
+
import "../chunk-AOIGHDXR.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-DN57D5UC.js";
|
|
6
|
+
import "../chunk-K4WPSEXZ.js";
|
|
7
|
+
import "../chunk-AOIGHDXR.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-723.sha-48cbc94",
|
|
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": {
|