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.
- package/dist/commands/wallet.d.ts.map +1 -1
- package/dist/commands/wallet.js +18 -0
- package/dist/commands/wallet.js.map +1 -1
- package/dist/commands/workroom.js +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +36 -47
- package/dist/config.js.map +1 -1
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/tui-esm/App.js +0 -136
- package/dist/tui-esm/App.js.map +0 -1
- package/dist/tui-esm/Footer.js +0 -13
- package/dist/tui-esm/Footer.js.map +0 -1
- package/dist/tui-esm/Header.js +0 -19
- package/dist/tui-esm/Header.js.map +0 -1
- package/dist/tui-esm/InputLine.js +0 -121
- package/dist/tui-esm/InputLine.js.map +0 -1
- package/dist/tui-esm/Viewport.js +0 -39
- package/dist/tui-esm/Viewport.js.map +0 -1
- package/dist/tui-esm/WalletConnectPairing.js +0 -61
- package/dist/tui-esm/WalletConnectPairing.js.map +0 -1
- package/dist/tui-esm/command-catalog.js +0 -20
- package/dist/tui-esm/command-catalog.js.map +0 -1
- package/dist/tui-esm/command-renderers.js +0 -180
- package/dist/tui-esm/command-renderers.js.map +0 -1
- package/dist/tui-esm/commerce-format.js +0 -19
- package/dist/tui-esm/commerce-format.js.map +0 -1
- package/dist/tui-esm/components/Button.js +0 -21
- package/dist/tui-esm/components/Button.js.map +0 -1
- package/dist/tui-esm/components/CeremonyView.js +0 -10
- package/dist/tui-esm/components/CeremonyView.js.map +0 -1
- package/dist/tui-esm/components/CompletionDropdown.js +0 -23
- package/dist/tui-esm/components/CompletionDropdown.js.map +0 -1
- package/dist/tui-esm/components/ConfirmPrompt.js +0 -10
- package/dist/tui-esm/components/ConfirmPrompt.js.map +0 -1
- package/dist/tui-esm/components/CustomTextInput.js +0 -99
- package/dist/tui-esm/components/CustomTextInput.js.map +0 -1
- package/dist/tui-esm/components/InteractiveTable.js +0 -61
- package/dist/tui-esm/components/InteractiveTable.js.map +0 -1
- package/dist/tui-esm/components/StepSpinner.js +0 -32
- package/dist/tui-esm/components/StepSpinner.js.map +0 -1
- package/dist/tui-esm/components/Toast.js +0 -29
- package/dist/tui-esm/components/Toast.js.map +0 -1
- package/dist/tui-esm/components/commerce/AgreementList.js +0 -25
- package/dist/tui-esm/components/commerce/AgreementList.js.map +0 -1
- package/dist/tui-esm/components/commerce/ComputeCard.js +0 -9
- package/dist/tui-esm/components/commerce/ComputeCard.js.map +0 -1
- package/dist/tui-esm/components/commerce/DiscoverList.js +0 -14
- package/dist/tui-esm/components/commerce/DiscoverList.js.map +0 -1
- package/dist/tui-esm/components/commerce/HireCard.js +0 -11
- package/dist/tui-esm/components/commerce/HireCard.js.map +0 -1
- package/dist/tui-esm/components/commerce/RoundsList.js +0 -9
- package/dist/tui-esm/components/commerce/RoundsList.js.map +0 -1
- package/dist/tui-esm/components/commerce/SquadCard.js +0 -10
- package/dist/tui-esm/components/commerce/SquadCard.js.map +0 -1
- package/dist/tui-esm/components/commerce/StatusCard.js +0 -10
- package/dist/tui-esm/components/commerce/StatusCard.js.map +0 -1
- package/dist/tui-esm/components/commerce/SubscribeCard.js +0 -10
- package/dist/tui-esm/components/commerce/SubscribeCard.js.map +0 -1
- package/dist/tui-esm/components/commerce/WorkroomCard.js +0 -10
- package/dist/tui-esm/components/commerce/WorkroomCard.js.map +0 -1
- package/dist/tui-esm/components/commerce/common.js +0 -71
- package/dist/tui-esm/components/commerce/common.js.map +0 -1
- package/dist/tui-esm/components/commerce/index.js +0 -27
- package/dist/tui-esm/components/commerce/index.js.map +0 -1
- package/dist/tui-esm/index.js +0 -55
- package/dist/tui-esm/index.js.map +0 -1
- package/dist/tui-esm/kernel.js +0 -734
- package/dist/tui-esm/kernel.js.map +0 -1
- package/dist/tui-esm/render-inline.js +0 -32
- package/dist/tui-esm/render-inline.js.map +0 -1
- package/dist/tui-esm/useChat.js +0 -91
- package/dist/tui-esm/useChat.js.map +0 -1
- package/dist/tui-esm/useCommand.js +0 -142
- package/dist/tui-esm/useCommand.js.map +0 -1
- package/dist/tui-esm/useNotifications.js +0 -17
- package/dist/tui-esm/useNotifications.js.map +0 -1
- package/dist/tui-esm/useScroll.js +0 -46
- package/dist/tui-esm/useScroll.js.map +0 -1
- package/dist/tui-esm/useTerminalSize.js +0 -32
- package/dist/tui-esm/useTerminalSize.js.map +0 -1
- package/hermes/plugins/dist/arc402_hermes-1.0.0-py3-none-any.whl +0 -0
- 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;
|
|
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"}
|
package/dist/commands/wallet.js
CHANGED
|
@@ -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 ??
|