@cancore/contracts 0.2.0-rc.3 → 0.2.0-rc.7
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/README.md +137 -28
- package/dist/abi.d.ts +110 -178
- package/dist/abi.js +1 -1
- package/dist/{chunk-NV5IUURP.js → chunk-GJPX4H5K.js} +132 -232
- package/dist/chunk-GJPX4H5K.js.map +1 -0
- package/dist/{chunk-VODZRADO.js → chunk-IAPV7XWJ.js} +2 -2
- package/dist/chunk-IAPV7XWJ.js.map +1 -0
- package/dist/index.d.ts +416 -86
- package/dist/index.js +699 -165
- package/dist/index.js.map +1 -1
- package/dist/networks.d.ts +1 -1
- package/dist/networks.js +1 -1
- package/package.json +1 -1
- package/spec/abi/CancoreRouter.json +64 -155
- package/spec/abi/ICancoreRouter.json +64 -69
- package/spec/protocol/asyncapi.json +265 -27
- package/spec/protocol/messages.schema.json +135 -24
- package/spec/protocol/records.schema.json +3 -2
- package/spec/protocol/rest.schema.json +7 -4
- package/spec/protocol/typed-data/FillerKeyRegistration.json +69 -0
- package/spec/protocol/typed-data/FillerMessage.json +115 -0
- package/spec/protocol/typed-data/FillerQuote.json +12 -12
- package/spec/protocol/typed-data/GatewayMessage.json +12 -9
- package/spec/protocol/typed-data/TicketIntent.json +57 -9
- package/spec/protocol/typed-data/TicketReceipt.json +2 -2
- package/spec/protocol/vectors/messages.json +190 -10
- package/spec/protocol/vectors/settle-attestations.json +542 -0
- package/spec/typed-data/FillProof.json +61 -33
- package/spec/typed-data/FillTicket.json +46 -13
- package/dist/chunk-NV5IUURP.js.map +0 -1
- package/dist/chunk-VODZRADO.js.map +0 -1
package/README.md
CHANGED
|
@@ -18,8 +18,8 @@ need one dependency, `@noble/hashes`.
|
|
|
18
18
|
| --- | --- | --- |
|
|
19
19
|
| `@cancore/contracts/abi` | `HTLC_ABI`, `FEE_VAULT_ABI`, `CNRX_ABI`, `IHTLC_ABI`, `IBURN_MINT_ERC20_ABI`, `IPERMIT2_ABI`, `MULTI_BALANCE_CHECKER_ABI`, `CANCORE_ROUTER_ABI`, `ICANCORE_ROUTER_ABI`, `ATTESTOR_SET_ABI`, `CNRX_STAKING_ABI`, `POINTS_CLAIM_ABI`; an `*_ERRORS` table for each contract that declares custom errors | `Cancore-io/evm-contracts/abi/*.json` — the reviewed snapshots that repository keeps in lock-step with its compiled contracts; `CNRX` and `IBurnMintERC20` from `evm-contracts/vendor/*.json`, a build of `cancore-token-evm` vendored there |
|
|
20
20
|
| `@cancore/contracts/networks` | `NETWORKS`, `networkOf`, `networkKindOf`, `networkByChainId` | the chain ids the Cancore API uses |
|
|
21
|
-
| `@cancore/contracts` (filler protocol v1) | EIP-712 types and domains of the intent rail, `hashTypedData` / `jcs` / `gatewayBodyHash` / `requestIdHash`, `drawValue` / `drawWinner` / `firstRoundAtOrAfter`, wire message types and enums, `FILLER_GATEWAYS` | `docs/intents/protocol.md` and `auction-and-draw.md` in Cancore-io/meta; `CancoreRouter.sol` for the code types |
|
|
22
|
-
| `@cancore/contracts` | all of the above, plus `DEPLOYMENTS` / `deploymentOf`, `FEE_CLAIM_TYPES` / `feeClaimDomain`, `FILL_PROOF_TYPES` / `fillProofDomain` / `FillProof`, `BYTECODE_HASHES
|
|
21
|
+
| `@cancore/contracts` (filler protocol v1) | EIP-712 types and domains of the intent rail, `hashTypedData` / `jcs` / `gatewayBodyHash` / `fillerMessageBodyHash` / `requestIdHash`, one digest helper per settlement type (`hashFillTicket`, `hashFillerQuote`, `hashTicketIntent`, `hashFillerMessage`, `hashFillerKeyRegistration`), `fillerIdHash` / `repayToFromEvm` / `repayToFromParty` / `isEvmRepayTo` / `evmAddressFromRepayTo`, `isEoaSignature`, `fillerEnvelopeError`, `drawValue` / `drawWinner` / `firstRoundAtOrAfter`, wire message types and enums, `FILLER_GATEWAYS` | `docs/intents/protocol.md` and `auction-and-draw.md` in Cancore-io/meta; `CancoreRouter.sol` for the code types |
|
|
22
|
+
| `@cancore/contracts` | all of the above, plus `DEPLOYMENTS` / `deploymentOf`, `FEE_CLAIM_TYPES` / `feeClaimDomain`, `FILL_PROOF_TYPES` / `fillProofDomain` / `hashFillProof` / `FillProof`, `BUILD_HASHES` (and its deprecated alias `BYTECODE_HASHES`), `CONTRACTS_RELEASE`, `describeRevert` | the contracts repository's `version.json` and bytecode hashes; the FeeVault contract's own struct and domain; `evm-contracts/abi/typed-data/FillProof.json` for the router's `FillProof` |
|
|
23
23
|
|
|
24
24
|
The ABIs and selector tables are **generated**, never edited: `npm run sync` reads a checkout
|
|
25
25
|
of `evm-contracts` (`EVM_CONTRACTS_DIR`) and rewrites `spec/abi/*.json` and
|
|
@@ -66,10 +66,13 @@ type hash is the router's `ORDER_TYPEHASH`. Router addresses are not in this pac
|
|
|
66
66
|
## FillProof: what attestors sign
|
|
67
67
|
|
|
68
68
|
`CancoreRouter.settle(order, proof, sigs)` pays a filler out only against k attestor
|
|
69
|
-
signatures over one EIP-712 `FillProof`, in the domain of the order's **source** router
|
|
69
|
+
signatures over one EIP-712 `FillProof`, in the domain of the order's **source** router, and
|
|
70
|
+
pays `proof.repayTo`. Twelve fields: `fillerId` (`keccak256(utf8(fillerId))`) and `repayTo`
|
|
71
|
+
(encoded for the source chain) come from the delivery — `Filled` on an EVM destination, the
|
|
72
|
+
`DeliveryReceipt` on a Canton one — and sit before `attempt` and `setId`.
|
|
70
73
|
|
|
71
74
|
```ts
|
|
72
|
-
import { FILL_PROOF_TYPES, fillProofDomain, PROOF_KIND_ATTESTATION } from '@cancore/contracts';
|
|
75
|
+
import { FILL_PROOF_TYPES, fillProofDomain, hashFillProof, PROOF_KIND_ATTESTATION } from '@cancore/contracts';
|
|
73
76
|
|
|
74
77
|
const signature = await wallet.signTypedData({
|
|
75
78
|
domain: fillProofDomain(sourceChainId, sourceRouter),
|
|
@@ -80,10 +83,12 @@ const signature = await wallet.signTypedData({
|
|
|
80
83
|
```
|
|
81
84
|
|
|
82
85
|
This repository keeps golden vectors for the schema in `spec/typed-data/FillProof.json` (shipped
|
|
83
|
-
in the package since 0.2.0, under `@cancore/contracts/spec/*`)
|
|
84
|
-
`
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
in the package since 0.2.0, under `@cancore/contracts/spec/*`), each with its `domainSeparator`,
|
|
87
|
+
`structHash` and digest, and the file's `typeHash`. The twelve-field schema and vectors are
|
|
88
|
+
synced from `evm-contracts/abi/typed-data/FillProof.json` at `CONTRACTS_RELEASE.commit`; the
|
|
89
|
+
router tests check every vector against its own `hashFillProof` (CAN-2140). Sync only from a
|
|
90
|
+
variant A checkout: an older eleven-field struct would overwrite this file with the old one.
|
|
91
|
+
The Canton-source verifier and its rollout remain a separate compatibility gate.
|
|
87
92
|
|
|
88
93
|
## Filler protocol v1 (RC)
|
|
89
94
|
|
|
@@ -93,31 +98,41 @@ breaking protocol change is `0.3`.
|
|
|
93
98
|
|
|
94
99
|
```ts
|
|
95
100
|
import {
|
|
96
|
-
|
|
101
|
+
gatewayBodyHash, hashFillerMessage, hashTicketIntent, repayToFromEvm, fillerIdHash,
|
|
97
102
|
} from '@cancore/contracts';
|
|
98
103
|
|
|
99
|
-
// what the filler
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
// what the filler's message key signs to take an offered ticket: its delivery key and payout address
|
|
105
|
+
const intentDigest = hashTicketIntent({
|
|
106
|
+
orderHash, attempt, validFrom, validUntil,
|
|
107
|
+
fillerId: 'acme',
|
|
108
|
+
deliveryKey, // the address that will send fill (zero for a Canton destination)
|
|
109
|
+
repayTo: repayToFromEvm(payout), // EVM source; repayToFromParty(partyId) for a Canton source
|
|
105
110
|
});
|
|
106
111
|
|
|
112
|
+
// what msgSig of EVERY filler → filler-gateway message is over: FillerMessage{bodyHash}
|
|
113
|
+
const msgDigest = hashFillerMessage(message); // bodyHash = keccak256(JCS(message without msgSig))
|
|
114
|
+
|
|
107
115
|
// what every S→F frame's `sig` is over: GatewayMessage{bodyHash} in the same domain
|
|
108
116
|
const bodyHash = gatewayBodyHash(frame); // keccak256(JCS(frame without sig))
|
|
117
|
+
|
|
118
|
+
fillerIdHash('acme'); // the on-chain fillerId of FillTicket, Filled, FillProof, Settled
|
|
109
119
|
```
|
|
110
120
|
|
|
111
121
|
`hashTypedData` encodes flat structs (address, bool, bytes, bytesN, string, uintN) and throws on
|
|
112
122
|
anything else; it takes wire values as they come — decimal strings, numbers or bigints. There
|
|
113
|
-
is no signing in this package: hand the digest to your own secp256k1 key.
|
|
123
|
+
is no signing in this package: hand the digest to your own secp256k1 key. The filler signs
|
|
124
|
+
everything with one message key, an EOA: 65 bytes `r ‖ s ‖ v`, low-s, `v ∈ {27, 28}`, no
|
|
125
|
+
EIP-1271 — `isEoaSignature` checks that shape before recovery. A message key is registered
|
|
126
|
+
with `FillerKeyRegistration` signed by that key, at onboarding and, with the new key, at a
|
|
127
|
+
manual key change by Cancore staff; there is no key-rotation type or message.
|
|
114
128
|
|
|
115
129
|
| Types | Domain | Status |
|
|
116
130
|
| --- | --- | --- |
|
|
117
|
-
| `
|
|
131
|
+
| `TicketReceipt`, `StakeBinding`, `FillerAuth`, `GatewayMessage` | `CancoreFillerProtocol` v1 | v1 RC — vectors in `spec/protocol/typed-data/` |
|
|
132
|
+
| `FillerQuote` (`string fillerId`), `TicketIntent` (with `fillerId`, `deliveryKey`, `repayTo`), `FillerMessage`, `FillerKeyRegistration` | `CancoreFillerProtocol` v1 | variant A — vectors in `spec/protocol/typed-data/` |
|
|
118
133
|
| `Order` (11 fields, with `createdAt`), `Quote` | `CancoreRouter` v1, source router | router code; provisional copies in `spec/typed-data/` until evm-contracts publishes them |
|
|
119
|
-
| `FillTicket` | `CancoreFillTicket` v1 |
|
|
120
|
-
| `FillProof` | `CancoreRouter` v1, source router | synced from
|
|
134
|
+
| `FillTicket` (`orderHash`, `fillerId`, `deliveryKey`, `repayTo`, `attempt`, `validFrom`, `validUntil`) | `CancoreFillTicket` v1 | variant A, synced from the router (CAN-2140) |
|
|
135
|
+
| `FillProof` (twelve fields) | `CancoreRouter` v1, source router | variant A, synced from the router (above) |
|
|
121
136
|
|
|
122
137
|
Golden vectors are generated with ethers by `scripts/gen-protocol-vectors.mjs` from the literal
|
|
123
138
|
inputs in `scripts/protocol-fixtures.mjs`, and checked by this package's own encoder too. The
|
|
@@ -131,11 +146,12 @@ drand quicknet rounds.
|
|
|
131
146
|
|
|
132
147
|
| File (`@cancore/contracts/spec/protocol/…`) | Holds |
|
|
133
148
|
| --- | --- |
|
|
134
|
-
| `messages.schema.json` | one `$def` per WebSocket frame type (
|
|
149
|
+
| `messages.schema.json` | one `$def` per WebSocket frame type (23), `x-direction` S2F / F2S / both, and the primitives they share |
|
|
135
150
|
| `rest.schema.json` | REST fallback bodies; `x-endpoints` (method, path, auth, request/response), `x-error-status` |
|
|
136
151
|
| `records.schema.json` | the draw record, the epoch record, `GET /v1/gateway` |
|
|
137
152
|
| `asyncapi.json` | AsyncAPI 3.0: channel `/v1`, the gateway's send/receive operations, examples |
|
|
138
153
|
| `vectors/messages.json`, `vectors/records.json` | valid example frames and fixture records (hashes real, `sig` a placeholder: r = s = 0, v = 27) |
|
|
154
|
+
| `vectors/settle-attestations.json` | `settle.attestations` golden vectors: EVM and Canton source, real TEST-key signatures, the pushed frame and the REST body with one payload, and schema-valid payloads a filler must refuse |
|
|
139
155
|
|
|
140
156
|
The same objects are exported as `PROTOCOL_SCHEMAS`, `ASYNCAPI`, `MESSAGE_DIRECTIONS` and
|
|
141
157
|
`REST_ENDPOINTS`, with TypeScript shapes of every frame (`TicketOffer`, `QuoteAck`, …) and the
|
|
@@ -152,16 +168,48 @@ ajv.validate(messageSchemaRef(frame.type, 'S2F'), frame); // errors name the fie
|
|
|
152
168
|
```
|
|
153
169
|
|
|
154
170
|
The schemas describe what a v1 **sender** emits: lowercase hex, uint64 and wider as decimal
|
|
155
|
-
strings,
|
|
171
|
+
strings, times in milliseconds, every frame with `id`, `fillerId` and `sentAt`, every S→F frame
|
|
172
|
+
signed with `sig` and every F→S frame — `ticket.decline`, a declining `quote.reconfirm.reply`,
|
|
173
|
+
`fill.reported`, `pong` and `error` included — with `msgSig` (`f2sEnvelope`); REST request
|
|
174
|
+
bodies carry the same envelope. `fillerEnvelopeError` runs the key-free checks of §3.4 (shape of
|
|
175
|
+
`msgSig`, the session's `fillerId`, freshness, `id`); recovering `msgSig` against the registered
|
|
176
|
+
message key and refusing a replayed `id` stay with the receiver, which keeps an accepted `id` until
|
|
177
|
+
`messageIdRetainUntil(sentAt, receivedAt, maxMessageAgeMs)` — freshness is symmetric, so a sender
|
|
178
|
+
clock running ahead keeps a message fresh past `receivedAt + maxMessageAgeMs`. The `repayToEvm` definition
|
|
179
|
+
refuses a `repayTo` with non-zero top 12 bytes, for a receiver that knows the source is EVM. No
|
|
156
180
|
object is closed: a receiver ignores unknown fields and a taker ignores unknown S→F types
|
|
157
181
|
(V-2), so check a frame of an unknown type against `s2fEnvelope` and skip it. Every enum is
|
|
158
182
|
open the same way: the known values, or any UPPER_SNAKE value added within v1, which a receiver
|
|
159
183
|
treats as `OTHER`/generic; a `ticket.issued` of an unknown `form` is checked on its common fields
|
|
160
|
-
only. `ping
|
|
161
|
-
|
|
184
|
+
only. `ping`, `pong` and `error` go both ways: the gateway's copy carries `sig` (`pingS2F`), the
|
|
185
|
+
filler's `msgSig` (`pingF2S`); the second argument of `messageSchemaRef` picks one.
|
|
162
186
|
`scripts/gen-protocol-docs.mjs` derives the examples, records and the AsyncAPI document from
|
|
163
187
|
the schemas and the vectors.
|
|
164
188
|
|
|
189
|
+
### Attestation signatures for `settle`
|
|
190
|
+
|
|
191
|
+
Once filler-gateway holds at least `threshold` verified attestor signatures over a filler's
|
|
192
|
+
`FillProof`, it pushes `settle.attestations` to that filler and serves the same payload on
|
|
193
|
+
`GET /v1/filler/attestations/{orderHash}` (404 `ATTESTATIONS_NOT_READY` before that, 404
|
|
194
|
+
`UNKNOWN_TICKET` when the filler holds no ticket on the order); the filler node submits `settle`
|
|
195
|
+
itself (protocol §3.5, §3.6, §10 D-N). `proof` is the `FillProof` the source router hashes,
|
|
196
|
+
field for field (`FILL_PROOF_TYPES`), including variant A's `fillerId` and `repayTo`
|
|
197
|
+
(protocol §3.3). A signature entry follows `sourceChainId`: `{signer, signature}` with a
|
|
198
|
+
65-byte signature on an EVM source, `{signer, pubKey, signature}` with the DER public key and a
|
|
199
|
+
minimal DER signature on a Canton source, as `SwapIntent_SettleWithProof` takes them.
|
|
200
|
+
|
|
201
|
+
```ts
|
|
202
|
+
import { settleAttestationsErrors, settleAttestationsPayload, settleAttestationsPayloadHash, settleSigs } from '@cancore/contracts';
|
|
203
|
+
|
|
204
|
+
const payload = settleAttestationsPayload(frame); // the same from WebSocket and REST
|
|
205
|
+
settleAttestationsErrors(payload); // [] or what the schema cannot state: threshold, signer order, ids
|
|
206
|
+
settleAttestationsPayloadHash(frame); // dedupe the two channels
|
|
207
|
+
settleSigs(payload); // EVM: the sigs of settle(order, proof, sigs); Canton: cantonSigEntries(payload)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Recover every signer and check it against `attestationSetFor(orderHash)` with your own
|
|
211
|
+
secp256k1 library (T-7). `scripts/gen-settle-attestations.mjs` writes the vectors.
|
|
212
|
+
|
|
165
213
|
`FILLER_GATEWAYS` is where the gateway key and the ticket signers of each environment are
|
|
166
214
|
published. It is empty in the RC: no gateway key exists yet.
|
|
167
215
|
|
|
@@ -180,7 +228,7 @@ decode against the same table.
|
|
|
180
228
|
## Deployments
|
|
181
229
|
|
|
182
230
|
```ts
|
|
183
|
-
import { DEPLOYMENTS, deploymentOf,
|
|
231
|
+
import { DEPLOYMENTS, deploymentOf, BUILD_HASHES } from '@cancore/contracts';
|
|
184
232
|
|
|
185
233
|
const { htlc, htlcBlock } = deploymentOf('mainnet', 'arbitrum')!;
|
|
186
234
|
```
|
|
@@ -188,11 +236,13 @@ const { htlc, htlcBlock } = deploymentOf('mainnet', 'arbitrum')!;
|
|
|
188
236
|
Three environments, three independent deployments: what is on Sepolia for the dev stand is
|
|
189
237
|
not what is on Sepolia for testnet. `htlcBlock` is the floor for an event scan.
|
|
190
238
|
|
|
191
|
-
`
|
|
192
|
-
`scripts/tools/check-bytecode-match.mjs`: `
|
|
239
|
+
`BUILD_HASHES` pins the build each release was made from, as `evm-contracts` records it in
|
|
240
|
+
`scripts/tools/check-bytecode-match.mjs`: `creationHexSha256` and `runtimeHexSha256` are sha256
|
|
193
241
|
of the UTF-8 text of the artifact's `0x`-prefixed hex (creation and runtime code) — not
|
|
194
|
-
keccak256, and not of the bytes — and `
|
|
195
|
-
of that text, `0x` included.
|
|
242
|
+
keccak256, and not of the bytes — and `creationHexLength` / `runtimeHexLength` are the length
|
|
243
|
+
of that text, `0x` included. `BYTECODE_HASHES` is the same data under the old field names
|
|
244
|
+
(`bytecodeHash`, `deployedBytecodeHash`, `bytecodeLength`, `deployedBytecodeLength`); it is
|
|
245
|
+
deprecated and goes before `0.2.0`. It is not a hash of `eth_getCode`: a contract with
|
|
196
246
|
immutables (`CancoreRouter`, `FeeVault`) never matches one, so checking a live deployment
|
|
197
247
|
against it means rebuilding the release, not hashing the address. `CONTRACTS_RELEASE` names the
|
|
198
248
|
release.
|
|
@@ -241,6 +291,10 @@ EVM_CONTRACTS_DIR=../evm-contracts npm run sync # then review the diff and rel
|
|
|
241
291
|
EVM_CONTRACTS_DIR=../evm-contracts node scripts/sync.mjs
|
|
242
292
|
```
|
|
243
293
|
|
|
294
|
+
`EVM_CONTRACTS_DIR` must be the root of a clean git checkout of `evm-contracts`: the sync records
|
|
295
|
+
its `HEAD` as `CONTRACTS_RELEASE.commit` and refuses a directory that is not a checkout root or
|
|
296
|
+
has uncommitted changes, so the release cannot name a commit its data did not come from.
|
|
297
|
+
|
|
244
298
|
It reads `abi/*.json` except the two manifests (`bytecode-hashes.json`, `versions.json`) and
|
|
245
299
|
`vendor/*.json` (the `.abi` field), and refuses to run when `spec/abi/` holds a snapshot the
|
|
246
300
|
source no longer has — dropping a published ABI is a decision, not a side effect of a sync.
|
|
@@ -252,6 +306,61 @@ Full documentation: <https://docs.cancore.io/sdk/contracts>
|
|
|
252
306
|
|
|
253
307
|
## Changes
|
|
254
308
|
|
|
309
|
+
- `0.2.0-rc.7` — sync the variant A `CancoreRouter` and `ICancoreRouter` ABIs from
|
|
310
|
+
evm-contracts commit `c214f56f6fe5a62097833c5f1335b0cb5351b225` (CAN-2140).
|
|
311
|
+
- Both the package root and `/abi`, and the shipped `spec/abi/` JSON, expose
|
|
312
|
+
`Filled(orderHash, fillerId, deliveryKey, repayTo, received, recipient, filledAt, attempt)`
|
|
313
|
+
and `Settled(orderHash, fillerId, repayTo, payout, fee)`. Both events index `orderHash` and
|
|
314
|
+
`fillerId`. **Breaking within the RC line**: consumers must decode the new event topics
|
|
315
|
+
and fields; the published `0.2.0-rc.6` still has the old router ABIs.
|
|
316
|
+
- The router's `FillTicket` and `FillProof` tuples now match the variant A typed data
|
|
317
|
+
already shipped in `0.2.0-rc.6`. No typed-data digest changes from `rc.6` to `rc.7`.
|
|
318
|
+
The generated typed-data snapshot now also includes `FillTicket` from the synced schema.
|
|
319
|
+
- Remove the old on-router filler registry views, `setFiller` and `FillerSet`;
|
|
320
|
+
`WrongDeliveryKey` replaces `WrongTicketFiller` and `NotFiller`. Refresh
|
|
321
|
+
`CONTRACTS_RELEASE.commit` and the router build hashes.
|
|
322
|
+
- This package does not deploy a router or complete the Canton/backend/trader rollout.
|
|
323
|
+
- `0.2.0-rc.6` (CAN-2139; previously listed as unreleased) — the settlement design of variant A (protocol.md §3.3, §3.4, §3.15,
|
|
324
|
+
§3.16; CAN-2139). **Breaking within the RC line**: every digest of the changed types changes.
|
|
325
|
+
- `FillTicket` is `(orderHash, bytes32 fillerId, address deliveryKey, bytes32 repayTo, attempt,
|
|
326
|
+
validFrom, validUntil)`; `FillProof` has twelve fields, `fillerId` and `repayTo` in place of
|
|
327
|
+
`address filler`; `TicketIntent` adds `string fillerId`, `deliveryKey`, `repayTo`;
|
|
328
|
+
`FillerQuote` names `string fillerId` instead of `address filler`. Type hashes:
|
|
329
|
+
`FillTicket` `0x3b13cc38…73ec82`, `FillProof` `0xc37e18cd…2419ae`.
|
|
330
|
+
- New types `FillerMessage(bytes32 bodyHash)` (the envelope signature `msgSig` of every filler
|
|
331
|
+
message) and `FillerKeyRegistration(string fillerId,address messageKey,uint64 issuedAt)`
|
|
332
|
+
(proof of possession of the message key, also for a manual key change by staff). No
|
|
333
|
+
key-rotation type, no `key.rotate` message, no refund-redirect type.
|
|
334
|
+
- Helpers: `hashFillTicket`, `hashFillProof`, `hashFillerQuote`, `hashTicketIntent`,
|
|
335
|
+
`hashFillerMessage`, `hashFillerKeyRegistration`, `fillerMessageBodyHash`, `fillerIdHash`,
|
|
336
|
+
`repayToFromEvm`, `repayToFromParty`, `isEvmRepayTo`, `evmAddressFromRepayTo`,
|
|
337
|
+
`isEoaSignature`, `fillerEnvelopeError`, `messageIdRetainUntil`.
|
|
338
|
+
- Schemas: every F→S frame carries `id`, `fillerId`, `sentAt`, `msgSig` (`f2sEnvelope`), as does
|
|
339
|
+
the stake-binding REST body; every S→F frame carries `id`; `error` goes both ways
|
|
340
|
+
(`errorS2F`, `errorF2S`); `quote` drops `filler`; `ticket.intent` adds `deliveryKey`,
|
|
341
|
+
`repayTo`; the issued EVM ticket is the seven-field `FillTicket` and the Canton form adds
|
|
342
|
+
`repayTo`; error codes `STALE_MESSAGE`, `REPLAYED_MESSAGE`, `TICKET_REFUSED` with
|
|
343
|
+
`reason` (`TICKET_REFUSED_REASONS`); `repayToEvm`, `fillerKeyRegistration` definitions;
|
|
344
|
+
`sig65` refuses an `s` with its top bit set; `GET /v1/gateway` returns `maxMessageAgeMs`.
|
|
345
|
+
- Vectors for every new and changed type; the router ABI catches up with these types in
|
|
346
|
+
`0.2.0-rc.7` (see «FillProof: what attestors sign»).
|
|
347
|
+
- `0.2.0-rc.6` (CAN-2018; previously listed as unreleased) — filler-gateway → filler `settle.attestations` and `GET /v1/filler/attestations/{orderHash}`
|
|
348
|
+
(protocol §3.5, §3.6, §10 D-N): the frame schema with the router's `FillProof` and the EVM and
|
|
349
|
+
Canton signature entries, the REST endpoint, the error code `ATTESTATIONS_NOT_READY` (404), an
|
|
350
|
+
AsyncAPI message, golden vectors (`spec/protocol/vectors/settle-attestations.json`), the
|
|
351
|
+
`SettleAttestations` types and the helpers `settleAttestationsPayload`,
|
|
352
|
+
`settleAttestationsPayloadHash`, `settleAttestationsErrors`, `settleSigs`, `cantonSigEntries`.
|
|
353
|
+
Additive only (V-2): no existing frame, type or vector changes.
|
|
354
|
+
- `0.2.0-rc.6` — `auth.response` gains an optional `nonce` (bytes32): the `auth.challenge` nonce it
|
|
355
|
+
answers, so filler-gateway's REST login (`POST /v1/filler/auth`) finds the challenge without trying
|
|
356
|
+
every live one. Additive only (V-2); the `FillerAuth` type and every digest are unchanged.
|
|
357
|
+
- `0.2.0-rc.5` — `CONTRACTS_RELEASE.commit`: the evm-contracts commit the data was synced from.
|
|
358
|
+
The sync takes it from the checkout's `HEAD` and refuses a directory that is not a clean
|
|
359
|
+
checkout root. Additive only.
|
|
360
|
+
- `0.2.0-rc.4` — adds `BUILD_HASHES`: the release's build hashes under names that say what they
|
|
361
|
+
are (`creationHexSha256`, `runtimeHexSha256`, `creationHexLength`, `runtimeHexLength`).
|
|
362
|
+
`BYTECODE_HASHES` keeps the same values under the old names, deprecated, and is removed before
|
|
363
|
+
`0.2.0`. Additive only.
|
|
255
364
|
- `0.2.0-rc.3` — adds the `CNRXStaking` and `PointsClaim` ABIs with their error tables
|
|
256
365
|
(`CNRX_STAKING_ABI`, `CNRX_STAKING_ERRORS`, `POINTS_CLAIM_ABI`, `POINTS_CLAIM_ERRORS`). The
|
|
257
366
|
generator now splits an acronym of two or more capitals from the word after it, which renames
|