@alchemy/cli 0.13.0 → 0.15.0
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/{auth-5XFZB2BU.js → auth-57YPPTNF.js} +2 -2
- package/dist/auth-ZBEPAFEP.js +16 -0
- package/dist/{chunk-5BEJA752.js → chunk-CFIDLPKB.js} +12 -0
- package/dist/{chunk-PRSZJXA6.js → chunk-CXR7CCJ7.js} +42 -4
- package/dist/{chunk-I6YQX7PF.js → chunk-CZWKHYTE.js} +1 -1
- package/dist/{chunk-RPSHRYCZ.js → chunk-EJB4WDTU.js} +1 -1
- package/dist/{chunk-PYIVNQEI.js → chunk-M7HFRKW6.js} +4 -4
- package/dist/{chunk-DXQAGBW6.js → chunk-OIRERSZT.js} +1 -1
- package/dist/{chunk-LANOFNO6.js → chunk-PISUI34T.js} +1 -1
- package/dist/{chunk-DWNXGFON.js → chunk-RQDWIB62.js} +2 -2
- package/dist/{chunk-OE6B6S2H.js → chunk-UL5ZSWTE.js} +3 -3
- package/dist/{chunk-5DR7BHUX.js → chunk-WDGPT4OT.js} +6 -6
- package/dist/{errors-6BEPCY5N.js → errors-VS7SGW7B.js} +3 -1
- package/dist/index.js +380 -58
- package/dist/{interactive-6SOB4IYV.js → interactive-3ACOLHPG.js} +7 -7
- package/dist/{onboarding-TYRUMFUL.js → onboarding-L2FTZRYN.js} +6 -6
- package/dist/{policy-prompt-LY6DMMT4.js → policy-prompt-UNNIF63S.js} +5 -5
- package/dist/{resolve-GELBKDTP.js → resolve-IRTGQL4A.js} +3 -3
- package/package.json +1 -1
- package/dist/auth-YB6AALZO.js +0 -16
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
|
|
3
|
+
import {
|
|
4
|
+
registerAuth,
|
|
5
|
+
selectAppAfterAuth
|
|
6
|
+
} from "./chunk-WDGPT4OT.js";
|
|
7
|
+
import "./chunk-CZWKHYTE.js";
|
|
8
|
+
import "./chunk-EJB4WDTU.js";
|
|
9
|
+
import "./chunk-CXR7CCJ7.js";
|
|
10
|
+
import "./chunk-OIRERSZT.js";
|
|
11
|
+
import "./chunk-PISUI34T.js";
|
|
12
|
+
import "./chunk-CFIDLPKB.js";
|
|
13
|
+
export {
|
|
14
|
+
registerAuth,
|
|
15
|
+
selectAppAfterAuth
|
|
16
|
+
};
|
|
@@ -301,6 +301,7 @@ var ErrorCode = {
|
|
|
301
301
|
PAYMENT_REQUIRED: "PAYMENT_REQUIRED",
|
|
302
302
|
SETUP_REQUIRED: "SETUP_REQUIRED",
|
|
303
303
|
QUOTE_FAILED: "QUOTE_FAILED",
|
|
304
|
+
PREFLIGHT_REVERT: "PREFLIGHT_REVERT",
|
|
304
305
|
INTERNAL_ERROR: "INTERNAL_ERROR"
|
|
305
306
|
};
|
|
306
307
|
var RETRYABLE_CODES = /* @__PURE__ */ new Set([
|
|
@@ -321,6 +322,7 @@ var EXIT_CODES = {
|
|
|
321
322
|
PAYMENT_REQUIRED: 9,
|
|
322
323
|
SETUP_REQUIRED: 3,
|
|
323
324
|
QUOTE_FAILED: 10,
|
|
325
|
+
PREFLIGHT_REVERT: 11,
|
|
324
326
|
INTERNAL_ERROR: 1
|
|
325
327
|
};
|
|
326
328
|
var CLIError = class extends Error {
|
|
@@ -414,6 +416,15 @@ function errRPC(code, message) {
|
|
|
414
416
|
function errInvalidArgs(detail) {
|
|
415
417
|
return new CLIError(ErrorCode.INVALID_ARGS, detail);
|
|
416
418
|
}
|
|
419
|
+
function errPreflightRevert(reason, details) {
|
|
420
|
+
return new CLIError(
|
|
421
|
+
ErrorCode.PREFLIGHT_REVERT,
|
|
422
|
+
`Transaction preflight reverted: ${reason}`,
|
|
423
|
+
"Fix the revert reason, lower the amount, adjust allowance/balance, or try a dry run before submitting again.",
|
|
424
|
+
details,
|
|
425
|
+
{ reason }
|
|
426
|
+
);
|
|
427
|
+
}
|
|
417
428
|
function errNotFound(resource) {
|
|
418
429
|
return new CLIError(ErrorCode.NOT_FOUND, `Not found: ${resource}`);
|
|
419
430
|
}
|
|
@@ -549,6 +560,7 @@ export {
|
|
|
549
560
|
errNetworkRequired,
|
|
550
561
|
errRPC,
|
|
551
562
|
errInvalidArgs,
|
|
563
|
+
errPreflightRevert,
|
|
552
564
|
errNotFound,
|
|
553
565
|
errRateLimited,
|
|
554
566
|
errAccessDenied,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
configDir,
|
|
5
5
|
load,
|
|
6
6
|
save
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PISUI34T.js";
|
|
8
8
|
import {
|
|
9
9
|
CLIError,
|
|
10
10
|
ErrorCode,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
redactSensitiveText,
|
|
31
31
|
timeout,
|
|
32
32
|
verbose
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-CFIDLPKB.js";
|
|
34
34
|
|
|
35
35
|
// src/lib/resolve.ts
|
|
36
36
|
import { readFileSync as readFileSync2 } from "fs";
|
|
@@ -1272,8 +1272,10 @@ var walletSessionCapabilitiesSchema = z.object({
|
|
|
1272
1272
|
"evm.signMessage": z.boolean().optional(),
|
|
1273
1273
|
"evm.signTypedData": z.boolean().optional(),
|
|
1274
1274
|
"evm.signAuthorization": z.boolean().optional(),
|
|
1275
|
+
"evm.prepareCalls": z.boolean().optional(),
|
|
1276
|
+
"evm.sendCalls": z.boolean().optional(),
|
|
1275
1277
|
"solana.signTransaction": z.boolean().optional()
|
|
1276
|
-
}).
|
|
1278
|
+
}).catchall(z.boolean());
|
|
1277
1279
|
var walletSessionEnvironmentSchema = z.object({
|
|
1278
1280
|
platform: z.string().min(1),
|
|
1279
1281
|
arch: z.string().min(1),
|
|
@@ -1320,6 +1322,42 @@ var walletSessionSchema = z.object({
|
|
|
1320
1322
|
solana: chainWalletSessionSchema.optional()
|
|
1321
1323
|
}).strict().optional()
|
|
1322
1324
|
}).strict();
|
|
1325
|
+
var LEGACY_PERSISTED_CAPABILITY_KEYS = [
|
|
1326
|
+
"evm.signMessage",
|
|
1327
|
+
"evm.signTypedData",
|
|
1328
|
+
"evm.signAuthorization",
|
|
1329
|
+
"solana.signTransaction"
|
|
1330
|
+
];
|
|
1331
|
+
function persistedCapabilities(capabilities) {
|
|
1332
|
+
if (!capabilities) return void 0;
|
|
1333
|
+
const persisted = {};
|
|
1334
|
+
for (const key of LEGACY_PERSISTED_CAPABILITY_KEYS) {
|
|
1335
|
+
const value = capabilities[key];
|
|
1336
|
+
if (value !== void 0) {
|
|
1337
|
+
persisted[key] = value;
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
return Object.keys(persisted).length > 0 ? persisted : void 0;
|
|
1341
|
+
}
|
|
1342
|
+
function withPersistedChainCapabilities(chainSession) {
|
|
1343
|
+
const { capabilities, ...rest } = chainSession;
|
|
1344
|
+
const persisted = persistedCapabilities(capabilities);
|
|
1345
|
+
return persisted ? { ...rest, capabilities: persisted } : rest;
|
|
1346
|
+
}
|
|
1347
|
+
function toPersistedSession(session) {
|
|
1348
|
+
const aliased = withCompatibilityAliases(session);
|
|
1349
|
+
const { capabilities, sessionsByChain, ...rest } = aliased;
|
|
1350
|
+
const persistedCapabilitiesForSession = persistedCapabilities(capabilities);
|
|
1351
|
+
const persistedSessionsByChain = sessionsByChain ? {
|
|
1352
|
+
...sessionsByChain.evm ? { evm: withPersistedChainCapabilities(sessionsByChain.evm) } : {},
|
|
1353
|
+
...sessionsByChain.solana ? { solana: withPersistedChainCapabilities(sessionsByChain.solana) } : {}
|
|
1354
|
+
} : void 0;
|
|
1355
|
+
return {
|
|
1356
|
+
...rest,
|
|
1357
|
+
...persistedCapabilitiesForSession ? { capabilities: persistedCapabilitiesForSession } : {},
|
|
1358
|
+
...persistedSessionsByChain ? { sessionsByChain: persistedSessionsByChain } : {}
|
|
1359
|
+
};
|
|
1360
|
+
}
|
|
1323
1361
|
function sessionPath() {
|
|
1324
1362
|
return join(configDir(), SESSION_FILE);
|
|
1325
1363
|
}
|
|
@@ -1475,7 +1513,7 @@ function loadStoredSession() {
|
|
|
1475
1513
|
return store.load();
|
|
1476
1514
|
}
|
|
1477
1515
|
function saveSession(session) {
|
|
1478
|
-
getWalletSessionStore().save(
|
|
1516
|
+
getWalletSessionStore().save(toPersistedSession(session));
|
|
1479
1517
|
}
|
|
1480
1518
|
function updateSession(updates) {
|
|
1481
1519
|
const session = loadSession();
|
|
@@ -3,7 +3,7 @@ if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
|
|
|
3
3
|
import {
|
|
4
4
|
gasManagerClientFromFlags,
|
|
5
5
|
toAdminNetworkId
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CXR7CCJ7.js";
|
|
7
7
|
import {
|
|
8
8
|
dim,
|
|
9
9
|
green,
|
|
@@ -11,16 +11,16 @@ import {
|
|
|
11
11
|
promptConfirm,
|
|
12
12
|
promptText,
|
|
13
13
|
withSpinner
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OIRERSZT.js";
|
|
15
15
|
import {
|
|
16
16
|
load,
|
|
17
17
|
save
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-PISUI34T.js";
|
|
19
19
|
import {
|
|
20
20
|
errAppRequired,
|
|
21
21
|
errInvalidArgs,
|
|
22
22
|
errLoginRequired
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-CFIDLPKB.js";
|
|
24
24
|
|
|
25
25
|
// src/lib/policy-prompt.ts
|
|
26
26
|
var CREATE_NEW_SENTINEL = "__create_new__";
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
|
|
3
3
|
import {
|
|
4
4
|
isInteractiveAllowed
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EJB4WDTU.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveAuthToken,
|
|
8
8
|
resolveWalletSession
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CXR7CCJ7.js";
|
|
10
10
|
|
|
11
11
|
// src/lib/onboarding.ts
|
|
12
12
|
var SETUP_CAPABILITY_ORDER = [
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
|
|
3
3
|
import {
|
|
4
4
|
configPath
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PISUI34T.js";
|
|
6
6
|
import {
|
|
7
7
|
esc
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CFIDLPKB.js";
|
|
9
9
|
|
|
10
10
|
// src/lib/update-check.ts
|
|
11
11
|
import { execFileSync } from "child_process";
|
|
@@ -53,7 +53,7 @@ function semverLT(a, b) {
|
|
|
53
53
|
return false;
|
|
54
54
|
}
|
|
55
55
|
function currentVersion() {
|
|
56
|
-
return true ? "0.
|
|
56
|
+
return true ? "0.15.0" : "0.0.0";
|
|
57
57
|
}
|
|
58
58
|
function toUpdateStatus(latestVersion, checkedAt) {
|
|
59
59
|
const current = currentVersion();
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
completeLogin,
|
|
5
5
|
prepareLogin,
|
|
6
6
|
revokeToken
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CZWKHYTE.js";
|
|
8
8
|
import {
|
|
9
9
|
isInteractiveAllowed
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EJB4WDTU.js";
|
|
11
11
|
import {
|
|
12
12
|
AdminClient,
|
|
13
13
|
resolveAuthToken
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CXR7CCJ7.js";
|
|
15
15
|
import {
|
|
16
16
|
bold,
|
|
17
17
|
brand,
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
promptAutocomplete,
|
|
21
21
|
promptText,
|
|
22
22
|
withSpinner
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-OIRERSZT.js";
|
|
24
24
|
import {
|
|
25
25
|
configPath,
|
|
26
26
|
load,
|
|
27
27
|
maskIf,
|
|
28
28
|
save
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-PISUI34T.js";
|
|
30
30
|
import {
|
|
31
31
|
CLIError,
|
|
32
32
|
ErrorCode,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
exitWithError,
|
|
35
35
|
isJSONMode,
|
|
36
36
|
printHuman
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-CFIDLPKB.js";
|
|
38
38
|
|
|
39
39
|
// src/commands/auth.ts
|
|
40
40
|
function registerAuth(program) {
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
errNetworkRequired,
|
|
17
17
|
errNoActiveSession,
|
|
18
18
|
errNotFound,
|
|
19
|
+
errPreflightRevert,
|
|
19
20
|
errRPC,
|
|
20
21
|
errRateLimited,
|
|
21
22
|
errSessionExpired,
|
|
@@ -27,7 +28,7 @@ import {
|
|
|
27
28
|
exitWithError,
|
|
28
29
|
isReplMode,
|
|
29
30
|
setReplMode
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-CFIDLPKB.js";
|
|
31
32
|
export {
|
|
32
33
|
CLIError,
|
|
33
34
|
EXIT_CODES,
|
|
@@ -44,6 +45,7 @@ export {
|
|
|
44
45
|
errNetworkRequired,
|
|
45
46
|
errNoActiveSession,
|
|
46
47
|
errNotFound,
|
|
48
|
+
errPreflightRevert,
|
|
47
49
|
errRPC,
|
|
48
50
|
errRateLimited,
|
|
49
51
|
errSessionExpired,
|
package/dist/index.js
CHANGED
|
@@ -5,23 +5,23 @@ import {
|
|
|
5
5
|
errNotLoggedInForPolicyLookup,
|
|
6
6
|
errSponsorshipNeedsPolicy,
|
|
7
7
|
selectOrCreatePolicy
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-M7HFRKW6.js";
|
|
9
9
|
import {
|
|
10
10
|
registerAuth
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WDGPT4OT.js";
|
|
12
12
|
import {
|
|
13
13
|
openBrowser
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CZWKHYTE.js";
|
|
15
15
|
import {
|
|
16
16
|
SETUP_CAPABILITY_LABELS,
|
|
17
17
|
SETUP_CAPABILITY_ORDER,
|
|
18
18
|
getSetupStatus,
|
|
19
19
|
isSetupComplete,
|
|
20
20
|
shouldRunOnboarding
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-RQDWIB62.js";
|
|
22
22
|
import {
|
|
23
23
|
isInteractiveAllowed
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-EJB4WDTU.js";
|
|
25
25
|
import {
|
|
26
26
|
RpcApiError,
|
|
27
27
|
adminClientFromFlags,
|
|
@@ -63,12 +63,12 @@ import {
|
|
|
63
63
|
updateSession,
|
|
64
64
|
validateNetwork,
|
|
65
65
|
walletNetworkToChain
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-CXR7CCJ7.js";
|
|
67
67
|
import {
|
|
68
68
|
getAvailableUpdate,
|
|
69
69
|
getUpdateStatus,
|
|
70
70
|
printUpdateNotice
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-UL5ZSWTE.js";
|
|
72
72
|
import {
|
|
73
73
|
bold,
|
|
74
74
|
brand,
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
weiToEth,
|
|
93
93
|
withSpinner,
|
|
94
94
|
yellow
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-OIRERSZT.js";
|
|
96
96
|
import {
|
|
97
97
|
KEY_MAP,
|
|
98
98
|
configDir,
|
|
@@ -103,7 +103,7 @@ import {
|
|
|
103
103
|
save,
|
|
104
104
|
toMap,
|
|
105
105
|
validKeys
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-PISUI34T.js";
|
|
107
107
|
import {
|
|
108
108
|
CLIError,
|
|
109
109
|
EXIT_CODES,
|
|
@@ -116,6 +116,7 @@ import {
|
|
|
116
116
|
errNetwork,
|
|
117
117
|
errNoActiveSession,
|
|
118
118
|
errNotFound,
|
|
119
|
+
errPreflightRevert,
|
|
119
120
|
errRPC,
|
|
120
121
|
errRateLimited,
|
|
121
122
|
errSessionExpired,
|
|
@@ -144,7 +145,7 @@ import {
|
|
|
144
145
|
setNoColor,
|
|
145
146
|
timeout,
|
|
146
147
|
verbose
|
|
147
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-CFIDLPKB.js";
|
|
148
149
|
|
|
149
150
|
// src/index.ts
|
|
150
151
|
import { Command, Help } from "commander";
|
|
@@ -581,8 +582,8 @@ function registerConfig(program2) {
|
|
|
581
582
|
"Interactive policy selection requires an interactive terminal. Pass an ID: `alchemy config set evm-gas-policy-id <id>`."
|
|
582
583
|
);
|
|
583
584
|
}
|
|
584
|
-
const { selectOrCreatePolicy: selectOrCreatePolicy2 } = await import("./policy-prompt-
|
|
585
|
-
const { resolveNetwork: resolveNetwork2 } = await import("./resolve-
|
|
585
|
+
const { selectOrCreatePolicy: selectOrCreatePolicy2 } = await import("./policy-prompt-UNNIF63S.js");
|
|
586
|
+
const { resolveNetwork: resolveNetwork2 } = await import("./resolve-IRTGQL4A.js");
|
|
586
587
|
const network = resolveNetwork2(program2);
|
|
587
588
|
await selectOrCreatePolicy2({
|
|
588
589
|
flavor: "sponsorship",
|
|
@@ -636,8 +637,8 @@ function registerConfig(program2) {
|
|
|
636
637
|
"Interactive policy selection requires an interactive terminal. Pass an ID: `alchemy config set solana-fee-policy-id <id>`."
|
|
637
638
|
);
|
|
638
639
|
}
|
|
639
|
-
const { selectOrCreatePolicy: selectOrCreatePolicy2 } = await import("./policy-prompt-
|
|
640
|
-
const { resolveSolanaNetwork: resolveSolanaNetwork2 } = await import("./resolve-
|
|
640
|
+
const { selectOrCreatePolicy: selectOrCreatePolicy2 } = await import("./policy-prompt-UNNIF63S.js");
|
|
641
|
+
const { resolveSolanaNetwork: resolveSolanaNetwork2 } = await import("./resolve-IRTGQL4A.js");
|
|
641
642
|
const network = resolveSolanaNetwork2(program2);
|
|
642
643
|
await selectOrCreatePolicy2({
|
|
643
644
|
flavor: "solana",
|
|
@@ -694,7 +695,7 @@ function registerConfig(program2) {
|
|
|
694
695
|
printJSON(toMap(cfg));
|
|
695
696
|
return;
|
|
696
697
|
}
|
|
697
|
-
const { resolveAuthToken: resolveAuthToken2 } = await import("./resolve-
|
|
698
|
+
const { resolveAuthToken: resolveAuthToken2 } = await import("./resolve-IRTGQL4A.js");
|
|
698
699
|
const validToken = resolveAuthToken2(cfg);
|
|
699
700
|
const authStatus = cfg.auth_token ? validToken ? `${green("\u2713")} authenticated${cfg.auth_token_expires_at ? ` ${dim(`(expires ${cfg.auth_token_expires_at})`)}` : ""}` : `${yellow("\u25C6")} expired${cfg.auth_token_expires_at ? ` ${dim(`(${cfg.auth_token_expires_at})`)}` : ""}` : dim("(not set) \u2014 run 'alchemy auth' to log in");
|
|
700
701
|
const pairs = [
|
|
@@ -1880,7 +1881,9 @@ var CONNECT_TIMEOUT_MS = 5 * 6e4;
|
|
|
1880
1881
|
var DEFAULT_WALLET_CAPABILITIES = {
|
|
1881
1882
|
"evm.signMessage": true,
|
|
1882
1883
|
"evm.signTypedData": true,
|
|
1883
|
-
"evm.signAuthorization": true
|
|
1884
|
+
"evm.signAuthorization": true,
|
|
1885
|
+
"evm.prepareCalls": true,
|
|
1886
|
+
"evm.sendCalls": true
|
|
1884
1887
|
};
|
|
1885
1888
|
var DEFAULT_SOLANA_SESSION_CAPABILITIES = {
|
|
1886
1889
|
"solana.signTransaction": true
|
|
@@ -2060,6 +2063,30 @@ function formatWalletStatus(value) {
|
|
|
2060
2063
|
if (value === "active") return green("active");
|
|
2061
2064
|
return dim(value);
|
|
2062
2065
|
}
|
|
2066
|
+
function walletModeSummary(args) {
|
|
2067
|
+
return {
|
|
2068
|
+
session: {
|
|
2069
|
+
available: args.sessionActive,
|
|
2070
|
+
signing: "delegated session approval",
|
|
2071
|
+
transactionSupport: ["wallet_prepareCalls", "wallet_sendCalls"],
|
|
2072
|
+
preflightSimulation: true,
|
|
2073
|
+
sponsorshipEligible: true,
|
|
2074
|
+
nonceManagement: "Alchemy smart wallet",
|
|
2075
|
+
supportedCallShapes: ["single call", "batch calls", "paymaster capabilities"]
|
|
2076
|
+
},
|
|
2077
|
+
local: {
|
|
2078
|
+
available: args.localEvmConfigured || args.localSolanaConfigured,
|
|
2079
|
+
evmConfigured: args.localEvmConfigured,
|
|
2080
|
+
solanaConfigured: args.localSolanaConfigured,
|
|
2081
|
+
signing: "local private key",
|
|
2082
|
+
transactionSupport: ["wallet_sendCalls for EVM smart-wallet commands", "Solana transaction signing"],
|
|
2083
|
+
preflightSimulation: false,
|
|
2084
|
+
sponsorshipEligible: true,
|
|
2085
|
+
nonceManagement: "local signer / chain-specific client",
|
|
2086
|
+
supportedCallShapes: ["single call", "batch calls when routed through EVM smart-wallet commands"]
|
|
2087
|
+
}
|
|
2088
|
+
};
|
|
2089
|
+
}
|
|
2063
2090
|
function walletKeysDirPath() {
|
|
2064
2091
|
return join(configDir(), WALLET_KEYS_DIR);
|
|
2065
2092
|
}
|
|
@@ -2786,6 +2813,11 @@ function registerWallets(program2) {
|
|
|
2786
2813
|
Boolean(localState.evmAddress)
|
|
2787
2814
|
);
|
|
2788
2815
|
if (isJSONMode()) {
|
|
2816
|
+
const modes = walletModeSummary({
|
|
2817
|
+
sessionActive: snap.status === "active",
|
|
2818
|
+
localEvmConfigured: Boolean(localState.evmAddress),
|
|
2819
|
+
localSolanaConfigured: Boolean(localSolanaAddress)
|
|
2820
|
+
});
|
|
2789
2821
|
printJSON({
|
|
2790
2822
|
// Preserved top-level fields (session-scoped, backward-compatible).
|
|
2791
2823
|
walletAddress: snap.walletAddress,
|
|
@@ -2819,7 +2851,8 @@ function registerWallets(program2) {
|
|
|
2819
2851
|
},
|
|
2820
2852
|
localEvm: localState.evmAddress ? { address: localState.evmAddress, keyFile: localState.evmKeyFile } : null,
|
|
2821
2853
|
localSolana: localSolanaAddress ? { address: localSolanaAddress, keyFile: localState.solanaKeyFile } : null,
|
|
2822
|
-
activeSigner
|
|
2854
|
+
activeSigner,
|
|
2855
|
+
modes
|
|
2823
2856
|
});
|
|
2824
2857
|
return;
|
|
2825
2858
|
}
|
|
@@ -2830,7 +2863,9 @@ function registerWallets(program2) {
|
|
|
2830
2863
|
["Local EVM", localState.evmAddress ?? dim("not configured")],
|
|
2831
2864
|
["Local Solana", localSolanaAddress ?? dim("not configured")],
|
|
2832
2865
|
["Environment", snap.environment ?? dim("none")],
|
|
2833
|
-
["Signer Capabilities", snap.signerCapabilities.length > 0 ? snap.signerCapabilities.join(", ") : dim("none")]
|
|
2866
|
+
["Signer Capabilities", snap.signerCapabilities.length > 0 ? snap.signerCapabilities.join(", ") : dim("none")],
|
|
2867
|
+
["Session Mode", snap.status === "active" ? "smart-wallet calls, preflight simulation, sponsorship eligible, managed nonce" : dim("not active")],
|
|
2868
|
+
["Local Mode", localState.evmAddress || localSolanaAddress ? "local key signing; sponsorship only where command supports it" : dim("not configured")]
|
|
2834
2869
|
];
|
|
2835
2870
|
if (snap.connectionRequestId) {
|
|
2836
2871
|
pairs.push(["Connection Request ID", snap.connectionRequestId]);
|
|
@@ -3336,6 +3371,60 @@ function registerWebhooks(program2) {
|
|
|
3336
3371
|
});
|
|
3337
3372
|
}
|
|
3338
3373
|
|
|
3374
|
+
// src/lib/solana-rpc.ts
|
|
3375
|
+
var SOLANA_DAS_METHODS = /* @__PURE__ */ new Set([
|
|
3376
|
+
"getAsset",
|
|
3377
|
+
"getAssetsByOwner",
|
|
3378
|
+
"searchAssets",
|
|
3379
|
+
"getTokenAccounts",
|
|
3380
|
+
"getAssets",
|
|
3381
|
+
"getAssetProof",
|
|
3382
|
+
"getAssetsByAuthority",
|
|
3383
|
+
"getAssetsByGroup",
|
|
3384
|
+
"getAssetsByCreator",
|
|
3385
|
+
"getAssetSignatures",
|
|
3386
|
+
"getNftEditions"
|
|
3387
|
+
]);
|
|
3388
|
+
function errorText(err) {
|
|
3389
|
+
if (err instanceof CLIError) {
|
|
3390
|
+
return [err.message, err.details].filter(Boolean).join(" ");
|
|
3391
|
+
}
|
|
3392
|
+
if (err instanceof Error) {
|
|
3393
|
+
return err.message;
|
|
3394
|
+
}
|
|
3395
|
+
return String(err);
|
|
3396
|
+
}
|
|
3397
|
+
function solanaRpcFamilyForMethod(method) {
|
|
3398
|
+
return SOLANA_DAS_METHODS.has(method) ? "das" : "rpc";
|
|
3399
|
+
}
|
|
3400
|
+
function normalizeSolanaDasPaywallError(err) {
|
|
3401
|
+
if (err instanceof CLIError && err.code === ErrorCode.PAYMENT_REQUIRED) {
|
|
3402
|
+
return err;
|
|
3403
|
+
}
|
|
3404
|
+
const detail = errorText(err);
|
|
3405
|
+
if (!/\b(free tier|payg|paid tier|paid plan|upgrade|plan does not|current plan|not available on your plan)\b/i.test(detail)) {
|
|
3406
|
+
return null;
|
|
3407
|
+
}
|
|
3408
|
+
return new CLIError(
|
|
3409
|
+
ErrorCode.PAYMENT_REQUIRED,
|
|
3410
|
+
"Solana DAS request requires a paid Alchemy plan.",
|
|
3411
|
+
"Upgrade your app to PAYG or use a plan with Solana DAS access at https://dashboard.alchemy.com/.",
|
|
3412
|
+
detail || void 0
|
|
3413
|
+
);
|
|
3414
|
+
}
|
|
3415
|
+
async function callSolana(client, family, method, params) {
|
|
3416
|
+
const startedAt = Date.now();
|
|
3417
|
+
debug(`solana ${family} ${method} params`, params);
|
|
3418
|
+
try {
|
|
3419
|
+
const result = await client.call(method, params);
|
|
3420
|
+
debug(`solana ${family} ${method} ok ${Date.now() - startedAt}ms`);
|
|
3421
|
+
return result;
|
|
3422
|
+
} catch (err) {
|
|
3423
|
+
debug(`solana ${family} ${method} failed ${Date.now() - startedAt}ms`, errorText(err));
|
|
3424
|
+
throw err;
|
|
3425
|
+
}
|
|
3426
|
+
}
|
|
3427
|
+
|
|
3339
3428
|
// src/commands/network.ts
|
|
3340
3429
|
function registerNetwork(program2) {
|
|
3341
3430
|
const cmd = program2.command("network").description("Manage networks");
|
|
@@ -5985,7 +6074,7 @@ function registerRpcSurfaceCommand({ root, parent, method }) {
|
|
|
5985
6074
|
result = await withSpinner(
|
|
5986
6075
|
`Calling ${method.name}...`,
|
|
5987
6076
|
`Called ${method.name}`,
|
|
5988
|
-
() => client
|
|
6077
|
+
() => callNetworkRpcMethod(client, method, params)
|
|
5989
6078
|
);
|
|
5990
6079
|
}
|
|
5991
6080
|
printSyntaxJSON(result);
|
|
@@ -5994,6 +6083,20 @@ function registerRpcSurfaceCommand({ root, parent, method }) {
|
|
|
5994
6083
|
}
|
|
5995
6084
|
});
|
|
5996
6085
|
}
|
|
6086
|
+
async function callNetworkRpcMethod(client, method, params) {
|
|
6087
|
+
if (method.family !== "solana") {
|
|
6088
|
+
return await client.call(method.rpcMethod, params);
|
|
6089
|
+
}
|
|
6090
|
+
const solanaFamily = solanaRpcFamilyForMethod(method.rpcMethod);
|
|
6091
|
+
try {
|
|
6092
|
+
return await callSolana(client, solanaFamily, method.rpcMethod, params);
|
|
6093
|
+
} catch (err) {
|
|
6094
|
+
if (solanaFamily === "das") {
|
|
6095
|
+
throw normalizeSolanaDasPaywallError(err) ?? err;
|
|
6096
|
+
}
|
|
6097
|
+
throw err;
|
|
6098
|
+
}
|
|
6099
|
+
}
|
|
5997
6100
|
function parseRpcParams(input) {
|
|
5998
6101
|
const parsed = parseRequiredJSON(input, "--params");
|
|
5999
6102
|
if (Array.isArray(parsed)) {
|
|
@@ -6106,7 +6209,7 @@ function registerSolana(program2) {
|
|
|
6106
6209
|
const result = await withSpinner(
|
|
6107
6210
|
`Calling ${method}\u2026`,
|
|
6108
6211
|
`Called ${method}`,
|
|
6109
|
-
() => client
|
|
6212
|
+
() => callSolana(client, "rpc", method, parseCLIParams(params))
|
|
6110
6213
|
);
|
|
6111
6214
|
printSyntaxJSON(result);
|
|
6112
6215
|
} catch (err) {
|
|
@@ -6123,7 +6226,9 @@ function registerSolana(program2) {
|
|
|
6123
6226
|
const result = await withSpinner(
|
|
6124
6227
|
`Calling ${method}\u2026`,
|
|
6125
6228
|
`Called ${method}`,
|
|
6126
|
-
() => client
|
|
6229
|
+
() => callSolana(client, "das", method, rpcParams).catch((err) => {
|
|
6230
|
+
throw normalizeSolanaDasPaywallError(err) ?? err;
|
|
6231
|
+
})
|
|
6127
6232
|
);
|
|
6128
6233
|
printSyntaxJSON(result);
|
|
6129
6234
|
} catch (err) {
|
|
@@ -6263,6 +6368,41 @@ Examples:
|
|
|
6263
6368
|
}
|
|
6264
6369
|
|
|
6265
6370
|
// src/commands/agent-prompt.ts
|
|
6371
|
+
var AGENT_PROMPT_SCOPES = [
|
|
6372
|
+
"wallet",
|
|
6373
|
+
"evm",
|
|
6374
|
+
"solana",
|
|
6375
|
+
"webhook",
|
|
6376
|
+
"app",
|
|
6377
|
+
"data",
|
|
6378
|
+
"xchain"
|
|
6379
|
+
];
|
|
6380
|
+
var SCOPE_COMMAND_PATHS = {
|
|
6381
|
+
app: ["app", "auth", "config"],
|
|
6382
|
+
data: ["evm data", "evm logs", "evm block", "evm tx", "evm receipt"],
|
|
6383
|
+
evm: ["evm"],
|
|
6384
|
+
solana: ["solana"],
|
|
6385
|
+
wallet: [
|
|
6386
|
+
"wallet",
|
|
6387
|
+
"evm send",
|
|
6388
|
+
"evm contract",
|
|
6389
|
+
"evm swap",
|
|
6390
|
+
"evm approve",
|
|
6391
|
+
"evm status",
|
|
6392
|
+
"xchain bridge"
|
|
6393
|
+
],
|
|
6394
|
+
webhook: ["webhook", "config set webhook-api-key"],
|
|
6395
|
+
xchain: ["xchain"]
|
|
6396
|
+
};
|
|
6397
|
+
var SCOPE_EXAMPLE_MATCHERS = {
|
|
6398
|
+
app: [" app ", " auth ", " config "],
|
|
6399
|
+
data: [" evm data ", " evm logs ", " evm block ", " evm tx ", " evm receipt "],
|
|
6400
|
+
evm: [" evm "],
|
|
6401
|
+
solana: [" solana "],
|
|
6402
|
+
wallet: [" wallet ", " evm send ", " evm swap ", " evm approve ", " xchain bridge "],
|
|
6403
|
+
webhook: [" webhook "],
|
|
6404
|
+
xchain: [" xchain "]
|
|
6405
|
+
};
|
|
6266
6406
|
var RETRYABLE_CODES = /* @__PURE__ */ new Set([
|
|
6267
6407
|
ErrorCode.RATE_LIMITED,
|
|
6268
6408
|
ErrorCode.NETWORK_ERROR
|
|
@@ -6281,6 +6421,7 @@ var ERROR_RECOVERY = {
|
|
|
6281
6421
|
PAYMENT_REQUIRED: "Fund your x402 wallet or switch to API key auth",
|
|
6282
6422
|
SETUP_REQUIRED: "Run preflight: alchemy --json --no-interactive config status, then follow nextCommands",
|
|
6283
6423
|
QUOTE_FAILED: "Quote unavailable; check data.cause for the specific reason (INSUFFICIENT_BALANCE, INSUFFICIENT_LIQUIDITY, UNSUPPORTED_ROUTE, QUOTE_REVERTED, QUOTE_FAILED) and follow the hint",
|
|
6424
|
+
PREFLIGHT_REVERT: "Transaction preflight reverted; inspect data.reason, fix balance/allowance/calldata, and retry with --dry-run when available",
|
|
6284
6425
|
INTERNAL_ERROR: "Unexpected error; retry or report a bug"
|
|
6285
6426
|
};
|
|
6286
6427
|
function buildCommandSchema(cmd) {
|
|
@@ -6315,6 +6456,56 @@ function buildCommandSchema(cmd) {
|
|
|
6315
6456
|
}
|
|
6316
6457
|
return schema;
|
|
6317
6458
|
}
|
|
6459
|
+
function commandMatchesPath(cmd, path) {
|
|
6460
|
+
if (path[0] !== cmd.name) return null;
|
|
6461
|
+
if (path.length === 1) return cmd;
|
|
6462
|
+
if (!cmd.subcommands) return null;
|
|
6463
|
+
const childMatches = filterCommandSchemas(cmd.subcommands, [path.slice(1)]);
|
|
6464
|
+
if (childMatches.length === 0) return null;
|
|
6465
|
+
return {
|
|
6466
|
+
...cmd,
|
|
6467
|
+
subcommands: childMatches
|
|
6468
|
+
};
|
|
6469
|
+
}
|
|
6470
|
+
function filterCommandSchemas(commands, paths) {
|
|
6471
|
+
const filtered = [];
|
|
6472
|
+
for (const cmd of commands) {
|
|
6473
|
+
const matches = paths.map((path) => commandMatchesPath(cmd, path)).filter((match) => Boolean(match));
|
|
6474
|
+
if (matches.length === 0) continue;
|
|
6475
|
+
if (matches.some((match) => match === cmd)) {
|
|
6476
|
+
filtered.push(cmd);
|
|
6477
|
+
continue;
|
|
6478
|
+
}
|
|
6479
|
+
const subcommands = matches.flatMap((match) => match.subcommands ?? []);
|
|
6480
|
+
filtered.push({
|
|
6481
|
+
...cmd,
|
|
6482
|
+
subcommands
|
|
6483
|
+
});
|
|
6484
|
+
}
|
|
6485
|
+
return filtered;
|
|
6486
|
+
}
|
|
6487
|
+
function parseScope(value) {
|
|
6488
|
+
if (value === void 0) return void 0;
|
|
6489
|
+
const normalized = value.trim().toLowerCase();
|
|
6490
|
+
if (AGENT_PROMPT_SCOPES.includes(normalized)) {
|
|
6491
|
+
return normalized;
|
|
6492
|
+
}
|
|
6493
|
+
throw errInvalidArgs(
|
|
6494
|
+
`Unknown agent-prompt scope '${value}'. Use one of: ${AGENT_PROMPT_SCOPES.join(", ")}.`
|
|
6495
|
+
);
|
|
6496
|
+
}
|
|
6497
|
+
function applyScope(payload, scope) {
|
|
6498
|
+
if (!scope) return;
|
|
6499
|
+
payload.scope = scope;
|
|
6500
|
+
payload.commands = filterCommandSchemas(
|
|
6501
|
+
payload.commands,
|
|
6502
|
+
SCOPE_COMMAND_PATHS[scope].map((path) => path.split(" "))
|
|
6503
|
+
);
|
|
6504
|
+
const matchers = SCOPE_EXAMPLE_MATCHERS[scope];
|
|
6505
|
+
payload.examples = payload.examples.filter(
|
|
6506
|
+
(example) => matchers.some((matcher) => ` ${example} `.includes(matcher))
|
|
6507
|
+
);
|
|
6508
|
+
}
|
|
6318
6509
|
function buildAgentPrompt(program2) {
|
|
6319
6510
|
const errors = {};
|
|
6320
6511
|
for (const [code, exitCode] of Object.entries(EXIT_CODES)) {
|
|
@@ -6343,6 +6534,11 @@ function buildAgentPrompt(program2) {
|
|
|
6343
6534
|
command: "alchemy --json --no-interactive config status",
|
|
6344
6535
|
description: "Check auth readiness before first command. Use capabilities.rpc_data/admin_api/notify_webhooks/wallet_signing/x402 to scope setup to the intended command family."
|
|
6345
6536
|
},
|
|
6537
|
+
transactionPreflight: [
|
|
6538
|
+
"Before `evm send`, check the sender's native balance with `alchemy --json --no-interactive evm data balance <address> -n <network>`.",
|
|
6539
|
+
"Before ERC-20 sends, swaps, approvals, or bridges, verify the source token balance/allowance or request a quote first; do not infer spendability from a configured wallet alone.",
|
|
6540
|
+
"If a balance is zero or below the requested amount, stop and report the funding gap instead of retrying the transaction."
|
|
6541
|
+
],
|
|
6346
6542
|
runtimeDiscovery: {
|
|
6347
6543
|
installed: {
|
|
6348
6544
|
command: "alchemy --json --no-interactive agent-prompt",
|
|
@@ -6476,6 +6672,11 @@ function formatAsSystemPrompt(payload) {
|
|
|
6476
6672
|
lines.push(` Command: ${payload.preflight.command}`);
|
|
6477
6673
|
lines.push(` ${payload.preflight.description}`);
|
|
6478
6674
|
lines.push("");
|
|
6675
|
+
lines.push("Transaction preflight:");
|
|
6676
|
+
for (const rule of payload.transactionPreflight) {
|
|
6677
|
+
lines.push(` - ${rule}`);
|
|
6678
|
+
}
|
|
6679
|
+
lines.push("");
|
|
6479
6680
|
lines.push("Runtime discovery:");
|
|
6480
6681
|
lines.push(` Installed CLI: ${payload.runtimeDiscovery.installed.command}`);
|
|
6481
6682
|
lines.push(` ${payload.runtimeDiscovery.installed.description}`);
|
|
@@ -6531,13 +6732,18 @@ function formatAsSystemPrompt(payload) {
|
|
|
6531
6732
|
return lines.join("\n");
|
|
6532
6733
|
}
|
|
6533
6734
|
function registerAgentPrompt(program2) {
|
|
6534
|
-
program2.command("agent-prompt").description("Emit complete agent/automation usage instructions").option("--commands <list>", "Filter to specific commands in JSON output (requires --json). Comma-separated (e.g. data,rpc,gas)").action((opts) => {
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
|
|
6538
|
-
|
|
6735
|
+
program2.command("agent-prompt").description("Emit complete agent/automation usage instructions").option("--scope <scope>", "Filter output to a command area: wallet, evm, solana, webhook, app, data, xchain").option("--commands <list>", "Filter to specific commands in JSON output (requires --json). Comma-separated (e.g. data,rpc,gas)").action((opts) => {
|
|
6736
|
+
try {
|
|
6737
|
+
const payload = buildAgentPrompt(program2);
|
|
6738
|
+
applyScope(payload, parseScope(opts.scope));
|
|
6739
|
+
if (opts.commands) {
|
|
6740
|
+
const filter = new Set(opts.commands.split(",").map((s) => s.trim().toLowerCase()));
|
|
6741
|
+
payload.commands = payload.commands.filter((cmd) => filter.has(cmd.name.toLowerCase()));
|
|
6742
|
+
}
|
|
6743
|
+
printHuman(formatAsSystemPrompt(payload), payload);
|
|
6744
|
+
} catch (err) {
|
|
6745
|
+
exitWithError(err);
|
|
6539
6746
|
}
|
|
6540
|
-
printHuman(formatAsSystemPrompt(payload), payload);
|
|
6541
6747
|
});
|
|
6542
6748
|
}
|
|
6543
6749
|
|
|
@@ -6670,6 +6876,55 @@ function registrySymbolSuggestions(network) {
|
|
|
6670
6876
|
return listRegistryTokens(network).map((t) => t.symbol);
|
|
6671
6877
|
}
|
|
6672
6878
|
|
|
6879
|
+
// src/lib/preflight-errors.ts
|
|
6880
|
+
function errorText2(err) {
|
|
6881
|
+
if (err instanceof CLIError) {
|
|
6882
|
+
return [err.message, err.details].filter(Boolean).join(" ");
|
|
6883
|
+
}
|
|
6884
|
+
if (err instanceof Error) {
|
|
6885
|
+
return err.message;
|
|
6886
|
+
}
|
|
6887
|
+
return String(err);
|
|
6888
|
+
}
|
|
6889
|
+
function cleanReason(value) {
|
|
6890
|
+
return value.replace(/^["'`]+|["'`]+$/g, "").replace(/\s+/g, " ").trim();
|
|
6891
|
+
}
|
|
6892
|
+
function extractRevertReason(text) {
|
|
6893
|
+
const patterns = [
|
|
6894
|
+
/An error occurred while executing user operation:\s*["'`]?([^"'`\n]+)["'`]?/i,
|
|
6895
|
+
/reverted with the following reason:\s*["'`]?([^"'`\n]+)["'`]?/i,
|
|
6896
|
+
/execution reverted(?::|[ \t]+with reason string)[ \t]*["'`]?([^"'`\n]+)["'`]?/i,
|
|
6897
|
+
/reverted with (?:the )?reason(?: string)?:?[ \t]*["'`]?([^"'`\n]+)["'`]?/i,
|
|
6898
|
+
/\breason:[ \t]*["'`]?([^"'`\n]+)["'`]?/i,
|
|
6899
|
+
/\brevert(?:ed)?[: \t]+["'`]?([^"'`\n]+)["'`]?/i
|
|
6900
|
+
];
|
|
6901
|
+
for (const pattern of patterns) {
|
|
6902
|
+
const match = text.match(pattern);
|
|
6903
|
+
const reason = match?.[1] ? cleanReason(match[1]) : "";
|
|
6904
|
+
if (reason) return reason;
|
|
6905
|
+
}
|
|
6906
|
+
if (/\b(revert|reverted|execution reverted|call exception)\b/i.test(text)) {
|
|
6907
|
+
return "execution reverted";
|
|
6908
|
+
}
|
|
6909
|
+
return null;
|
|
6910
|
+
}
|
|
6911
|
+
function normalizePreflightRevertError(err) {
|
|
6912
|
+
if (err instanceof CLIError && err.code === ErrorCode.PREFLIGHT_REVERT) {
|
|
6913
|
+
return err;
|
|
6914
|
+
}
|
|
6915
|
+
const detail = errorText2(err);
|
|
6916
|
+
const reason = extractRevertReason(detail);
|
|
6917
|
+
if (!reason) return null;
|
|
6918
|
+
return errPreflightRevert(reason, detail || void 0);
|
|
6919
|
+
}
|
|
6920
|
+
async function withPreflightRevert(fn) {
|
|
6921
|
+
try {
|
|
6922
|
+
return await fn();
|
|
6923
|
+
} catch (err) {
|
|
6924
|
+
throw normalizePreflightRevertError(err) ?? err;
|
|
6925
|
+
}
|
|
6926
|
+
}
|
|
6927
|
+
|
|
6673
6928
|
// src/commands/approve.ts
|
|
6674
6929
|
function isNativeToken(address3) {
|
|
6675
6930
|
return address3.toLowerCase() === NATIVE_TOKEN_ADDRESS.toLowerCase();
|
|
@@ -6848,10 +7103,10 @@ async function performApprove(program2, spenderArg, opts) {
|
|
|
6848
7103
|
const { id } = await withSpinner(
|
|
6849
7104
|
"Sending approval\u2026",
|
|
6850
7105
|
"Approval submitted",
|
|
6851
|
-
() => client.sendCalls({
|
|
7106
|
+
() => withPreflightRevert(() => client.sendCalls({
|
|
6852
7107
|
calls,
|
|
6853
7108
|
capabilities: paymaster ? { paymaster } : void 0
|
|
6854
|
-
})
|
|
7109
|
+
}))
|
|
6855
7110
|
);
|
|
6856
7111
|
const status = await withSpinner(
|
|
6857
7112
|
"Waiting for confirmation\u2026",
|
|
@@ -7296,10 +7551,10 @@ async function performContractCall(program2, addressArg, functionArg, opts) {
|
|
|
7296
7551
|
const { id } = await withSpinner(
|
|
7297
7552
|
"Sending transaction\u2026",
|
|
7298
7553
|
"Transaction submitted",
|
|
7299
|
-
() => client.sendCalls({
|
|
7554
|
+
() => withPreflightRevert(() => client.sendCalls({
|
|
7300
7555
|
calls: [call],
|
|
7301
7556
|
capabilities: paymaster ? { paymaster } : void 0
|
|
7302
|
-
})
|
|
7557
|
+
}))
|
|
7303
7558
|
);
|
|
7304
7559
|
const status = await withSpinner(
|
|
7305
7560
|
"Waiting for confirmation\u2026",
|
|
@@ -7995,6 +8250,13 @@ Examples:
|
|
|
7995
8250
|
}
|
|
7996
8251
|
|
|
7997
8252
|
// src/commands/portfolio.ts
|
|
8253
|
+
var BALANCE_FIELD_NAMES = /* @__PURE__ */ new Set([
|
|
8254
|
+
"balance",
|
|
8255
|
+
"tokenbalance",
|
|
8256
|
+
"rawbalance",
|
|
8257
|
+
"rawtokenbalance",
|
|
8258
|
+
"amount"
|
|
8259
|
+
]);
|
|
7998
8260
|
async function runDataCall(program2, title, path, body) {
|
|
7999
8261
|
const x402 = resolveX402Client(program2);
|
|
8000
8262
|
return withSpinner(
|
|
@@ -8006,22 +8268,82 @@ async function runDataCall(program2, title, path, body) {
|
|
|
8006
8268
|
function limitPayload(value, limit) {
|
|
8007
8269
|
if (limit === void 0) return value;
|
|
8008
8270
|
if (Array.isArray(value)) {
|
|
8009
|
-
return value.slice(0, limit);
|
|
8271
|
+
return value.slice(0, limit).map((item) => limitPayload(item, limit));
|
|
8010
8272
|
}
|
|
8011
|
-
if (value
|
|
8273
|
+
if (isRecord(value)) {
|
|
8012
8274
|
return Object.fromEntries(
|
|
8013
8275
|
Object.entries(value).map(([key, nested]) => [
|
|
8014
8276
|
key,
|
|
8015
|
-
|
|
8277
|
+
limitPayload(nested, limit)
|
|
8016
8278
|
])
|
|
8017
8279
|
);
|
|
8018
8280
|
}
|
|
8019
8281
|
return value;
|
|
8020
8282
|
}
|
|
8283
|
+
function isRecord(value) {
|
|
8284
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
8285
|
+
}
|
|
8286
|
+
function isHexQuantity(value) {
|
|
8287
|
+
return /^0x[0-9a-f]+$/i.test(value);
|
|
8288
|
+
}
|
|
8289
|
+
function parseDecimals2(value) {
|
|
8290
|
+
const decimals = typeof value === "number" ? value : typeof value === "string" && /^\d+$/.test(value) ? Number(value) : void 0;
|
|
8291
|
+
if (decimals === void 0 || !Number.isInteger(decimals) || decimals < 0 || decimals > 255) {
|
|
8292
|
+
return void 0;
|
|
8293
|
+
}
|
|
8294
|
+
return decimals;
|
|
8295
|
+
}
|
|
8296
|
+
function decimalsForRecord(value) {
|
|
8297
|
+
const direct = parseDecimals2(value.decimals);
|
|
8298
|
+
if (direct !== void 0) return direct;
|
|
8299
|
+
for (const key of ["tokenMetadata", "metadata", "token"]) {
|
|
8300
|
+
const nested = value[key];
|
|
8301
|
+
if (isRecord(nested)) {
|
|
8302
|
+
const decimals = parseDecimals2(nested.decimals);
|
|
8303
|
+
if (decimals !== void 0) return decimals;
|
|
8304
|
+
}
|
|
8305
|
+
}
|
|
8306
|
+
return void 0;
|
|
8307
|
+
}
|
|
8308
|
+
function formatRawAmount(raw, decimals) {
|
|
8309
|
+
if (decimals === 0) return raw.toString();
|
|
8310
|
+
const divisor = 10n ** BigInt(decimals);
|
|
8311
|
+
const whole = raw / divisor;
|
|
8312
|
+
const fraction = raw % divisor;
|
|
8313
|
+
if (fraction === 0n) return whole.toString();
|
|
8314
|
+
const fractionText = fraction.toString().padStart(decimals, "0").replace(/0+$/, "");
|
|
8315
|
+
return `${whole}.${fractionText}`;
|
|
8316
|
+
}
|
|
8317
|
+
function shouldNormalizeBalanceField(key) {
|
|
8318
|
+
const normalized = key.toLowerCase();
|
|
8319
|
+
return BALANCE_FIELD_NAMES.has(normalized) || normalized.endsWith("balance");
|
|
8320
|
+
}
|
|
8321
|
+
function normalizePortfolioOutput(value) {
|
|
8322
|
+
if (Array.isArray(value)) {
|
|
8323
|
+
return value.map(normalizePortfolioOutput);
|
|
8324
|
+
}
|
|
8325
|
+
if (!isRecord(value)) {
|
|
8326
|
+
return value;
|
|
8327
|
+
}
|
|
8328
|
+
const decimals = decimalsForRecord(value);
|
|
8329
|
+
const output = {};
|
|
8330
|
+
for (const [key, nested] of Object.entries(value)) {
|
|
8331
|
+
output[key] = normalizePortfolioOutput(nested);
|
|
8332
|
+
if (typeof nested !== "string" || !shouldNormalizeBalanceField(key) || !isHexQuantity(nested)) {
|
|
8333
|
+
continue;
|
|
8334
|
+
}
|
|
8335
|
+
const raw = BigInt(nested);
|
|
8336
|
+
output[`${key}Decimal`] = raw.toString();
|
|
8337
|
+
if (decimals !== void 0) {
|
|
8338
|
+
output[`${key}Formatted`] = formatRawAmount(raw, decimals);
|
|
8339
|
+
}
|
|
8340
|
+
}
|
|
8341
|
+
return output;
|
|
8342
|
+
}
|
|
8021
8343
|
async function runPortfolioCommand(program2, title, path, opts) {
|
|
8022
8344
|
const limit = parseOptionalInt(opts.limit, "--limit");
|
|
8023
8345
|
const result = await runDataCall(program2, title, path, JSON.parse(opts.body));
|
|
8024
|
-
const output = limitPayload(result, limit);
|
|
8346
|
+
const output = normalizePortfolioOutput(limitPayload(result, limit));
|
|
8025
8347
|
if (isJSONMode()) printJSON(output);
|
|
8026
8348
|
else printSyntaxJSON(output);
|
|
8027
8349
|
}
|
|
@@ -8473,7 +8795,7 @@ Examples:
|
|
|
8473
8795
|
dryRun: opts.dryRun
|
|
8474
8796
|
});
|
|
8475
8797
|
} catch (err) {
|
|
8476
|
-
const { exitWithError: exitWithError2 } = await import("./errors-
|
|
8798
|
+
const { exitWithError: exitWithError2 } = await import("./errors-VS7SGW7B.js");
|
|
8477
8799
|
exitWithError2(err);
|
|
8478
8800
|
}
|
|
8479
8801
|
});
|
|
@@ -8550,10 +8872,10 @@ async function performEvmSend(program2, toArg, amountArg, tokenAddress, opts = {
|
|
|
8550
8872
|
const { id } = await withSpinner(
|
|
8551
8873
|
"Sending transaction\u2026",
|
|
8552
8874
|
"Transaction submitted",
|
|
8553
|
-
() => client.sendCalls({
|
|
8875
|
+
() => withPreflightRevert(() => client.sendCalls({
|
|
8554
8876
|
calls,
|
|
8555
8877
|
capabilities: paymaster ? { paymaster } : void 0
|
|
8556
|
-
})
|
|
8878
|
+
}))
|
|
8557
8879
|
);
|
|
8558
8880
|
const status = await withSpinner(
|
|
8559
8881
|
"Waiting for confirmation\u2026",
|
|
@@ -8679,7 +9001,7 @@ function buildWalletQuoteClient(program2, address3) {
|
|
|
8679
9001
|
}
|
|
8680
9002
|
|
|
8681
9003
|
// src/lib/quote-errors.ts
|
|
8682
|
-
function
|
|
9004
|
+
function errorText3(err) {
|
|
8683
9005
|
if (err instanceof CLIError) {
|
|
8684
9006
|
return [err.message, err.details].filter(Boolean).join(" ");
|
|
8685
9007
|
}
|
|
@@ -8737,7 +9059,7 @@ function normalizeQuoteError(err, flow) {
|
|
|
8737
9059
|
if (err instanceof CLIError && err.code !== ErrorCode.RPC_ERROR && err.code !== ErrorCode.INTERNAL_ERROR) {
|
|
8738
9060
|
return err;
|
|
8739
9061
|
}
|
|
8740
|
-
const detail =
|
|
9062
|
+
const detail = errorText3(err);
|
|
8741
9063
|
const cause = classifyQuoteFailure(detail);
|
|
8742
9064
|
return new CLIError(
|
|
8743
9065
|
ErrorCode.QUOTE_FAILED,
|
|
@@ -8810,10 +9132,10 @@ async function prepareQuoteForExecution(client, quote) {
|
|
|
8810
9132
|
const preparedQuote = await withSpinner(
|
|
8811
9133
|
"Preparing swap\u2026",
|
|
8812
9134
|
"Swap prepared",
|
|
8813
|
-
() => client.prepareCalls({
|
|
9135
|
+
() => withPreflightRevert(() => client.prepareCalls({
|
|
8814
9136
|
...permitQuote.modifiedRequest,
|
|
8815
9137
|
paymasterPermitSignature: permitSignature
|
|
8816
|
-
})
|
|
9138
|
+
}))
|
|
8817
9139
|
);
|
|
8818
9140
|
if ("type" in preparedQuote && preparedQuote.type === "paymaster-permit") {
|
|
8819
9141
|
throw errInvalidArgs("Swap quote still requires a paymaster permit after signing. The quote response format may be unsupported.");
|
|
@@ -8954,14 +9276,14 @@ async function performSwapExecute(program2, opts) {
|
|
|
8954
9276
|
async () => {
|
|
8955
9277
|
if ("rawCalls" in preparedQuote && preparedQuote.rawCalls === true) {
|
|
8956
9278
|
const rawCallsQuote = preparedQuote;
|
|
8957
|
-
return client.sendCalls({
|
|
9279
|
+
return withPreflightRevert(() => client.sendCalls({
|
|
8958
9280
|
calls: rawCallsQuote.calls,
|
|
8959
9281
|
capabilities: paymaster ? { paymaster } : void 0
|
|
8960
|
-
});
|
|
9282
|
+
}));
|
|
8961
9283
|
}
|
|
8962
9284
|
const executablePreparedQuote = preparedQuote;
|
|
8963
9285
|
const signedQuote = await client.signPreparedCalls(executablePreparedQuote);
|
|
8964
|
-
return client.sendPreparedCalls(signedQuote);
|
|
9286
|
+
return withPreflightRevert(() => client.sendPreparedCalls(signedQuote));
|
|
8965
9287
|
}
|
|
8966
9288
|
);
|
|
8967
9289
|
const status = await withSpinner(
|
|
@@ -9516,10 +9838,10 @@ async function prepareQuoteForExecution2(client, quote) {
|
|
|
9516
9838
|
const preparedQuote = await withSpinner(
|
|
9517
9839
|
"Preparing bridge\u2026",
|
|
9518
9840
|
"Bridge prepared",
|
|
9519
|
-
() => client.prepareCalls({
|
|
9841
|
+
() => withPreflightRevert(() => client.prepareCalls({
|
|
9520
9842
|
...permitQuote.modifiedRequest,
|
|
9521
9843
|
paymasterPermitSignature: permitSignature
|
|
9522
|
-
})
|
|
9844
|
+
}))
|
|
9523
9845
|
);
|
|
9524
9846
|
if ("type" in preparedQuote && preparedQuote.type === "paymaster-permit") {
|
|
9525
9847
|
throw errInvalidArgs("Bridge quote still requires a paymaster permit after signing. The quote response format may be unsupported.");
|
|
@@ -9673,14 +9995,14 @@ async function performBridgeExecute(program2, opts) {
|
|
|
9673
9995
|
async () => {
|
|
9674
9996
|
if ("rawCalls" in preparedQuote && preparedQuote.rawCalls === true) {
|
|
9675
9997
|
const rawCallsQuote = preparedQuote;
|
|
9676
|
-
return client.sendCalls({
|
|
9998
|
+
return withPreflightRevert(() => client.sendCalls({
|
|
9677
9999
|
calls: rawCallsQuote.calls,
|
|
9678
10000
|
capabilities: paymaster ? { paymaster } : void 0
|
|
9679
|
-
});
|
|
10001
|
+
}));
|
|
9680
10002
|
}
|
|
9681
10003
|
const executablePreparedQuote = preparedQuote;
|
|
9682
10004
|
const signedQuote = await client.signPreparedCalls(executablePreparedQuote);
|
|
9683
|
-
return client.sendPreparedCalls(signedQuote);
|
|
10005
|
+
return withPreflightRevert(() => client.sendPreparedCalls(signedQuote));
|
|
9684
10006
|
}
|
|
9685
10007
|
);
|
|
9686
10008
|
const status = await withSpinner(
|
|
@@ -9777,7 +10099,7 @@ function displayPath(path) {
|
|
|
9777
10099
|
const home = getHomeDir();
|
|
9778
10100
|
return path.startsWith(home) ? `~${path.slice(home.length)}` : path;
|
|
9779
10101
|
}
|
|
9780
|
-
function
|
|
10102
|
+
function isRecord2(value) {
|
|
9781
10103
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
9782
10104
|
}
|
|
9783
10105
|
function isClientId(value) {
|
|
@@ -9964,7 +10286,7 @@ async function readJSONConfig(path) {
|
|
|
9964
10286
|
const raw = await readFile(path, "utf8");
|
|
9965
10287
|
if (raw.trim().length === 0) return {};
|
|
9966
10288
|
const parsed = JSON.parse(raw);
|
|
9967
|
-
if (!
|
|
10289
|
+
if (!isRecord2(parsed)) {
|
|
9968
10290
|
throw errInvalidArgs(`${displayPath(path)} must contain a JSON object.`);
|
|
9969
10291
|
}
|
|
9970
10292
|
return parsed;
|
|
@@ -9978,7 +10300,7 @@ async function readJSONConfig(path) {
|
|
|
9978
10300
|
}
|
|
9979
10301
|
function withMcpServerConfig(config) {
|
|
9980
10302
|
const existing = config.mcpServers;
|
|
9981
|
-
if (existing !== void 0 && !
|
|
10303
|
+
if (existing !== void 0 && !isRecord2(existing)) {
|
|
9982
10304
|
throw errInvalidArgs("Cursor mcpServers must be a JSON object.");
|
|
9983
10305
|
}
|
|
9984
10306
|
return {
|
|
@@ -10396,7 +10718,7 @@ async function flushProcessOutput() {
|
|
|
10396
10718
|
}
|
|
10397
10719
|
program.name("alchemy").description(
|
|
10398
10720
|
"The Alchemy CLI lets you query blockchain data, call JSON-RPC methods, and manage your Alchemy configuration."
|
|
10399
|
-
).version("0.
|
|
10721
|
+
).version("0.15.0", "-v, --version", "display CLI version").option("--api-key <key>", "Alchemy API key (env: ALCHEMY_API_KEY)").option(
|
|
10400
10722
|
"-n, --network <network>",
|
|
10401
10723
|
"Target network for networked commands"
|
|
10402
10724
|
).option("--x402", "Use x402 wallet-based gateway auth").option(
|
|
@@ -10583,11 +10905,11 @@ ${styledLine}`;
|
|
|
10583
10905
|
"wallet"
|
|
10584
10906
|
];
|
|
10585
10907
|
if (!skipAppPrompt.includes(cmdName) && isInteractiveAllowed(program) && !opts.apiKey && !process.env.ALCHEMY_API_KEY) {
|
|
10586
|
-
const { resolveAuthToken: resolveAuthToken2 } = await import("./resolve-
|
|
10908
|
+
const { resolveAuthToken: resolveAuthToken2 } = await import("./resolve-IRTGQL4A.js");
|
|
10587
10909
|
const authToken = resolveAuthToken2(cfg);
|
|
10588
10910
|
const hasApiKey = Boolean(cfg.api_key?.trim() || cfg.app?.apiKey);
|
|
10589
10911
|
if (authToken && !hasApiKey) {
|
|
10590
|
-
const { selectAppAfterAuth } = await import("./auth-
|
|
10912
|
+
const { selectAppAfterAuth } = await import("./auth-ZBEPAFEP.js");
|
|
10591
10913
|
console.log("");
|
|
10592
10914
|
console.log(` No app selected. Please select an app to continue.`);
|
|
10593
10915
|
await selectAppAfterAuth(authToken);
|
|
@@ -10622,7 +10944,7 @@ ${styledLine}`;
|
|
|
10622
10944
|
if (isInteractiveAllowed(program)) {
|
|
10623
10945
|
let latestForInteractiveStartup = null;
|
|
10624
10946
|
if (shouldRunOnboarding(program, cfg)) {
|
|
10625
|
-
const { runOnboarding } = await import("./onboarding-
|
|
10947
|
+
const { runOnboarding } = await import("./onboarding-L2FTZRYN.js");
|
|
10626
10948
|
const latest = getAvailableUpdateOnce();
|
|
10627
10949
|
const completed = await runOnboarding(program, latest);
|
|
10628
10950
|
updateShownDuringInteractiveStartup = Boolean(latest);
|
|
@@ -10636,7 +10958,7 @@ ${styledLine}`;
|
|
|
10636
10958
|
latestForInteractiveStartup
|
|
10637
10959
|
);
|
|
10638
10960
|
}
|
|
10639
|
-
const { startREPL } = await import("./interactive-
|
|
10961
|
+
const { startREPL } = await import("./interactive-3ACOLHPG.js");
|
|
10640
10962
|
program.exitOverride();
|
|
10641
10963
|
program.configureOutput({
|
|
10642
10964
|
writeErr: () => {
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
|
|
3
3
|
import {
|
|
4
4
|
getSetupMethod
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-RQDWIB62.js";
|
|
6
|
+
import "./chunk-EJB4WDTU.js";
|
|
7
7
|
import {
|
|
8
8
|
getRPCNetworkIds
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CXR7CCJ7.js";
|
|
10
10
|
import {
|
|
11
11
|
getUpdateNoticeLines
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UL5ZSWTE.js";
|
|
13
13
|
import {
|
|
14
14
|
bold,
|
|
15
15
|
brand,
|
|
@@ -17,18 +17,18 @@ import {
|
|
|
17
17
|
dim,
|
|
18
18
|
green,
|
|
19
19
|
setBrandedHelpSuppressed
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-OIRERSZT.js";
|
|
21
21
|
import {
|
|
22
22
|
configDir,
|
|
23
23
|
load
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-PISUI34T.js";
|
|
25
25
|
import {
|
|
26
26
|
bgRgb,
|
|
27
27
|
isJSONMode,
|
|
28
28
|
noColor,
|
|
29
29
|
rgb,
|
|
30
30
|
setReplMode
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-CFIDLPKB.js";
|
|
32
32
|
|
|
33
33
|
// src/commands/interactive.ts
|
|
34
34
|
import * as readline from "readline";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
|
|
3
3
|
import {
|
|
4
4
|
getUpdateNoticeLines
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UL5ZSWTE.js";
|
|
6
6
|
import {
|
|
7
7
|
bold,
|
|
8
8
|
brand,
|
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
dim,
|
|
11
11
|
green,
|
|
12
12
|
promptText
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-OIRERSZT.js";
|
|
14
14
|
import {
|
|
15
15
|
load,
|
|
16
16
|
save
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-PISUI34T.js";
|
|
18
|
+
import "./chunk-CFIDLPKB.js";
|
|
19
19
|
|
|
20
20
|
// src/commands/onboarding.ts
|
|
21
21
|
async function runOnboarding(_program, latestUpdate = null) {
|
|
@@ -38,7 +38,7 @@ async function runOnboarding(_program, latestUpdate = null) {
|
|
|
38
38
|
if (answer === null) {
|
|
39
39
|
return false;
|
|
40
40
|
}
|
|
41
|
-
const { performBrowserLogin, AUTH_PORT, getLoginUrl } = await import("./auth-
|
|
41
|
+
const { performBrowserLogin, AUTH_PORT, getLoginUrl } = await import("./auth-57YPPTNF.js");
|
|
42
42
|
console.log(` Opening browser to log in...`);
|
|
43
43
|
console.log(` ${dim(getLoginUrl(AUTH_PORT))}`);
|
|
44
44
|
console.log(` ${dim("Waiting for authentication...")}`);
|
|
@@ -51,7 +51,7 @@ async function runOnboarding(_program, latestUpdate = null) {
|
|
|
51
51
|
auth_token_expires_at: result.expiresAt
|
|
52
52
|
});
|
|
53
53
|
console.log(` ${green("\u2713")} Logged in successfully`);
|
|
54
|
-
const { selectAppAfterAuth } = await import("./auth-
|
|
54
|
+
const { selectAppAfterAuth } = await import("./auth-ZBEPAFEP.js");
|
|
55
55
|
await selectAppAfterAuth(result.token);
|
|
56
56
|
return true;
|
|
57
57
|
} catch (err) {
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
errNotLoggedInForPolicyLookup,
|
|
6
6
|
errSponsorshipNeedsPolicy,
|
|
7
7
|
selectOrCreatePolicy
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-M7HFRKW6.js";
|
|
9
|
+
import "./chunk-CXR7CCJ7.js";
|
|
10
|
+
import "./chunk-OIRERSZT.js";
|
|
11
|
+
import "./chunk-PISUI34T.js";
|
|
12
|
+
import "./chunk-CFIDLPKB.js";
|
|
13
13
|
export {
|
|
14
14
|
createPolicyInteractive,
|
|
15
15
|
errNotLoggedInForPolicyLookup,
|
|
@@ -26,9 +26,9 @@ import {
|
|
|
26
26
|
resolveWalletSession,
|
|
27
27
|
resolveX402,
|
|
28
28
|
resolveX402Client
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-CXR7CCJ7.js";
|
|
30
|
+
import "./chunk-PISUI34T.js";
|
|
31
|
+
import "./chunk-CFIDLPKB.js";
|
|
32
32
|
export {
|
|
33
33
|
adminClientFromFlags,
|
|
34
34
|
apiKeyClientFromFlags,
|
package/package.json
CHANGED
package/dist/auth-YB6AALZO.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
|
|
3
|
-
import {
|
|
4
|
-
registerAuth,
|
|
5
|
-
selectAppAfterAuth
|
|
6
|
-
} from "./chunk-5DR7BHUX.js";
|
|
7
|
-
import "./chunk-I6YQX7PF.js";
|
|
8
|
-
import "./chunk-RPSHRYCZ.js";
|
|
9
|
-
import "./chunk-PRSZJXA6.js";
|
|
10
|
-
import "./chunk-DXQAGBW6.js";
|
|
11
|
-
import "./chunk-LANOFNO6.js";
|
|
12
|
-
import "./chunk-5BEJA752.js";
|
|
13
|
-
export {
|
|
14
|
-
registerAuth,
|
|
15
|
-
selectAppAfterAuth
|
|
16
|
-
};
|