Skip to content

Update to @azeth/sdk 0.2.22 / @azeth/provider 0.2.21 APIs#1

Open
0xtus wants to merge 1 commit into
mainfrom
chore/sdk-0.2.22-compat
Open

Update to @azeth/sdk 0.2.22 / @azeth/provider 0.2.21 APIs#1
0xtus wants to merge 1 commit into
mainfrom
chore/sdk-0.2.22-compat

Conversation

@0xtus

@0xtus 0xtus commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

The template was written against the v0.2.0-era API surface and no longer compiled against the latest published packages. This updates it to build clean on @azeth/sdk@0.2.22 and @azeth/provider@0.2.21.

Changes

  • deps: @azeth/sdk^0.2.22, @azeth/provider^0.2.21
  • publishService: RegisterParams now requires name, description, and entityType alongside capabilities/endpoint
  • x402 routes: route config moved to the x402 V2 PaymentOption shape — accepts: { scheme: 'exact', price, network, payTo } with CAIP-2 networks (via the exported CAIP2_NETWORKS map) instead of the flat { price, network: 'base-sepolia' } object
  • createX402StackFromEnv: now async; pass the smart account as payTo so consumers can rate the service
  • getWeightedReputation: returns { weightedValue, totalWeight, opinionCount } (payment-weighted, 18-decimal fixed point on a -100..100 scale) — display updated accordingly
  • submitOpinion: uses the SimpleOpinion shape ({ serviceTokenId, rating, tag1, endpoint }); ratings are payment-gated (≥ $1 net USD paid to the provider), so the example now handles that gate gracefully instead of crashing
  • README: MCP server tool count 32 → 34

Verification

  • npm install resolves @azeth/sdk@0.2.22, @azeth/provider@0.2.21 (0 vulnerabilities)
  • npm run build (tsc) passes clean
  • node dist/server.js / node dist/client.js start and exit with the expected missing-key guidance (runtime ESM resolution verified)

🤖 Generated with Claude Code

- bump @azeth/sdk ^0.2.22, @azeth/provider ^0.2.21
- publishService now requires name/description/entityType (RegisterParams)
- x402 routes use PaymentOption shape: accepts { scheme, price, network (CAIP-2), payTo }
- createX402StackFromEnv is async and takes a payTo override (smart account)
- getWeightedReputation returns { weightedValue, totalWeight, opinionCount }
- submitOpinion takes SimpleOpinion { serviceTokenId, rating (-100..100), tag1 };
  handle the $1 net-payment gate gracefully
- README: MCP server now exposes 34 tools

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant