arc402-cli 1.8.7 → 1.8.8

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.
Files changed (84) hide show
  1. package/dist/commands/wallet.d.ts.map +1 -1
  2. package/dist/commands/wallet.js +18 -0
  3. package/dist/commands/wallet.js.map +1 -1
  4. package/dist/commands/workroom.js +1 -1
  5. package/dist/config.d.ts.map +1 -1
  6. package/dist/config.js +36 -47
  7. package/dist/config.js.map +1 -1
  8. package/dist/index.js +11 -5
  9. package/dist/index.js.map +1 -1
  10. package/package.json +2 -2
  11. package/dist/tui-esm/App.js +0 -136
  12. package/dist/tui-esm/App.js.map +0 -1
  13. package/dist/tui-esm/Footer.js +0 -13
  14. package/dist/tui-esm/Footer.js.map +0 -1
  15. package/dist/tui-esm/Header.js +0 -19
  16. package/dist/tui-esm/Header.js.map +0 -1
  17. package/dist/tui-esm/InputLine.js +0 -121
  18. package/dist/tui-esm/InputLine.js.map +0 -1
  19. package/dist/tui-esm/Viewport.js +0 -39
  20. package/dist/tui-esm/Viewport.js.map +0 -1
  21. package/dist/tui-esm/WalletConnectPairing.js +0 -61
  22. package/dist/tui-esm/WalletConnectPairing.js.map +0 -1
  23. package/dist/tui-esm/command-catalog.js +0 -20
  24. package/dist/tui-esm/command-catalog.js.map +0 -1
  25. package/dist/tui-esm/command-renderers.js +0 -180
  26. package/dist/tui-esm/command-renderers.js.map +0 -1
  27. package/dist/tui-esm/commerce-format.js +0 -19
  28. package/dist/tui-esm/commerce-format.js.map +0 -1
  29. package/dist/tui-esm/components/Button.js +0 -21
  30. package/dist/tui-esm/components/Button.js.map +0 -1
  31. package/dist/tui-esm/components/CeremonyView.js +0 -10
  32. package/dist/tui-esm/components/CeremonyView.js.map +0 -1
  33. package/dist/tui-esm/components/CompletionDropdown.js +0 -23
  34. package/dist/tui-esm/components/CompletionDropdown.js.map +0 -1
  35. package/dist/tui-esm/components/ConfirmPrompt.js +0 -10
  36. package/dist/tui-esm/components/ConfirmPrompt.js.map +0 -1
  37. package/dist/tui-esm/components/CustomTextInput.js +0 -99
  38. package/dist/tui-esm/components/CustomTextInput.js.map +0 -1
  39. package/dist/tui-esm/components/InteractiveTable.js +0 -61
  40. package/dist/tui-esm/components/InteractiveTable.js.map +0 -1
  41. package/dist/tui-esm/components/StepSpinner.js +0 -32
  42. package/dist/tui-esm/components/StepSpinner.js.map +0 -1
  43. package/dist/tui-esm/components/Toast.js +0 -29
  44. package/dist/tui-esm/components/Toast.js.map +0 -1
  45. package/dist/tui-esm/components/commerce/AgreementList.js +0 -25
  46. package/dist/tui-esm/components/commerce/AgreementList.js.map +0 -1
  47. package/dist/tui-esm/components/commerce/ComputeCard.js +0 -9
  48. package/dist/tui-esm/components/commerce/ComputeCard.js.map +0 -1
  49. package/dist/tui-esm/components/commerce/DiscoverList.js +0 -14
  50. package/dist/tui-esm/components/commerce/DiscoverList.js.map +0 -1
  51. package/dist/tui-esm/components/commerce/HireCard.js +0 -11
  52. package/dist/tui-esm/components/commerce/HireCard.js.map +0 -1
  53. package/dist/tui-esm/components/commerce/RoundsList.js +0 -9
  54. package/dist/tui-esm/components/commerce/RoundsList.js.map +0 -1
  55. package/dist/tui-esm/components/commerce/SquadCard.js +0 -10
  56. package/dist/tui-esm/components/commerce/SquadCard.js.map +0 -1
  57. package/dist/tui-esm/components/commerce/StatusCard.js +0 -10
  58. package/dist/tui-esm/components/commerce/StatusCard.js.map +0 -1
  59. package/dist/tui-esm/components/commerce/SubscribeCard.js +0 -10
  60. package/dist/tui-esm/components/commerce/SubscribeCard.js.map +0 -1
  61. package/dist/tui-esm/components/commerce/WorkroomCard.js +0 -10
  62. package/dist/tui-esm/components/commerce/WorkroomCard.js.map +0 -1
  63. package/dist/tui-esm/components/commerce/common.js +0 -71
  64. package/dist/tui-esm/components/commerce/common.js.map +0 -1
  65. package/dist/tui-esm/components/commerce/index.js +0 -27
  66. package/dist/tui-esm/components/commerce/index.js.map +0 -1
  67. package/dist/tui-esm/index.js +0 -55
  68. package/dist/tui-esm/index.js.map +0 -1
  69. package/dist/tui-esm/kernel.js +0 -734
  70. package/dist/tui-esm/kernel.js.map +0 -1
  71. package/dist/tui-esm/render-inline.js +0 -32
  72. package/dist/tui-esm/render-inline.js.map +0 -1
  73. package/dist/tui-esm/useChat.js +0 -91
  74. package/dist/tui-esm/useChat.js.map +0 -1
  75. package/dist/tui-esm/useCommand.js +0 -142
  76. package/dist/tui-esm/useCommand.js.map +0 -1
  77. package/dist/tui-esm/useNotifications.js +0 -17
  78. package/dist/tui-esm/useNotifications.js.map +0 -1
  79. package/dist/tui-esm/useScroll.js +0 -46
  80. package/dist/tui-esm/useScroll.js.map +0 -1
  81. package/dist/tui-esm/useTerminalSize.js +0 -32
  82. package/dist/tui-esm/useTerminalSize.js.map +0 -1
  83. package/hermes/plugins/dist/arc402_hermes-1.0.0-py3-none-any.whl +0 -0
  84. package/hermes/plugins/dist/arc402_hermes-1.0.0.tar.gz +0 -0
@@ -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;AA0qBpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA4tG7D"}
1
+ {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/commands/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwrBpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAuuG7D"}
@@ -158,6 +158,13 @@ function getWalletAddressFromFactoryLogs(factoryInterface, logs) {
158
158
  }
159
159
  return null;
160
160
  }
161
+ async function assertAddressHasCode(provider, address, label) {
162
+ const code = await provider.getCode(address);
163
+ if (code !== "0x")
164
+ return;
165
+ throw new Error(`${label} ${address} has no contract code. ` +
166
+ `This usually means an owner EOA was saved instead of the deployed ARC402Wallet contract.`);
167
+ }
161
168
  // Standard onboarding categories required for a newly deployed wallet.
162
169
  // These cover the full ARC-402 flow: spending, hiring, compute, research, protocol ops.
163
170
  const ONBOARDING_CATEGORIES = [
@@ -1100,6 +1107,7 @@ function registerWalletCommands(program) {
1100
1107
  console.error("UserOperation failed on-chain.");
1101
1108
  process.exit(1);
1102
1109
  }
1110
+ await assertAddressHasCode(provider, senderAddress, "Deployed wallet");
1103
1111
  config.walletContractAddress = senderAddress;
1104
1112
  config.ownerAddress = ownerAddress;
1105
1113
  (0, config_1.saveConfig)(config);
@@ -1229,6 +1237,7 @@ function registerWalletCommands(program) {
1229
1237
  console.error("Could not find WalletDeployed/WalletCreated event in receipt. Check the transaction on-chain.");
1230
1238
  process.exit(1);
1231
1239
  }
1240
+ await assertAddressHasCode(provider, deployedWallet, "Deployed wallet");
1232
1241
  walletAddress = deployedWallet;
1233
1242
  // ── Step 1 complete: save wallet + owner immediately ─────────────────
1234
1243
  config.walletContractAddress = walletAddress;
@@ -1269,6 +1278,7 @@ function registerWalletCommands(program) {
1269
1278
  deploySpinner.fail("Could not find WalletDeployed/WalletCreated event in receipt. Check the transaction on-chain.");
1270
1279
  process.exit(1);
1271
1280
  }
1281
+ await assertAddressHasCode(provider, walletAddress, "Deployed wallet");
1272
1282
  deploySpinner.succeed("Wallet deployed");
1273
1283
  // Generate guardian key (separate from hot key) and call setGuardian
1274
1284
  const guardianWallet = ethers_1.ethers.Wallet.createRandom();
@@ -1327,6 +1337,14 @@ function registerWalletCommands(program) {
1327
1337
  const policyAddress = resolvePolicyEngineAddress(config);
1328
1338
  const chainId = config.network === "base-mainnet" ? 8453 : 84532;
1329
1339
  const provider = new ethers_1.ethers.JsonRpcProvider(config.rpcUrl);
1340
+ try {
1341
+ await assertAddressHasCode(provider, walletAddress, "Configured walletContractAddress");
1342
+ }
1343
+ catch (error) {
1344
+ console.error(colors_1.c.failure + " " + colors_1.c.red(error instanceof Error ? error.message : String(error)));
1345
+ console.error(colors_1.c.dim("Tip: use the deployed wallet contract address, not the owner EOA, then rerun onboarding."));
1346
+ process.exit(1);
1347
+ }
1330
1348
  // Resolve protocol contracts to whitelist
1331
1349
  const handshakeAddress = config.handshakeAddress ??
1332
1350
  config_1.NETWORK_DEFAULTS[config.network]?.handshakeAddress ??