@agether/agether 1.3.0 → 1.3.2

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 (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.ts +6 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agether/agether",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "OpenClaw plugin for Agether — on-chain credit for AI agents",
5
5
  "main": "src/index.ts",
6
6
  "openclaw": {
@@ -9,7 +9,7 @@
9
9
  ]
10
10
  },
11
11
  "dependencies": {
12
- "@agether/sdk": "^1.10.0",
12
+ "@agether/sdk": "^1.10.1",
13
13
  "axios": "^1.6.0",
14
14
  "ethers": "^6.9.0"
15
15
  },
package/src/index.ts CHANGED
@@ -536,13 +536,14 @@ export default function register(api: any) {
536
536
  const agentId = client.getAgentId();
537
537
 
538
538
  if (params.refresh) {
539
- // x402-gated fresh score
539
+ // x402-gated fresh score — account address required for payment
540
+ const accountAddress = await client.getAccountAddress();
540
541
  const x402 = new X402Client({
541
542
  privateKey: cfg.privateKey,
542
543
  rpcUrl: cfg.rpcUrl,
543
544
  backendUrl: cfg.backendUrl,
544
545
  agentId,
545
- accountAddress: await client.getAccountAddress().catch(() => undefined),
546
+ accountAddress,
546
547
  });
547
548
  const result = await x402.get(`${cfg.backendUrl}/score/${agentId}`);
548
549
  if (!result.success) return fail(result.error || "Score request failed");
@@ -613,7 +614,9 @@ export default function register(api: any) {
613
614
  try {
614
615
  agentId = client.getAgentId();
615
616
  accountAddress = await client.getAccountAddress();
616
- } catch { /* no account, pay from EOA */ }
617
+ } catch (e) {
618
+ console.warn('[agether] x402_pay: getAccountAddress failed, paying from EOA:', e instanceof Error ? e.message : e);
619
+ }
617
620
 
618
621
  const autoDrawEnabled = params.autoDraw === true; // default false — opt-in only
619
622
  const x402 = new X402Client({