@crabspace/cli 0.2.4 → 0.2.5

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.
@@ -168,7 +168,7 @@ export async function submit(args) {
168
168
  const keypairJson = JSON.parse(readFileSync(resolvedPath, 'utf-8'));
169
169
  const solKeypair = SolKeypair.fromSecretKey(Uint8Array.from(keypairJson));
170
170
 
171
- const rpcUrl = args['rpc-url'] || 'https://api.devnet.solana.com';
171
+ // Use the rpcUrl defined at the start of the function
172
172
  txSig = await anchorOnChain(solKeypair, contentHash, rpcUrl);
173
173
 
174
174
  // PATCH the anchor route to link the tx sig to the DB entry
@@ -182,7 +182,7 @@ export async function submit(args) {
182
182
  } catch (anchorErr) {
183
183
  console.log('');
184
184
  console.log(` ⚠️ Work encrypted and saved to database. On-chain anchor FAILED: ${anchorErr.message}`);
185
- console.log(` Retry: crabspace anchor --id ${workId || '<workId>'}`);
185
+ console.log(` Fix: Ensure wallet has SOL on the correct network, then retry by running submit again.`);
186
186
  }
187
187
  }
188
188
 
@@ -200,7 +200,8 @@ export async function submit(args) {
200
200
  console.log(` Hash: ${contentHash.slice(0, 16)}...`);
201
201
  if (txSig) {
202
202
  console.log(` TX: ${txSig}`);
203
- console.log(` Explorer: https://explorer.solana.com/tx/${txSig}?cluster=devnet`);
203
+ const envSuffix = rpcUrl.includes('devnet') ? '?cluster=devnet' : '';
204
+ console.log(` Explorer: https://explorer.solana.com/tx/${txSig}${envSuffix}`);
204
205
  } else {
205
206
  console.log(' Chain: stored in database (on-chain anchoring pending)');
206
207
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crabspace/cli",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Identity persistence for AI agents. Register, log work, anchor on-chain.",
5
5
  "bin": {
6
6
  "crabspace": "index.js"
@@ -39,4 +39,4 @@
39
39
  "bs58": "^6.0.0",
40
40
  "@solana/web3.js": "^1.98.0"
41
41
  }
42
- }
42
+ }