@moonbeam-foundation/sdk 0.11.0 → 0.12.0

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/docs/VENUES.md ADDED
@@ -0,0 +1,160 @@
1
+ # Every venue, and one sale stop by stop
2
+
3
+ `VENUES` and `SALE_STOPS` in `@moonbeam-foundation/sdk/market` hold this page as data. `npx moonbeam venues` prints it.
4
+
5
+ ## How a state is read
6
+
7
+ Each step's state comes from the Moonbeam product's market register (`src/market/venues-register.json`, refreshed with
8
+ `node scripts/gen-venues.mjs --from <register>`; `npm run check:venues` keeps the module in step). The SDK never sets a state.
9
+ It maps the register's word one way:
10
+
11
+ | Register | State | Means |
12
+ |---|---|---|
13
+ | live, proven | **live** | outside buyers' money ran through it |
14
+ | partial | **partial** | part of the step runs |
15
+ | self_test | **self-test** | it ran, with Moonbeam on both sides |
16
+ | claimed, contradicted | **not yet** | no outside run was found |
17
+ | none | **n/a** | the market has no such step |
18
+
19
+ `venues(t, { agent })` adds what the layer reads now: `market` (the market's own status and its week of money, from
20
+ `GET /venues`) and `agentListing` (that agent on the list step's three markets, from `GET /list/:id`). A read that fails is
21
+ named in `unread`, and the shipped table answers for it. A live read never upgrades a state.
22
+
23
+ Fields of a venue: `id`, `name`, `marketId` (the id `market(t, id)` takes), `does`, `listedBy` (`list-step`, `venue-account`
24
+ or `registry`), `howListed`, `entry { cost, done }`, and one row per step (`list`, `take`, `settle`, `paid`), each
25
+ `{ state, register, says, read_on, call }`. `call` is `<module>.<export>`, or null where no SDK call does that step.
26
+
27
+ ## Every venue
28
+
29
+ | Venue | List | Take a job | Settle | Paid |
30
+ |---|---|---|---|---|
31
+ | x402 | live · `market.publishListing` | live · `market.handOver` | live · `market.agentSales` | not yet · `market.agentSales` |
32
+ | Virtuals ACP (ERC-8183 jobs) | not yet · `market.publishListing` | self-test · `jobs.readJobs` | self-test · `market.jobCalls` | self-test · `jobs.readJobs` |
33
+ | Virtuals memo jobs (memo-ACP) | not yet · `market.publishListing` | not yet · `jobs.readJobs` | not yet · `market.jobCalls` | not yet · `jobs.readJobs` |
34
+ | BitAgent | not yet · `market.publishListing` | not yet · `jobs.readJobs` | not yet · `market.jobCalls` | not yet · `jobs.readJobs` |
35
+ | Olas Mech | live · `market.readListing` | not yet · `market.olasRequest` | not yet · `market.olasRequest` | not yet · `market.olasRequest` |
36
+ | NEAR AI Agent Market | partial · `market.readListing` | not yet · `market.handOver` | not yet | not yet |
37
+ | A2A Registry | live · `market.listOn` | not yet · `market.handOver` | n/a | not yet · `market.agentSales` |
38
+ | MCP Registry | partial · `market.listOn` | not yet · `market.handOver` | n/a | not yet · `market.agentSales` |
39
+ | ERC-8004 | live · `market.listOn` | n/a | n/a | n/a |
40
+ | Workflow nodes (npm) | live | not yet | n/a | n/a |
41
+
42
+ ## Each venue
43
+
44
+ ### x402 (`x402-base`)
45
+
46
+ Buyers pay per call in USDC on Base; each paid task is handed to your agent and settled through the facilitator. Your listing sells through the class wall of its job class. The Bazaar indexes a wall after its first paid call; x402scan, Ultravioleta and PayAI list it too. `market(t, 'x402')` reads its week of money.
47
+
48
+ - **list**: live: listed in the CDP Bazaar, x402scan, Ultravioleta and PayAI (read 2026-11-06)
49
+ - **take**: live: outside payers paid the layer's walls on Base (read 2026-11-06)
50
+ - **settle**: live: 18 settle transactions on Base from payers outside the layer's addresses (read 2026-11-06)
51
+ - **paid**: not yet: the payout releaser is armed on Base since 2026-10-16 and has sent nothing: its 2 owed sales are held, their seller publishes no payee (read 2026-11-07)
52
+
53
+ ### Virtuals ACP (ERC-8183 jobs) (`erc8183-base`)
54
+
55
+ A buyer opens an ERC-8183 job with a budget; the provider delivers, the evaluator completes or rejects, the contract pays. Resold through Moonbeam's own seller account on Virtuals: your published listing is one of its offerings. `market(t, 'erc8183')` reads its week of money.
56
+
57
+ - **list**: not yet: the seller record exists; that buyers can find it was not shown (read 2026-11-06)
58
+ - **take**: self-test: the one Base job, 81734, had the layer as client and provider (read 2026-11-06)
59
+ - **settle**: self-test: job 81734 completed and released, the layer on both sides (read 2026-11-06)
60
+ - **paid**: self-test: job 81734's provider was paid by the contract; the layer was on both sides (read 2026-11-07)
61
+
62
+ ### Virtuals memo jobs (memo-ACP) (`memoacp-base`)
63
+
64
+ A buyer and a provider move a job by memos through the Virtuals router; the router pays on the last memo. The same Virtuals account; a record in the memo router's registry is the step still open. `market(t, 'virtuals')` reads its week of money.
65
+
66
+ - **list**: not yet: no memo-ACP listing of the layer was found (read 2026-11-06)
67
+ - **take**: not yet: no memo-ACP job of the layer was found (read 2026-11-06)
68
+ - **settle**: not yet: no memo-ACP settlement of the layer was found (read 2026-11-06)
69
+ - **paid**: not yet: no memo-ACP payment to a seller of the layer was found (read 2026-11-07)
70
+
71
+ ### BitAgent (`bitagent-base`)
72
+
73
+ ERC-8183 jobs on BitAgent's own contract on Base. An agent registered on BitAgent (an account on the venue), resold through Moonbeam's own seller. `market(t, 'bitagent')` reads its week of money.
74
+
75
+ - **list**: not yet: the layer is not among the 637 BitAgent agents read (read 2026-11-06)
76
+ - **take**: not yet: no BitAgent job of the layer was found (read 2026-11-06)
77
+ - **settle**: not yet: no BitAgent settlement of the layer was found (read 2026-11-06)
78
+ - **paid**: not yet: no BitAgent payment to a seller of the layer was found (read 2026-11-07)
79
+
80
+ ### Olas Mech (`olas-base`)
81
+
82
+ A requester pays a mech on Base for one request; the mech delivers its answer on chain. An Olas service registered from your own wallet (a bond and gas): `readListing().export.olas` holds its service, mech and worker. `market(t, 'olas')` reads its week of money.
83
+
84
+ - **list**: live: the layer's mech service page answers on the Olas marketplace (read 2026-11-06)
85
+ - **take**: not yet: 0 requests to the layer's mech, and the code to answer a hire is missing (read 2026-11-06)
86
+ - **settle**: not yet: no Olas delivery of the layer was found (read 2026-11-06)
87
+ - **paid**: not yet: no delivery of the layer's mech, so no payment to it (read 2026-11-07)
88
+
89
+ ### NEAR AI Agent Market (`near-agent-market`)
90
+
91
+ Buyers find an agent by category and its own words, and hire it over A2A. Your own account on market.near.ai: `readListing().export.near` is the registration to send.
92
+
93
+ - **list**: partial: the layer's listing answers on the NEAR AI Agent Market (read 2026-11-06)
94
+ - **take**: not yet: 0 delivered jobs of the layer on the NEAR market (read 2026-11-06)
95
+ - **settle**: not yet: no NEAR market payment to the layer was found (read 2026-11-06)
96
+ - **paid**: not yet
97
+
98
+ ### A2A Registry (`a2a`)
99
+
100
+ A directory of A2A agent cards; buyers call the agent at its card's endpoint. The list step: the layer serves the agent's A2A card and publishes it to the registry.
101
+
102
+ - **list**: live: the A2A Registry lists the layer; its entry is stale (read 2026-11-06)
103
+ - **take**: not yet: only the layer's own test traffic was found (read 2026-11-06)
104
+ - **settle**: n/a: an A2A directory has no settlement step (read 2026-11-06)
105
+ - **paid**: not yet: the A2A doer whose share is held is the layer's own wallet; no outside A2A doer was paid (read 2026-11-07)
106
+
107
+ ### MCP Registry (`mcp`)
108
+
109
+ The official MCP Registry and its mirrors (Glama, PulseMCP); clients call the agent's MCP door. The list step: the layer serves the agent's MCP door and publishes it to the official registry.
110
+
111
+ - **list**: partial: listed in the official MCP Registry and on Glama (read 2026-11-06)
112
+ - **take**: not yet: the MCP endpoint answers; no paid hire through it was found (read 2026-11-06)
113
+ - **settle**: n/a: an MCP registry has no settlement step (read 2026-11-06)
114
+ - **paid**: not yet: the MCP seller owed on Base publishes no payee; its share is held (read 2026-11-07)
115
+
116
+ ### ERC-8004 (`erc8004`)
117
+
118
+ The identity registry on Base every other market reads: the agent's id, card and endpoint. The list step records it; for an id your own wallet owns, `register8004Calls` builds `register(agentURI)` for you to sign.
119
+
120
+ - **list**: live: the layer's identities are registered on Base (read 2026-11-06)
121
+ - **take**: n/a: an identity registry takes no hire (read 2026-11-06)
122
+ - **settle**: n/a: an identity registry settles nothing (read 2026-11-06)
123
+ - **paid**: n/a: an identity registry pays nothing
124
+
125
+ ### Workflow nodes (npm) (`workflow-nodes`)
126
+
127
+ Workflow builders add the agent as a node; each node runs the same calls as this SDK (`./workflows`). A node package on npm; the node directory lists it after its review.
128
+
129
+ - **list**: live: the package is on npm; the node directory does not list it (read 2026-11-06)
130
+ - **take**: not yet: only test-network runs were found (read 2026-11-06)
131
+ - **settle**: n/a: a workflow node has no settlement of its own (read 2026-11-06)
132
+ - **paid**: n/a: a workflow node has no payout of its own
133
+
134
+ ## One sale, stop by stop
135
+
136
+ The Studio's sale tour has 17 stops (`tutorial-stop:<id>`), and each has exactly one SDK call that does or reads it. The Studio
137
+ shows this table, so its field names are stable: `id`, `order`, `label`, `studio` (the Studio command or layer op),
138
+ `call`, `module` (`market`, `resale` or `cli`), `fn`, `route` (null when the call runs offline), `needs` (`offline`, `free`:
139
+ public on a shared free rate that a key lifts, or `key`) and `hop` (how the Studio's tour says the stop runs: `live`,
140
+ `partial`, `missing`, or null).
141
+
142
+ | # | id | Label | Studio | SDK call | Route | Needs |
143
+ |---|---|---|---|---|---|---|
144
+ | 1 | `studio` | The Studio | page /acp/studio | `npx moonbeam workflows` | offline | offline |
145
+ | 2 | `offer-in` | A seller comes in | /find 3 | `market.searchSellers` | `GET /match/search` | free |
146
+ | 3 | `classify` | Checked and classed | POST /v1/handshake | `market.checkAgent` | `POST /onboard/diagnose` | key |
147
+ | 4 | `listed` | Listed | /onboard 1 | `market.publishListing` | `POST /agent-listings/:id/publish` | key |
148
+ | 5 | `quote` | The terms | POST /v1/pools/quote | `resale.quoteSale` | offline | offline |
149
+ | 6 | `edges` | Your listings | /edges | `market.layerListings` | `GET /listings` | free |
150
+ | 7 | `hired` | Hired | POST /v1/exchanges/:edge_id/call | `market.hirePlan` | `POST /settle` | key |
151
+ | 8 | `delivered` | Delivered | /sell | `market.handOver` | `POST /handshake` | key |
152
+ | 9 | `graded` | Graded | assurance | `market.composeGrade` | `POST /judge/compose` | key |
153
+ | 10 | `settled` | Settled | POST /v1/settle | `market.jobRecord` | `GET /settle/:id` | free |
154
+ | 11 | `legs` | Who gets what | /sell | `resale.legsByName` | offline | offline |
155
+ | 12 | `accrued` | Booked | GET /v1/resale | `market.saleLedger` | `GET /resale` | free |
156
+ | 13 | `split` | Added up each week | GET /v1/pipe/queues | `market.payoutQueues` | `GET /pipe/queues` | free |
157
+ | 14 | `vault` | The vault | GET /v1/vault/policy | `market.vaultPolicy` | `GET /vault/policy` | free |
158
+ | 15 | `paid` | Paid | GET /v1/vault/policy | `market.claimablePayouts` | `GET /pipe/claimable` | free |
159
+ | 16 | `recorded` | Recorded | GET /v1/root | `market.saleRecord` | `GET /root` | free |
160
+ | 17 | `usage` | What it cost | Settings → Usage | `market.keyStanding` | `GET /access/key` | key |
@@ -0,0 +1,19 @@
1
+ // Every venue, one table: each market, what a seller does there (list, take a job, settle, get paid), its state as the market
2
+ // register reads it, and the SDK call for each step. Then one sale, stop by stop, each stop with its one SDK call.
3
+ // node examples/70-every-venue.mjs the shipped table and its read date (offline)
4
+ // MOONBEAM_API=… node examples/70-every-venue.mjs [8453:<id>] with each market's own read now, and where that agent is listed
5
+ import { VENUES, VENUES_READ_ON, SALE_STOPS, venues, transportFromEnv } from '@moonbeam-foundation/sdk/market';
6
+
7
+ const agent = process.argv[2];
8
+ const live = !process.env.OFFLINE && process.env.MOONBEAM_API;
9
+ const r = live ? await venues(transportFromEnv(), agent ? { agent } : {}) : { venues: VENUES, readOn: VENUES_READ_ON, readAt: null, unread: [] };
10
+ const cell = (s) => `${s.state}${s.call ? ` ${s.call}` : ''}`.padEnd(32);
11
+ console.log(`every venue, as the register read it on ${r.readOn}${r.readAt ? ` · markets read ${r.readAt}` : ''}`);
12
+ console.log(`${'venue'.padEnd(30)}${'list'.padEnd(32)}${'take a job'.padEnd(32)}${'settle'.padEnd(32)}paid`);
13
+ for (const v of r.venues) {
14
+ console.log(`${v.name.padEnd(30)}${cell(v.list)}${cell(v.take)}${cell(v.settle)}${v.paid.state}${v.paid.call ? ` ${v.paid.call}` : ''}`);
15
+ if (v.agentListing !== undefined) console.log(`${''.padEnd(30)}${agent} here: ${v.agentListing ? v.agentListing.state : 'not asked'}`);
16
+ }
17
+ for (const u of r.unread) console.log(`not read now: ${u}`);
18
+ console.log('\none sale, stop by stop');
19
+ for (const s of SALE_STOPS) console.log(`${String(s.order).padStart(2)} ${s.label.padEnd(20)} ${s.call.padEnd(26)} ${s.route ?? 'offline'}`);
@@ -82,6 +82,7 @@ Each role gets a readiness report: what you put up, what you can lose, and anyth
82
82
  | # | File | Best for | You see |
83
83
  |---|---|---|---|
84
84
  | 60 | [cross-list-a-seller](60-cross-list-a-seller.mjs) | A real seller on one market, priced on every other market Moonbeam reaches; live with a key, `MARKUP_BPS` for your own markup | `x402-base 5.00 4.00 1.00`: the buyer pays 5.00, the seller keeps 4.00 |
85
+ | 70 | [every-venue](70-every-venue.mjs) | Every venue: what a seller does there, each step's state and its SDK call; then one sale stop by stop. Live with `MOONBEAM_API` and an agent id | `ERC-8004 live market.listOn n/a` |
85
86
 
86
87
  ## Settings
87
88
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moonbeam-foundation/sdk",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Agentic commerce SDK for AI agents: buy and sell agent work on every market (x402, MCP, A2A, Virtuals ACP / ERC-8183, Olas, BitAgent, ERC-8004, NEAR), with graded jobs and assurance on Base. The Moonbeam Studio's workflows as code.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -136,14 +136,16 @@
136
136
  "check:registry": "node scripts/gen-moonbeam-acp.mjs --check",
137
137
  "check:pins": "node scripts/check-pins.mjs",
138
138
  "check:diagrams": "node scripts/gen-diagrams.mjs >/dev/null && git diff --exit-code -- 'docs/workflows/*.svg' docs/WORKFLOWS.md",
139
- "check": "npm run typecheck && npm run build && npm test && npm run check:pins && npm run check:workflows && npm run check:diagrams",
139
+ "check": "npm run typecheck && npm run build && npm test && npm run check:pins && npm run check:workflows && npm run check:venues && npm run check:diagrams",
140
140
  "sync": "node scripts/sync.mjs",
141
141
  "check:sync": "node scripts/sync.mjs --check",
142
142
  "test:fork": "node test/fork/run-fork.mjs",
143
143
  "test:live": "LIVE=1 vitest run test/live.test.ts",
144
144
  "e2e:devnet": "npm run build && node scripts/devnet-onboard.mjs",
145
145
  "gen:workflows": "node scripts/gen-workflows.mjs",
146
- "check:workflows": "node scripts/gen-workflows.mjs --check"
146
+ "check:workflows": "node scripts/gen-workflows.mjs --check",
147
+ "gen:venues": "node scripts/gen-venues.mjs",
148
+ "check:venues": "node scripts/gen-venues.mjs --check"
147
149
  },
148
150
  "keywords": [
149
151
  "moonbeam",