@tempoxyz/id 0.0.0-pr-722.sha-145aae4 → 0.0.0-pr-723.sha-e431f51
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-DLVOXLEL.js → Connections-DGFGVF35.js} +2 -2
- package/dist/{Sheet-II5IGP5J.js → Sheet-2NWDVPFR.js} +1 -1
- package/dist/{chunk-O3UAZSAM.js → chunk-5KYR4O7P.js} +1 -1
- package/dist/{chunk-MTJSZT4S.js → chunk-HIKQ4IBM.js} +52 -21
- package/dist/{chunk-7JMEEUUA.js → chunk-MLNEONHA.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-FFLTODHO.js → dialog-PR35OGJM.js} +1 -1
- package/package.json +1 -1
|
@@ -1005,9 +1005,9 @@ async function authorizeUrl(auth, options) {
|
|
|
1005
1005
|
if (!accessKey2 && options.challenge !== void 0)
|
|
1006
1006
|
throw new ChallengeWithoutKeyError();
|
|
1007
1007
|
const redirectUri = options.redirectUri ?? auth.redirectUri ?? `${window.location.origin}/`;
|
|
1008
|
-
const key = accessKey2 ? await resolve(accessKey2) : void 0;
|
|
1008
|
+
const key = accessKey2 && !("address" in accessKey2) ? await resolve(accessKey2) : void 0;
|
|
1009
1009
|
const pending = from2({
|
|
1010
|
-
...key ? key.material : { key: false },
|
|
1010
|
+
...key ? key.material : accessKey2 ? {} : { key: false },
|
|
1011
1011
|
chainId: auth.chainId,
|
|
1012
1012
|
clientId: auth.clientId,
|
|
1013
1013
|
redirectUri,
|
|
@@ -1015,9 +1015,13 @@ async function authorizeUrl(auth, options) {
|
|
|
1015
1015
|
state: Base644.fromBytes(Bytes2.random(16), base64url),
|
|
1016
1016
|
verifier: Base644.fromBytes(Bytes2.random(32), base64url)
|
|
1017
1017
|
});
|
|
1018
|
-
const authorization2 =
|
|
1019
|
-
|
|
1020
|
-
|
|
1018
|
+
const authorization2 = (() => {
|
|
1019
|
+
if (!accessKey2) return void 0;
|
|
1020
|
+
if ("address" in accessKey2) return keyAuthorization(auth, { accessKey: accessKey2 });
|
|
1021
|
+
return keyAuthorization(auth, {
|
|
1022
|
+
accessKey: { ...accessKey2, account: key.accessKey }
|
|
1023
|
+
});
|
|
1024
|
+
})();
|
|
1021
1025
|
const url = new URL("/oauth2/authorize", auth.url);
|
|
1022
1026
|
const parameters = new URLSearchParams({
|
|
1023
1027
|
...options.challenge === void 0 ? {} : { challenge: options.challenge },
|
|
@@ -1074,23 +1078,39 @@ function request(auth, options) {
|
|
|
1074
1078
|
};
|
|
1075
1079
|
}
|
|
1076
1080
|
function keyAuthorization(auth, options) {
|
|
1077
|
-
const {
|
|
1078
|
-
const permissions2 = resolve2(
|
|
1081
|
+
const { accessKey: accessKey2 } = options;
|
|
1082
|
+
const permissions2 = resolve2(accessKey2, {
|
|
1079
1083
|
chainId: auth.chainId
|
|
1080
1084
|
});
|
|
1081
|
-
const
|
|
1085
|
+
const named = (() => {
|
|
1086
|
+
if ("address" in accessKey2)
|
|
1087
|
+
return {
|
|
1088
|
+
account: options.account ?? accessKey2.access,
|
|
1089
|
+
address: accessKey2.address,
|
|
1090
|
+
keyType: accessKey2.type ?? "secp256k1",
|
|
1091
|
+
witness: accessKey2.witness
|
|
1092
|
+
};
|
|
1093
|
+
const { account: signer } = accessKey2;
|
|
1094
|
+
return {
|
|
1095
|
+
account: options.account ?? (signer.accessKeyAddress ? signer.address : void 0),
|
|
1096
|
+
address: signer.accessKeyAddress ?? signer.address,
|
|
1097
|
+
keyType: signer.keyType,
|
|
1098
|
+
witness: void 0
|
|
1099
|
+
};
|
|
1100
|
+
})();
|
|
1082
1101
|
return {
|
|
1083
|
-
...
|
|
1084
|
-
address:
|
|
1102
|
+
...named.account ? { account: named.account } : {},
|
|
1103
|
+
address: named.address,
|
|
1085
1104
|
chainId: Hex2.fromNumber(permissions2.chainId),
|
|
1086
1105
|
expiry: permissions2.expiry,
|
|
1087
|
-
keyType:
|
|
1106
|
+
keyType: named.keyType,
|
|
1088
1107
|
limits: permissions2.limits?.map(({ limit, period, token: token2 }) => ({
|
|
1089
1108
|
limit: Hex2.fromNumber(limit),
|
|
1090
1109
|
...period ? { period } : {},
|
|
1091
1110
|
token: token2
|
|
1092
1111
|
})),
|
|
1093
|
-
scopes: permissions2.scopes
|
|
1112
|
+
scopes: permissions2.scopes,
|
|
1113
|
+
...named.witness ? { witness: named.witness } : {}
|
|
1094
1114
|
};
|
|
1095
1115
|
}
|
|
1096
1116
|
function funding(options) {
|
|
@@ -1768,7 +1788,7 @@ async function open(auth, options) {
|
|
|
1768
1788
|
throw new OriginError({ origin: window.location.origin, redirectUri });
|
|
1769
1789
|
if (mode === "popup" && options.mode !== "popup" && !activated()) {
|
|
1770
1790
|
const address2 = await abortable(read2(), { signal });
|
|
1771
|
-
const Sheet = await import("./Sheet-
|
|
1791
|
+
const Sheet = await import("./Sheet-2NWDVPFR.js");
|
|
1772
1792
|
return await new Promise((resolve3, reject) => {
|
|
1773
1793
|
const abort = () => {
|
|
1774
1794
|
close();
|
|
@@ -1819,7 +1839,7 @@ async function watch(auth, options) {
|
|
|
1819
1839
|
try {
|
|
1820
1840
|
return await new Promise(
|
|
1821
1841
|
(resolve3, reject) => {
|
|
1822
|
-
void import("./Sheet-
|
|
1842
|
+
void import("./Sheet-2NWDVPFR.js").then(
|
|
1823
1843
|
(Sheet) => {
|
|
1824
1844
|
if (settled) return;
|
|
1825
1845
|
unblock = Sheet.waiting({
|
|
@@ -1884,7 +1904,7 @@ function parse(url, options) {
|
|
|
1884
1904
|
async function frame(auth, options) {
|
|
1885
1905
|
const { redirectUri, signal, toUrl } = options;
|
|
1886
1906
|
const address2 = await abortable(options.address, { signal });
|
|
1887
|
-
const Sheet = await import("./Sheet-
|
|
1907
|
+
const Sheet = await import("./Sheet-2NWDVPFR.js");
|
|
1888
1908
|
signal?.throwIfAborted();
|
|
1889
1909
|
let close;
|
|
1890
1910
|
let abort;
|
|
@@ -2052,7 +2072,7 @@ function complete3(auth, options = {}) {
|
|
|
2052
2072
|
removed
|
|
2053
2073
|
]);
|
|
2054
2074
|
return finish({
|
|
2055
|
-
accessKey:
|
|
2075
|
+
accessKey: options.accessKey,
|
|
2056
2076
|
body,
|
|
2057
2077
|
pending: stored
|
|
2058
2078
|
});
|
|
@@ -2065,7 +2085,7 @@ async function createUrl(auth, options = {}) {
|
|
|
2065
2085
|
}
|
|
2066
2086
|
async function handleCallback(auth, options) {
|
|
2067
2087
|
return finish({
|
|
2068
|
-
accessKey:
|
|
2088
|
+
accessKey: options.accessKey,
|
|
2069
2089
|
body: await redeem(auth, {
|
|
2070
2090
|
pending: options.pending,
|
|
2071
2091
|
url: new URL(options.url)
|
|
@@ -2094,7 +2114,7 @@ function handleResult(options) {
|
|
|
2094
2114
|
status: 400
|
|
2095
2115
|
});
|
|
2096
2116
|
return finish({
|
|
2097
|
-
accessKey:
|
|
2117
|
+
accessKey: options.accessKey,
|
|
2098
2118
|
body: authorization2,
|
|
2099
2119
|
pending: options.pending
|
|
2100
2120
|
});
|
|
@@ -2172,13 +2192,24 @@ function finish(options) {
|
|
|
2172
2192
|
signedIn: true,
|
|
2173
2193
|
status: 400
|
|
2174
2194
|
});
|
|
2195
|
+
if (options.accessKey && "address" in options.accessKey) {
|
|
2196
|
+
const tokens3 = tokens(body);
|
|
2197
|
+
return {
|
|
2198
|
+
...tokens3,
|
|
2199
|
+
key: from({
|
|
2200
|
+
account: body.account,
|
|
2201
|
+
keyAuthorization: body.key_authorization
|
|
2202
|
+
}),
|
|
2203
|
+
user: user(tokens3)
|
|
2204
|
+
};
|
|
2205
|
+
}
|
|
2175
2206
|
return authorization(
|
|
2176
2207
|
{
|
|
2177
2208
|
account: body.account,
|
|
2178
2209
|
key_authorization: body.key_authorization,
|
|
2179
2210
|
tokens: body
|
|
2180
2211
|
},
|
|
2181
|
-
{ accessKey: options.accessKey, material }
|
|
2212
|
+
{ accessKey: own(options.accessKey), material }
|
|
2182
2213
|
);
|
|
2183
2214
|
}
|
|
2184
2215
|
async function prefetch(auth) {
|
|
@@ -4712,7 +4743,7 @@ var signInIds = /* @__PURE__ */ new Set([
|
|
|
4712
4743
|
function plugin() {
|
|
4713
4744
|
let loading;
|
|
4714
4745
|
function load() {
|
|
4715
|
-
loading ??= import("./dialog-
|
|
4746
|
+
loading ??= import("./dialog-PR35OGJM.js").then((module) => module.dialog()).catch((error3) => {
|
|
4716
4747
|
loading = void 0;
|
|
4717
4748
|
throw error3;
|
|
4718
4749
|
});
|
|
@@ -5116,7 +5147,7 @@ function create4(options = {}) {
|
|
|
5116
5147
|
function connections2() {
|
|
5117
5148
|
if (!connectionsOptions)
|
|
5118
5149
|
return Promise.reject(new ConnectionsRequiredError());
|
|
5119
|
-
attached ??= import("./Connections-
|
|
5150
|
+
attached ??= import("./Connections-DGFGVF35.js").then(
|
|
5120
5151
|
(module) => module.attach(config, connectionsOptions)
|
|
5121
5152
|
);
|
|
5122
5153
|
return attached;
|
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-5KYR4O7P.js";
|
|
5
|
+
import "../chunk-MLNEONHA.js";
|
|
6
|
+
import "../chunk-HIKQ4IBM.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-5KYR4O7P.js";
|
|
5
|
+
import "../chunk-MLNEONHA.js";
|
|
6
|
+
import "../chunk-HIKQ4IBM.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-5KYR4O7P.js";
|
|
6
|
+
import "../chunk-MLNEONHA.js";
|
|
7
|
+
import "../chunk-HIKQ4IBM.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-e431f51",
|
|
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": {
|