@bankr/cli 0.3.23 → 0.3.35
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/README.md +15 -5
- package/dist/cli.js +20 -14
- package/dist/commands/balances.js +1 -2
- package/dist/commands/cancel.js +1 -4
- package/dist/commands/club.js +6 -16
- package/dist/commands/config.js +1 -2
- package/dist/commands/fees.js +19 -29
- package/dist/commands/files.js +17 -39
- package/dist/commands/launch.d.ts +5 -0
- package/dist/commands/launch.js +98 -22
- package/dist/commands/launchQuotes.d.ts +7 -0
- package/dist/commands/launchQuotes.js +49 -0
- package/dist/commands/llm.d.ts +8 -0
- package/dist/commands/llm.js +308 -68
- package/dist/commands/login.js +20 -31
- package/dist/commands/portfolio.js +1 -2
- package/dist/commands/prompt.js +28 -29
- package/dist/commands/sign.js +8 -16
- package/dist/commands/sounds.js +6 -16
- package/dist/commands/status.js +1 -4
- package/dist/commands/submit.js +12 -24
- package/dist/commands/swap.js +2 -4
- package/dist/commands/tokens.js +1 -2
- package/dist/commands/transfer.js +2 -4
- package/dist/commands/update.js +1 -2
- package/dist/commands/webhooks.js +21 -65
- package/dist/commands/whoami.js +1 -2
- package/dist/commands/x402.js +36 -100
- package/dist/lib/api.d.ts +42 -2
- package/dist/lib/api.js +10 -2
- package/dist/lib/chains.js +4 -0
- package/dist/lib/explorer.js +1 -0
- package/dist/lib/output.d.ts +4 -0
- package/dist/lib/output.js +12 -0
- package/dist/lib/quoteTokens.d.ts +15 -0
- package/dist/lib/quoteTokens.js +53 -0
- package/package.json +1 -1
package/dist/lib/chains.js
CHANGED
|
@@ -7,6 +7,7 @@ export const CHAIN_LABELS = {
|
|
|
7
7
|
arbitrum: "Arbitrum",
|
|
8
8
|
bnb: "BNB Chain",
|
|
9
9
|
robinhood: "Robinhood Chain",
|
|
10
|
+
arc: "Arc",
|
|
10
11
|
solana: "Solana",
|
|
11
12
|
};
|
|
12
13
|
export const VALID_CHAINS = new Set([
|
|
@@ -18,6 +19,7 @@ export const VALID_CHAINS = new Set([
|
|
|
18
19
|
"arbitrum",
|
|
19
20
|
"bnb",
|
|
20
21
|
"robinhood",
|
|
22
|
+
"arc",
|
|
21
23
|
"solana",
|
|
22
24
|
]);
|
|
23
25
|
export const CHAIN_IDS = {
|
|
@@ -29,6 +31,7 @@ export const CHAIN_IDS = {
|
|
|
29
31
|
arbitrum: 42161,
|
|
30
32
|
bnb: 56,
|
|
31
33
|
robinhood: 4663,
|
|
34
|
+
arc: 5042,
|
|
32
35
|
};
|
|
33
36
|
export const NATIVE_SYMBOLS = {
|
|
34
37
|
base: "ETH",
|
|
@@ -39,5 +42,6 @@ export const NATIVE_SYMBOLS = {
|
|
|
39
42
|
polygon: "POL",
|
|
40
43
|
bnb: "BNB",
|
|
41
44
|
robinhood: "ETH",
|
|
45
|
+
arc: "USDC",
|
|
42
46
|
};
|
|
43
47
|
//# sourceMappingURL=chains.js.map
|
package/dist/lib/explorer.js
CHANGED
|
@@ -5,6 +5,7 @@ const EXPLORERS = {
|
|
|
5
5
|
name: "Blockscout",
|
|
6
6
|
baseUrl: "https://robinhoodchain.blockscout.com",
|
|
7
7
|
},
|
|
8
|
+
42161: { name: "Arbiscan", baseUrl: "https://arbiscan.io" },
|
|
8
9
|
};
|
|
9
10
|
/** Unknown chain ids fall back to Basescan (pre-multichain behavior). */
|
|
10
11
|
export function txExplorer(chainId, txHash) {
|
package/dist/lib/output.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ export declare function brand(msg: string): void;
|
|
|
22
22
|
export declare function brandBold(msg: string): void;
|
|
23
23
|
export declare function success(msg: string): void;
|
|
24
24
|
export declare function error(msg: string): void;
|
|
25
|
+
/** Collapses the error-then-exit epilogue every command repeats. */
|
|
26
|
+
export declare function fatal(message: string): never;
|
|
27
|
+
/** Same epilogue, for the spinner-driven variant that reports a caught error. */
|
|
28
|
+
export declare function failWith(spinner: Ora, label: string, err: unknown): never;
|
|
25
29
|
export declare function warn(msg: string): void;
|
|
26
30
|
export declare function info(msg: string): void;
|
|
27
31
|
export declare function blank(): void;
|
package/dist/lib/output.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
2
|
import ora from "ora";
|
|
3
|
+
import { getErrorMessage } from "./errors.js";
|
|
3
4
|
const BRAND_HEX = "#FF613D";
|
|
4
5
|
const brandColor = chalk.hex(BRAND_HEX);
|
|
5
6
|
const brandColorBold = brandColor.bold;
|
|
@@ -39,6 +40,17 @@ export function success(msg) {
|
|
|
39
40
|
export function error(msg) {
|
|
40
41
|
console.error(chalk.red(`✗ ${msg}`));
|
|
41
42
|
}
|
|
43
|
+
/** Collapses the error-then-exit epilogue every command repeats. */
|
|
44
|
+
export function fatal(message) {
|
|
45
|
+
error(message);
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
/** Same epilogue, for the spinner-driven variant that reports a caught error. */
|
|
49
|
+
export function failWith(spinner, label, err) {
|
|
50
|
+
spinner.fail(label);
|
|
51
|
+
error(getErrorMessage(err));
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
42
54
|
export function warn(msg) {
|
|
43
55
|
console.log(chalk.yellow(`⚠ ${msg}`));
|
|
44
56
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DeployTokenRequest, LaunchProvider, LaunchQuoteTokenOption } from "./api.js";
|
|
2
|
+
/** Match a `--quote` value (symbol or address) against the API's list. */
|
|
3
|
+
export declare function resolveQuoteToken(options: readonly LaunchQuoteTokenOption[], query: string): LaunchQuoteTokenOption | undefined;
|
|
4
|
+
export type QuoteTokenDeployFields = Pick<DeployTokenRequest, "pairedStockAddress" | "pairedTokenAddress" | "launchV3" | "provider">;
|
|
5
|
+
/**
|
|
6
|
+
* The deploy-body fields that select `option`. The provider is pinned with
|
|
7
|
+
* every non-default pick so a rollout can't move the launch to a provider
|
|
8
|
+
* that ignores the field.
|
|
9
|
+
*/
|
|
10
|
+
export declare function quoteTokenDeployFields(option: LaunchQuoteTokenOption, provider: LaunchProvider): QuoteTokenDeployFields;
|
|
11
|
+
export type QuoteTokenGroupLabel = "Default" | "Majors" | "More tokens" | "Stocks";
|
|
12
|
+
export declare function quoteTokenGroupLabel(option: LaunchQuoteTokenOption): QuoteTokenGroupLabel;
|
|
13
|
+
/** Short caveat to print next to an option, or undefined when it's clean. */
|
|
14
|
+
export declare function quoteTokenAvailabilityNote(option: LaunchQuoteTokenOption): string | undefined;
|
|
15
|
+
//# sourceMappingURL=quoteTokens.d.ts.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
function normalize(query) {
|
|
2
|
+
return query.trim().toLowerCase().replace(/^\$/, "");
|
|
3
|
+
}
|
|
4
|
+
/** Match a `--quote` value (symbol or address) against the API's list. */
|
|
5
|
+
export function resolveQuoteToken(options, query) {
|
|
6
|
+
const key = normalize(query);
|
|
7
|
+
if (!key)
|
|
8
|
+
return undefined;
|
|
9
|
+
return options.find((option) => option.symbol.toLowerCase() === key ||
|
|
10
|
+
option.address.toLowerCase() === key);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The deploy-body fields that select `option`. The provider is pinned with
|
|
14
|
+
* every non-default pick so a rollout can't move the launch to a provider
|
|
15
|
+
* that ignores the field.
|
|
16
|
+
*/
|
|
17
|
+
export function quoteTokenDeployFields(option, provider) {
|
|
18
|
+
switch (option.deployField) {
|
|
19
|
+
case null:
|
|
20
|
+
return {};
|
|
21
|
+
case "pairedStockAddress":
|
|
22
|
+
return { pairedStockAddress: option.address, provider };
|
|
23
|
+
case "pairedTokenAddress":
|
|
24
|
+
return { pairedTokenAddress: option.address, provider };
|
|
25
|
+
case "launchV3.quoteAddress":
|
|
26
|
+
return { launchV3: { quoteAddress: option.address }, provider };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export function quoteTokenGroupLabel(option) {
|
|
30
|
+
if (option.isDefault)
|
|
31
|
+
return "Default";
|
|
32
|
+
switch (option.kind) {
|
|
33
|
+
case "major":
|
|
34
|
+
case "stable":
|
|
35
|
+
return "Majors";
|
|
36
|
+
case "project":
|
|
37
|
+
case "wrapper":
|
|
38
|
+
return "More tokens";
|
|
39
|
+
case "stock":
|
|
40
|
+
return "Stocks";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/** Short caveat to print next to an option, or undefined when it's clean. */
|
|
44
|
+
export function quoteTokenAvailabilityNote(option) {
|
|
45
|
+
if (option.illiquid === true)
|
|
46
|
+
return "thin liquidity";
|
|
47
|
+
if (option.readiness === "pending")
|
|
48
|
+
return "not ready yet";
|
|
49
|
+
if (option.readiness === "unknown")
|
|
50
|
+
return "readiness unknown";
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=quoteTokens.js.map
|