arc402-cli 0.7.5 → 0.9.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/INK6-UX-SPEC.md +446 -0
- package/MIGRATION-SPEC.md +108 -0
- package/dist/abis.js +14 -17
- package/dist/abis.js.map +1 -1
- package/dist/bundler.d.ts +1 -1
- package/dist/bundler.d.ts.map +1 -1
- package/dist/bundler.js +27 -61
- package/dist/bundler.js.map +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +5 -9
- package/dist/client.js.map +1 -1
- package/dist/coinbase-smart-wallet.js +1 -4
- package/dist/coinbase-smart-wallet.js.map +1 -1
- package/dist/commands/accept.js +25 -28
- package/dist/commands/accept.js.map +1 -1
- package/dist/commands/agent-handshake.js +15 -18
- package/dist/commands/agent-handshake.js.map +1 -1
- package/dist/commands/agent.js +98 -104
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/agreements.js +62 -98
- package/dist/commands/agreements.js.map +1 -1
- package/dist/commands/arbitrator.js +45 -81
- package/dist/commands/arbitrator.js.map +1 -1
- package/dist/commands/arena-handshake.js +27 -30
- package/dist/commands/arena-handshake.js.map +1 -1
- package/dist/commands/arena.js +12 -18
- package/dist/commands/arena.js.map +1 -1
- package/dist/commands/backup.js +30 -36
- package/dist/commands/backup.js.map +1 -1
- package/dist/commands/cancel.js +15 -18
- package/dist/commands/cancel.js.map +1 -1
- package/dist/commands/channel.js +45 -81
- package/dist/commands/channel.js.map +1 -1
- package/dist/commands/coldstart.js +31 -34
- package/dist/commands/coldstart.js.map +1 -1
- package/dist/commands/config.js +23 -29
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/contract-interaction.js +12 -15
- package/dist/commands/contract-interaction.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +98 -135
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/deliver.js +37 -76
- package/dist/commands/deliver.js.map +1 -1
- package/dist/commands/discover.js +24 -27
- package/dist/commands/discover.js.map +1 -1
- package/dist/commands/dispute.js +104 -110
- package/dist/commands/dispute.js.map +1 -1
- package/dist/commands/doctor.js +16 -55
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/endpoint.js +56 -95
- package/dist/commands/endpoint.js.map +1 -1
- package/dist/commands/feed.js +11 -18
- package/dist/commands/feed.js.map +1 -1
- package/dist/commands/hire.js +37 -40
- package/dist/commands/hire.js.map +1 -1
- package/dist/commands/migrate.js +30 -33
- package/dist/commands/migrate.js.map +1 -1
- package/dist/commands/negotiate.d.ts.map +1 -1
- package/dist/commands/negotiate.js +34 -36
- package/dist/commands/negotiate.js.map +1 -1
- package/dist/commands/openshell.js +68 -104
- package/dist/commands/openshell.js.map +1 -1
- package/dist/commands/owner.js +17 -20
- package/dist/commands/owner.js.map +1 -1
- package/dist/commands/policy.js +41 -43
- package/dist/commands/policy.js.map +1 -1
- package/dist/commands/relay.d.ts.map +1 -1
- package/dist/commands/relay.js +18 -51
- package/dist/commands/relay.js.map +1 -1
- package/dist/commands/remediate.js +20 -23
- package/dist/commands/remediate.js.map +1 -1
- package/dist/commands/reputation.js +25 -27
- package/dist/commands/reputation.js.map +1 -1
- package/dist/commands/setup.js +65 -104
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/trust.js +17 -20
- package/dist/commands/trust.js.map +1 -1
- package/dist/commands/verify.js +18 -21
- package/dist/commands/verify.js.map +1 -1
- package/dist/commands/wallet.js +619 -625
- package/dist/commands/wallet.js.map +1 -1
- package/dist/commands/watch.js +33 -36
- package/dist/commands/watch.js.map +1 -1
- package/dist/commands/watchtower.js +37 -73
- package/dist/commands/watchtower.js.map +1 -1
- package/dist/commands/workroom.d.ts.map +1 -1
- package/dist/commands/workroom.js +138 -171
- package/dist/commands/workroom.js.map +1 -1
- package/dist/config.js +21 -65
- package/dist/config.js.map +1 -1
- package/dist/daemon/config.d.ts.map +1 -1
- package/dist/daemon/config.js +16 -53
- package/dist/daemon/config.js.map +1 -1
- package/dist/daemon/hire-listener.d.ts +3 -3
- package/dist/daemon/hire-listener.d.ts.map +1 -1
- package/dist/daemon/hire-listener.js +13 -47
- package/dist/daemon/hire-listener.js.map +1 -1
- package/dist/daemon/index.d.ts +1 -1
- package/dist/daemon/index.d.ts.map +1 -1
- package/dist/daemon/index.js +50 -88
- package/dist/daemon/index.js.map +1 -1
- package/dist/daemon/job-lifecycle.d.ts +1 -1
- package/dist/daemon/job-lifecycle.d.ts.map +1 -1
- package/dist/daemon/job-lifecycle.js +11 -51
- package/dist/daemon/job-lifecycle.js.map +1 -1
- package/dist/daemon/notify.d.ts +1 -1
- package/dist/daemon/notify.d.ts.map +1 -1
- package/dist/daemon/notify.js +19 -53
- package/dist/daemon/notify.js.map +1 -1
- package/dist/daemon/token-metering.js +8 -47
- package/dist/daemon/token-metering.js.map +1 -1
- package/dist/daemon/userops.d.ts +2 -2
- package/dist/daemon/userops.d.ts.map +1 -1
- package/dist/daemon/userops.js +23 -27
- package/dist/daemon/userops.js.map +1 -1
- package/dist/daemon/wallet-monitor.d.ts +1 -1
- package/dist/daemon/wallet-monitor.d.ts.map +1 -1
- package/dist/daemon/wallet-monitor.js +8 -12
- package/dist/daemon/wallet-monitor.js.map +1 -1
- package/dist/drain-v4.js +26 -64
- package/dist/drain-v4.js.map +1 -1
- package/dist/endpoint-config.js +20 -63
- package/dist/endpoint-config.js.map +1 -1
- package/dist/endpoint-notify.js +9 -48
- package/dist/endpoint-notify.js.map +1 -1
- package/dist/index.js +16 -50
- package/dist/index.js.map +1 -1
- package/dist/openshell-runtime.d.ts.map +1 -1
- package/dist/openshell-runtime.js +38 -82
- package/dist/openshell-runtime.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +77 -83
- package/dist/program.js.map +1 -1
- package/dist/repl.js +25 -31
- package/dist/repl.js.map +1 -1
- package/dist/signing.js +3 -6
- package/dist/signing.js.map +1 -1
- package/dist/telegram-notify.js +3 -40
- package/dist/telegram-notify.js.map +1 -1
- package/dist/tui/App.d.ts +1 -9
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +87 -65
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/Footer.js +4 -7
- package/dist/tui/Footer.js.map +1 -1
- package/dist/tui/Header.d.ts +1 -2
- package/dist/tui/Header.d.ts.map +1 -1
- package/dist/tui/Header.js +9 -14
- package/dist/tui/Header.js.map +1 -1
- package/dist/tui/InputLine.d.ts +1 -2
- package/dist/tui/InputLine.d.ts.map +1 -1
- package/dist/tui/InputLine.js +92 -46
- package/dist/tui/InputLine.js.map +1 -1
- package/dist/tui/Viewport.d.ts +5 -4
- package/dist/tui/Viewport.d.ts.map +1 -1
- package/dist/tui/Viewport.js +20 -13
- package/dist/tui/Viewport.js.map +1 -1
- package/dist/tui/WalletConnectPairing.d.ts +23 -0
- package/dist/tui/WalletConnectPairing.d.ts.map +1 -0
- package/dist/tui/WalletConnectPairing.js +75 -0
- package/dist/tui/WalletConnectPairing.js.map +1 -0
- package/dist/tui/components/Button.d.ts +7 -0
- package/dist/tui/components/Button.d.ts.map +1 -0
- package/dist/tui/components/Button.js +18 -0
- package/dist/tui/components/Button.js.map +1 -0
- package/dist/tui/components/CeremonyView.d.ts +13 -0
- package/dist/tui/components/CeremonyView.d.ts.map +1 -0
- package/dist/tui/components/CeremonyView.js +7 -0
- package/dist/tui/components/CeremonyView.js.map +1 -0
- package/dist/tui/components/CompletionDropdown.d.ts +7 -0
- package/dist/tui/components/CompletionDropdown.d.ts.map +1 -0
- package/dist/tui/components/CompletionDropdown.js +20 -0
- package/dist/tui/components/CompletionDropdown.js.map +1 -0
- package/dist/tui/components/ConfirmPrompt.d.ts +9 -0
- package/dist/tui/components/ConfirmPrompt.d.ts.map +1 -0
- package/dist/tui/components/ConfirmPrompt.js +7 -0
- package/dist/tui/components/ConfirmPrompt.js.map +1 -0
- package/dist/tui/components/InteractiveTable.d.ts +14 -0
- package/dist/tui/components/InteractiveTable.d.ts.map +1 -0
- package/dist/tui/components/InteractiveTable.js +58 -0
- package/dist/tui/components/InteractiveTable.js.map +1 -0
- package/dist/tui/components/StepSpinner.d.ts +11 -0
- package/dist/tui/components/StepSpinner.d.ts.map +1 -0
- package/dist/tui/components/StepSpinner.js +29 -0
- package/dist/tui/components/StepSpinner.js.map +1 -0
- package/dist/tui/components/Toast.d.ts +18 -0
- package/dist/tui/components/Toast.d.ts.map +1 -0
- package/dist/tui/components/Toast.js +25 -0
- package/dist/tui/components/Toast.js.map +1 -0
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/index.js +28 -21
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/useChat.js +13 -19
- package/dist/tui/useChat.js.map +1 -1
- package/dist/tui/useCommand.d.ts +2 -7
- package/dist/tui/useCommand.d.ts.map +1 -1
- package/dist/tui/useCommand.js +77 -165
- package/dist/tui/useCommand.js.map +1 -1
- package/dist/tui/useNotifications.d.ts +9 -0
- package/dist/tui/useNotifications.d.ts.map +1 -0
- package/dist/tui/useNotifications.js +14 -0
- package/dist/tui/useNotifications.js.map +1 -0
- package/dist/tui/useScroll.js +9 -12
- package/dist/tui/useScroll.js.map +1 -1
- package/dist/ui/banner.d.ts +12 -0
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +35 -19
- package/dist/ui/banner.js.map +1 -1
- package/dist/ui/colors.js +13 -19
- package/dist/ui/colors.js.map +1 -1
- package/dist/ui/format.js +6 -14
- package/dist/ui/format.js.map +1 -1
- package/dist/ui/spinner.js +6 -12
- package/dist/ui/spinner.js.map +1 -1
- package/dist/ui/tree.js +3 -6
- package/dist/ui/tree.js.map +1 -1
- package/dist/utils/format.js +27 -41
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/hash.js +4 -42
- package/dist/utils/hash.js.map +1 -1
- package/dist/utils/time.js +2 -6
- package/dist/utils/time.js.map +1 -1
- package/dist/wallet-router.d.ts +1 -1
- package/dist/wallet-router.d.ts.map +1 -1
- package/dist/wallet-router.js +12 -19
- package/dist/wallet-router.js.map +1 -1
- package/dist/walletconnect-session.d.ts +1 -1
- package/dist/walletconnect-session.d.ts.map +1 -1
- package/dist/walletconnect-session.js +6 -11
- package/dist/walletconnect-session.js.map +1 -1
- package/dist/walletconnect.d.ts +6 -1
- package/dist/walletconnect.d.ts.map +1 -1
- package/dist/walletconnect.js +32 -35
- package/dist/walletconnect.js.map +1 -1
- package/package.json +7 -6
- package/src/bundler.ts +1 -1
- package/src/client.ts +1 -1
- package/src/commands/accept.ts +7 -7
- package/src/commands/agent-handshake.ts +4 -4
- package/src/commands/agent.ts +9 -9
- package/src/commands/agreements.ts +8 -8
- package/src/commands/arbitrator.ts +5 -5
- package/src/commands/arena-handshake.ts +6 -6
- package/src/commands/arena.ts +2 -2
- package/src/commands/backup.ts +1 -1
- package/src/commands/cancel.ts +6 -6
- package/src/commands/channel.ts +6 -6
- package/src/commands/coldstart.ts +5 -5
- package/src/commands/config.ts +2 -2
- package/src/commands/contract-interaction.ts +2 -2
- package/src/commands/daemon.ts +14 -11
- package/src/commands/deliver.ts +9 -9
- package/src/commands/discover.ts +5 -5
- package/src/commands/dispute.ts +7 -7
- package/src/commands/doctor.ts +2 -2
- package/src/commands/endpoint.ts +6 -6
- package/src/commands/feed.ts +1 -1
- package/src/commands/hire.ts +10 -10
- package/src/commands/migrate.ts +7 -7
- package/src/commands/negotiate.ts +6 -5
- package/src/commands/openshell.ts +4 -4
- package/src/commands/owner.ts +5 -5
- package/src/commands/policy.ts +5 -5
- package/src/commands/relay.ts +5 -1
- package/src/commands/remediate.ts +5 -5
- package/src/commands/reputation.ts +6 -6
- package/src/commands/setup.ts +1 -1
- package/src/commands/trust.ts +6 -6
- package/src/commands/verify.ts +6 -6
- package/src/commands/wallet.ts +15 -15
- package/src/commands/watch.ts +3 -3
- package/src/commands/watchtower.ts +6 -6
- package/src/commands/workroom.ts +14 -10
- package/src/daemon/config.ts +2 -1
- package/src/daemon/hire-listener.ts +3 -3
- package/src/daemon/index.ts +10 -9
- package/src/daemon/job-lifecycle.ts +1 -1
- package/src/daemon/notify.ts +4 -4
- package/src/daemon/userops.ts +4 -4
- package/src/daemon/wallet-monitor.ts +2 -2
- package/src/endpoint-notify.ts +1 -1
- package/src/index.ts +8 -7
- package/src/openshell-runtime.ts +5 -1
- package/src/program.ts +36 -36
- package/src/repl.ts +3 -3
- package/src/tui/App.tsx +75 -52
- package/src/tui/Header.tsx +26 -12
- package/src/tui/InputLine.tsx +108 -33
- package/src/tui/Viewport.tsx +22 -18
- package/src/tui/WalletConnectPairing.tsx +131 -0
- package/src/tui/components/Button.tsx +38 -0
- package/src/tui/components/CeremonyView.tsx +39 -0
- package/src/tui/components/CompletionDropdown.tsx +59 -0
- package/src/tui/components/ConfirmPrompt.tsx +36 -0
- package/src/tui/components/InteractiveTable.tsx +112 -0
- package/src/tui/components/StepSpinner.tsx +84 -0
- package/src/tui/components/Toast.tsx +59 -0
- package/src/tui/index.tsx +27 -9
- package/src/tui/useChat.ts +1 -1
- package/src/tui/useCommand.ts +86 -183
- package/src/tui/useNotifications.ts +28 -0
- package/src/ui/banner.ts +29 -2
- package/src/ui/tree.ts +1 -1
- package/src/wallet-router.ts +2 -2
- package/src/walletconnect-session.ts +1 -1
- package/src/walletconnect.ts +20 -5
- package/tsconfig.json +16 -7
package/src/commands/cancel.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ServiceAgreementClient } from "@arc402/sdk";
|
|
3
|
-
import { loadConfig } from "../config";
|
|
4
|
-
import { requireSigner } from "../client";
|
|
5
|
-
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router";
|
|
6
|
-
import { SERVICE_AGREEMENT_ABI } from "../abis";
|
|
7
|
-
import { c } from "../ui/colors";
|
|
8
|
-
import { startSpinner } from "../ui/spinner";
|
|
3
|
+
import { loadConfig } from "../config.js";
|
|
4
|
+
import { requireSigner } from "../client.js";
|
|
5
|
+
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router.js";
|
|
6
|
+
import { SERVICE_AGREEMENT_ABI } from "../abis.js";
|
|
7
|
+
import { c } from "../ui/colors.js";
|
|
8
|
+
import { startSpinner } from "../ui/spinner.js";
|
|
9
9
|
|
|
10
10
|
export function registerCancelCommand(program: Command): void {
|
|
11
11
|
program.command("cancel <id>").description("Cancel a proposed agreement; use --expired for post-deadline recovery paths").option("--expired", "Call expiredCancel()", false).action(async (id, opts) => {
|
package/src/commands/channel.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { loadConfig } from "../config";
|
|
3
|
-
import { requireSigner, getClient } from "../client";
|
|
2
|
+
import { loadConfig } from "../config.js";
|
|
3
|
+
import { requireSigner, getClient } from "../client.js";
|
|
4
4
|
import { ChannelClient } from "@arc402/sdk";
|
|
5
5
|
import type { ChannelState } from "@arc402/sdk";
|
|
6
6
|
import * as fs from "fs";
|
|
7
7
|
import * as path from "path";
|
|
8
8
|
import * as os from "os";
|
|
9
|
-
import { c } from '../ui/colors';
|
|
10
|
-
import { startSpinner } from '../ui/spinner';
|
|
11
|
-
import { renderTree } from '../ui/tree';
|
|
12
|
-
import { formatAddress } from '../ui/format';
|
|
9
|
+
import { c } from '../ui/colors.js';
|
|
10
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
11
|
+
import { renderTree } from '../ui/tree.js';
|
|
12
|
+
import { formatAddress } from '../ui/format.js';
|
|
13
13
|
|
|
14
14
|
const CHANNEL_STATES_DIR = path.join(os.homedir(), ".arc402", "channel-states");
|
|
15
15
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ethers } from "ethers";
|
|
3
|
-
import { loadConfig } from "../config";
|
|
4
|
-
import { getClient, requireSigner } from "../client";
|
|
5
|
-
import { c } from '../ui/colors';
|
|
6
|
-
import { startSpinner } from '../ui/spinner';
|
|
7
|
-
import { renderTree } from '../ui/tree';
|
|
3
|
+
import { loadConfig } from "../config.js";
|
|
4
|
+
import { getClient, requireSigner } from "../client.js";
|
|
5
|
+
import { c } from '../ui/colors.js';
|
|
6
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
7
|
+
import { renderTree } from '../ui/tree.js';
|
|
8
8
|
|
|
9
9
|
const VOUCHING_REGISTRY_ABI = [
|
|
10
10
|
"function vouch(address newAgent, uint256 stakeAmount) external payable",
|
package/src/commands/config.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import prompts from "prompts";
|
|
3
3
|
import chalk from "chalk";
|
|
4
|
-
import { Arc402Config, NETWORK_DEFAULTS, configExists, loadConfig, saveConfig, getSubdomainApi, getWcProjectId } from "../config";
|
|
5
|
-
import { c } from '../ui/colors';
|
|
4
|
+
import { Arc402Config, NETWORK_DEFAULTS, configExists, loadConfig, saveConfig, getSubdomainApi, getWcProjectId } from "../config.js";
|
|
5
|
+
import { c } from '../ui/colors.js';
|
|
6
6
|
|
|
7
7
|
export function registerConfigCommands(program: Command): void {
|
|
8
8
|
const config = program.command("config").description("Manage ARC-402 CLI configuration");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ethers } from "ethers";
|
|
3
|
-
import { loadConfig } from "../config";
|
|
4
|
-
import { requireSigner } from "../client";
|
|
3
|
+
import { loadConfig } from "../config.js";
|
|
4
|
+
import { requireSigner } from "../client.js";
|
|
5
5
|
import { ContractInteractionClient, IntentPayload } from "@arc402/sdk";
|
|
6
6
|
|
|
7
7
|
export function registerContractInteractionCommands(program: Command): void {
|
package/src/commands/daemon.ts
CHANGED
|
@@ -6,12 +6,12 @@ import * as os from "os";
|
|
|
6
6
|
import { spawn, spawnSync } from "child_process";
|
|
7
7
|
import { ethers } from "ethers";
|
|
8
8
|
import prompts from "prompts";
|
|
9
|
-
import { loadConfig } from "../config";
|
|
10
|
-
import { requireSigner } from "../client";
|
|
11
|
-
import { startSpinner } from "../ui/spinner";
|
|
12
|
-
import { renderTree } from "../ui/tree";
|
|
13
|
-
import { c } from "../ui/colors";
|
|
14
|
-
import { SERVICE_AGREEMENT_ABI } from "../abis";
|
|
9
|
+
import { loadConfig } from "../config.js";
|
|
10
|
+
import { requireSigner } from "../client.js";
|
|
11
|
+
import { startSpinner } from "../ui/spinner.js";
|
|
12
|
+
import { renderTree } from "../ui/tree.js";
|
|
13
|
+
import { c } from "../ui/colors.js";
|
|
14
|
+
import { SERVICE_AGREEMENT_ABI } from "../abis.js";
|
|
15
15
|
import {
|
|
16
16
|
DAEMON_DIR,
|
|
17
17
|
DAEMON_PID,
|
|
@@ -20,8 +20,8 @@ import {
|
|
|
20
20
|
DAEMON_TOML,
|
|
21
21
|
TEMPLATE_DAEMON_TOML,
|
|
22
22
|
loadDaemonConfig,
|
|
23
|
-
} from "../daemon/config";
|
|
24
|
-
import { buildNotifier } from "../daemon/notify";
|
|
23
|
+
} from "../daemon/config.js";
|
|
24
|
+
import { buildNotifier } from "../daemon/notify.js";
|
|
25
25
|
import {
|
|
26
26
|
buildOpenShellSecretExports,
|
|
27
27
|
buildOpenShellSshConfig,
|
|
@@ -31,7 +31,11 @@ import {
|
|
|
31
31
|
readOpenShellConfig,
|
|
32
32
|
runCmd,
|
|
33
33
|
writeOpenShellConfig,
|
|
34
|
-
} from "../openshell-runtime";
|
|
34
|
+
} from "../openshell-runtime.js";
|
|
35
|
+
|
|
36
|
+
import { fileURLToPath } from "node:url";
|
|
37
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
38
|
+
const __dirname = path.dirname(__filename);
|
|
35
39
|
|
|
36
40
|
// ─── Constants ────────────────────────────────────────────────────────────────
|
|
37
41
|
|
|
@@ -556,8 +560,7 @@ export function registerDaemonCommands(program: Command): void {
|
|
|
556
560
|
process.exit(result.status ?? 0);
|
|
557
561
|
} else {
|
|
558
562
|
// Foreground mode without sandbox: import and run directly (blocking)
|
|
559
|
-
|
|
560
|
-
const { runDaemon } = require("../daemon/index") as { runDaemon: (fg: boolean) => Promise<void> };
|
|
563
|
+
const { runDaemon } = await import("../daemon/index.js");
|
|
561
564
|
await runDaemon(true);
|
|
562
565
|
}
|
|
563
566
|
return;
|
package/src/commands/deliver.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ServiceAgreementClient, uploadEncryptedIPFS } from "@arc402/sdk";
|
|
3
3
|
import { ethers } from "ethers";
|
|
4
|
-
import { loadConfig } from "../config";
|
|
5
|
-
import { getClient, requireSigner } from "../client";
|
|
6
|
-
import { hashFile, hashString } from "../utils/hash";
|
|
7
|
-
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router";
|
|
8
|
-
import { SERVICE_AGREEMENT_ABI } from "../abis";
|
|
4
|
+
import { loadConfig } from "../config.js";
|
|
5
|
+
import { getClient, requireSigner } from "../client.js";
|
|
6
|
+
import { hashFile, hashString } from "../utils/hash.js";
|
|
7
|
+
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router.js";
|
|
8
|
+
import { SERVICE_AGREEMENT_ABI } from "../abis.js";
|
|
9
9
|
import { readFile } from "fs/promises";
|
|
10
10
|
import prompts from "prompts";
|
|
11
|
-
import { resolveAgentEndpoint, notifyAgent, DEFAULT_REGISTRY_ADDRESS } from "../endpoint-notify";
|
|
12
|
-
import { c } from '../ui/colors';
|
|
13
|
-
import { startSpinner } from '../ui/spinner';
|
|
14
|
-
import { renderTree } from '../ui/tree';
|
|
11
|
+
import { resolveAgentEndpoint, notifyAgent, DEFAULT_REGISTRY_ADDRESS } from "../endpoint-notify.js";
|
|
12
|
+
import { c } from '../ui/colors.js';
|
|
13
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
14
|
+
import { renderTree } from '../ui/tree.js';
|
|
15
15
|
|
|
16
16
|
export function registerDeliverCommand(program: Command): void {
|
|
17
17
|
program
|
package/src/commands/discover.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ethers } from "ethers";
|
|
3
3
|
import { AgentRegistryClient, CapabilityRegistryClient, ReputationOracleClient, SponsorshipAttestationClient } from "@arc402/sdk";
|
|
4
|
-
import { loadConfig } from "../config";
|
|
5
|
-
import { getClient } from "../client";
|
|
6
|
-
import { getTrustTier, printTable, truncateAddress } from "../utils/format";
|
|
7
|
-
import { c } from '../ui/colors';
|
|
8
|
-
import { renderTree } from '../ui/tree';
|
|
4
|
+
import { loadConfig } from "../config.js";
|
|
5
|
+
import { getClient } from "../client.js";
|
|
6
|
+
import { getTrustTier, printTable, truncateAddress } from "../utils/format.js";
|
|
7
|
+
import { c } from '../ui/colors.js';
|
|
8
|
+
import { renderTree } from '../ui/tree.js';
|
|
9
9
|
|
|
10
10
|
// Minimal ABI for the new getAgentsWithCapability function (Spec 18)
|
|
11
11
|
const CAPABILITY_REGISTRY_EXTRA_ABI = [
|
package/src/commands/dispute.ts
CHANGED
|
@@ -2,13 +2,13 @@ import { Command } from "commander";
|
|
|
2
2
|
import { ethers } from "ethers";
|
|
3
3
|
import prompts from "prompts";
|
|
4
4
|
import { ArbitrationVote, DirectDisputeReason, DisputeClass, DisputeMode, DisputeOutcome, EvidenceType, ServiceAgreementClient, DisputeArbitrationClient } from "@arc402/sdk";
|
|
5
|
-
import { loadConfig } from "../config";
|
|
6
|
-
import { getClient, requireSigner } from "../client";
|
|
7
|
-
import { hashFile, hashString } from "../utils/hash";
|
|
8
|
-
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router";
|
|
9
|
-
import { SERVICE_AGREEMENT_ABI } from "../abis";
|
|
10
|
-
import { c } from '../ui/colors';
|
|
11
|
-
import { startSpinner } from '../ui/spinner';
|
|
5
|
+
import { loadConfig } from "../config.js";
|
|
6
|
+
import { getClient, requireSigner } from "../client.js";
|
|
7
|
+
import { hashFile, hashString } from "../utils/hash.js";
|
|
8
|
+
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router.js";
|
|
9
|
+
import { SERVICE_AGREEMENT_ABI } from "../abis.js";
|
|
10
|
+
import { c } from '../ui/colors.js';
|
|
11
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
12
12
|
|
|
13
13
|
export function registerDisputeCommand(program: Command): void {
|
|
14
14
|
const dispute = program.command("dispute").description("Formal dispute workflow; remediation-first by default, with narrow hard-fail direct-dispute exceptions");
|
package/src/commands/doctor.ts
CHANGED
|
@@ -4,8 +4,8 @@ import * as fs from "fs";
|
|
|
4
4
|
import * as path from "path";
|
|
5
5
|
import * as os from "os";
|
|
6
6
|
import { spawnSync } from "child_process";
|
|
7
|
-
import { configExists, loadConfig } from "../config";
|
|
8
|
-
import { c } from "../ui/colors";
|
|
7
|
+
import { configExists, loadConfig } from "../config.js";
|
|
8
|
+
import { c } from "../ui/colors.js";
|
|
9
9
|
|
|
10
10
|
const ARC402_DIR = path.join(os.homedir(), ".arc402");
|
|
11
11
|
const CONFIG_PATH = path.join(ARC402_DIR, "config.json");
|
package/src/commands/endpoint.ts
CHANGED
|
@@ -8,16 +8,16 @@ import {
|
|
|
8
8
|
loadEndpointConfig,
|
|
9
9
|
normalizeAgentName,
|
|
10
10
|
saveEndpointConfig,
|
|
11
|
-
} from "../endpoint-config";
|
|
12
|
-
import { configExists, getSubdomainApi, loadConfig, NETWORK_DEFAULTS } from "../config";
|
|
13
|
-
import { DAEMON_PID } from "../daemon/config";
|
|
14
|
-
import { detectDockerAccess, readOpenShellConfig, runCmd } from "../openshell-runtime";
|
|
15
|
-
import { getClient } from "../client";
|
|
11
|
+
} from "../endpoint-config.js";
|
|
12
|
+
import { configExists, getSubdomainApi, loadConfig, NETWORK_DEFAULTS } from "../config.js";
|
|
13
|
+
import { DAEMON_PID } from "../daemon/config.js";
|
|
14
|
+
import { detectDockerAccess, readOpenShellConfig, runCmd } from "../openshell-runtime.js";
|
|
15
|
+
import { getClient } from "../client.js";
|
|
16
16
|
import * as dns from "dns/promises";
|
|
17
17
|
import * as fs from "fs";
|
|
18
18
|
import * as net from "net";
|
|
19
19
|
import chalk from "chalk";
|
|
20
|
-
import { c } from '../ui/colors';
|
|
20
|
+
import { c } from '../ui/colors.js';
|
|
21
21
|
|
|
22
22
|
interface DoctorCheck {
|
|
23
23
|
layer: string;
|
package/src/commands/feed.ts
CHANGED
package/src/commands/hire.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ServiceAgreementClient, SessionManager } from "@arc402/sdk";
|
|
3
3
|
import { ethers } from "ethers";
|
|
4
|
-
import { getUsdcAddress, loadConfig } from "../config";
|
|
5
|
-
import { requireSigner } from "../client";
|
|
6
|
-
import { hashFile, hashString } from "../utils/hash";
|
|
7
|
-
import { parseDuration } from "../utils/time";
|
|
8
|
-
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router";
|
|
9
|
-
import { AGENT_REGISTRY_ABI, SERVICE_AGREEMENT_ABI } from "../abis";
|
|
10
|
-
import { c } from '../ui/colors';
|
|
11
|
-
import { startSpinner } from '../ui/spinner';
|
|
12
|
-
import { renderTree, TreeItem } from '../ui/tree';
|
|
13
|
-
import { formatAddress } from '../ui/format';
|
|
4
|
+
import { getUsdcAddress, loadConfig } from "../config.js";
|
|
5
|
+
import { requireSigner } from "../client.js";
|
|
6
|
+
import { hashFile, hashString } from "../utils/hash.js";
|
|
7
|
+
import { parseDuration } from "../utils/time.js";
|
|
8
|
+
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router.js";
|
|
9
|
+
import { AGENT_REGISTRY_ABI, SERVICE_AGREEMENT_ABI } from "../abis.js";
|
|
10
|
+
import { c } from '../ui/colors.js';
|
|
11
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
12
|
+
import { renderTree, TreeItem } from '../ui/tree.js';
|
|
13
|
+
import { formatAddress } from '../ui/format.js';
|
|
14
14
|
|
|
15
15
|
const DEFAULT_REGISTRY_ADDRESS = "0xD5c2851B00090c92Ba7F4723FB548bb30C9B6865";
|
|
16
16
|
|
package/src/commands/migrate.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ethers } from "ethers";
|
|
3
|
-
import { loadConfig } from "../config";
|
|
4
|
-
import { getClient, requireSigner } from "../client";
|
|
5
|
-
import { c } from '../ui/colors';
|
|
6
|
-
import { startSpinner } from '../ui/spinner';
|
|
7
|
-
import { renderTree } from '../ui/tree';
|
|
8
|
-
import { formatAddress } from '../ui/format';
|
|
3
|
+
import { loadConfig } from "../config.js";
|
|
4
|
+
import { getClient, requireSigner } from "../client.js";
|
|
5
|
+
import { c } from '../ui/colors.js';
|
|
6
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
7
|
+
import { renderTree } from '../ui/tree.js';
|
|
8
|
+
import { formatAddress } from '../ui/format.js';
|
|
9
9
|
|
|
10
10
|
const MIGRATION_REGISTRY_ABI = [
|
|
11
11
|
"function registerMigration(address oldWallet, address newWallet) external",
|
|
@@ -91,7 +91,7 @@ export function registerMigrateCommands(program: Command): void {
|
|
|
91
91
|
migratedFrom: wasSource ? migratedFrom : null,
|
|
92
92
|
};
|
|
93
93
|
if (opts.json) return console.log(JSON.stringify(payload, null, 2));
|
|
94
|
-
const statusItems: import('../ui/tree').TreeItem[] = [
|
|
94
|
+
const statusItems: import('../ui/tree.js').TreeItem[] = [
|
|
95
95
|
{ label: 'Address', value: formatAddress(address) },
|
|
96
96
|
{ label: 'Active', value: formatAddress(activeWallet) },
|
|
97
97
|
{ label: 'Status', value: isCurrent ? 'current (no further migration)' : `migrated — resolves to ${formatAddress(activeWallet)}` },
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
+
import * as fs from "node:fs";
|
|
2
3
|
import { ethers } from "ethers";
|
|
3
4
|
import {
|
|
4
5
|
createSignedProposal,
|
|
@@ -8,10 +9,10 @@ import {
|
|
|
8
9
|
NegotiationGuard,
|
|
9
10
|
SessionManager,
|
|
10
11
|
} from "@arc402/sdk";
|
|
11
|
-
import { loadConfig } from "../config";
|
|
12
|
-
import { requireSigner, getClient } from "../client";
|
|
13
|
-
import { hashFile, hashString } from "../utils/hash";
|
|
14
|
-
import { c } from '../ui/colors';
|
|
12
|
+
import { loadConfig } from "../config.js";
|
|
13
|
+
import { requireSigner, getClient } from "../client.js";
|
|
14
|
+
import { hashFile, hashString } from "../utils/hash.js";
|
|
15
|
+
import { c } from '../ui/colors.js';
|
|
15
16
|
|
|
16
17
|
const sessionManager = new SessionManager();
|
|
17
18
|
|
|
@@ -232,7 +233,7 @@ export function registerNegotiateCommands(program: Command): void {
|
|
|
232
233
|
const guard = new NegotiationGuard({ agentRegistryAddress: config.agentRegistryAddress, runner: provider });
|
|
233
234
|
|
|
234
235
|
const rawJson = opts.message.startsWith("@")
|
|
235
|
-
?
|
|
236
|
+
? fs.readFileSync(opts.message.slice(1), "utf8")
|
|
236
237
|
: opts.message;
|
|
237
238
|
|
|
238
239
|
const result = await guard.verify(rawJson);
|
|
@@ -3,8 +3,8 @@ import * as fs from "fs";
|
|
|
3
3
|
import * as path from "path";
|
|
4
4
|
import * as os from "os";
|
|
5
5
|
import * as YAML from "yaml";
|
|
6
|
-
import { c } from '../ui/colors';
|
|
7
|
-
import { startSpinner } from '../ui/spinner';
|
|
6
|
+
import { c } from '../ui/colors.js';
|
|
7
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
8
8
|
import {
|
|
9
9
|
ARC402_DIR,
|
|
10
10
|
DEFAULT_RUNTIME_REMOTE_ROOT,
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
resolveOpenShellSecrets,
|
|
17
17
|
runCmd,
|
|
18
18
|
writeOpenShellConfig,
|
|
19
|
-
} from "../openshell-runtime";
|
|
20
|
-
import { DAEMON_PID, DAEMON_LOG, DAEMON_TOML } from "../daemon/config";
|
|
19
|
+
} from "../openshell-runtime.js";
|
|
20
|
+
import { DAEMON_PID, DAEMON_LOG, DAEMON_TOML } from "../daemon/config.js";
|
|
21
21
|
|
|
22
22
|
// ─── Constants ────────────────────────────────────────────────────────────────
|
|
23
23
|
|
package/src/commands/owner.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { DisputeArbitrationClient } from "@arc402/sdk";
|
|
3
|
-
import { loadConfig } from "../config";
|
|
4
|
-
import { requireSigner } from "../client";
|
|
5
|
-
import { c } from '../ui/colors';
|
|
6
|
-
import { startSpinner } from '../ui/spinner';
|
|
7
|
-
import { formatAddress } from '../ui/format';
|
|
3
|
+
import { loadConfig } from "../config.js";
|
|
4
|
+
import { requireSigner } from "../client.js";
|
|
5
|
+
import { c } from '../ui/colors.js';
|
|
6
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
7
|
+
import { formatAddress } from '../ui/format.js';
|
|
8
8
|
|
|
9
9
|
export function registerOwnerCommands(program: Command): void {
|
|
10
10
|
const owner = program.command("owner").description("Protocol ownership management (DisputeArbitration two-step transfer)");
|
package/src/commands/policy.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ethers } from "ethers";
|
|
3
|
-
import { loadConfig } from "../config";
|
|
4
|
-
import { getClient, requireSigner } from "../client";
|
|
5
|
-
import { c } from '../ui/colors';
|
|
6
|
-
import { startSpinner } from '../ui/spinner';
|
|
7
|
-
import { formatAddress } from '../ui/format';
|
|
3
|
+
import { loadConfig } from "../config.js";
|
|
4
|
+
import { getClient, requireSigner } from "../client.js";
|
|
5
|
+
import { c } from '../ui/colors.js';
|
|
6
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
7
|
+
import { formatAddress } from '../ui/format.js';
|
|
8
8
|
|
|
9
9
|
const POLICY_ENGINE_EXTENDED_ABI = [
|
|
10
10
|
"function addToBlocklist(address wallet, address provider) external",
|
package/src/commands/relay.ts
CHANGED
|
@@ -5,7 +5,11 @@ import * as os from "os";
|
|
|
5
5
|
import * as http from "http";
|
|
6
6
|
import * as https from "https";
|
|
7
7
|
import { spawn } from "child_process";
|
|
8
|
-
import { c } from '../ui/colors';
|
|
8
|
+
import { c } from '../ui/colors.js';
|
|
9
|
+
|
|
10
|
+
import { fileURLToPath } from "node:url";
|
|
11
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
+
const __dirname = path.dirname(__filename);
|
|
9
13
|
|
|
10
14
|
const PID_FILE = path.join(os.homedir(), ".arc402", "relay.pid");
|
|
11
15
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ProviderResponseType, ServiceAgreementClient } from "@arc402/sdk";
|
|
3
|
-
import { loadConfig } from "../config";
|
|
4
|
-
import { getClient, requireSigner } from "../client";
|
|
5
|
-
import { hashFile, hashString } from "../utils/hash";
|
|
6
|
-
import { c } from '../ui/colors';
|
|
7
|
-
import { startSpinner } from '../ui/spinner';
|
|
3
|
+
import { loadConfig } from "../config.js";
|
|
4
|
+
import { getClient, requireSigner } from "../client.js";
|
|
5
|
+
import { hashFile, hashString } from "../utils/hash.js";
|
|
6
|
+
import { c } from '../ui/colors.js';
|
|
7
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
8
8
|
|
|
9
9
|
export function registerRemediateCommands(program: Command): void {
|
|
10
10
|
const remediate = program.command("remediate").description("Negotiated remediation before formal dispute");
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ReputationOracleClient, ReputationSignalType } from "@arc402/sdk";
|
|
3
3
|
import { ethers } from "ethers";
|
|
4
|
-
import { loadConfig } from "../config";
|
|
5
|
-
import { getClient, requireSigner } from "../client";
|
|
6
|
-
import { c } from '../ui/colors';
|
|
7
|
-
import { startSpinner } from '../ui/spinner';
|
|
8
|
-
import { renderTree } from '../ui/tree';
|
|
9
|
-
import { formatAddress } from '../ui/format';
|
|
4
|
+
import { loadConfig } from "../config.js";
|
|
5
|
+
import { getClient, requireSigner } from "../client.js";
|
|
6
|
+
import { c } from '../ui/colors.js';
|
|
7
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
8
|
+
import { renderTree } from '../ui/tree.js';
|
|
9
|
+
import { formatAddress } from '../ui/format.js';
|
|
10
10
|
|
|
11
11
|
const reputation = new Command("reputation").description("Network-wide reputation signals");
|
|
12
12
|
|
package/src/commands/setup.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as net from "net";
|
|
|
3
3
|
import { execSync, spawn } from "child_process";
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
import prompts from "prompts";
|
|
6
|
-
import { configExists, loadConfig, getSubdomainApi } from "../config";
|
|
6
|
+
import { configExists, loadConfig, getSubdomainApi } from "../config.js";
|
|
7
7
|
|
|
8
8
|
const DAEMON_PORT = 4402;
|
|
9
9
|
|
package/src/commands/trust.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ReputationOracleClient, SponsorshipAttestationClient, TrustClient } from "@arc402/sdk";
|
|
3
|
-
import { loadConfig } from "../config";
|
|
4
|
-
import { getClient } from "../client";
|
|
5
|
-
import { getTrustTier, identityTierLabel } from "../utils/format";
|
|
6
|
-
import { c } from '../ui/colors';
|
|
7
|
-
import { renderTree } from '../ui/tree';
|
|
8
|
-
import { formatAddress } from '../ui/format';
|
|
3
|
+
import { loadConfig } from "../config.js";
|
|
4
|
+
import { getClient } from "../client.js";
|
|
5
|
+
import { getTrustTier, identityTierLabel } from "../utils/format.js";
|
|
6
|
+
import { c } from '../ui/colors.js';
|
|
7
|
+
import { renderTree } from '../ui/tree.js';
|
|
8
|
+
import { formatAddress } from '../ui/format.js';
|
|
9
9
|
|
|
10
10
|
export function registerTrustCommand(program: Command): void {
|
|
11
11
|
program.command("trust <address>").description("Look up trust plus secondary sponsorship/reputation signals for an address").option("--json").action(async (address, opts) => {
|
package/src/commands/verify.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ServiceAgreementClient } from "@arc402/sdk";
|
|
3
3
|
import { ethers } from "ethers";
|
|
4
|
-
import { loadConfig } from "../config";
|
|
5
|
-
import { getClient, requireSigner } from "../client";
|
|
6
|
-
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router";
|
|
7
|
-
import { SERVICE_AGREEMENT_ABI } from "../abis";
|
|
8
|
-
import { c } from '../ui/colors';
|
|
9
|
-
import { startSpinner } from '../ui/spinner';
|
|
4
|
+
import { loadConfig } from "../config.js";
|
|
5
|
+
import { getClient, requireSigner } from "../client.js";
|
|
6
|
+
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router.js";
|
|
7
|
+
import { SERVICE_AGREEMENT_ABI } from "../abis.js";
|
|
8
|
+
import { c } from '../ui/colors.js';
|
|
9
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
10
10
|
|
|
11
11
|
// Agreement status values from the contract
|
|
12
12
|
const AGREEMENT_STATUS_NAMES: Record<number, string> = {
|
package/src/commands/wallet.ts
CHANGED
|
@@ -6,21 +6,21 @@ import fs from "fs";
|
|
|
6
6
|
import path from "path";
|
|
7
7
|
import os from "os";
|
|
8
8
|
import { spawnSync } from "child_process";
|
|
9
|
-
import { Arc402Config, getConfigPath, getUsdcAddress, loadConfig, NETWORK_DEFAULTS, saveConfig } from "../config";
|
|
10
|
-
import { getClient, requireSigner } from "../client";
|
|
11
|
-
import { getTrustTier } from "../utils/format";
|
|
12
|
-
import { AGENT_REGISTRY_ABI, ARC402_WALLET_EXECUTE_ABI, ARC402_WALLET_GUARDIAN_ABI, ARC402_WALLET_MACHINE_KEY_ABI, ARC402_WALLET_OWNER_ABI, ARC402_WALLET_PASSKEY_ABI, ARC402_WALLET_PROTOCOL_ABI, ARC402_WALLET_REGISTRY_ABI, POLICY_ENGINE_GOVERNANCE_ABI, POLICY_ENGINE_LIMITS_ABI, TRUST_REGISTRY_ABI, WALLET_FACTORY_ABI } from "../abis";
|
|
13
|
-
import { warnIfPublicRpc } from "../config";
|
|
14
|
-
import { connectPhoneWallet, sendTransactionWithSession, requestPhoneWalletSignature } from "../walletconnect";
|
|
15
|
-
import { BundlerClient, buildSponsoredUserOp, PaymasterClient, DEFAULT_ENTRY_POINT } from "../bundler";
|
|
16
|
-
import { clearWCSession } from "../walletconnect-session";
|
|
17
|
-
import { handleWalletError } from "../wallet-router";
|
|
18
|
-
import { requestCoinbaseSmartWalletSignature } from "../coinbase-smart-wallet";
|
|
19
|
-
import { sendTelegramMessage } from "../telegram-notify";
|
|
20
|
-
import { renderTree } from "../ui/tree";
|
|
21
|
-
import { startSpinner } from "../ui/spinner";
|
|
22
|
-
import { c } from "../ui/colors";
|
|
23
|
-
import { formatAddress } from "../ui/format";
|
|
9
|
+
import { Arc402Config, getConfigPath, getUsdcAddress, loadConfig, NETWORK_DEFAULTS, saveConfig } from "../config.js";
|
|
10
|
+
import { getClient, requireSigner } from "../client.js";
|
|
11
|
+
import { getTrustTier } from "../utils/format.js";
|
|
12
|
+
import { AGENT_REGISTRY_ABI, ARC402_WALLET_EXECUTE_ABI, ARC402_WALLET_GUARDIAN_ABI, ARC402_WALLET_MACHINE_KEY_ABI, ARC402_WALLET_OWNER_ABI, ARC402_WALLET_PASSKEY_ABI, ARC402_WALLET_PROTOCOL_ABI, ARC402_WALLET_REGISTRY_ABI, POLICY_ENGINE_GOVERNANCE_ABI, POLICY_ENGINE_LIMITS_ABI, TRUST_REGISTRY_ABI, WALLET_FACTORY_ABI } from "../abis.js";
|
|
13
|
+
import { warnIfPublicRpc } from "../config.js";
|
|
14
|
+
import { connectPhoneWallet, sendTransactionWithSession, requestPhoneWalletSignature } from "../walletconnect.js";
|
|
15
|
+
import { BundlerClient, buildSponsoredUserOp, PaymasterClient, DEFAULT_ENTRY_POINT } from "../bundler.js";
|
|
16
|
+
import { clearWCSession } from "../walletconnect-session.js";
|
|
17
|
+
import { handleWalletError } from "../wallet-router.js";
|
|
18
|
+
import { requestCoinbaseSmartWalletSignature } from "../coinbase-smart-wallet.js";
|
|
19
|
+
import { sendTelegramMessage } from "../telegram-notify.js";
|
|
20
|
+
import { renderTree } from "../ui/tree.js";
|
|
21
|
+
import { startSpinner } from "../ui/spinner.js";
|
|
22
|
+
import { c } from "../ui/colors.js";
|
|
23
|
+
import { formatAddress } from "../ui/format.js";
|
|
24
24
|
|
|
25
25
|
const POLICY_ENGINE_DEFAULT = "0x44102e70c2A366632d98Fe40d892a2501fC7fFF2";
|
|
26
26
|
const GUARDIAN_KEY_PATH = path.join(os.homedir(), ".arc402", "guardian.key");
|
package/src/commands/watch.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ethers } from "ethers";
|
|
3
|
-
import { loadConfig } from "../config";
|
|
4
|
-
import { getClient } from "../client";
|
|
5
|
-
import { c } from "../ui/colors";
|
|
3
|
+
import { loadConfig } from "../config.js";
|
|
4
|
+
import { getClient } from "../client.js";
|
|
5
|
+
import { c } from "../ui/colors.js";
|
|
6
6
|
|
|
7
7
|
// ─── Minimal ABIs for event watching ─────────────────────────────────────────
|
|
8
8
|
|
|
@@ -2,13 +2,13 @@ import { Command } from "commander";
|
|
|
2
2
|
import * as fs from "fs";
|
|
3
3
|
import * as path from "path";
|
|
4
4
|
import * as os from "os";
|
|
5
|
-
import { loadConfig } from "../config";
|
|
6
|
-
import { requireSigner, getClient } from "../client";
|
|
5
|
+
import { loadConfig } from "../config.js";
|
|
6
|
+
import { requireSigner, getClient } from "../client.js";
|
|
7
7
|
import { WatchtowerClient, ChannelClient } from "@arc402/sdk";
|
|
8
|
-
import { c } from '../ui/colors';
|
|
9
|
-
import { startSpinner } from '../ui/spinner';
|
|
10
|
-
import { renderTree } from '../ui/tree';
|
|
11
|
-
import { formatAddress } from '../ui/format';
|
|
8
|
+
import { c } from '../ui/colors.js';
|
|
9
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
10
|
+
import { renderTree } from '../ui/tree.js';
|
|
11
|
+
import { formatAddress } from '../ui/format.js';
|
|
12
12
|
|
|
13
13
|
const CHANNEL_STATES_DIR = path.join(os.homedir(), ".arc402", "channel-states");
|
|
14
14
|
|