arc402-cli 0.9.4 → 0.9.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/commands/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8kBpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAg2F7D"}
1
+ {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/commands/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8kBpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA82F7D"}
@@ -851,8 +851,22 @@ export function registerWalletCommands(program) {
851
851
  .option("--hardware", "Hardware wallet mode: show raw wc: URI only (for Ledger Live, Trezor Suite, etc.)")
852
852
  .option("--sponsored", "Use CDP paymaster for gas sponsorship (requires paymasterUrl + cdpKeyName + CDP_PRIVATE_KEY env)")
853
853
  .option("--dry-run", "Simulate the deployment ceremony without sending transactions")
854
+ .option("--force", "Deploy even if a wallet is already configured")
854
855
  .action(async (opts) => {
855
856
  const config = loadConfig();
857
+ // ── Check for existing wallet ──────────────────────────────────────────
858
+ if (config.walletContractAddress) {
859
+ const addr = config.walletContractAddress;
860
+ console.log();
861
+ console.log(` ${c.mark} Wallet already deployed at ${c.white(addr)}`);
862
+ console.log(` Use ${c.white("wallet status")} to check it.`);
863
+ console.log(` Use ${c.white("wallet deploy --force")} to deploy another wallet.`);
864
+ console.log();
865
+ if (!opts.force)
866
+ return;
867
+ console.log(` ${c.warning} Deploying a second wallet (--force)...`);
868
+ console.log();
869
+ }
856
870
  if (opts.dryRun) {
857
871
  const factoryAddr = config.walletFactoryAddress ?? NETWORK_DEFAULTS[config.network]?.walletFactoryAddress ?? "(not configured)";
858
872
  const chainId = config.network === "base-mainnet" ? 8453 : 84532;