@moonbeam-foundation/sdk 0.5.3 → 0.10.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.
Files changed (168) hide show
  1. package/README.md +313 -39
  2. package/bin/moonbeam.mjs +15 -2
  3. package/dist/abi/index.d.ts +55 -0
  4. package/dist/abi/index.d.ts.map +1 -0
  5. package/dist/abi/index.js +227 -0
  6. package/dist/abi/index.js.map +1 -0
  7. package/dist/acp/events.d.ts +38 -38
  8. package/dist/acp/events.d.ts.map +1 -1
  9. package/dist/acp/events.js.map +1 -1
  10. package/dist/acp/moonbeam-acp.generated.d.ts +55 -0
  11. package/dist/acp/moonbeam-acp.generated.d.ts.map +1 -0
  12. package/dist/acp/moonbeam-acp.generated.js +59 -0
  13. package/dist/acp/moonbeam-acp.generated.js.map +1 -0
  14. package/dist/acp/outcome.d.ts +5 -1
  15. package/dist/acp/outcome.d.ts.map +1 -1
  16. package/dist/acp/outcome.js +3 -2
  17. package/dist/acp/outcome.js.map +1 -1
  18. package/dist/acp/pipeline.js.map +1 -1
  19. package/dist/acp/registry.d.ts.map +1 -1
  20. package/dist/acp/registry.js +5 -3
  21. package/dist/acp/registry.js.map +1 -1
  22. package/dist/actors/track-record.js.map +1 -1
  23. package/dist/adapters/acp.js.map +1 -1
  24. package/dist/adapters/stamp.d.ts +2 -2
  25. package/dist/adapters/stamp.d.ts.map +1 -1
  26. package/dist/adapters/stamp.js +6 -6
  27. package/dist/adapters/stamp.js.map +1 -1
  28. package/dist/arbitration/index.d.ts +120 -0
  29. package/dist/arbitration/index.d.ts.map +1 -0
  30. package/dist/arbitration/index.js +116 -0
  31. package/dist/arbitration/index.js.map +1 -0
  32. package/dist/assurance/assurance-shared.d.ts +1924 -0
  33. package/dist/assurance/assurance-shared.d.ts.map +1 -0
  34. package/dist/assurance/assurance-shared.js +2227 -0
  35. package/dist/assurance/assurance-shared.js.map +1 -0
  36. package/dist/assurance/index.d.ts +57 -0
  37. package/dist/assurance/index.d.ts.map +1 -0
  38. package/dist/assurance/index.js +49 -0
  39. package/dist/assurance/index.js.map +1 -0
  40. package/dist/attest/index.d.ts +19 -0
  41. package/dist/attest/index.d.ts.map +1 -0
  42. package/dist/attest/index.js +17 -0
  43. package/dist/attest/index.js.map +1 -0
  44. package/dist/client/index.d.ts +16 -6
  45. package/dist/client/index.d.ts.map +1 -1
  46. package/dist/client/index.js +21 -1
  47. package/dist/client/index.js.map +1 -1
  48. package/dist/connect/logs.js.map +1 -1
  49. package/dist/core/money.js.map +1 -1
  50. package/dist/core/settle.js.map +1 -1
  51. package/dist/core/types.d.ts +1 -1
  52. package/dist/cover/index.d.ts +65 -0
  53. package/dist/cover/index.d.ts.map +1 -0
  54. package/dist/cover/index.js +61 -0
  55. package/dist/cover/index.js.map +1 -0
  56. package/dist/devnet/edge.d.ts +207 -0
  57. package/dist/devnet/edge.d.ts.map +1 -0
  58. package/dist/devnet/edge.js +209 -0
  59. package/dist/devnet/edge.js.map +1 -0
  60. package/dist/devnet/index.d.ts +403 -0
  61. package/dist/devnet/index.d.ts.map +1 -0
  62. package/dist/devnet/index.js +420 -0
  63. package/dist/devnet/index.js.map +1 -0
  64. package/dist/devnet/profile.d.ts +110 -0
  65. package/dist/devnet/profile.d.ts.map +1 -0
  66. package/dist/devnet/profile.js +145 -0
  67. package/dist/devnet/profile.js.map +1 -0
  68. package/dist/erc8004/index.d.ts +9 -9
  69. package/dist/erc8004/index.d.ts.map +1 -1
  70. package/dist/erc8004/index.js.map +1 -1
  71. package/dist/erc8004/registry.generated.d.ts.map +1 -1
  72. package/dist/erc8004/registry.generated.js +0 -1
  73. package/dist/erc8004/registry.generated.js.map +1 -1
  74. package/dist/erc8183/index.d.ts +12 -12
  75. package/dist/erc8183/index.d.ts.map +1 -1
  76. package/dist/erc8183/index.js.map +1 -1
  77. package/dist/errors/index.d.ts +51 -0
  78. package/dist/errors/index.d.ts.map +1 -0
  79. package/dist/errors/index.js +63 -0
  80. package/dist/errors/index.js.map +1 -0
  81. package/dist/index.d.ts +12 -0
  82. package/dist/index.d.ts.map +1 -1
  83. package/dist/index.js +13 -0
  84. package/dist/index.js.map +1 -1
  85. package/dist/jobs/index.d.ts +62 -0
  86. package/dist/jobs/index.d.ts.map +1 -0
  87. package/dist/jobs/index.js +59 -0
  88. package/dist/jobs/index.js.map +1 -0
  89. package/dist/judge/index.d.ts +144 -4
  90. package/dist/judge/index.d.ts.map +1 -1
  91. package/dist/judge/index.js +138 -5
  92. package/dist/judge/index.js.map +1 -1
  93. package/dist/launcher/index.d.ts +3 -3
  94. package/dist/launcher/index.d.ts.map +1 -1
  95. package/dist/market/index.d.ts +162 -0
  96. package/dist/market/index.d.ts.map +1 -0
  97. package/dist/market/index.js +137 -0
  98. package/dist/market/index.js.map +1 -0
  99. package/dist/onboard/index.d.ts +66 -26
  100. package/dist/onboard/index.d.ts.map +1 -1
  101. package/dist/onboard/index.js +98 -29
  102. package/dist/onboard/index.js.map +1 -1
  103. package/dist/pools/index.d.ts +77 -11
  104. package/dist/pools/index.d.ts.map +1 -1
  105. package/dist/pools/index.js +58 -15
  106. package/dist/pools/index.js.map +1 -1
  107. package/dist/proof/index.d.ts +121 -0
  108. package/dist/proof/index.d.ts.map +1 -0
  109. package/dist/proof/index.js +84 -0
  110. package/dist/proof/index.js.map +1 -0
  111. package/dist/resale/index.d.ts +136 -0
  112. package/dist/resale/index.d.ts.map +1 -0
  113. package/dist/resale/index.js +131 -0
  114. package/dist/resale/index.js.map +1 -0
  115. package/dist/resale/payment-scheme.d.mts +46 -0
  116. package/dist/resale/payment-scheme.mjs +351 -0
  117. package/dist/resale/payment-scheme.pin.json +6 -0
  118. package/dist/resale/settle-rule.d.ts +49 -0
  119. package/dist/resale/settle-rule.d.ts.map +1 -0
  120. package/dist/resale/settle-rule.js +53 -0
  121. package/dist/resale/settle-rule.js.map +1 -0
  122. package/dist/rpc/index.d.ts +24 -0
  123. package/dist/rpc/index.d.ts.map +1 -0
  124. package/dist/rpc/index.js +66 -0
  125. package/dist/rpc/index.js.map +1 -0
  126. package/dist/workflows/data.d.ts +3 -0
  127. package/dist/workflows/data.d.ts.map +1 -0
  128. package/dist/workflows/data.js +829 -0
  129. package/dist/workflows/data.js.map +1 -0
  130. package/dist/workflows/index.d.ts +31 -0
  131. package/dist/workflows/index.d.ts.map +1 -0
  132. package/dist/workflows/index.js +104 -0
  133. package/dist/workflows/index.js.map +1 -0
  134. package/dist/workflows/types.d.ts +26 -0
  135. package/dist/workflows/types.d.ts.map +1 -0
  136. package/dist/workflows/types.js +2 -0
  137. package/dist/workflows/types.js.map +1 -0
  138. package/dist/x402/index.d.ts +153 -0
  139. package/dist/x402/index.d.ts.map +1 -0
  140. package/dist/x402/index.js +143 -0
  141. package/dist/x402/index.js.map +1 -0
  142. package/docs/workflows/hire-from-chat.png +0 -0
  143. package/docs/workflows/list-business.png +0 -0
  144. package/docs/workflows/onboard-batch.png +0 -0
  145. package/docs/workflows/onboard.png +0 -0
  146. package/docs/workflows/publish.png +0 -0
  147. package/docs/workflows/resell.png +0 -0
  148. package/docs/workflows/sell-edge.png +0 -0
  149. package/examples/03-end-to-end-offline.mjs +2 -2
  150. package/examples/14-grade-record.mjs +6 -4
  151. package/examples/17-grade-live.mjs +1 -1
  152. package/examples/20-onboard-client.mjs +2 -2
  153. package/examples/24-resell-on-base.mjs +17 -0
  154. package/examples/{30-read-a-real-job.mjs → 30-read-a-job.mjs} +2 -2
  155. package/examples/32-read-live-from-base.mjs +8 -11
  156. package/examples/40-the-article.mjs +2 -2
  157. package/examples/50-x402-pay-a-wall.mjs +28 -0
  158. package/examples/51-read-a-proof.mjs +22 -0
  159. package/examples/52-arbitration-calls.mjs +13 -0
  160. package/examples/53-attested-by-default.mjs +19 -0
  161. package/examples/README.md +16 -7
  162. package/examples/data/proof-base-tx-52587000.json +116 -0
  163. package/examples/data/x402-wall-402.json +85 -0
  164. package/package.json +101 -20
  165. package/skills/moonbeam-actor-backer/SKILL.md +1 -1
  166. package/skills/moonbeam-actor-challenger/SKILL.md +1 -1
  167. package/skills/moonbeam-actor-doubter/SKILL.md +1 -1
  168. package/skills/moonbeam-assurance/SKILL.md +1 -1
package/README.md CHANGED
@@ -1,32 +1,158 @@
1
- # @moonbeam-foundation/sdk
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/moonbeam-foundation/moonbeam-sdk/main/docs/workflows/hire-from-chat.png" alt="The Moonbeam Studio: a chat agent finds a seller, quotes the terms, plans the hire, grades the delivery and plans the ending" width="860">
3
+ </p>
2
4
 
3
- **Assurance for AI agent work: a price, a judge and a deadline, settled against proof.**
5
+ # Moonbeam SDK: agentic commerce for AI agents
4
6
 
5
- - **What:** the SDK for Moonbeam's assurance layer on Base. It models a covered job end to end: the seller's deposit,
6
- the buyer's premium, cover from a pool, the verdict, and a settlement in which every ledger sums to zero.
7
- - **Why:** agent escrow refunds the price of a failed job, never the cost of the failure, and the judge has no capital
8
- behind its verdict. Moonbeam adds the deposit, the pool and a grader (Jev by TypeSafe).
9
- - **How:** `npm install @moonbeam-foundation/sdk`, then replay Moonbeam's first covered hire on Base, offline, in a few seconds:
7
+ **Buy and sell AI agent work on every agent market, with every job graded before the seller is paid.**
8
+
9
+ [![npm](https://img.shields.io/npm/v/@moonbeam-foundation/sdk?color=53cbc9&label=npm)](https://www.npmjs.com/package/@moonbeam-foundation/sdk)
10
+ [![downloads](https://img.shields.io/npm/dm/@moonbeam-foundation/sdk?color=e1147b)](https://www.npmjs.com/package/@moonbeam-foundation/sdk)
11
+ [![types](https://img.shields.io/npm/types/@moonbeam-foundation/sdk)](https://www.npmjs.com/package/@moonbeam-foundation/sdk)
12
+ [![node](https://img.shields.io/node/v/@moonbeam-foundation/sdk)](https://nodejs.org)
13
+ [![license](https://img.shields.io/npm/l/@moonbeam-foundation/sdk)](LICENSE)
14
+
15
+ Moonbeam is a marketplace for AI agents: sellers list an agent, buyers hire it for a task, and every answer is checked
16
+ before the seller is paid. This SDK is that marketplace as code, the same steps the **Moonbeam Studio** runs as workflows.
10
17
 
11
18
  ```bash
12
- npx moonbeam demo
19
+ npm install @moonbeam-foundation/sdk
20
+ npx moonbeam workflows # the Studio's seven agentic commerce workflows, each step with the call that runs it
21
+ npx moonbeam demo # Moonbeam's first covered hire on Base, replayed offline in a few seconds
13
22
  ```
14
23
 
15
- ![moonbeam demo: a covered hire on Base, Jev's grade of that same job checked against its Base record, and the settlement](docs/demo.gif)
24
+ Node 20 or later, TypeScript types included, ESM.
16
25
 
17
- Moonbeam ACP is in a pilot on Base with selected partners. For early access, write to
18
- [builders@moonbeam.foundation](mailto:builders@moonbeam.foundation).
26
+ ## One SDK, every agent market
27
+
28
+ | Market | Find and buy | Sell under your own name | Read back |
29
+ |---|---|---|---|
30
+ | **x402** (paid HTTP, USDC on Base) | `searchSellers`, `markets` | `readListing().export.x402`: your wall's answer | `market('x402')` |
31
+ | **MCP** | `searchSellers` | `readListing().export.mcp`: your server entry | `listingCard` |
32
+ | **A2A** | `searchSellers`, `testEndpoint` | your agent card, `listingCard` | `testEndpoint` |
33
+ | **Virtuals ACP** (ERC-8183, memo-ACP) | `searchSellers`, `readJobs` | listed through Moonbeam's own seller | `readJobs`, `market('virtuals')` |
34
+ | **Olas Mech** | `markets` | `readListing().export.olas`: the mech, its card and its rate | `market('olas')` |
35
+ | **BitAgent** (ERC-8183) | `readJobs('bitagent:8453:…')` | listed through Moonbeam's own seller | `market('bitagent')` |
36
+ | **ERC-8004** (agent registry) | `identity`, `readiness` | `readListing().export.erc8004`: the registration | `identity` |
37
+ | **NEAR AI** | `markets` | `readListing().export.near`: the registration | `readListing` |
38
+ | **Moonbeam** (graded jobs on Base) | `searchSellers`, `readJobs` | `createListing`, `publishListing` | `jobRecord`, `readJobs` |
39
+
40
+ Nothing in this SDK signs or sends a transaction. A step that leads to a write on a chain answers the unsigned calls,
41
+ each with the party who signs it, and your wallet sends them.
42
+
43
+ ## Agentic commerce workflows
44
+
45
+ Each picture is the workflow's canvas in the Moonbeam Studio, and each step under it is the SDK call that runs it.
46
+ `npx moonbeam workflows <id>` prints the same steps in your terminal, and `@moonbeam-foundation/sdk/workflows` holds them as data.
47
+
48
+ The hire, quote and ending steps run on Moonbeam's test network (`./devnet`), as they do in the Studio. On Base, a job
49
+ is read with `readJobs` and graded and recorded with `./judge`.
50
+
51
+ ### Hire a seller from a chat · `hire-from-chat`
52
+
53
+ The Moonbeam agent finds a seller, quotes the terms, plans the hire, grades the delivery and plans the ending.
54
+
55
+ | Step | Layer call | SDK |
56
+ |---|---|---|
57
+ | find_seller | `GET /v1/match/search` | `searchSellers()` · `./market` |
58
+ | quote_assurance | `POST /v1/pools/quote` | `quoteEdge()` · `./devnet` |
59
+ | hire_plan (the buyer signs) | `POST /v1/settle` | `hire()` · `./devnet` |
60
+ | grade_delivery | `POST /v1/judge/compose` | `gradeJob()` · `./judge` |
61
+ | settle_plan (the evaluator signs) | `POST /v1/assurance/call` | `settle()` · `./devnet` |
62
+
63
+ ### Sell one task through an edge · `sell-edge`
64
+
65
+ ![Sell one task through an edge](https://raw.githubusercontent.com/moonbeam-foundation/moonbeam-sdk/main/docs/workflows/sell-edge.png)
66
+
67
+ Find a listed edge of a job class whose check passed, and sell one task through it: the seller answers, one meter line.
68
+
69
+ ```ts
70
+ import { transportFromEnv, listedEdges } from '@moonbeam-foundation/sdk/market';
71
+ import { callEdge } from '@moonbeam-foundation/sdk/devnet';
72
+
73
+ const t = transportFromEnv(); // MOONBEAM_API and MOONBEAM_API_KEY
74
+ const { rows } = await listedEdges(t, { class: 'mcp.tool_call' });
75
+ const sold = await callEdge(t, String(rows[0].edge_id), { task: 'Summarize this page', class: 'mcp.tool_call' });
76
+ ```
77
+
78
+ ### Make your agent hireable · `onboard`
79
+
80
+ ![Make your agent hireable](https://raw.githubusercontent.com/moonbeam-foundation/moonbeam-sdk/main/docs/workflows/onboard.png)
19
81
 
20
- ## Install
82
+ Find the agent, read its verdict, get the fix for each failing check, re-check it with one handshake, and read its terms.
83
+
84
+ | Step | Layer call | SDK |
85
+ |---|---|---|
86
+ | find | `GET /v1/agents/identity` | `identity()` · `./market` |
87
+ | verdict | `GET /v1/agents/:chain/:id/readiness` | `readiness()` · `./market` |
88
+ | fix | the layer's check | `checkAgent()` · `./market` |
89
+ | re-check | `POST /v1/agents/probe` | `testEndpoint()` · `./market` |
90
+ | assured | `POST /v1/pools/quote` | `quoteEdge()` · `./devnet` |
91
+
92
+ ### List my business · `list-business`
93
+
94
+ ![List my business: ten modules](https://raw.githubusercontent.com/moonbeam-foundation/moonbeam-sdk/main/docs/workflows/list-business.png)
95
+
96
+ From your address to every agent market, in ten modules: read, claim, test your door, publish one record, reach each
97
+ market, get paid, keep it, be seen, and your plan.
98
+
99
+ ```ts
100
+ import { transportFromEnv, createListing, publishListing, readListing } from '@moonbeam-foundation/sdk/market';
101
+
102
+ const t = transportFromEnv();
103
+ const { listing } = await createListing(t, {
104
+ identity: { name: 'Text Tools', handle: 'text-tools', tagline: 'Word counts and tidy JSON, checked by code.' },
105
+ hosting: { mode: 'self_hosted', door: { kind: 'a2a', endpoint: 'https://tools.example.com/a2a' } },
106
+ pricing: { seller_price_usd: '0.05', classes: ['text.word_count', 'data.json_normalize'], payout: '0xYourAddressOnBase' },
107
+ });
108
+ await publishListing(t, listing.id); // one graded task per job; each job it passes is sold
109
+ const { export: everywhere } = await readListing(t, listing.id);
110
+ // everywhere.x402 · everywhere.mcp · everywhere.erc8004 · everywhere.near · everywhere.olas: what each market needs from you
111
+ ```
112
+
113
+ ### Publish a workflow and build its record · `publish`
114
+
115
+ ![Publish a workflow and build its record](https://raw.githubusercontent.com/moonbeam-foundation/moonbeam-sdk/main/docs/workflows/publish.png)
116
+
117
+ Every hire of a published workflow is quoted from its record, graded complete or reject, and added to the record.
118
+
119
+ ### Buy from one agent, sell to another · `resell`
120
+
121
+ ![Buy from one agent, sell to another](https://raw.githubusercontent.com/moonbeam-foundation/moonbeam-sdk/main/docs/workflows/resell.png)
122
+
123
+ The buy side quoted from the seller's record and graded, then the agent listed and the next task sold through it.
124
+
125
+ ### Onboard a batch of sellers · `onboard-batch`
126
+
127
+ ![Onboard a batch of sellers](https://raw.githubusercontent.com/moonbeam-foundation/moonbeam-sdk/main/docs/workflows/onboard-batch.png)
128
+
129
+ Find sellers ready to join, check each answer, quote the terms, and list each one with its pool and licence.
130
+
131
+ ## Your key
132
+
133
+ The reads of markets, sellers, jobs and agent cards are public. Listing an agent, reading its owner view, finding
134
+ buyers and checking an agent run on your Moonbeam key.
21
135
 
22
136
  ```bash
23
- npm install @moonbeam-foundation/sdk
24
- npx moonbeam demo
137
+ export MOONBEAM_API=<the endpoint that comes with your key, /v1 included>
138
+ export MOONBEAM_API_KEY=<your Moonbeam key>
25
139
  ```
26
140
 
27
- Node 20 or later.
141
+ Moonbeam is in a pilot on Base with selected partners. For a key, write to
142
+ [builders@moonbeam.foundation](mailto:builders@moonbeam.foundation).
28
143
 
29
- ## What problem this solves
144
+ ## Assurance: a price, a judge and a deadline, settled against proof
145
+
146
+ - **What:** Moonbeam's assurance layer on Base, modelled end to end: the seller's deposit, the buyer's premium, the
147
+ backers' pool, the verdict, and a settlement in which every ledger sums to zero.
148
+ - **Why:** agent escrow refunds the price of a failed job, never the cost of the failure, and the judge has no capital
149
+ behind its verdict. Moonbeam adds the deposit, the pool and a grader (Jev by TypeSafe).
150
+ - **Today:** cover is not sold on Base, because no arbitrator is registered on the Base hook; jobs are graded and
151
+ recorded, and the model below is what the hook settles.
152
+
153
+ ![moonbeam demo: a covered hire on Base, Jev's grade of that same job checked against its Base record, and the settlement](docs/demo.gif)
154
+
155
+ ### What problem this solves
30
156
 
31
157
  Agent-to-agent protocols already hold payment in escrow and release it when an
32
158
  evaluator approves. If the provider misses the deadline, escrow refunds the
@@ -36,7 +162,7 @@ It does not cover the *cost of the failure* — the campaign that missed its slo
36
162
  the fill that never happened — and it leaves the evaluator with no capital
37
163
  behind its verdict. This SDK models the layer that closes both gaps.
38
164
 
39
- ## Quick start
165
+ ### Quick start: settle a covered job
40
166
 
41
167
  ```ts
42
168
  import { settle, parseUnits } from '@moonbeam-foundation/sdk';
@@ -71,14 +197,16 @@ job, which is the shape a flat premium cannot fund at realistic failure rates.
71
197
 
72
198
  ## Examples
73
199
 
74
- Nineteen runnable files in [`examples/`](examples), all offline except two, built on real Base jobs. `npm test` runs them.
200
+ Twenty-five runnable files in [`examples/`](examples), built on Base jobs; all run offline except four (17 and 32 read live; 50 and
201
+ 51 read live, or run from recorded answers with `OFFLINE=1`). `npm test` runs them.
75
202
 
76
203
  | Start with | If you are |
77
204
  |---|---|
78
- | [`03-end-to-end-offline`](examples/03-end-to-end-offline.mjs) | new here: one real job read from Base, graded, settled |
205
+ | [`03-end-to-end-offline`](examples/03-end-to-end-offline.mjs) | new here: one job read from Base, graded, settled |
79
206
  | [`20`–`23` onboarding](examples/README.md#before-you-take-part) | about to pay, work, judge or back: what you put up, what you can lose, what should stop you |
80
207
  | [`10`–`17` the grader](examples/README.md#the-grader-stage-by-stage) | judging jobs: evidence → facts → answers → verdict → record → end the job → verify, then live |
81
208
  | [`30`–`33` reading jobs](examples/README.md#reading-jobs-that-already-ran) | studying jobs that already ran, one or many, offline or from a Base RPC |
209
+ | [`50`–`53`](examples/README.md) | paying an x402 wall on Base, reading a proof, arbitration, the records every step comes with |
82
210
 
83
211
  ```sh
84
212
  node examples/03-end-to-end-offline.mjs
@@ -150,7 +278,7 @@ waitingOn(state, clock); // who is holding this up
150
278
  but the provider can escalate to arbitration.
151
279
  - A silent **evaluator** cannot strand either: the deadline resolves the job.
152
280
 
153
- These are checked against real state rather than asserted in prose.
281
+ These are checked against the chain's state rather than asserted in prose.
154
282
 
155
283
  ## Time carries its provenance
156
284
 
@@ -206,27 +334,35 @@ providers that reject them leave holes in history that later reads never revisit
206
334
 
207
335
  ## Building transactions
208
336
 
209
- The SDK builds calls; it never signs or sends them, and never holds a key.
337
+ The SDK builds calls; it never signs or sends them, and never holds a key. The calls target the assurance hook Moonbeam runs
338
+ on Base (`@moonbeam-foundation/sdk/onboard`; the hook, the pool factory and the pools are read from the coordination layer's
339
+ address registry, never typed here):
210
340
 
211
341
  ```ts
212
- import { createAssuranceClient, asProofBlob } from '@moonbeam-foundation/sdk';
213
-
214
- const client = createAssuranceClient({ chainId: 84532, escrow, evaluator });
215
-
216
- client.escrow.claimRefund({ taskId }); // callable by anyone after the deadline
217
- client.evaluator.approve({ jobId, proof: asProofBlob(blob) }); // proof required by the type
218
- client.evaluator.reject({ jobId, reason }); // no proof — refusing is always safe
342
+ import { fundCalls, sellerDepositCalls, coverPremium, submitCalls, settleCalls, BASE_GLMR, BASE_USDC, MOONBEAM_HOOK } from '@moonbeam-foundation/sdk/onboard';
343
+
344
+ // a covered job is a GLMR job: the hook covers in GLMR only (the USDC route closed on 2026-09-29)
345
+ const premium = coverPremium(terms.price, { k: 19, n: 20 }); // the seller's record → the premium (jev-wilson)
346
+ sellerDepositCalls(terms); // the seller approves exactly its deposit
347
+ const [approve, fund] = fundCalls({ ...terms, token: BASE_GLMR }, { pool, premium, coverCap }); // approve price + premium, then fundJobWithCover
348
+ const [approveU, fundU] = fundCalls({ ...terms, token: BASE_USDC }); // an uncovered USDC job: no pool, premium 0
349
+ submitCalls({ jobId, evidenceDigest, correlator }); // the seller seals its delivery
350
+ settleCalls(jobId, 'completed'); // complete(jobId) · reject(jobId, digest) · expire(jobId)
219
351
  ```
220
352
 
221
- `asProofBlob` rejects an empty blob, so the approval path cannot be called
222
- without one. The asymmetry lives in the signatures rather than in a comment.
353
+ `fundJob`'s last address word is the **cover pool**, not an evaluator: the hook keeps no per-job evaluator (evaluators are the
354
+ owner's allowlist). `premium` is an argument the hook checks against the pool. A USDC job with a pool is refused before any call
355
+ (the hook would revert `PoolAssetMismatch`). `MOONBEAM_HOOK.status` carries the registry's word on the hook row (`live`, or
356
+ `scheduled-change` while a route change is announced). `test/fork/run-fork.mjs` sends these calls on a local fork of Base:
357
+ deposit approval, approve, `fundJob` against a live pool, `submit`, `complete`, then the settle's attestation.
223
358
 
224
- Constructing a client for a chain the contracts are not deployed on throws
225
- immediately, rather than producing a transaction addressed to nothing.
359
+ Pools open by the council's yes, not by a release: `poolsOpenOn(transport)` (`./pools`) reads `GET /v1/pools/networks` (its
360
+ `supported` lines and `closed_by_policy`) through the site's proxy and returns no chain while the GLMR pools are not open; the
361
+ typed `POOLS_OPEN_ON` is only the fallback. Pass its `chains` to the pool builders as `openOn`. The judge's quota is read the same way (`quotaOf(transport)`).
226
362
 
227
363
  ## Judging a job on the Base hook
228
364
 
229
- `@moonbeam-foundation/sdk/judge` grades a job on Moonbeam's assurance hook on Base
365
+ `@moonbeam-foundation/sdk/judge` grades a GLMR job on Moonbeam's assurance hook on Base
230
366
  (`0xc0578657Eda85e0a246771aa1839ce79b54eE80d`) and builds the call that ends it. The grade works like this:
231
367
 
232
368
  - Code checks the facts first. A failed check rejects the job, and the model is never asked.
@@ -241,19 +377,156 @@ const receipt = await gradeJob({
241
377
  jobId, // the hook's 32-byte job id
242
378
  evidence: { task, delivered },
243
379
  facts: jobFacts({ delivered: true, checks: { proof_verifies: () => checkProof(delivered) } }),
244
- trial: true, // 3 free calls; or key: <your TypeSafe key>
380
+ key: process.env.TYPESAFE_KEY, // your own TypeSafe key
245
381
  });
246
- const onchain = await recordGrade(receipt, { network: 'devnet' }); // none | devnet | base | both — unsigned calls
382
+ const onchain = await recordGrade(receipt); // unsigned calls on Base; { network: 'none' } turns it off
247
383
  const end = endJob(jobId, receipt); // complete(jobId) | reject(jobId, digest) | null (needs_review)
248
384
  const check = await verifyGrade(receipt, { chain: false });
249
385
  ```
250
386
 
387
+ With `key`, Jev is asked over System One: the request `{ model, state, questions }` and its answer are the same at
388
+ TypeSafe (`https://api.typesafe.ai/v1/systemone`, the default) and at a coordination endpoint's System One door. To use the
389
+ door, pass `systemOne: { via: 'coord', base, apiKey }`: your coordination key travels as `X-API-Key`, and your TypeSafe
390
+ key travels in `x-systemone-key` for that call only. `askSystemOne` (also exported as `askJev`) asks once, with any model
391
+ spelling (`jev-1-13-0` → `jev-1.13.0`, `jev-1-14-0` → `jev-1.14.0`, `typesafe-jev` → `jev-latest`).
392
+
393
+ Jev's answers are recorded in two answer logs on Base: JevAnswerLog `0x8e9B9cE86a2d55c10318607b0c815B7B8C66254d` and
394
+ JevAnswerLogV2 `0xC08dfc61d702AEA45d1EF2515d8BDA36d548C75c`. `answerRecordedAt(reader, digest)` looks a digest up in
395
+ both. `readJudgeAdapter(reader)` reads JudgeAdapterV5 `0x5242dE388a846d16641744dEB095eD63990E7be8` on Base: the hook it
396
+ posts verdicts to, the decision log it anchors on, and its release delay.
397
+
251
398
  `endJob` is signed by the job's buyer or by an evaluator the hook registered. For needs_review it returns `null`: the
252
399
  job stays held until one of those parties decides, or until anyone calls `expire` after the deadline. The tests
253
- re-encode the hook's `complete` from the covered hire on Base,
400
+ re-encode the hook's `complete` from the covered GLMR hire on Base,
254
401
  [`0xc606d00f…3116`](https://basescan.org/tx/0xc606d00fed64e912585bbc93feb15a9289cfcde94289f49f7c74a7a468903116),
255
402
  byte for byte.
256
403
 
404
+ ## Reselling on Base
405
+
406
+ `@moonbeam-foundation/sdk/resale` is the Moonbeam profile of the coordination layer's one payment scheme, a byte-identical
407
+ vendored copy pinned by its sha256 (`src/resale/payment-scheme.pin.json`): what a reseller's visitor pays, where every unit of it
408
+ goes, and the reseller's own leg — the same numbers the layer itself charges.
409
+
410
+ ```
411
+ price_to_buyer = seller_price + our_fee + venue_fee(in) + venue_fee(out) [+ reseller_markup]
412
+ ```
413
+
414
+ ```ts
415
+ import { quoteBase, legsByName, markupLeg, childKeyTerms, childKeyPlan, subscribePlan, readSale } from '@moonbeam-foundation/sdk/resale';
416
+
417
+ const q = quoteBase({ venue_in: 'reseller', venue_out: 'erc8183-base', seller_price: 8_000n, reseller: { tenant, markup_bps: 1000 } });
418
+ if (q.ok) legsByName(q); // { our_fee: 2000n, venue_fee: 888n, seller_share: 8000n, reseller_markup: 1000n }; Σ = q.price_to_buyer
419
+ childKeyTerms({ '*': 1000 }); // what a child key is, in the layer's words
420
+ childKeyPlan({ '*': 1000 }); // POST /tenant/keys { action: 'child', markup_bps } — the reseller sends it with its own key
421
+ subscribePlan({ usdc: 1 }); // POST /access/subscribe — the child's top-up door (the x402 quote comes back as a 402)
422
+ await readSale(transport, 'rs_…'); // GET /resale/sales/{id} through the site's proxy
423
+ ```
424
+
425
+ A reseller is a tenant of the layer; its visitors buy on child keys from the reseller's balance; the markup is the reseller's
426
+ own leg, never part of the layer's fee. The buyer pays on one of the five Base venues (`x402-base`, `erc8183-base`,
427
+ `memoacp-base`, `bitagent-base`, `olas-base`), and the assurance economy stays in GLMR. The seller is paid where it was hired:
428
+ `quoteSale` takes the seller's own venue (x402 on Solana or Arbitrum, ACP v3 on Arc, and the others the scheme prices), and
429
+ `sellerRailOf(offer)` says which network, token and payTo its leg settles on. A seller's own x402 entry comes first, then its
430
+ venue's rail. A seller with no paid rail of its own is paid in USDC on Base. A network the seller did not publish is never
431
+ chosen for it: its leg is held instead. `quoteBase` keeps both sides on Base. Example:
432
+ [`examples/24-resell-on-base.mjs`](examples/24-resell-on-base.mjs).
433
+
434
+ ## Attested by default
435
+
436
+ Every step this SDK handles comes with its record: a grade (`recordGrade`), an assurance settle (`settleAttested`) and a
437
+ resale step (`attestSale`). Each returns its mark (a digest anyone can recompute from the step's canonical body) and the
438
+ unsigned calls that put the mark on Base, where Moonbeam runs:
439
+
440
+ | contract on Base | call | built for |
441
+ |---|---|---|
442
+ | JevDecisionLog `0x209490d6A0FFC5368A42b0c2208BDCda853f6a92` | `record(subject, kind, digest, confidenceBps, model, uri)` | every step |
443
+ | JevAnswerLog `0x8e9B9cE86a2d55c10318607b0c815B7B8C66254d` | `record(useCase, subject, inputDigest, answersDigest, decisionDigest, model, uri)` | a grade |
444
+ | a grade stamp registry | `stamp(subject, digest, verdict, mode, model, uri)` | a step with a verdict |
445
+
446
+ Base has no grade stamp registry, so the stamp comes back in `missing`, with no call. Pass `networks: [chainId]` to
447
+ aim elsewhere, or `networks: 'none'` (`network: 'none'` for a grade) to turn recording off. The mark is returned
448
+ either way. Your wallet signs the calls; nothing here sends.
449
+
450
+ ```ts
451
+ import { settleAttested, hookQuote } from '@moonbeam-foundation/sdk/assurance';
452
+ const s = settleAttested(job, hookQuote({ price, premium, deposit, covered: true }));
453
+ s.legs; // who receives what, from the job's own GLMR amounts
454
+ s.attest.calls; // [JevDecisionLog.record on 8453]
455
+ s.attest.missing; // [{ contract: 'GradeStampRegistry', chainId: 8453, why: … }]
456
+ ```
457
+
458
+ ## Paying an x402 wall
459
+
460
+ ```ts
461
+ import { quoteWall, transferAuthorization, paymentHeaders } from '@moonbeam-foundation/sdk/x402';
462
+ const { accept } = await quoteWall(transport, '/x402/class/mcp.digest', { network: 'eip155:8453' }); // the entry of your network
463
+ const typed = transferAuthorization(accept, { from: myAddress }); // EIP-3009 TransferWithAuthorization, on that chain
464
+ const signature = await wallet.signTypedData(typed); // your wallet signs
465
+ const headers = paymentHeaders(accept, typed.message, signature); // { 'PAYMENT-SIGNATURE': … } (x402 v2)
466
+ ```
467
+
468
+ A wall's 402 lists one `exact` entry per network it settles on. `pickAccept(body, { network })` takes the entry of the
469
+ network you pay from: a CAIP-2 id, a v1 name such as `arbitrum`, or a preference list. With no network named, it takes
470
+ Base. Network, token, payTo and amount all come from the entry. A Solana entry is picked like any other, but
471
+ `transferAuthorization` refuses it: your Solana wallet builds that transfer. The x402 v2 payment carries the accepted
472
+ entry whole, in `PAYMENT-SIGNATURE`. `{ legacy: true }` adds `X-PAYMENT` beside it, and `x402Version: 1` sends only
473
+ `X-PAYMENT`. `subscribe()` posts the top-up door and returns its 402 quote. `quoteSale` from `./resale` prices the same
474
+ wall from the seller's price.
475
+
476
+ ## Cover quotes
477
+
478
+ ```ts
479
+ import { quoteCover, coverQuotePlan } from '@moonbeam-foundation/sdk/cover';
480
+ const q = await quoteCover(transport, { buyer: myAddress, job: 'bitagent:8453:8566' }); // venue bitagent, chain 8453, job 8566
481
+ if (!q.ok) q.why; // why it is not insurable now
482
+ ```
483
+
484
+ `GET /v1/cover/quote` requires the venue the job is on. These helpers always send it: `erc8183` (the Virtuals ACP v3
485
+ contract) unless you pass `venue`, or unless the job id names its own. Inputs a venue cannot be quoted from are refused
486
+ before any call.
487
+
488
+ ## Job ids and holds
489
+
490
+ `./jobs` reads a job id from any market. A bare number is a Virtuals ACP v3 job on Base. `<label>:<chainId>:<jobId>` names
491
+ the contract the job lives in, as in `bitagent:8453:8566`. A 32-byte id is an assurance-hook job. `readJobs(transport, ids)`
492
+ reads up to 50 of them in one call. A job whose grade came back `needs_review` has its own hold, separate from
493
+ `awaiting_grade`: a person reviews the decision. `toOutcome(state, clock, { verdict: 'needs_review' })` returns
494
+ `pending: 'needsReview'` for such a job.
495
+
496
+ ## Refusals
497
+
498
+ Every read throws a `CoordError` on a refusal (`./errors`): `status`, `code`, `type`, `param`, `nextStep` and the words as
499
+ its message. The layer refuses in two shapes, `{ ok: false, code, error: "<words>" }` and the OpenAI error object
500
+ `{ error: { message, type, param, code } }`, and `refusalOf` reads both. An `error` that is an object never surfaces as
501
+ `[object Object]`.
502
+
503
+ ## Proofs
504
+
505
+ ```ts
506
+ import { readProof, verifyOnBase } from '@moonbeam-foundation/sdk/proof';
507
+ import { baseReader } from '@moonbeam-foundation/sdk/rpc';
508
+ const p = await readProof(transport, txHash); // block, superroot, checks, proven, ref v5:8453:<tx>@<superroot>
509
+ // { chain: 42161 } reads a transaction on another chain the layer proves
510
+ const c = await verifyOnBase(baseReader(), p.blob!); // verify(blob) by eth_call on the V5 verifier 0x2D475a53eAA8F9AC78B69bD2429275a622C644f8
511
+ ```
512
+
513
+ `c.verified` is what the verifier returns. `c.anchored` is false while the verifier has no superroot anchor set. The
514
+ block is bound to the snapshot the verifier folds by the inclusion path the layer serves (`c.inclusion`).
515
+
516
+ ## Arbitration
517
+
518
+ `./arbitration` builds the calls of the three-tier ArbitratorRouter: `resolveByCode` (tier 0, anyone),
519
+ `secondGraderTypedData` + `resolveBySecondGrader` (tier 1), and `councilApprove`, `pullOracle` and
520
+ `resolveByCouncil` (tier 2). It also decodes `Escalated`, `CouncilApproved` and `Resolved`, and `recordEffectOf`
521
+ says what a ruling writes into the seller's record. The router is not deployed on Base and the hook names no
522
+ arbitrator (`ARBITRATION_ON_BASE`), so every builder takes the router's address.
523
+
524
+ ## The Base reader
525
+
526
+ `baseReader()` from `./rpc` walks a measured rotation of Base endpoints: a rate limit or a refused range moves the call
527
+ to the next endpoint, and a revert is thrown at once. `BASE_RPC` (a comma list) goes first. The live examples read
528
+ through it.
529
+
257
530
  ## Skills for AI agents
258
531
 
259
532
  The package ships one skill per actor under `skills/`, so an agent acting as a
@@ -296,7 +569,7 @@ Implement `AssuranceAdapter<HostJob, HostOutcome>`: say what a job costs and wha
296
569
  its outcome means. Adapters translate; they never settle.
297
570
 
298
571
  The interface is deliberately narrow because it currently has **one**
299
- implementation. One adapter is a hypothetical seam, two is a real one — so it is
572
+ implementation. One adapter is a hypothetical seam, two is a working one — so it is
300
573
  better to keep this small until a second protocol shows what actually needs to
301
574
  be shared.
302
575
 
@@ -314,7 +587,7 @@ provider doing the work and the evaluator grading it. Everyone else opts in.
314
587
 
315
588
  Worth being precise about backing a pool: choosing to back one is optional, but once
316
589
  in, underwriting is not a separate opt-in — **the exposure is the yield**.
317
- There is no passive tier, because rewards come from real fees rather than
590
+ There is no passive tier, because rewards come from fees paid rather than
318
591
  inflation.
319
592
 
320
593
  ## Pool economics
@@ -366,7 +639,8 @@ on it can pay.
366
639
 
367
640
  ```bash
368
641
  npm install
369
- npm test # 56 tests
642
+ npm test # every suite, offline
643
+ npm run check # typecheck + build + tests + the two pins (the assurance machine, the payment scheme)
370
644
  npm run typecheck # strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes
371
645
  npm run build # ESM + .d.ts to dist/
372
646
  npm run test:coverage
package/bin/moonbeam.mjs CHANGED
@@ -1,10 +1,23 @@
1
1
  #!/usr/bin/env node
2
2
  // moonbeam demo — Moonbeam's first covered hire on Base, replayed offline: the job, the grade, the settlement.
3
3
  // npx moonbeam demo (no key, no network, nothing signed)
4
+ // npx moonbeam workflows [id] the Moonbeam Studio's agentic commerce workflows, step by step (offline)
4
5
  import { readFileSync } from 'node:fs';
5
6
 
6
- const [cmd] = process.argv.slice(2);
7
- if (cmd !== 'demo') { console.log('moonbeam demo replay Moonbeam\'s first covered hire on Base: the job, the grade, the settlement'); process.exit(cmd ? 2 : 0); }
7
+ const [cmd, arg] = process.argv.slice(2);
8
+ // moonbeam workflows [id]: the Moonbeam Studio's agentic commerce workflows, each step with the SDK call that runs it
9
+ if (cmd === 'workflows') {
10
+ const { WORKFLOWS, workflowOf, diagramOf, imageOf } = await import('../dist/workflows/index.js');
11
+ const pick = arg ? workflowOf(arg) : null;
12
+ if (arg && !pick) { console.log(`no workflow "${arg}": ${WORKFLOWS.map((w) => w.id).join(', ')}`); process.exit(2); }
13
+ for (const w of pick ? [pick] : WORKFLOWS) console.log(`${diagramOf(w)}\n picture: ${imageOf(w)}\n`);
14
+ process.exit(0);
15
+ }
16
+ if (cmd !== 'demo') {
17
+ console.log(['moonbeam demo replay Moonbeam\'s first covered hire on Base: the job, the grade, the settlement',
18
+ 'moonbeam workflows [id] the Studio\'s agentic commerce workflows, each step with the SDK call that runs it'].join('\n'));
19
+ process.exit(cmd ? 2 : 0);
20
+ }
8
21
 
9
22
  const { settle, parseUnits, formatUnits, conservesValue } = await import('../dist/index.js');
10
23
  const hire = JSON.parse(readFileSync(new URL('../examples/data/pilot-hire.json', import.meta.url), 'utf8'));
@@ -0,0 +1,55 @@
1
+ /**
2
+ * A small ABI encoder (and decoder for the static words of logs) for the calls this SDK builds, so nothing here needs a
3
+ * chain library: uintN, intN ≥ 0, address, bool, bytesN, bytes, string, tuples and arrays (fixed or dynamic), nested.
4
+ * Types are written the way Solidity prints them, with or without names: `(uint64 chainId,bytes32[] siblings)[]`.
5
+ * Pinned against viem's encodeAbiParameters in test/abi.test.ts.
6
+ */
7
+ import { hexToBytes, type Hex } from '../onboard/index.js';
8
+ export type AbiType = {
9
+ kind: 'uint';
10
+ bits: number;
11
+ } | {
12
+ kind: 'address';
13
+ } | {
14
+ kind: 'bool';
15
+ } | {
16
+ kind: 'fixed';
17
+ size: number;
18
+ } | {
19
+ kind: 'bytes';
20
+ } | {
21
+ kind: 'string';
22
+ } | {
23
+ kind: 'tuple';
24
+ components: {
25
+ name: string | null;
26
+ type: AbiType;
27
+ }[];
28
+ } | {
29
+ kind: 'array';
30
+ of: AbiType;
31
+ length: number | null;
32
+ };
33
+ export type AbiValue = string | number | bigint | boolean | readonly AbiValue[] | {
34
+ readonly [k: string]: AbiValue;
35
+ };
36
+ /** a parameter `type name` → its parts (a lone type has no name) */
37
+ export declare function splitName(p: string): {
38
+ type: string;
39
+ name: string | null;
40
+ };
41
+ /** parse one type, e.g. `(uint8 a,bytes b)[]`, `tuple(uint8)`, `bytes32[3]`, `address` */
42
+ export declare function parseType(src: string): AbiType;
43
+ /** the canonical (name-free) form of a type, as selectors hash it */
44
+ export declare function canonical(t: AbiType): string;
45
+ /** abi.encode(values) for the given types (strings or parsed) */
46
+ export declare function encodeParams(types: readonly (string | AbiType)[], values: readonly AbiValue[]): Hex;
47
+ /** the function's selector from a signature with or without names, e.g. `verify((bytes32 h)[] x)` */
48
+ export declare function signatureOf(fn: string): string;
49
+ /** calldata: selector ‖ abi.encode(args) */
50
+ export declare function encodeFunction(fn: string, args: readonly AbiValue[]): Hex;
51
+ export declare const topicOf: (eventSignature: string) => Hex;
52
+ /** decode the static head words of log data or a return value (uint, bool, address, bytesN only) */
53
+ export declare function decodeStatic(types: readonly string[], data: string): (bigint | boolean | string)[];
54
+ export { hexToBytes };
55
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/abi/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAc,UAAU,EAAmB,KAAK,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAExF,MAAM,MAAM,OAAO,GACf;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,EAAE,CAAA;CAAE,GACvE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAC1D,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,QAAQ,EAAE,GAAG;IAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;CAAE,CAAC;AAcrH,oEAAoE;AACpE,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAM1E;AAED,0FAA0F;AAC1F,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CA0B9C;AAED,qEAAqE;AACrE,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAQ5C;AAmDD,iEAAiE;AACjE,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,CAAC,MAAM,GAAG,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,QAAQ,EAAE,GAAG,GAAG,CAEnG;AACD,qGAAqG;AACrG,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAI9C;AAED,4CAA4C;AAC5C,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,QAAQ,EAAE,GAAG,GAAG,CAMzE;AACD,eAAO,MAAM,OAAO,mBAAoB,MAAM,KAAG,GAAmD,CAAC;AAErG,oGAAoG;AACpG,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC,EAAE,CAWlG;AACD,OAAO,EAAE,UAAU,EAAE,CAAC"}