@moonbeam-foundation/sdk 0.7.0 → 0.11.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 (132) hide show
  1. package/README.md +78 -432
  2. package/bin/moonbeam.mjs +15 -2
  3. package/dist/acp/moonbeam-acp.generated.d.ts +7 -2
  4. package/dist/acp/moonbeam-acp.generated.d.ts.map +1 -1
  5. package/dist/acp/moonbeam-acp.generated.js +6 -3
  6. package/dist/acp/moonbeam-acp.generated.js.map +1 -1
  7. package/dist/acp/outcome.d.ts +5 -1
  8. package/dist/acp/outcome.d.ts.map +1 -1
  9. package/dist/acp/outcome.js +3 -2
  10. package/dist/acp/outcome.js.map +1 -1
  11. package/dist/adapters/stamp.d.ts +1 -1
  12. package/dist/adapters/stamp.d.ts.map +1 -1
  13. package/dist/adapters/stamp.js +6 -6
  14. package/dist/adapters/stamp.js.map +1 -1
  15. package/dist/assurance/assurance-shared.d.ts.map +1 -1
  16. package/dist/assurance/assurance-shared.js +3 -1
  17. package/dist/assurance/assurance-shared.js.map +1 -1
  18. package/dist/cover/index.d.ts +65 -0
  19. package/dist/cover/index.d.ts.map +1 -0
  20. package/dist/cover/index.js +61 -0
  21. package/dist/cover/index.js.map +1 -0
  22. package/dist/devnet/edge.d.ts +207 -0
  23. package/dist/devnet/edge.d.ts.map +1 -0
  24. package/dist/devnet/edge.js +209 -0
  25. package/dist/devnet/edge.js.map +1 -0
  26. package/dist/devnet/index.d.ts +403 -0
  27. package/dist/devnet/index.d.ts.map +1 -0
  28. package/dist/devnet/index.js +420 -0
  29. package/dist/devnet/index.js.map +1 -0
  30. package/dist/devnet/profile.d.ts +110 -0
  31. package/dist/devnet/profile.d.ts.map +1 -0
  32. package/dist/devnet/profile.js +145 -0
  33. package/dist/devnet/profile.js.map +1 -0
  34. package/dist/erc8004/registry.generated.d.ts.map +1 -1
  35. package/dist/erc8004/registry.generated.js +0 -1
  36. package/dist/erc8004/registry.generated.js.map +1 -1
  37. package/dist/errors/index.d.ts +51 -0
  38. package/dist/errors/index.d.ts.map +1 -0
  39. package/dist/errors/index.js +63 -0
  40. package/dist/errors/index.js.map +1 -0
  41. package/dist/index.d.ts +6 -1
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +6 -1
  44. package/dist/index.js.map +1 -1
  45. package/dist/jobs/index.d.ts +62 -0
  46. package/dist/jobs/index.d.ts.map +1 -0
  47. package/dist/jobs/index.js +59 -0
  48. package/dist/jobs/index.js.map +1 -0
  49. package/dist/judge/index.d.ts +109 -1
  50. package/dist/judge/index.d.ts.map +1 -1
  51. package/dist/judge/index.js +97 -3
  52. package/dist/judge/index.js.map +1 -1
  53. package/dist/market/index.d.ts +281 -0
  54. package/dist/market/index.d.ts.map +1 -0
  55. package/dist/market/index.js +211 -0
  56. package/dist/market/index.js.map +1 -0
  57. package/dist/onboard/index.d.ts +4 -4
  58. package/dist/onboard/index.d.ts.map +1 -1
  59. package/dist/onboard/index.js +9 -15
  60. package/dist/onboard/index.js.map +1 -1
  61. package/dist/pools/index.d.ts +29 -5
  62. package/dist/pools/index.d.ts.map +1 -1
  63. package/dist/pools/index.js +34 -15
  64. package/dist/pools/index.js.map +1 -1
  65. package/dist/proof/index.d.ts +8 -4
  66. package/dist/proof/index.d.ts.map +1 -1
  67. package/dist/proof/index.js +10 -7
  68. package/dist/proof/index.js.map +1 -1
  69. package/dist/resale/index.d.ts +22 -6
  70. package/dist/resale/index.d.ts.map +1 -1
  71. package/dist/resale/index.js +29 -15
  72. package/dist/resale/index.js.map +1 -1
  73. package/dist/resale/payment-scheme.pin.json +1 -1
  74. package/dist/resale/settle-rule.d.ts +49 -0
  75. package/dist/resale/settle-rule.d.ts.map +1 -0
  76. package/dist/resale/settle-rule.js +53 -0
  77. package/dist/resale/settle-rule.js.map +1 -0
  78. package/dist/workflows/data.d.ts +3 -0
  79. package/dist/workflows/data.d.ts.map +1 -0
  80. package/dist/workflows/data.js +829 -0
  81. package/dist/workflows/data.js.map +1 -0
  82. package/dist/workflows/index.d.ts +40 -0
  83. package/dist/workflows/index.d.ts.map +1 -0
  84. package/dist/workflows/index.js +79 -0
  85. package/dist/workflows/index.js.map +1 -0
  86. package/dist/workflows/steps.d.ts +48 -0
  87. package/dist/workflows/steps.d.ts.map +1 -0
  88. package/dist/workflows/steps.js +62 -0
  89. package/dist/workflows/steps.js.map +1 -0
  90. package/dist/workflows/types.d.ts +26 -0
  91. package/dist/workflows/types.d.ts.map +1 -0
  92. package/dist/workflows/types.js +2 -0
  93. package/dist/workflows/types.js.map +1 -0
  94. package/dist/workflows/verified.d.ts +17 -0
  95. package/dist/workflows/verified.d.ts.map +1 -0
  96. package/dist/workflows/verified.js +219 -0
  97. package/dist/workflows/verified.js.map +1 -0
  98. package/dist/x402/index.d.ts +80 -17
  99. package/dist/x402/index.d.ts.map +1 -1
  100. package/dist/x402/index.js +95 -27
  101. package/dist/x402/index.js.map +1 -1
  102. package/docs/REFERENCE.md +511 -0
  103. package/docs/WORKFLOWS.md +164 -0
  104. package/docs/studio/hire-from-chat.png +0 -0
  105. package/docs/studio/list-business.png +0 -0
  106. package/docs/studio/onboard-batch.png +0 -0
  107. package/docs/studio/onboard.png +0 -0
  108. package/docs/studio/publish.png +0 -0
  109. package/docs/studio/resell.png +0 -0
  110. package/docs/studio/sell-edge.png +0 -0
  111. package/docs/workflows/hire-from-chat.png +0 -0
  112. package/docs/workflows/hire-from-chat.svg +102 -0
  113. package/docs/workflows/list-business.png +0 -0
  114. package/docs/workflows/list-business.svg +116 -0
  115. package/docs/workflows/onboard-batch.png +0 -0
  116. package/docs/workflows/onboard-batch.svg +66 -0
  117. package/docs/workflows/onboard.png +0 -0
  118. package/docs/workflows/onboard.svg +76 -0
  119. package/docs/workflows/publish.png +0 -0
  120. package/docs/workflows/publish.svg +86 -0
  121. package/docs/workflows/resell.png +0 -0
  122. package/docs/workflows/resell.svg +116 -0
  123. package/docs/workflows/sell-edge.png +0 -0
  124. package/docs/workflows/sell-edge.svg +46 -0
  125. package/examples/40-the-article.mjs +1 -1
  126. package/examples/50-x402-pay-a-wall.mjs +22 -11
  127. package/examples/51-read-a-proof.mjs +5 -4
  128. package/examples/60-cross-list-a-seller.mjs +36 -0
  129. package/examples/README.md +11 -2
  130. package/examples/data/cross-list.recorded.json +10 -0
  131. package/examples/data/x402-wall-402.json +85 -0
  132. package/package.json +56 -15
package/README.md CHANGED
@@ -1,477 +1,123 @@
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="A Moonbeam Studio workflow: a chat agent finds a seller, quotes the terms, plans the hire, grades the delivery and plans the ending; every node verified live" 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: list an AI agent once, sell it on every agent market
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
+ [![npm](https://img.shields.io/npm/v/@moonbeam-foundation/sdk?color=53cbc9&label=npm)](https://www.npmjs.com/package/@moonbeam-foundation/sdk)
8
+ [![downloads](https://img.shields.io/npm/dm/@moonbeam-foundation/sdk?color=e1147b)](https://www.npmjs.com/package/@moonbeam-foundation/sdk)
9
+ [![types](https://img.shields.io/npm/types/@moonbeam-foundation/sdk)](https://www.npmjs.com/package/@moonbeam-foundation/sdk)
10
+ [![license](https://img.shields.io/npm/l/@moonbeam-foundation/sdk)](LICENSE)
10
11
 
11
- ```bash
12
- npx moonbeam demo
13
- ```
14
-
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)
16
-
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).
19
-
20
- ## Install
12
+ Moonbeam is the reseller between agent markets. An agent that sells on one market is listed on the others, each job is graded
13
+ before the seller is paid, and every sale's money is split by one rule.
21
14
 
22
15
  ```bash
23
16
  npm install @moonbeam-foundation/sdk
24
- npx moonbeam demo
25
- ```
26
-
27
- Node 20 or later.
28
-
29
- ## What problem this solves
30
-
31
- Agent-to-agent protocols already hold payment in escrow and release it when an
32
- evaluator approves. If the provider misses the deadline, escrow refunds the
33
- buyer. That covers the *price of the job*.
34
-
35
- It does not cover the *cost of the failure* — the campaign that missed its slot,
36
- the fill that never happened — and it leaves the evaluator with no capital
37
- behind its verdict. This SDK models the layer that closes both gaps.
38
-
39
- ## Quick start
40
-
41
- ```ts
42
- import { settle, parseUnits } from '@moonbeam-foundation/sdk';
43
-
44
- const units = (v: string) => parseUnits(v); // amounts in the token's smallest units
45
-
46
- const { ledger, locked } = settle({
47
- terms: {
48
- pay: units('100'), // what the client pays for the work
49
- premium: units('1'), // what it pays for cover
50
- deposit: units('120'), // the provider's bond, sized above the job
51
- evaluatorBond: units('25'), // the judge's bond
52
- poolCapital: units('5000'), // backers standing behind the provider
53
- damage: units('70'), // consequential loss if the work is bad
54
- },
55
- verdict: 'cheated',
56
- });
57
-
58
- locked; // 221_000000n — pay + premium + deposit, derived not typed
59
- ledger.client; // +70_000000n — refunded AND compensated
60
- ledger.provider; // -70_000000n — pays the damage out of its own bond
61
- ledger.pool; // 0n — the bond covered it; the pool is the tail
17
+ npx moonbeam workflows # the Studio's seven workflows, each node with its class and the SDK call that runs it
62
18
  ```
63
19
 
64
- Positive is received, negative is paid, and every settlement sums to zero.
65
-
66
- The deposit is sized above the job on purpose. Cheating has to cost the
67
- provider more than the job pays, or the arithmetic argues for cheating; and
68
- because the bond is first loss, the pool pays only the residual a bond cannot
69
- cover. Drop the deposit to `40` here and the pool pays `30` on this single
70
- job, which is the shape a flat premium cannot fund at realistic failure rates.
20
+ Node 20 or later, TypeScript types included, ESM. Nothing in this SDK signs: a step that moves money answers unsigned calls
21
+ and names who signs each.
71
22
 
72
- ## Examples
23
+ ## Why cross-list
73
24
 
74
- Twenty-five runnable files in [`examples/`](examples), built on Base jobs; all run offline except four (17 and 32 read live; 50 and
75
- 51 read live, or run from recorded answers with `OFFLINE=1`). `npm test` runs them.
25
+ Read on 2026-11-06 through `markets()`:
76
26
 
77
- | Start with | If you are |
27
+ | Market | Paid in the last 7 days |
78
28
  |---|---|
79
- | [`03-end-to-end-offline`](examples/03-end-to-end-offline.mjs) | new here: one job read from Base, graded, settled |
80
- | [`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 |
81
- | [`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 |
82
- | [`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 |
83
- | [`50`–`53`](examples/README.md) | paying an x402 wall on Base, reading a proof, arbitration, the records every step comes with |
84
-
85
- ```sh
86
- node examples/03-end-to-end-offline.mjs
87
- # 1 read the chain says: doneRight (judged by: self)
88
- # 2 grade an independent grader says: complete · re-verifies: true
89
- # 3 settle client -101 · provider +100 · pool +1 · sums to zero
90
- ```
91
-
92
- ## The four outcomes
93
-
94
- | Verdict | What happens |
95
- |---|---|
96
- | `doneRight` | Provider is paid and gets its deposit back; the pool keeps the premium. |
97
- | `notDelivered` | Nothing arrived. Everything unwinds, nobody punished. |
98
- | `rejected` | Work arrived and was graded bad. Refund and deposit returned — **no damage cover**. |
99
- | `cheated` | Client is made whole *beyond* a refund — from the provider's deposit first, then the pool. |
29
+ | x402 (paid HTTP, the Coinbase facilitator) | 375,519 USD |
30
+ | Olas Mech | 72 USD |
31
+ | Virtuals ACP (memo-ACP) | 2 USD |
32
+ | ERC-8183 jobs on Base | 0.48 USD |
33
+ | BitAgent | 0 USD |
100
34
 
101
- The last two rows carry the design's most important distinction. Refusing to pay
102
- costs an evaluator nothing and requires no proof, so rejections are ordinary
103
- events rather than evidence of fraud. If every rejection paid damage cover, a
104
- pool would be underwriting quality disputes and its losses would track the
105
- rejection rate rather than the fraud rate. So `cheated` — the only verdict that
106
- draws on the deposit and the pool — is reserved for an adjudication by a neutral
107
- party.
35
+ Of the 102 sellers with a job record on Base (`sellerRecords()`), none sells on more than one market. The buyers are on x402;
36
+ most agent sellers are not.
108
37
 
109
- That is what makes **cheating pay the victim**: being cheated is the client's
110
- best financial outcome after the fact, and every unit paid out comes from someone
111
- who did wrong or who sold cover, never from an uninvolved party.
112
-
113
- ## Reading the chain
114
-
115
- Decode agent-commerce logs into typed events, fold them into job state, and ask
116
- what actually settled:
38
+ ## Cross-list a seller
117
39
 
118
40
  ```ts
119
- import { decodeAcpLogs, foldTask, toOutcome, localClock } from '@moonbeam-foundation/sdk';
41
+ import { transportFromEnv, sellerRecords } from '@moonbeam-foundation/sdk/market';
42
+ import { quoteSale, legsByName } from '@moonbeam-foundation/sdk/resale';
120
43
 
121
- const state = foldTask(decodeAcpLogs(logs)); // one job's logs
122
- const outcome = toOutcome(state, localClock(now));
123
- // { verdict: 'cheated', basis: 'adjudicatedForClient' }
124
- // or { verdict: null, pending: 'awaitingAdjudication' }
44
+ const { sellers } = await sellerRecords(transportFromEnv(), { chainId: 8453 });
45
+ const q = quoteSale({ venue_in: 'x402-base', venue_out: 'bitagent-base', seller_price: 4_000000n });
46
+ legsByName(q); // { seller_share: 4000000n, our_fee: 1000000n, venue_fee: 0n, reseller_markup: 0n }: the buyer pays 5.00 USDC
125
47
  ```
126
48
 
127
- `toOutcome` returns no verdict whenever the chain has not settled the question —
128
- a raised dispute, or a close marked "adjudicated" with no named winner. It
129
- refuses to guess, because a verdict moves money.
130
-
131
- Decoding is keyed on topic0 and address-agnostic, so it survives redeployment.
132
- Every pinned constant is re-derived from its signature in the test suite, so a
133
- typo cannot silently fail to match live traffic. One event is genuinely
134
- ambiguous — two contracts declare an identical `Disputed` signature — and the
135
- decoder reports `source: 'ambiguous'` rather than guessing.
49
+ [`examples/60-cross-list-a-seller.mjs`](examples/60-cross-list-a-seller.mjs) prices two real sellers on every other market:
136
50
 
137
- ## Nobody can be locked out
138
-
139
- A job holds other people's money, so no party may strand another by going quiet:
140
-
141
- ```ts
142
- import { livenessOf, recourseFor, waitingOn } from '@moonbeam-foundation/sdk';
143
-
144
- livenessOf(state, clock); // { noLockout: true, stranded: [] }
145
- recourseFor('provider', state, clock); // what I can do, and my guaranteed exit
146
- waitingOn(state, clock); // who is holding this up
51
+ ```text
52
+ film commentary: sells on bitagent-base at 4 USDC · 79 jobs · 196 USDC paid · 10 buyers
53
+ sold on buyer pays seller our fee market fees your markup
54
+ x402-base 5.00 4.00 1.00 0.00 0.00
55
+ erc8183-base 5.56 4.00 1.00 0.56 0.00
56
+ olas-base 5.88 4.00 1.00 0.88 0.00
147
57
  ```
148
58
 
149
- - A silent **provider** cannot strand the client: past the deadline the refund is
150
- permissionless — anyone may trigger it.
151
- - A silent **client** cannot strand the provider: release is the client's alone,
152
- but the provider can escalate to arbitration.
153
- - A silent **evaluator** cannot strand either: the deadline resolves the job.
154
-
155
- These are checked against the chain's state rather than asserted in prose.
156
-
157
- ## Time carries its provenance
59
+ The seller keeps its own price on every market. The legs sum to what the buyer pays: `price to buyer = seller price + our fee
60
+ + each market's own fee [+ your markup]`.
158
61
 
159
- Deadlines decide money, so a `Clock` always records where "now" came from —
160
- `local`, `chain`, or `attested` (a signed finality attestation). A proof-checking
161
- setup narrows what must be trusted; it does not remove trust, so the SDK never
162
- describes an attested clock as requiring none.
163
-
164
- ```ts
165
- import { createAttestationSource, clockFromAttestation } from '@moonbeam-foundation/sdk';
166
- import { recoverMessageAddress } from 'viem';
167
-
168
- const source = createAttestationSource({ baseUrl: 'https://…' });
169
- const attestation = await source.latest(8453);
170
-
171
- // The `signer` field is SELF-REPORTED. Recover it yourself or it proves nothing.
172
- const ecrecover = (digest: string, signature: string) =>
173
- recoverMessageAddress({ message: { raw: digest as `0x${string}` }, signature: signature as `0x${string}` });
174
-
175
- if (attestation.ok) {
176
- const clock = await clockFromAttestation(attestation.value, ecrecover);
177
- // Refused outright if the signature does not check out — never downgraded silently.
178
- }
179
- ```
180
-
181
- Note the recovery scheme: attestations are signed as EIP-191 personal messages
182
- over the digest, not as a raw hash. Recovery always returns *some* address, so
183
- the wrong scheme yields a plausible-looking address that simply never matches.
184
- Verify against a known-good attestation once before relying on it.
185
-
186
- ## Network answers that are not answers
187
-
188
- Connectors return a `Result` rather than throwing, to keep one distinction the
189
- SDK considers load-bearing:
190
-
191
- ```ts
192
- if (!result.ok && meansAbsent(result.error)) {
193
- // The source definitively has nothing for this. A fact you can act on.
194
- } else if (!result.ok) {
195
- // Unavailable, network failure, malformed: you do not know. Not the same thing.
196
- }
197
- ```
198
-
199
- A 404 is honest — the service has no data for that chain. A 500 is an outage.
200
- Collapsing the two would let a server fault read as "no proof exists", and under
201
- the rule above, absence of proof must never authorise a payment.
202
-
203
- The log reader carries the same instinct: some providers answer a valid query
204
- with an empty set instead of an error, which is indistinguishable from a quiet
205
- range, so `fetchLogRange` reports emptiness as `noData` unless you explicitly
206
- vouch for your source. It also pages wide ranges automatically, because
207
- providers that reject them leave holes in history that later reads never revisit.
208
-
209
- ## Building transactions
210
-
211
- The SDK builds calls; it never signs or sends them, and never holds a key. The calls target the assurance hook Moonbeam runs
212
- on Base (`@moonbeam-foundation/sdk/onboard`; the hook, the pool factory and the pools are read from the coordination layer's
213
- address registry, never typed here):
214
-
215
- ```ts
216
- import { fundCalls, sellerDepositCalls, coverPremium, submitCalls, settleCalls, BASE_GLMR, BASE_USDC, MOONBEAM_HOOK } from '@moonbeam-foundation/sdk/onboard';
217
-
218
- // a covered job is a GLMR job: the hook covers in GLMR only (the USDC route closed on 2026-09-29)
219
- const premium = coverPremium(terms.price, { k: 19, n: 20 }); // the seller's record → the premium (jev-wilson)
220
- sellerDepositCalls(terms); // the seller approves exactly its deposit
221
- const [approve, fund] = fundCalls({ ...terms, token: BASE_GLMR }, { pool, premium, coverCap }); // approve price + premium, then fundJobWithCover
222
- const [approveU, fundU] = fundCalls({ ...terms, token: BASE_USDC }); // an uncovered USDC job: no pool, premium 0
223
- submitCalls({ jobId, evidenceDigest, correlator }); // the seller seals its delivery
224
- settleCalls(jobId, 'completed'); // complete(jobId) · reject(jobId, digest) · expire(jobId)
225
- ```
226
-
227
- `fundJob`'s last address word is the **cover pool**, not an evaluator: the hook keeps no per-job evaluator (evaluators are the
228
- owner's allowlist). `premium` is an argument the hook checks against the pool. A USDC job with a pool is refused before any call
229
- (the hook would revert `PoolAssetMismatch`). `MOONBEAM_HOOK.status` carries the registry's word on the hook row (`live`, or
230
- `scheduled-change` while a route change is announced). `test/fork/run-fork.mjs` sends these calls on a local fork of Base:
231
- deposit approval, approve, `fundJob` against a live pool, `submit`, `complete`, then the settle's attestation.
232
-
233
- Pools open by the council's yes, not by a release: `poolsOpenOn(transport)` (`./pools`) reads `GET /v1/pools/networks` (its
234
- `supported` lines and `closed_by_policy`) through the site's proxy and returns no chain while the GLMR pools are not open; the
235
- 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)`).
236
-
237
- ## Judging a job on the Base hook
238
-
239
- `@moonbeam-foundation/sdk/judge` grades a GLMR job on Moonbeam's assurance hook on Base
240
- (`0xc0578657Eda85e0a246771aa1839ce79b54eE80d`) and builds the call that ends it. The grade works like this:
241
-
242
- - Code checks the facts first. A failed check rejects the job, and the model is never asked.
243
- - Jev, TypeSafe's calibrated decision model, answers four closed questions from the published RUBRIC_v1. Every answer
244
- comes back as a full probability distribution.
245
- - Code composes complete, reject or needs_review under fixed thresholds, and returns a receipt that hashes all of it.
246
-
247
- ```ts
248
- import { gradeJob, jobFacts, recordGrade, endJob, verifyGrade } from '@moonbeam-foundation/sdk/judge';
249
-
250
- const receipt = await gradeJob({
251
- jobId, // the hook's 32-byte job id
252
- evidence: { task, delivered },
253
- facts: jobFacts({ delivered: true, checks: { proof_verifies: () => checkProof(delivered) } }),
254
- key: process.env.TYPESAFE_KEY, // your own TypeSafe key
255
- });
256
- const onchain = await recordGrade(receipt); // unsigned calls on Base; { network: 'none' } turns it off
257
- const end = endJob(jobId, receipt); // complete(jobId) | reject(jobId, digest) | null (needs_review)
258
- const check = await verifyGrade(receipt, { chain: false });
259
- ```
62
+ ## Resell on your own keys
260
63
 
261
- `endJob` is signed by the job's buyer or by an evaluator the hook registered. For needs_review it returns `null`: the
262
- job stays held until one of those parties decides, or until anyone calls `expire` after the deadline. The tests
263
- re-encode the hook's `complete` from the covered GLMR hire on Base,
264
- [`0xc606d00f…3116`](https://basescan.org/tx/0xc606d00fed64e912585bbc93feb15a9289cfcde94289f49f7c74a7a468903116),
265
- byte for byte.
64
+ A reseller mints child keys with its own markup (`childKeyPlan` in `./resale`), and its buyers buy through them. Your margin
65
+ per child is read with `resellerChildren()`, and `resellerStanding()` says which step into reselling your key is on. With
66
+ `MARKUP_BPS=200` the same film commentary sells at 5.10 USDC, and 0.10 is yours.
266
67
 
267
- ## Reselling on Base
68
+ ## Workflows, node by node
268
69
 
269
- `@moonbeam-foundation/sdk/resale` is the Moonbeam profile of the coordination layer's one payment scheme, a byte-identical
270
- vendored copy pinned by its sha256 (`src/resale/payment-scheme.pin.json`): what a reseller's visitor pays, where every unit of it
271
- goes, and the reseller's own leg — the same numbers the layer itself charges.
70
+ Each node of a Studio workflow has one class and makes one call. Its colour in the pictures is its class, and its corner mark
71
+ is its last verification.
272
72
 
273
- ```
274
- price_to_buyer = seller_price + our_fee + venue_fee(in) + venue_fee(out) [+ reseller_markup]
275
- ```
73
+ | Class | Means |
74
+ |---|---|
75
+ | knowledge | reads the graph the layer keeps: sellers, buyers, markets, jobs, agents |
76
+ | check | asks a live agent, or the layer, whether something holds; nothing is paid |
77
+ | transform | turns what was read into terms or a market's own format: a quote, a grade, a listing's export |
78
+ | connector | hands work or a listing to a market in that market's own protocol |
79
+ | money | answers unsigned calls in order, each with its signer |
276
80
 
277
- ```ts
278
- import { quoteBase, legsByName, markupLeg, childKeyTerms, childKeyPlan, subscribePlan, readSale } from '@moonbeam-foundation/sdk/resale';
279
-
280
- const q = quoteBase({ venue_in: 'reseller', venue_out: 'erc8183-base', seller_price: 8_000n, reseller: { tenant, markup_bps: 1000 } });
281
- if (q.ok) legsByName(q); // { our_fee: 2000n, venue_fee: 888n, seller_share: 8000n, reseller_markup: 1000n }; Σ = q.price_to_buyer
282
- childKeyTerms({ '*': 1000 }); // what a child key is, in the layer's words
283
- childKeyPlan({ '*': 1000 }); // POST /tenant/keys { action: 'child', markup_bps } — the reseller sends it with its own key
284
- subscribePlan({ usdc: 1 }); // POST /access/subscribe — the child's top-up door (the x402 quote comes back as a 402)
285
- await readSale(transport, 'rs_…'); // GET /resale/sales/{id} through the site's proxy
286
- ```
81
+ ![List my business: ten modules, each with its class and call](https://raw.githubusercontent.com/moonbeam-foundation/moonbeam-sdk/main/docs/workflows/list-business.png)
287
82
 
288
- 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
289
- own leg, never part of the layer's fee. The venues are the five Base venues (`x402-base`, `erc8183-base`, `memoacp-base`,
290
- `bitagent-base`, `olas-base`): Moonbeam resells on Base only, and the assurance economy stays in GLMR. Solana rails and the other
291
- chains are in the coordination layer's own SDK, not here. Example: [`examples/24-resell-on-base.mjs`](examples/24-resell-on-base.mjs).
83
+ ![Sell one task through a listed edge](https://raw.githubusercontent.com/moonbeam-foundation/moonbeam-sdk/main/docs/workflows/sell-edge.png)
292
84
 
293
- ## Attested by default
85
+ On 2026-11-06, 18 of the 25 layer calls behind the nodes ran live, and one job ran end to end on the test network: handed
86
+ over, graded, ended. The other seven wait on a listing or a sale on your own key, or on a seller that passes the onboarding
87
+ check, and each node says which. Every workflow, every node, its meaning
88
+ and its last run are in [docs/WORKFLOWS.md](docs/WORKFLOWS.md); `@moonbeam-foundation/sdk/workflows` holds them as data.
294
89
 
295
- Every step this SDK handles comes with its record: a grade (`recordGrade`), an assurance settle (`settleAttested`) and a
296
- resale step (`attestSale`). Each returns its mark (a digest anyone can recompute from the step's canonical body) and the
297
- unsigned calls that put the mark on Base, where Moonbeam runs:
90
+ ## One SDK, every market
298
91
 
299
- | contract on Base | call | built for |
92
+ | Market | Find and buy | Sell under your own name |
300
93
  |---|---|---|
301
- | JevDecisionLog `0x209490d6A0FFC5368A42b0c2208BDCda853f6a92` | `record(subject, kind, digest, confidenceBps, model, uri)` | every step |
302
- | JevAnswerLog `0x8e9B9cE86a2d55c10318607b0c815B7B8C66254d` | `record(useCase, subject, inputDigest, answersDigest, decisionDigest, model, uri)` | a grade |
303
- | a grade stamp registry | `stamp(subject, digest, verdict, mode, model, uri)` | a step with a verdict |
304
-
305
- Base has no grade stamp registry, so the stamp comes back in `missing`, with no call. Pass `networks: [chainId]` to
306
- aim elsewhere, or `networks: 'none'` (`network: 'none'` for a grade) to turn recording off. The mark is returned
307
- either way. Your wallet signs the calls; nothing here sends.
94
+ | x402, MCP, A2A | `searchSellers`, `classAgents`, `handOver` | `createListing`, `publishListing` |
95
+ | Virtuals ACP (ERC-8183, memo-ACP), BitAgent | `sellerRecords`, `readJobs` (`./jobs`) | resold through Moonbeam's own seller |
96
+ | Olas Mech, NEAR AI | `markets`, `market` | `readListing().export`: the record in each market's format |
97
+ | ERC-8004 | `identity`, `registryAgent`, `readiness` | `jobCalls` with `register-8004`: the unsigned registration |
308
98
 
309
- ```ts
310
- import { settleAttested, hookQuote } from '@moonbeam-foundation/sdk/assurance';
311
- const s = settleAttested(job, hookQuote({ price, premium, deposit, covered: true }));
312
- s.legs; // who receives what, from the job's own GLMR amounts
313
- s.attest.calls; // [JevDecisionLog.record on 8453]
314
- s.attest.missing; // [{ contract: 'GradeStampRegistry', chainId: 8453, why: … }]
315
- ```
99
+ Every call above is in `./market` unless named otherwise.
316
100
 
317
- ## Paying an x402 wall on Base
101
+ ## Assurance and pools on top
318
102
 
319
- ```ts
320
- import { quoteWall, transferAuthorization, paymentHeader } from '@moonbeam-foundation/sdk/x402';
321
- const { accept } = await quoteWall(transport, '/x402/class/mcp.digest'); // the 402's Base entry (USDC)
322
- const typed = transferAuthorization(accept, { from: myAddress }); // EIP-3009 TransferWithAuthorization
323
- const signature = await wallet.signTypedData(typed); // your wallet signs
324
- const header = paymentHeader(accept, typed.message, signature); // the X-PAYMENT header
325
- ```
103
+ Any listing can carry assurance: the seller puts up a deposit, backers fund a pool, and a grade decides the ending
104
+ (`./assurance`, `./pools`, `./judge`). On Base today, jobs are graded and recorded, and no cover is sold, because no
105
+ arbitrator is registered on the hook. Pools open on the test network. `npx moonbeam demo` replays Moonbeam's first covered
106
+ hire on Base, offline.
326
107
 
327
- Only the `exact` entry on Base (`eip155:8453`) is taken; a wall that offers no Base entry is refused. `subscribe()` posts
328
- the top-up door and returns its 402 quote. `quoteSale` from `./resale` prices the same wall from the seller's price.
108
+ ## Your key
329
109
 
330
- ## Proofs
331
-
332
- ```ts
333
- import { readProof, verifyOnBase } from '@moonbeam-foundation/sdk/proof';
334
- import { baseReader } from '@moonbeam-foundation/sdk/rpc';
335
- const p = await readProof(transport, txHash); // block, superroot, checks, proven, ref v5:8453:<tx>@<superroot>
336
- const c = await verifyOnBase(baseReader(), p.blob!); // verify(blob) by eth_call on the V5 verifier 0x2D475a53eAA8F9AC78B69bD2429275a622C644f8
337
- ```
338
-
339
- `c.verified` is what the verifier returns. `c.anchored` is false while the verifier has no superroot anchor set. The
340
- block is bound to the snapshot the verifier folds by the inclusion path the layer serves (`c.inclusion`).
341
-
342
- ## Arbitration
343
-
344
- `./arbitration` builds the calls of the three-tier ArbitratorRouter: `resolveByCode` (tier 0, anyone),
345
- `secondGraderTypedData` + `resolveBySecondGrader` (tier 1), and `councilApprove`, `pullOracle` and
346
- `resolveByCouncil` (tier 2). It also decodes `Escalated`, `CouncilApproved` and `Resolved`, and `recordEffectOf`
347
- says what a ruling writes into the seller's record. The router is not deployed on Base and the hook names no
348
- arbitrator (`ARBITRATION_ON_BASE`), so every builder takes the router's address.
349
-
350
- ## The Base reader
351
-
352
- `baseReader()` from `./rpc` walks a measured rotation of Base endpoints: a rate limit or a refused range moves the call
353
- to the next endpoint, and a revert is thrown at once. `BASE_RPC` (a comma list) goes first. The live examples read
354
- through it.
355
-
356
- ## Skills for AI agents
357
-
358
- The package ships one skill per actor under `skills/`, so an agent acting as a
359
- backer gets the backer's reasoning and not the doubter's:
360
-
361
- `moonbeam-assurance` (router) · `moonbeam-acp-decoding` · and
362
- `moonbeam-actor-{client,provider,evaluator,backer,doubter,challenger}`
363
-
364
- Each states what its actor **risks** before what it earns, keeps to runnable
365
- calls rather than prose economics, and ends with the deployment boundary. Those
366
- rules are enforced by tests, not convention.
367
-
368
- ## Hooking up a host protocol
369
-
370
- The `acp` adapter translates an [Agent Commerce
371
- Protocol](https://whitepaper.virtuals.io/) job into insurable terms:
372
-
373
- ```ts
374
- import { acpAdapter, settle, DEFAULT_ACP_POLICY } from '@moonbeam-foundation/sdk';
375
-
376
- const terms = acpAdapter.toTerms(job, DEFAULT_ACP_POLICY);
377
- if (!terms) return; // not insurable — see below
378
-
379
- const verdict = acpAdapter.toVerdict({ approved: false, score: 0.2 });
380
- const { ledger } = settle({ terms, verdict });
381
- ```
382
-
383
- A job is **not insurable** when it is unpriced, above the policy cap, past the
384
- `transaction` phase (the outcome is already being decided), missing a signed
385
- Proof of Agreement (nothing to grade against), or missing a deadline (nothing
386
- resolves it if the evaluator goes silent). `toTerms` returns `null` rather than
387
- throwing, because "not insured" is the ordinary case, not an error.
388
-
389
- SLA expiry maps to `notDelivered`, never to `cheated` — the host protocol
390
- already refunds, and nobody should be punished for a job that simply expired.
391
-
392
- ### Writing another adapter
393
-
394
- Implement `AssuranceAdapter<HostJob, HostOutcome>`: say what a job costs and what
395
- its outcome means. Adapters translate; they never settle.
396
-
397
- The interface is deliberately narrow because it currently has **one**
398
- implementation. One adapter is a hypothetical seam, two is a working one — so it is
399
- better to keep this small until a second protocol shows what actually needs to
400
- be shared.
401
-
402
- ## Who must take part, and who may
403
-
404
- ```ts
405
- import { ACTORS, actorsBy } from '@moonbeam-foundation/sdk';
406
-
407
- actorsBy('obligatory'); // provider, evaluator
408
- actorsBy('optional'); // client, pool, doubter, challenger
409
- ```
410
-
411
- Only the two roles the system takes at their word must post capital: the
412
- provider doing the work and the evaluator grading it. Everyone else opts in.
413
-
414
- Worth being precise about backing a pool: choosing to back one is optional, but once
415
- in, underwriting is not a separate opt-in — **the exposure is the yield**.
416
- There is no passive tier, because rewards come from fees paid rather than
417
- inflation.
418
-
419
- ## Pool economics
420
-
421
- ```ts
422
- import { runSeason, breakEvenFailureRate, clearingFeeIsCoherent } from '@moonbeam-foundation/sdk';
423
-
424
- // An undersized bond, to show the pool actually paying. A deposit at or above
425
- // the damage leaves the pool at zero, which is the intended steady state.
426
- runSeason({
427
- jobs: 5_000,
428
- premiumPerJob: units('1'),
429
- failureRate: 0.006,
430
- damagePerFailure: units('70'),
431
- depositPerJob: units('40'),
432
- });
433
- // → premium 4_970, absorbed by deposits 1_200, paid by pool 900, net +4_070
434
-
435
- breakEvenFailureRate(units('1'), units('70'), units('40')); // ≈ 0.032
436
- clearingFeeIsCoherent(34, units('1'), units('70'), units('40')); // false
437
-
438
- // Raise the bond above the damage and the residual disappears:
439
- runSeason({ /* …as above… */ depositPerJob: units('120') });
440
- // → premium 4_970, absorbed by deposits 2_100, paid by pool 0, net +4_970
441
- breakEvenFailureRate(units('1'), units('70'), units('120')); // null — no rate breaks it
442
- ```
443
-
444
- That last call is the useful one. A published clearing fee is a claim about the
445
- failure rate the market expects; a pool's break-even is the rate it can actually
446
- survive. If those disagree by an order of magnitude, the two numbers were
447
- written against different assumptions — which is exactly the kind of drift that
448
- survives review when the economics live in prose.
449
-
450
- ## Design notes
451
-
452
- **Money is `bigint` minor units.** No floats anywhere in settlement. Basis-point
453
- maths rounds *down*, so no unit is ever minted that nobody funded.
454
-
455
- **The core is pure.** `settle()` takes terms and a verdict and returns a ledger.
456
- No clock, no chain, no I/O. That is what makes the economics testable:
457
- conservation of value, the arson cap, and "cheating pays the victim" are
458
- assertions over a return value rather than claims in a document.
459
-
460
- **The arson rule.** Doubt payouts are capped at capital already bonded
461
- (`deposit + poolCapital`), so causing a failure always costs more than betting
462
- on it can pay.
463
-
464
- ## Development
110
+ Markets, sellers, classes and agent cards read without a key. Listing, finding buyers, handing over and checking run on a
111
+ Moonbeam key:
465
112
 
466
113
  ```bash
467
- npm install
468
- npm test # every suite, offline
469
- npm run check # typecheck + build + tests + the two pins (the assurance machine, the payment scheme)
470
- npm run typecheck # strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes
471
- npm run build # ESM + .d.ts to dist/
472
- npm run test:coverage
114
+ export MOONBEAM_API=<the endpoint that comes with your key, /v1 included>
115
+ export MOONBEAM_API_KEY=<your Moonbeam key>
473
116
  ```
474
117
 
118
+ For a key, write to [builders@moonbeam.foundation](mailto:builders@moonbeam.foundation). The full reference (assurance,
119
+ reading the chain, transactions, grading, x402, proofs, arbitration, pool economics) is in [docs/REFERENCE.md](docs/REFERENCE.md).
120
+
475
121
  ## License
476
122
 
477
123
  Apache-2.0
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'));
@@ -27,10 +27,13 @@ export declare const BASE_USDC_TOKEN: RegistryContract & {
27
27
  };
28
28
  /** The judge's decision log on Base: every decision is recorded here before it is used. */
29
29
  export declare const JEV_DECISION_LOG: RegistryContract;
30
- /** The devnet copy of the decision log (chain 36927): tests and dry runs. */
31
- export declare const JEV_DECISION_LOG_DEVNET: RegistryContract;
32
30
  /** The judge's answer log on Base (jev.answer.v1 digests). */
33
31
  export declare const JEV_ANSWER_LOG: RegistryContract;
32
+ /** The judge's second answer log on Base (the same JevAnswered event and recordedAt; a guardian rotates its recorder). A
33
+ * reader looks up an answers digest in both logs. */
34
+ export declare const JEV_ANSWER_LOG_V2: RegistryContract;
35
+ /** The evaluator adapter on Base that posts an anchored verdict to its hook after a vetoable delay. */
36
+ export declare const JUDGE_ADAPTER_V5: RegistryContract;
34
37
  /** The V5 proof verifier on Base (verify(blob) answers whether a served proof blob verifies). */
35
38
  export declare const V5_PROOF_VERIFIER: RegistryContract;
36
39
  /** The addresses by role, for code that only needs the address. */
@@ -41,6 +44,8 @@ export declare const REGISTRY: Readonly<{
41
44
  usdc: `0x${string}`;
42
45
  decisionLog: `0x${string}`;
43
46
  answerLog: `0x${string}`;
47
+ answerLogV2: `0x${string}`;
48
+ judgeAdapterV5: `0x${string}`;
44
49
  v5Verifier: `0x${string}`;
45
50
  }>;
46
51
  /** The earliest deployment date the registry records for the system, when it records one. */
@@ -1 +1 @@
1
- {"version":3,"file":"moonbeam-acp.generated.d.ts","sourceRoot":"","sources":["../../src/acp/moonbeam-acp.generated.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,kBAAkB,GAAG,YAAY,GAAG,aAAa,CAAC;AACxF,MAAM,WAAW,gBAAgB;IAAG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AAExK,6GAA6G;AAC7G,eAAO,MAAM,aAAa,EAAE,gBAA8Y,CAAC;AAC3a,sDAAsD;AACtD,eAAO,MAAM,4BAA4B,EAAE,gBAA4Q,CAAC;AACxT,yGAAyG;AACzG,eAAO,MAAM,qBAAqB,EAAE,gBAA8T,CAAC;AACnW,sEAAsE;AACtE,eAAO,MAAM,uBAAuB,EAAE,SAAS,gBAAgB,EA6B7D,CAAC;AACH,8HAA8H;AAC9H,eAAO,MAAM,eAAe,EAAE,gBAAgB,GAAG;IAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAsP,CAAC;AACxV,0DAA0D;AAC1D,eAAO,MAAM,eAAe,EAAE,gBAAgB,GAAG;IAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAA8N,CAAC;AAC/T,2FAA2F;AAC3F,eAAO,MAAM,gBAAgB,EAAE,gBAAgO,CAAC;AAChQ,6EAA6E;AAC7E,eAAO,MAAM,uBAAuB,EAAE,gBAA0M,CAAC;AACjP,8DAA8D;AAC9D,eAAO,MAAM,cAAc,EAAE,gBAA6Q,CAAC;AAC3S,iGAAiG;AACjG,eAAO,MAAM,iBAAiB,EAAE,gBAA4L,CAAC;AAC7N,mEAAmE;AACnE,eAAO,MAAM,QAAQ;;;;;;;;EAA4Q,CAAC;AAClS,6FAA6F;AAC7F,eAAO,MAAM,kBAAkB,EAAE,MAAM,GAAG,IAAmB,CAAC;AAC9D,0DAA0D;AAC1D,eAAO,MAAM,mBAAmB,EAAG,EAAW,CAAC"}
1
+ {"version":3,"file":"moonbeam-acp.generated.d.ts","sourceRoot":"","sources":["../../src/acp/moonbeam-acp.generated.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,kBAAkB,GAAG,YAAY,GAAG,aAAa,CAAC;AACxF,MAAM,WAAW,gBAAgB;IAAG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AAExK,6GAA6G;AAC7G,eAAO,MAAM,aAAa,EAAE,gBAA8Y,CAAC;AAC3a,sDAAsD;AACtD,eAAO,MAAM,4BAA4B,EAAE,gBAA4Q,CAAC;AACxT,yGAAyG;AACzG,eAAO,MAAM,qBAAqB,EAAE,gBAA8T,CAAC;AACnW,sEAAsE;AACtE,eAAO,MAAM,uBAAuB,EAAE,SAAS,gBAAgB,EA6B7D,CAAC;AACH,8HAA8H;AAC9H,eAAO,MAAM,eAAe,EAAE,gBAAgB,GAAG;IAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAsP,CAAC;AACxV,0DAA0D;AAC1D,eAAO,MAAM,eAAe,EAAE,gBAAgB,GAAG;IAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAA8N,CAAC;AAC/T,2FAA2F;AAC3F,eAAO,MAAM,gBAAgB,EAAE,gBAAgO,CAAC;AAChQ,8DAA8D;AAC9D,eAAO,MAAM,cAAc,EAAE,gBAA6Q,CAAC;AAC3S;sDACsD;AACtD,eAAO,MAAM,iBAAiB,EAAE,gBAA6P,CAAC;AAC9R,uGAAuG;AACvG,eAAO,MAAM,gBAAgB,EAAE,gBAAmT,CAAC;AACnV,iGAAiG;AACjG,eAAO,MAAM,iBAAiB,EAAE,gBAA4L,CAAC;AAC7N,mEAAmE;AACnE,eAAO,MAAM,QAAQ;;;;;;;;;;EAA8V,CAAC;AACpX,6FAA6F;AAC7F,eAAO,MAAM,kBAAkB,EAAE,MAAM,GAAG,IAAmB,CAAC;AAC9D,0DAA0D;AAC1D,eAAO,MAAM,mBAAmB,EAAG,EAAW,CAAC"}