@integraledger/lcp-verify 0.9.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.
- package/CHANGELOG.md +121 -0
- package/README.md +11 -5
- package/dist/index.d.ts +7 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/dist/report.d.ts +13 -4
- package/dist/report.d.ts.map +1 -1
- package/dist/report.js.map +1 -1
- package/dist/required.d.ts +26 -2
- package/dist/required.d.ts.map +1 -1
- package/dist/required.js +35 -0
- package/dist/required.js.map +1 -1
- package/dist/steps.d.ts +4 -1
- package/dist/steps.d.ts.map +1 -1
- package/dist/steps.js +7 -5
- package/dist/steps.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +16 -10
- package/src/report.ts +13 -4
- package/src/required.ts +42 -2
- package/src/steps.ts +12 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,126 @@
|
|
|
1
1
|
# @integraledger/lcp-verify
|
|
2
2
|
|
|
3
|
+
## 0.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- b2ffecc: Report the class a record actually supports, place a terms URL on UCP, and stop refusing a conformant UCP
|
|
8
|
+
profile — the remediation of the 2026-08-19 conformance re-audit.
|
|
9
|
+
|
|
10
|
+
**`verify` now computes `supportedClass` instead of echoing the claim.** It was `anyFailed ? "TC-0" :
|
|
11
|
+
claimedClass`, so a record proving nothing — no settlement, no acceptance, no authority chain — reported
|
|
12
|
+
whatever class the caller named, while the field's own published docblock promised "what the record
|
|
13
|
+
honestly supports, not what the caller asked for". It is now the highest class every one of whose required
|
|
14
|
+
steps is `proved`, `TC-0` on any failure, computed from the steps alone: neither capped by the claim (rungs
|
|
15
|
+
that reach TC-3 read TC-3 where the caller claimed TC-2) nor lifted by it. White paper #4 §5 defines the
|
|
16
|
+
class of a transaction as "the highest class whose criteria it fully meets", and this is that.
|
|
17
|
+
|
|
18
|
+
The claim is not discarded — the report gains **`claimedClass`**, a required member, because `verified`
|
|
19
|
+
answers "did the record reach the class it claimed?" and cannot be read without it. The two fields are the
|
|
20
|
+
report's two halves: an input echoed, and a finding computed. Where they differ, the record did not reach
|
|
21
|
+
its own shape. An out-of-taxonomy claim now lands only in the echo and can no longer masquerade as a
|
|
22
|
+
finding.
|
|
23
|
+
|
|
24
|
+
**UCP can advertise a terms URL.** Its policy object declares `url` — "Optional link to the full policy
|
|
25
|
+
document", `format: uri` — on the very entry this placement writes, and §C.3's illustration carries `url`
|
|
26
|
+
and `atrHash` side by side there. The manifest previously said the protocol had no slot, citing `links[]`,
|
|
27
|
+
which §C.3 separates as "a standing page, not a per-transaction record". The obstacle was mechanical:
|
|
28
|
+
`termsUrlFields` addresses document paths, and a tagged-array entry's index is chosen at write time. The
|
|
29
|
+
`tagged-array` container therefore gains `termsUrlField`, written onto the same entry in the same write, and
|
|
30
|
+
read back through the same first-match rule. UCP was the last shipped protocol that refused an
|
|
31
|
+
advertisement carrying its own locator (integra-protocol#8).
|
|
32
|
+
|
|
33
|
+
**`readUcpProfile` no longer refuses a conformant business profile.** `requireHttps` mapped an ABSENT `spec`
|
|
34
|
+
to the same branch as a malformed one, and the live host requires `spec` only of a platform declaration —
|
|
35
|
+
as this repository's own README already said. It is now `requireHttpsIfDeclared`: absence is absence, and a
|
|
36
|
+
declared value is still held to the host's https MUST.
|
|
37
|
+
|
|
38
|
+
Also: `requireWritten` replaces an unchecked cast in the x402 override, so a broken postcondition throws
|
|
39
|
+
instead of returning a success carrying no document; six x402 citations move to the revision that actually
|
|
40
|
+
touches the file they name, and a new gate refuses any `owner/repo@sha` in source that `spec-pins.json` does
|
|
41
|
+
not record; four spec citations move from line anchors to section anchors; the escrow binding states why it
|
|
42
|
+
declares no §8.3.1 off-canonical variant, and asserts it; and §C.3's `policies[]` illustration is recorded as
|
|
43
|
+
invalid against the live UCP schema, which shows `description` as a bare string where the host requires an
|
|
44
|
+
object — owed upstream, not a defect here.
|
|
45
|
+
|
|
46
|
+
Corpus 844 → 847, root `ec4ad1b02a81538b…`.
|
|
47
|
+
|
|
48
|
+
- 822190a: Give the terms URL the write path the published set never had, and certify the composition that broke
|
|
49
|
+
without it (integra-protocol#8).
|
|
50
|
+
|
|
51
|
+
A third party assembling a seller from published parts emitted a 402 the published buyer refuses: every
|
|
52
|
+
published reader demanded `legalContextUrl` and no published writer placed it, and the schema
|
|
53
|
+
`placement-x402` inlined onto the wire (`required: ["type","value"]`, closed) contradicted the authority
|
|
54
|
+
document integraledger.com serves (`required: ["type","value","legalContextUrl"]`, closed) — two
|
|
55
|
+
definitions of one `info`, no document valid against both, each package self-consistent. Three structural
|
|
56
|
+
gaps let it ship: the manifest's `termsUrlField` was singular and read-only (declared, hygiene-checked,
|
|
57
|
+
never written — and x402's wire carries the URL in two slots, so one path could not even name the shape),
|
|
58
|
+
nothing compared the inlined schema to the authority document, and the corpus certified `place` and
|
|
59
|
+
`extract` separately but never fed one to the other.
|
|
60
|
+
|
|
61
|
+
`binding-core` — the placement seam now moves an ADVERTISEMENT, not a bare reference. `place` takes
|
|
62
|
+
`{ ref, termsUrl? }` and writes the URL at every slot the manifest's new `termsUrlFields` (plural,
|
|
63
|
+
replacing `termsUrlField`) declares; it REFUSES an integrity-bearing advertisement with no URL where slots
|
|
64
|
+
are declared (a hash no counterparty can resolve is unverifiable by construction), a URL where no slot
|
|
65
|
+
exists (silent dropping is fail-open), and a non-https URL on either side of the seam. `extract` returns
|
|
66
|
+
`{ ref, termsUrl }` with absence as a typed value — `no-field-declared` is a fact about the protocol,
|
|
67
|
+
`declared-fields-empty` a fact about the document, and the gate decides what an absence means — while two
|
|
68
|
+
slots that disagree, or a malformed value in either, refuse. The object-path writer learned to descend
|
|
69
|
+
into an EXISTING array element (never minting one, never extending a list, refusing an index segment it
|
|
70
|
+
would have to create), which is what lets x402's `accepts[0].extra` mirrors land.
|
|
71
|
+
|
|
72
|
+
`placement-x402` — the inlined wire schema now IS the authority document minus `$id` and `$defs`
|
|
73
|
+
(Bazaar forbids both on the wire), drift-gated in `lcp-conformance` where the two packages meet.
|
|
74
|
+
`termsUrlFields` declares both slots the wire carries; the bare-hash alias is written (`extra` stopped
|
|
75
|
+
being wholly scheme-private when x402 §6.1 reserved names inside it, and LCP v1.38 §C.4's own Tier A
|
|
76
|
+
illustration carries the pair there); the `url` carrier admission is withdrawn (`carrierTypes` is
|
|
77
|
+
`sha256` alone — the schema on the wire is `const: "sha256"`, and no shipped reader ever accepted a url
|
|
78
|
+
in this slot). The `place` override shrinks to composition: the kit performs the whole placement and the
|
|
79
|
+
override adds only the `{info, schema}` wrapper.
|
|
80
|
+
|
|
81
|
+
`placement-mpp` / `placement-acp` — the singular member becomes the one-entry `termsUrlFields`; the kit
|
|
82
|
+
now writes the slot their buyer parsers always demanded and refuses first at the seller.
|
|
83
|
+
|
|
84
|
+
`lcp-conformance` — the corpus grows 812 → 844: a `roundtrip` op (place then extract in one case, the
|
|
85
|
+
composition certification whose absence let two separately-conformant halves ship jointly broken),
|
|
86
|
+
advertisement-rule refusals for every manifest, and the authority↔wire drift gate. Extract expectations
|
|
87
|
+
across every placement area become the extracted advertisement.
|
|
88
|
+
|
|
89
|
+
`lcp-verify` — `referencePlacementStep` reads the advertisement (`extracted.ref.value`) and deliberately
|
|
90
|
+
ignores `termsUrl`: where the terms live is the gate's fetch concern, not a fact the record can
|
|
91
|
+
contradict.
|
|
92
|
+
|
|
93
|
+
`lcp-discovery` — the x402 authority document restates the atrHash pattern inline in both definitions
|
|
94
|
+
(no `$defs` indirection the wire copy would have to rewrite) and moves the two-definitions rationale into
|
|
95
|
+
`$defs.receipt`, so the challenge-time root is byte-derivable for the wire.
|
|
96
|
+
|
|
97
|
+
### Patch Changes
|
|
98
|
+
|
|
99
|
+
- Updated dependencies [b2ffecc]
|
|
100
|
+
- Updated dependencies [822190a]
|
|
101
|
+
- @integraledger/lcp-binding-core@0.11.0
|
|
102
|
+
- @integraledger/lcp-authority@0.10.2
|
|
103
|
+
- @integraledger/lcp-kernel@0.11.0
|
|
104
|
+
|
|
105
|
+
## 0.10.1
|
|
106
|
+
|
|
107
|
+
**0.10.0 was staged and withdrawn before approval; this is that release, re-cut.** The conformance corpus
|
|
108
|
+
was re-sealed after 0.10.0 was staged — its root moved `32fa90a6…` → `28bbf4ef…` when the vector tree was
|
|
109
|
+
brought inside the prose gates — so the staged `lcp-conformance` tarball carried a seal that no longer
|
|
110
|
+
matched the repository. The seal is what proves corpus authenticity to an independent implementer, and a
|
|
111
|
+
published version cannot be replaced, so the whole set was rejected and re-cut rather than shipping one
|
|
112
|
+
package that disagreed with its own source. No version 0.10.0 exists on the registry.
|
|
113
|
+
|
|
114
|
+
Released as part of a flat `0.10.1` across the whole suite. One number describes the set that was built,
|
|
115
|
+
tested and sealed together, so a consumer never has to work out which combination of versions was verified.
|
|
116
|
+
|
|
117
|
+
This package has no source change of its own in this release. What moved across the suite: three exported
|
|
118
|
+
names were corrected before anyone depends on them — `USDC_DECIMALS` became rail-qualified after it was
|
|
119
|
+
found to mean 6 on three rails and 7 on Stellar under one name, `VISA_TAP_PLACEMENT_TIER_A` lost the tier
|
|
120
|
+
it had baked into an identifier, and the memo codecs were named for the carrier they encode. Two wire
|
|
121
|
+
identities were respelled to match the vocabulary they are written into. Five gates were added or widened,
|
|
122
|
+
and a large number of documentation claims were corrected against the host specifications at HEAD.
|
|
123
|
+
|
|
3
124
|
## 0.9.0
|
|
4
125
|
|
|
5
126
|
First public release.
|
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ const report = await verify({
|
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
```
|
|
35
|
-
verified: false | supportedClass: TC-
|
|
35
|
+
verified: false | claimedClass: TC-2 | supportedClass: TC-0
|
|
36
36
|
atr-fingerprint proved
|
|
37
37
|
settlement-enumeration proved
|
|
38
38
|
buyer-acceptance not-attempted no-acceptance
|
|
@@ -62,16 +62,22 @@ contradiction.
|
|
|
62
62
|
An acceptance presented without a signature verifier is `not-attempted("no-signature-verifier")`, because
|
|
63
63
|
a signature nobody checked is not evidence of a signature.
|
|
64
64
|
|
|
65
|
-
## `verified`
|
|
65
|
+
## `verified` is a verdict about a claim; `supportedClass` is a finding
|
|
66
66
|
|
|
67
67
|
At the default `depth: "structural"`, `verified` is **always** `false`. A structural walk is a
|
|
68
68
|
presence-and-absence readout; it cannot raise a verdict. Passing `depth: "mechanical"` — where the caller
|
|
69
69
|
has supplied live ports — lets `verified` become an honest function of the walk: true only when every
|
|
70
70
|
class-required step is `proved` and none `failed`.
|
|
71
71
|
|
|
72
|
-
`supportedClass`
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
`supportedClass` is different in kind: it is a FINDING, computed from the steps alone as the highest class
|
|
73
|
+
every one of whose required rungs is `proved`, and `TC-0` the moment any step fails. The claim neither caps
|
|
74
|
+
it nor lifts it — a record proving nothing reads `TC-0` however high the caller aimed, and one whose rungs
|
|
75
|
+
reach past the claim reads what they reach. `claimedClass` is echoed beside it so `verified`, which answers
|
|
76
|
+
"did the record reach the class it claimed?", can be read at all.
|
|
77
|
+
|
|
78
|
+
Step outcomes are depth-agnostic, so `depth` governs `verified` and never the class. A rung that is
|
|
79
|
+
`not-attempted` says something about this walk's inputs, not about the record — which is why the reason
|
|
80
|
+
rides each step and why `steps` is the thing to read before either summary.
|
|
75
81
|
|
|
76
82
|
A forged input cannot produce a `proved`. Signature verification that throws deep in curve math over
|
|
77
83
|
corrupted bytes is reported as a failure, not propagated as a crash — a verifier that dies on a forgery
|
package/dist/index.d.ts
CHANGED
|
@@ -6,11 +6,14 @@
|
|
|
6
6
|
*
|
|
7
7
|
* At STRUCTURAL depth `verified` is always `false` (a presence/absence readout → class, not a verdict).
|
|
8
8
|
* At MECHANICAL depth `verified` is an honest function of the walk via `computeVerified` — raised `true`
|
|
9
|
-
* iff every
|
|
9
|
+
* iff every step required by the CLAIMED class is `proved` and no step `failed`.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* The report separates what was asked from what was found. `claimedClass` is the caller's input, echoed
|
|
12
|
+
* verbatim. `supportedClass` is the walk's own finding via `computeSupportedClass` — the highest class
|
|
13
|
+
* whose every required step is `proved`, `TC-0` on any failure. The claim neither caps nor lifts it, so a
|
|
14
|
+
* record that proves nothing reads `TC-0` however high the caller aimed, and one whose rungs reach past the
|
|
15
|
+
* claim reads what it reached. Step outcomes are depth-agnostic (see `steps.ts`), so this holds at both
|
|
16
|
+
* depths: `depth` governs `verified`, never the class.
|
|
14
17
|
*/
|
|
15
18
|
import type { Bounds, ChainWalkResult, SignatureVerifier, SignedAcceptance } from "@integraledger/lcp-authority";
|
|
16
19
|
import { type CompositionInput } from "./composition.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EACV,MAAM,EACN,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,KAAK,gBAAgB,EAMtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAEV,kBAAkB,EAElB,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,aAAa,EAMlB,KAAK,cAAc,EACnB,KAAK,cAAc,EAKpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,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EAAE,SAAS,MAAM,EAAE,CAAC;IAClC;4FACwF;IACxF,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,sGAAsG;IACtG,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;uGAEmG;IACnG,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B;;;yFAGqF;IACrF,SAAS,CAAC,EAAE,cAAc,CAAC;CAC5B;AAED,mIAAmI;AACnI,wBAAsB,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAyG5E;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAIjE"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { discoveryIntegrityStep, frcNonGatingStep, offerBoundStep, operationsStep, proportionalityStep, } from "./composition.js";
|
|
2
|
-
import { computeVerified, } from "./required.js";
|
|
2
|
+
import { computeSupportedClass, computeVerified, } from "./required.js";
|
|
3
3
|
import { acceptanceStep, authorityStep, authorityStepFromWalk, commitmentStep, fingerprintStep, recourseStep, referencePlacementStep, resolvePartyStep, settlementStep, } from "./steps.js";
|
|
4
4
|
export { discoveryIntegrityStep, frcNonGatingStep, offerBoundStep, operationsStep, proportionalityStep, readCompositionSlots, } from "./composition.js";
|
|
5
5
|
export { jcsCanonicalize, serializeReport, } from "./report.js";
|
|
@@ -39,7 +39,8 @@ export async function verify(input) {
|
|
|
39
39
|
];
|
|
40
40
|
// Append the TC-4 composition steps ONLY when a composition slot is supplied — the slot is additive:
|
|
41
41
|
// a TC-0..TC-3 report that supplies none is byte-identical to one produced without the slot existing.
|
|
42
|
-
// The appended steps flow through the same `
|
|
42
|
+
// The appended steps flow through the same `computeSupportedClass`/`computeVerified` machinery as every
|
|
43
|
+
// other, and are the only rungs by which a walk can reach TC-4 at all.
|
|
43
44
|
if (input.composition !== undefined) {
|
|
44
45
|
steps.push({ name: "offer-bound", outcome: offerBoundStep(input.composition) }, { name: "operations-bound", outcome: operationsStep(input.composition) }, {
|
|
45
46
|
name: "discovery-integrity",
|
|
@@ -55,16 +56,16 @@ export async function verify(input) {
|
|
|
55
56
|
// Append the reference-placement step ONLY when a placement slot is supplied — its own `if`, because a
|
|
56
57
|
// placement is independent of a composition and a record may carry either, both, or neither. Absent ⇒
|
|
57
58
|
// nothing is appended and existing reports stay byte-identical, which is what makes the slot additive.
|
|
58
|
-
// Supplied ⇒ it flows through the same `
|
|
59
|
-
// a placement that CONTRADICTS the record impeaches `supportedClass` to TC-0 — the one
|
|
60
|
-
// grants it
|
|
59
|
+
// Supplied ⇒ it flows through the same `computeSupportedClass`/`computeVerified` machinery as every
|
|
60
|
+
// other step, so a placement that CONTRADICTS the record impeaches `supportedClass` to TC-0 — the one
|
|
61
|
+
// power the step grants it, since no class requires it and it can therefore only pull the answer down.
|
|
62
|
+
// Without this block the step would appear in no report and impeach nothing.
|
|
61
63
|
if (input.placement !== undefined) {
|
|
62
64
|
steps.push({
|
|
63
65
|
name: "reference-placement",
|
|
64
66
|
outcome: referencePlacementStep(input.placement, input.settledAtrHash),
|
|
65
67
|
});
|
|
66
68
|
}
|
|
67
|
-
const anyFailed = steps.some((s) => s.outcome.status === "failed");
|
|
68
69
|
const found = input.settlements ?? [];
|
|
69
70
|
const depth = input.depth ?? "structural";
|
|
70
71
|
const claimed = input.claimedClass ?? "TC-2";
|
|
@@ -86,7 +87,8 @@ export async function verify(input) {
|
|
|
86
87
|
// the SAME token `resolvePartyStep` emits for this condition (steps.ts), so absence has one spelling
|
|
87
88
|
// across the step and the report instead of contradicting itself inside a single run.
|
|
88
89
|
assurance: input.identity?.buyer?.assurance ?? "no-assurance-stated",
|
|
89
|
-
|
|
90
|
+
claimedClass: claimed,
|
|
91
|
+
supportedClass: computeSupportedClass(stepsForVerified),
|
|
90
92
|
asOf: input.asOf,
|
|
91
93
|
steps,
|
|
92
94
|
coverage: input.coverage,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAuBA,OAAO,EAEL,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAO1B,OAAO,EACL,qBAAqB,EACrB,eAAe,GAGhB,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,eAAe,EAGf,YAAY,EACZ,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB,OAAO,EAGL,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,eAAe,EAEf,eAAe,GAIhB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,cAAc,GAGf,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,eAAe,EAEf,mBAAmB,EAEnB,YAAY,EACZ,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,GACf,MAAM,YAAY,CAAC;AAyEpB,mIAAmI;AACnI,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,KAAkB;IAC7C,IAAI,KAAK,CAAC,aAAa,KAAK,SAAS,IAAI,KAAK,CAAC,cAAc,KAAK,SAAS;QACzE,MAAM,IAAI,KAAK,CACb,qMAAqM,CACtM,CAAC;IACJ,MAAM,KAAK,GAAuB;QAChC;YACE,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,MAAM,eAAe,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,cAAc,CAAC;SACrE;QACD;YACE,IAAI,EAA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D,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,KAAK;QACL,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,WAAW,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;KAC1D,CAAC;AACJ,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,aAAa,CAAC,MAA0B;IACtD,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CACtB,CAAC,CAAmB,EAAE,EAAE,CAAE,CAAC,CAAC,OAAuB,CAAC,MAAM,KAAK,QAAQ,CACxE,CAAC;AACJ,CAAC"}
|
package/dist/report.d.ts
CHANGED
|
@@ -37,9 +37,11 @@ export interface VerificationStep {
|
|
|
37
37
|
*
|
|
38
38
|
* Read `steps` before `verified`. `verified` is a summary that is FALSE at structural depth by
|
|
39
39
|
* construction, so a `false` may mean "impeached" or merely "not attempted mechanically", and only the
|
|
40
|
-
* step list distinguishes them. `supportedClass`
|
|
41
|
-
*
|
|
42
|
-
*
|
|
40
|
+
* step list distinguishes them. `claimedClass` and `supportedClass` are the report's two halves and must
|
|
41
|
+
* never be read as one: the first is the caller's input, echoed so the walk can be interpreted; the second
|
|
42
|
+
* is the walk's own finding. Where they differ, the record did not reach what it was shaped for. Several
|
|
43
|
+
* fields are `string` rather than a union on purpose: this type has to be able to hold another
|
|
44
|
+
* implementation's answer, including a wrong one. */
|
|
43
45
|
export interface VerificationReport {
|
|
44
46
|
/** Honest function of depth: `false` at structural (presence/absence → class); at mechanical, raised by
|
|
45
47
|
* `computeVerified` iff every class-required step is `proved` and none `failed`. */
|
|
@@ -50,7 +52,14 @@ export interface VerificationReport {
|
|
|
50
52
|
* reason `supportedClass` is: a foreign implementation's report must be representable before it can be
|
|
51
53
|
* compared, and a type that refuses to hold a wrong value cannot report one. */
|
|
52
54
|
assurance: string;
|
|
53
|
-
/** The
|
|
55
|
+
/** The class the record was shaped for, as the caller stated it — the walk's INPUT, echoed so `verified`
|
|
56
|
+
* can be read at all (it answers "did the record reach THIS class?"). A caller that states none is
|
|
57
|
+
* verified against `TC-2`, and that effective value is what appears here. Never a finding: nothing in
|
|
58
|
+
* the walk can change it. */
|
|
59
|
+
claimedClass: string;
|
|
60
|
+
/** The class the walk reached — the highest one whose every required step is `proved`, `TC-0` if any step
|
|
61
|
+
* failed. A FINDING, computed from the steps alone: it is not capped by `claimedClass` and not lifted by
|
|
62
|
+
* it. Compare the two to learn whether the record met its own shape. */
|
|
54
63
|
supportedClass: string;
|
|
55
64
|
/** The settlement's chain-anchored time every validity check is evaluated against. */
|
|
56
65
|
asOf: string;
|
package/dist/report.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE;qFACqF;AACrF,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,YAAY,CAAC;AAEtD,wDAAwD;AACxD,MAAM,MAAM,WAAW,GACnB;IAAE,MAAM,EAAE,QAAQ,CAAA;CAAE,GACpB;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,GAC1C;IAAE,MAAM,EAAE,eAAe,CAAA;CAAE,GAC3B;IAAE,MAAM,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/C;;iGAEiG;AACjG,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,WAAW,CAAC;CACtB;AAED
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE;qFACqF;AACrF,MAAM,MAAM,WAAW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AM,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|
package/dist/required.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { VerifyDepth } from "./report.js";
|
|
2
2
|
export type { VerifyDepth };
|
|
3
3
|
/** The transaction-class ladder. Higher classes require strictly more steps, so a record supporting TC-3
|
|
4
|
-
* supports every class below it. A class is a
|
|
5
|
-
*
|
|
4
|
+
* supports every class below it. A class is never a quality score: it names which rungs a record carries,
|
|
5
|
+
* and a record reaches the class its proved rungs reach — no more, and no less because a caller named
|
|
6
|
+
* something else. */
|
|
6
7
|
export type TransactionClass = "TC-0" | "TC-1" | "TC-2" | "TC-3" | "TC-4";
|
|
7
8
|
/** Every step the walk can append, in one closed union. Closed because `REQUIRED_STEPS` is keyed by these
|
|
8
9
|
* names and a typo would silently make a required step unfindable — which `computeVerified` would read as
|
|
@@ -34,6 +35,29 @@ export type StepName = "atr-fingerprint" | "settlement-enumeration" | "buyer-acc
|
|
|
34
35
|
* but its ABSENCE never blocks (FRC is a downstream consequence, not a v1 requirement).
|
|
35
36
|
*/
|
|
36
37
|
export declare const REQUIRED_STEPS: Record<TransactionClass, readonly StepName[]>;
|
|
38
|
+
/**
|
|
39
|
+
* The class the walk actually reached: the highest one every required step of which is `proved`.
|
|
40
|
+
*
|
|
41
|
+
* This is the report's `supportedClass`, and it is a FINDING — computed from the steps alone, never from
|
|
42
|
+
* what the caller said the record was shaped for. White paper #4 §5 defines the class of a transaction as
|
|
43
|
+
* "the highest class whose criteria it fully meets", so the answer is neither capped by the claim (a record
|
|
44
|
+
* whose rungs reach TC-3 supports TC-3 even where the caller claimed TC-2) nor floored by it (a record that
|
|
45
|
+
* proves nothing supports TC-0 however high the caller aimed).
|
|
46
|
+
*
|
|
47
|
+
* Any `failed` step ⇒ `TC-0`, whatever else proved. A contradicted rung impeaches the record rather than
|
|
48
|
+
* merely failing to lift it, which is the one power the impeachment-only steps (`frc-non-gating`,
|
|
49
|
+
* `reference-placement`) hold: they are required by no class, so they can only ever pull the answer down.
|
|
50
|
+
*
|
|
51
|
+
* Only `proved` counts. `not-attempted` and `indeterminate` never lift a class — but they also say nothing
|
|
52
|
+
* about the record, only about what this walk was given, and the reason rides in each step's own
|
|
53
|
+
* `depth` token. Read `steps` to tell "the record lacks this rung" from "this verifier was handed no port".
|
|
54
|
+
*/
|
|
55
|
+
export declare function computeSupportedClass(steps: readonly {
|
|
56
|
+
name: StepName;
|
|
57
|
+
outcome: {
|
|
58
|
+
status: string;
|
|
59
|
+
};
|
|
60
|
+
}[]): TransactionClass;
|
|
37
61
|
/** Whether a walk affirms the claimed class. Three rules, in order: **structural depth is always `false`**
|
|
38
62
|
* (a presence/absence readout never affirms liveness), any `failed` step impeaches the whole walk, and
|
|
39
63
|
* otherwise every step required by the claimed class must be `proved`. A step that is absent, or
|
package/dist/required.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"required.d.ts","sourceRoot":"","sources":["../src/required.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,YAAY,EAAE,WAAW,EAAE,CAAC;AAC5B
|
|
1
|
+
{"version":3,"file":"required.d.ts","sourceRoot":"","sources":["../src/required.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,YAAY,EAAE,WAAW,EAAE,CAAC;AAC5B;;;sBAGsB;AACtB,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAC1E;;2DAE2D;AAC3D,MAAM,MAAM,QAAQ,GAChB,iBAAiB,GACjB,wBAAwB,GACxB,kBAAkB,GAClB,uBAAuB,GACvB,oBAAoB,GACpB,oBAAoB,GACpB,eAAe,GAEf,aAAa,GACb,kBAAkB,GAClB,qBAAqB,GACrB,0BAA0B,GAC1B,gBAAgB,GAMhB,qBAAqB,CAAC;AAe1B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,gBAAgB,EAAE,SAAS,QAAQ,EAAE,CAYxE,CAAC;AAWF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,EAAE,GAChE,gBAAgB,CASlB;AAED;;;oEAGoE;AACpE,wBAAgB,eAAe,CAC7B,KAAK,EAAE,SAAS;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,EAAE,EACjE,YAAY,EAAE,gBAAgB,EAC9B,KAAK,EAAE,WAAW,GACjB,OAAO,CAOT"}
|
package/dist/required.js
CHANGED
|
@@ -48,6 +48,41 @@ export const REQUIRED_STEPS = {
|
|
|
48
48
|
"proportionality-declared",
|
|
49
49
|
],
|
|
50
50
|
};
|
|
51
|
+
/** The ladder from the top down. `TC-0` is deliberately absent: it requires nothing, so it is the floor
|
|
52
|
+
* {@link computeSupportedClass} falls to rather than a rung anything has to clear. */
|
|
53
|
+
const LADDER_DESCENDING = [
|
|
54
|
+
"TC-4",
|
|
55
|
+
"TC-3",
|
|
56
|
+
"TC-2",
|
|
57
|
+
"TC-1",
|
|
58
|
+
];
|
|
59
|
+
/**
|
|
60
|
+
* The class the walk actually reached: the highest one every required step of which is `proved`.
|
|
61
|
+
*
|
|
62
|
+
* This is the report's `supportedClass`, and it is a FINDING — computed from the steps alone, never from
|
|
63
|
+
* what the caller said the record was shaped for. White paper #4 §5 defines the class of a transaction as
|
|
64
|
+
* "the highest class whose criteria it fully meets", so the answer is neither capped by the claim (a record
|
|
65
|
+
* whose rungs reach TC-3 supports TC-3 even where the caller claimed TC-2) nor floored by it (a record that
|
|
66
|
+
* proves nothing supports TC-0 however high the caller aimed).
|
|
67
|
+
*
|
|
68
|
+
* Any `failed` step ⇒ `TC-0`, whatever else proved. A contradicted rung impeaches the record rather than
|
|
69
|
+
* merely failing to lift it, which is the one power the impeachment-only steps (`frc-non-gating`,
|
|
70
|
+
* `reference-placement`) hold: they are required by no class, so they can only ever pull the answer down.
|
|
71
|
+
*
|
|
72
|
+
* Only `proved` counts. `not-attempted` and `indeterminate` never lift a class — but they also say nothing
|
|
73
|
+
* about the record, only about what this walk was given, and the reason rides in each step's own
|
|
74
|
+
* `depth` token. Read `steps` to tell "the record lacks this rung" from "this verifier was handed no port".
|
|
75
|
+
*/
|
|
76
|
+
export function computeSupportedClass(steps) {
|
|
77
|
+
if (steps.some((s) => s.outcome.status === "failed"))
|
|
78
|
+
return "TC-0";
|
|
79
|
+
const proved = new Set(steps.filter((s) => s.outcome.status === "proved").map((s) => s.name));
|
|
80
|
+
for (const cls of LADDER_DESCENDING) {
|
|
81
|
+
if (REQUIRED_STEPS[cls].every((name) => proved.has(name)))
|
|
82
|
+
return cls;
|
|
83
|
+
}
|
|
84
|
+
return "TC-0";
|
|
85
|
+
}
|
|
51
86
|
/** Whether a walk affirms the claimed class. Three rules, in order: **structural depth is always `false`**
|
|
52
87
|
* (a presence/absence readout never affirms liveness), any `failed` step impeaches the whole walk, and
|
|
53
88
|
* otherwise every step required by the claimed class must be `proved`. A step that is absent, or
|
package/dist/required.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"required.js","sourceRoot":"","sources":["../src/required.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"required.js","sourceRoot":"","sources":["../src/required.ts"],"names":[],"mappings":"AAgCA,0EAA0E;AAC1E,MAAM,GAAG,GAAwB,CAAC,wBAAwB,EAAE,eAAe,CAAC,CAAC;AAC7E,gHAAgH;AAChH,MAAM,GAAG,GAAwB,CAAC,GAAG,GAAG,EAAE,iBAAiB,CAAC,CAAC;AAC7D,yEA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EACjE,YAA8B,EAC9B,KAAkB;IAElB,IAAI,KAAK,KAAK,YAAY;QAAE,OAAO,KAAK,CAAC,CAAC,gEAAgE;IAC1G,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC;QAAE,OAAO,KAAK,CAAC,CAAC,wBAAwB;IAC5F,MAAM,QAAQ,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC9C,OAAO,QAAQ,CAAC,KAAK,CACnB,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,KAAK,QAAQ,CAC1E,CAAC;AACJ,CAAC"}
|
package/dist/steps.d.ts
CHANGED
|
@@ -161,7 +161,10 @@ export declare function recourseStep(atrBytes: Uint8Array | undefined, evidenceR
|
|
|
161
161
|
*/
|
|
162
162
|
export declare function resolvePartyStep(identity: RecordIdentity | undefined): StepOutcome;
|
|
163
163
|
/** The placement slot: what a commerce protocol's own document yielded, and nothing else. `extracted` is
|
|
164
|
-
* the `
|
|
164
|
+
* the `ExtractedAdvertisement` a `ReferencePlacementAdapter.extract` returned — the reference under
|
|
165
|
+
* `ref`, the terms-URL reading beside it. This step compares the REFERENCE against the record
|
|
166
|
+
* fingerprint and deliberately ignores `termsUrl`: where the terms live is the gate's fetch concern,
|
|
167
|
+
* not a fact the record can contradict. Absent ⇒ the step is a gap. */
|
|
165
168
|
export interface PlacementInput {
|
|
166
169
|
readonly extracted?: unknown;
|
|
167
170
|
}
|
package/dist/steps.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../src/steps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,O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0Bb;AAED;;;;wEAIwE;AACxE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,cAAc,GAAG,SAAS,EACrC,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,WAAW,CA+Bb"}
|
package/dist/steps.js
CHANGED
|
@@ -361,9 +361,12 @@ export function referencePlacementStep(placement, settledAtrHash) {
|
|
|
361
361
|
const extracted = placement.extracted;
|
|
362
362
|
if (extracted === undefined)
|
|
363
363
|
return { status: "not-attempted", depth: "no-reference-extracted" };
|
|
364
|
-
|
|
365
|
-
extracted
|
|
366
|
-
|
|
364
|
+
const ref = typeof extracted === "object" && extracted !== null
|
|
365
|
+
? extracted.ref
|
|
366
|
+
: undefined;
|
|
367
|
+
if (typeof ref !== "object" ||
|
|
368
|
+
ref === null ||
|
|
369
|
+
typeof ref.value !== "string")
|
|
367
370
|
return { status: "not-attempted", depth: "malformed-extracted-reference" };
|
|
368
371
|
if (typeof settledAtrHash !== "string")
|
|
369
372
|
return { status: "not-attempted", depth: "no-record-fingerprint" };
|
|
@@ -376,8 +379,7 @@ export function referencePlacementStep(placement, settledAtrHash) {
|
|
|
376
379
|
const lower = h.toLowerCase();
|
|
377
380
|
return lower.startsWith("0x") ? lower : `0x${lower}`;
|
|
378
381
|
};
|
|
379
|
-
if (canonical(
|
|
380
|
-
canonical(settledAtrHash))
|
|
382
|
+
if (canonical(ref.value) !== canonical(settledAtrHash))
|
|
381
383
|
return { status: "failed", haltClass: "verification-failure" };
|
|
382
384
|
return { status: "proved" };
|
|
383
385
|
}
|
package/dist/steps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../src/steps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EA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AAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC,CAAC,qDAAqD;IACzE,CAAC;IACD,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QACxE,OAAO,SAAS,CAAC;IACnB,MAAM,QAAQ,GAAG,MAAiC,CAAC;IACnD,wGAAwG;IACxG,2CAA2C;IAC3C,OAAO,OAAO,QAAQ,CAAC,KAAK,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;AACpE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@integraledger/lcp-verify",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "The LCP verification walk, and the canonical report it emits.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lcp",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://github.com/IntegraLedger/integra-protocol/tree/main/packages/verify#readme",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@integraledger/lcp-authority": "0.
|
|
44
|
-
"@integraledger/lcp-binding-core": "0.
|
|
45
|
-
"@integraledger/lcp-kernel": "0.
|
|
43
|
+
"@integraledger/lcp-authority": "0.10.2",
|
|
44
|
+
"@integraledger/lcp-binding-core": "0.11.0",
|
|
45
|
+
"@integraledger/lcp-kernel": "0.11.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/node": "24.13.3",
|
package/src/index.ts
CHANGED
|
@@ -6,11 +6,14 @@
|
|
|
6
6
|
*
|
|
7
7
|
* At STRUCTURAL depth `verified` is always `false` (a presence/absence readout → class, not a verdict).
|
|
8
8
|
* At MECHANICAL depth `verified` is an honest function of the walk via `computeVerified` — raised `true`
|
|
9
|
-
* iff every
|
|
9
|
+
* iff every step required by the CLAIMED class is `proved` and no step `failed`.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* The report separates what was asked from what was found. `claimedClass` is the caller's input, echoed
|
|
12
|
+
* verbatim. `supportedClass` is the walk's own finding via `computeSupportedClass` — the highest class
|
|
13
|
+
* whose every required step is `proved`, `TC-0` on any failure. The claim neither caps nor lifts it, so a
|
|
14
|
+
* record that proves nothing reads `TC-0` however high the caller aimed, and one whose rungs reach past the
|
|
15
|
+
* claim reads what it reached. Step outcomes are depth-agnostic (see `steps.ts`), so this holds at both
|
|
16
|
+
* depths: `depth` governs `verified`, never the class.
|
|
14
17
|
*/
|
|
15
18
|
import type {
|
|
16
19
|
Bounds,
|
|
@@ -33,6 +36,7 @@ import type {
|
|
|
33
36
|
VerifyDepth,
|
|
34
37
|
} from "./report.js";
|
|
35
38
|
import {
|
|
39
|
+
computeSupportedClass,
|
|
36
40
|
computeVerified,
|
|
37
41
|
type StepName,
|
|
38
42
|
type TransactionClass,
|
|
@@ -205,7 +209,8 @@ export async function verify(input: VerifyInput): Promise<VerificationReport> {
|
|
|
205
209
|
|
|
206
210
|
// Append the TC-4 composition steps ONLY when a composition slot is supplied — the slot is additive:
|
|
207
211
|
// a TC-0..TC-3 report that supplies none is byte-identical to one produced without the slot existing.
|
|
208
|
-
// The appended steps flow through the same `
|
|
212
|
+
// The appended steps flow through the same `computeSupportedClass`/`computeVerified` machinery as every
|
|
213
|
+
// other, and are the only rungs by which a walk can reach TC-4 at all.
|
|
209
214
|
if (input.composition !== undefined) {
|
|
210
215
|
steps.push(
|
|
211
216
|
{ name: "offer-bound", outcome: offerBoundStep(input.composition) },
|
|
@@ -228,9 +233,10 @@ export async function verify(input: VerifyInput): Promise<VerificationReport> {
|
|
|
228
233
|
// Append the reference-placement step ONLY when a placement slot is supplied — its own `if`, because a
|
|
229
234
|
// placement is independent of a composition and a record may carry either, both, or neither. Absent ⇒
|
|
230
235
|
// nothing is appended and existing reports stay byte-identical, which is what makes the slot additive.
|
|
231
|
-
// Supplied ⇒ it flows through the same `
|
|
232
|
-
// a placement that CONTRADICTS the record impeaches `supportedClass` to TC-0 — the one
|
|
233
|
-
// grants it
|
|
236
|
+
// Supplied ⇒ it flows through the same `computeSupportedClass`/`computeVerified` machinery as every
|
|
237
|
+
// other step, so a placement that CONTRADICTS the record impeaches `supportedClass` to TC-0 — the one
|
|
238
|
+
// power the step grants it, since no class requires it and it can therefore only pull the answer down.
|
|
239
|
+
// Without this block the step would appear in no report and impeach nothing.
|
|
234
240
|
if (input.placement !== undefined) {
|
|
235
241
|
steps.push({
|
|
236
242
|
name: "reference-placement",
|
|
@@ -238,7 +244,6 @@ export async function verify(input: VerifyInput): Promise<VerificationReport> {
|
|
|
238
244
|
});
|
|
239
245
|
}
|
|
240
246
|
|
|
241
|
-
const anyFailed = steps.some((s) => s.outcome.status === "failed");
|
|
242
247
|
const found = input.settlements ?? [];
|
|
243
248
|
const depth = input.depth ?? "structural";
|
|
244
249
|
const claimed = input.claimedClass ?? "TC-2";
|
|
@@ -261,7 +266,8 @@ export async function verify(input: VerifyInput): Promise<VerificationReport> {
|
|
|
261
266
|
// the SAME token `resolvePartyStep` emits for this condition (steps.ts), so absence has one spelling
|
|
262
267
|
// across the step and the report instead of contradicting itself inside a single run.
|
|
263
268
|
assurance: input.identity?.buyer?.assurance ?? "no-assurance-stated",
|
|
264
|
-
|
|
269
|
+
claimedClass: claimed,
|
|
270
|
+
supportedClass: computeSupportedClass(stepsForVerified),
|
|
265
271
|
asOf: input.asOf,
|
|
266
272
|
steps,
|
|
267
273
|
coverage: input.coverage,
|
package/src/report.ts
CHANGED
|
@@ -35,9 +35,11 @@ export interface VerificationStep {
|
|
|
35
35
|
*
|
|
36
36
|
* Read `steps` before `verified`. `verified` is a summary that is FALSE at structural depth by
|
|
37
37
|
* construction, so a `false` may mean "impeached" or merely "not attempted mechanically", and only the
|
|
38
|
-
* step list distinguishes them. `supportedClass`
|
|
39
|
-
*
|
|
40
|
-
*
|
|
38
|
+
* step list distinguishes them. `claimedClass` and `supportedClass` are the report's two halves and must
|
|
39
|
+
* never be read as one: the first is the caller's input, echoed so the walk can be interpreted; the second
|
|
40
|
+
* is the walk's own finding. Where they differ, the record did not reach what it was shaped for. Several
|
|
41
|
+
* fields are `string` rather than a union on purpose: this type has to be able to hold another
|
|
42
|
+
* implementation's answer, including a wrong one. */
|
|
41
43
|
export interface VerificationReport {
|
|
42
44
|
/** Honest function of depth: `false` at structural (presence/absence → class); at mechanical, raised by
|
|
43
45
|
* `computeVerified` iff every class-required step is `proved` and none `failed`. */
|
|
@@ -48,7 +50,14 @@ export interface VerificationReport {
|
|
|
48
50
|
* reason `supportedClass` is: a foreign implementation's report must be representable before it can be
|
|
49
51
|
* compared, and a type that refuses to hold a wrong value cannot report one. */
|
|
50
52
|
assurance: string;
|
|
51
|
-
/** The
|
|
53
|
+
/** The class the record was shaped for, as the caller stated it — the walk's INPUT, echoed so `verified`
|
|
54
|
+
* can be read at all (it answers "did the record reach THIS class?"). A caller that states none is
|
|
55
|
+
* verified against `TC-2`, and that effective value is what appears here. Never a finding: nothing in
|
|
56
|
+
* the walk can change it. */
|
|
57
|
+
claimedClass: string;
|
|
58
|
+
/** The class the walk reached — the highest one whose every required step is `proved`, `TC-0` if any step
|
|
59
|
+
* failed. A FINDING, computed from the steps alone: it is not capped by `claimedClass` and not lifted by
|
|
60
|
+
* it. Compare the two to learn whether the record met its own shape. */
|
|
52
61
|
supportedClass: string;
|
|
53
62
|
/** The settlement's chain-anchored time every validity check is evaluated against. */
|
|
54
63
|
asOf: string;
|
package/src/required.ts
CHANGED
|
@@ -2,8 +2,9 @@ import type { VerifyDepth } from "./report.js";
|
|
|
2
2
|
|
|
3
3
|
export type { VerifyDepth };
|
|
4
4
|
/** The transaction-class ladder. Higher classes require strictly more steps, so a record supporting TC-3
|
|
5
|
-
* supports every class below it. A class is a
|
|
6
|
-
*
|
|
5
|
+
* supports every class below it. A class is never a quality score: it names which rungs a record carries,
|
|
6
|
+
* and a record reaches the class its proved rungs reach — no more, and no less because a caller named
|
|
7
|
+
* something else. */
|
|
7
8
|
export type TransactionClass = "TC-0" | "TC-1" | "TC-2" | "TC-3" | "TC-4";
|
|
8
9
|
/** Every step the walk can append, in one closed union. Closed because `REQUIRED_STEPS` is keyed by these
|
|
9
10
|
* names and a typo would silently make a required step unfindable — which `computeVerified` would read as
|
|
@@ -81,6 +82,45 @@ export const REQUIRED_STEPS: Record<TransactionClass, readonly StepName[]> = {
|
|
|
81
82
|
],
|
|
82
83
|
};
|
|
83
84
|
|
|
85
|
+
/** The ladder from the top down. `TC-0` is deliberately absent: it requires nothing, so it is the floor
|
|
86
|
+
* {@link computeSupportedClass} falls to rather than a rung anything has to clear. */
|
|
87
|
+
const LADDER_DESCENDING = [
|
|
88
|
+
"TC-4",
|
|
89
|
+
"TC-3",
|
|
90
|
+
"TC-2",
|
|
91
|
+
"TC-1",
|
|
92
|
+
] as const satisfies readonly TransactionClass[];
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The class the walk actually reached: the highest one every required step of which is `proved`.
|
|
96
|
+
*
|
|
97
|
+
* This is the report's `supportedClass`, and it is a FINDING — computed from the steps alone, never from
|
|
98
|
+
* what the caller said the record was shaped for. White paper #4 §5 defines the class of a transaction as
|
|
99
|
+
* "the highest class whose criteria it fully meets", so the answer is neither capped by the claim (a record
|
|
100
|
+
* whose rungs reach TC-3 supports TC-3 even where the caller claimed TC-2) nor floored by it (a record that
|
|
101
|
+
* proves nothing supports TC-0 however high the caller aimed).
|
|
102
|
+
*
|
|
103
|
+
* Any `failed` step ⇒ `TC-0`, whatever else proved. A contradicted rung impeaches the record rather than
|
|
104
|
+
* merely failing to lift it, which is the one power the impeachment-only steps (`frc-non-gating`,
|
|
105
|
+
* `reference-placement`) hold: they are required by no class, so they can only ever pull the answer down.
|
|
106
|
+
*
|
|
107
|
+
* Only `proved` counts. `not-attempted` and `indeterminate` never lift a class — but they also say nothing
|
|
108
|
+
* about the record, only about what this walk was given, and the reason rides in each step's own
|
|
109
|
+
* `depth` token. Read `steps` to tell "the record lacks this rung" from "this verifier was handed no port".
|
|
110
|
+
*/
|
|
111
|
+
export function computeSupportedClass(
|
|
112
|
+
steps: readonly { name: StepName; outcome: { status: string } }[],
|
|
113
|
+
): TransactionClass {
|
|
114
|
+
if (steps.some((s) => s.outcome.status === "failed")) return "TC-0";
|
|
115
|
+
const proved = new Set(
|
|
116
|
+
steps.filter((s) => s.outcome.status === "proved").map((s) => s.name),
|
|
117
|
+
);
|
|
118
|
+
for (const cls of LADDER_DESCENDING) {
|
|
119
|
+
if (REQUIRED_STEPS[cls].every((name) => proved.has(name))) return cls;
|
|
120
|
+
}
|
|
121
|
+
return "TC-0";
|
|
122
|
+
}
|
|
123
|
+
|
|
84
124
|
/** Whether a walk affirms the claimed class. Three rules, in order: **structural depth is always `false`**
|
|
85
125
|
* (a presence/absence readout never affirms liveness), any `failed` step impeaches the whole walk, and
|
|
86
126
|
* otherwise every step required by the claimed class must be `proved`. A step that is absent, or
|
package/src/steps.ts
CHANGED
|
@@ -440,7 +440,10 @@ export function resolvePartyStep(
|
|
|
440
440
|
}
|
|
441
441
|
|
|
442
442
|
/** The placement slot: what a commerce protocol's own document yielded, and nothing else. `extracted` is
|
|
443
|
-
* the `
|
|
443
|
+
* the `ExtractedAdvertisement` a `ReferencePlacementAdapter.extract` returned — the reference under
|
|
444
|
+
* `ref`, the terms-URL reading beside it. This step compares the REFERENCE against the record
|
|
445
|
+
* fingerprint and deliberately ignores `termsUrl`: where the terms live is the gate's fetch concern,
|
|
446
|
+
* not a fact the record can contradict. Absent ⇒ the step is a gap. */
|
|
444
447
|
export interface PlacementInput {
|
|
445
448
|
readonly extracted?: unknown;
|
|
446
449
|
}
|
|
@@ -467,10 +470,14 @@ export function referencePlacementStep(
|
|
|
467
470
|
const extracted: unknown = placement.extracted;
|
|
468
471
|
if (extracted === undefined)
|
|
469
472
|
return { status: "not-attempted", depth: "no-reference-extracted" };
|
|
473
|
+
const ref: unknown =
|
|
474
|
+
typeof extracted === "object" && extracted !== null
|
|
475
|
+
? (extracted as { ref?: unknown }).ref
|
|
476
|
+
: undefined;
|
|
470
477
|
if (
|
|
471
|
-
typeof
|
|
472
|
-
|
|
473
|
-
typeof (
|
|
478
|
+
typeof ref !== "object" ||
|
|
479
|
+
ref === null ||
|
|
480
|
+
typeof (ref as { value?: unknown }).value !== "string"
|
|
474
481
|
)
|
|
475
482
|
return { status: "not-attempted", depth: "malformed-extracted-reference" };
|
|
476
483
|
if (typeof settledAtrHash !== "string")
|
|
@@ -485,10 +492,7 @@ export function referencePlacementStep(
|
|
|
485
492
|
const lower = h.toLowerCase();
|
|
486
493
|
return lower.startsWith("0x") ? lower : `0x${lower}`;
|
|
487
494
|
};
|
|
488
|
-
if (
|
|
489
|
-
canonical((extracted as { value: string }).value) !==
|
|
490
|
-
canonical(settledAtrHash)
|
|
491
|
-
)
|
|
495
|
+
if (canonical((ref as { value: string }).value) !== canonical(settledAtrHash))
|
|
492
496
|
return { status: "failed", haltClass: "verification-failure" };
|
|
493
497
|
return { status: "proved" };
|
|
494
498
|
}
|