chore(ceremony): preserve the ceremony constructions removed from libid-contracts - #21
chore(ceremony): preserve the ceremony constructions removed from libid-contracts#21xgreenx wants to merge 1 commit into
Conversation
…ct wrappers Removes ts/packages/contracts/src/ceremony/ — 1,616 lines across the §5 Authorization Digest, the §7 derived PKCE verifier, the §9.1 attestation codec with its coverage, framing and uniqueness checks, the platform profiles, and their 686 lines of tests. This package owns the contracts and the TypeScript wrappers around them: typed ABIs, calldata, the concrete types a caller needs to invoke a function. None of what is removed here is that. Nothing in it calls a contract, and nothing in it is needed in order to call one — it is browser runtime protocol code, and libid owns that. Removal is safe because the module had no consumers. Nothing in this repo, in libid, or in handles.link imported it; the only tie was one `export *` in src/index.ts. identity/calls.ts takes `platformId` as a parameter rather than importing the profile constants, so it is unaffected. The code is preserved at libid-org/libid#21, a draft that deliberately does not compile, so nothing is lost by taking it out here. That PR also records what is still unsettled: @libid/ceremony does not exist yet, profile.ts mixes contract-mirroring constants with a server HTTP contract, and that contract currently disagrees with libid#13's SERVER.md. Also removed alongside the module: the ./ceremony export subpath, the `export *` in src/index.ts, and the mentions in the package description and in identity/calls.ts's header. The Solidity under solidity/contracts/ceremony/ is untouched — those are the contracts, and they stay. Signed-off-by: xgreenx <xgreenx9999@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…id-contracts Not a package and not wired up: no package.json, so `pnpm -r build|test|typecheck` skips it. It will not compile as it stands. These 1,616 lines are the only TypeScript implementation of the ceremony wire constructions that exists anywhere — the §5 Authorization Digest, the §7 derived PKCE verifier, the §9.1 attestation codec and its coverage, framing and uniqueness checks — and they were about to be deleted from libid-contracts#13, where they did not belong. This is the copy, so the work survives the removal. libid-contracts owns the contracts and the TypeScript wrappers around them: typed ABIs, calldata, the concrete types a caller needs to invoke a function. None of this is that. Nothing here calls a contract and nothing here is needed in order to call one; it is browser runtime protocol code, which this repository owns. Placement is deliberately left open. @libid/ceremony does not exist yet — its layout is specified in #13, which is documentation only and unmerged — so these files should be reorganized against it rather than adopted as they stand. src/README.md records that, the one import that breaks (../identity/handleVectors.js, generated in libid-contracts), and two open questions worth settling before this becomes real code: profile.ts implements merged specs/platform-ceremonies.md §6.3 while #13's SERVER.md proposes a different route and drops the schema member, and cross-implementation agreement is presently a hex fixture hand-copied into three repositories with nothing checking that the copies match. Signed-off-by: xgreenx <xgreenx9999@gmail.com> Assisted-by: Claude Opus 5
8932fbb to
b142897
Compare
|
Closing: the construction this preserves is superseded.
The branch |
What this is
These files were moved out of libid-org/libid-contracts#13, where they lived at
ts/packages/contracts/src/ceremony/. They are about to be stripped from that PR. This branch is the copy.1,616 lines, seven files:
authorization.tscode_verifierattestation.tsprofile.tsattestation.test.ts,authorization.test.ts,profile.test.tsindex.tsWhy they were removed from libid-contracts
That repository owns the contracts and the TypeScript wrappers around them — typed ABIs, calldata, the concrete types a caller needs to invoke a function. These files are none of those. Nothing here calls a contract, and nothing here is needed in order to call one. It is browser runtime protocol code, which this repository owns.
Removal from libid-contracts is safe because the module has no consumers — nothing in this repo, in handles.link, or in libid-contracts itself imports it. The only tie was a single
export *line.Why it does not compile
profile.tsimports../identity/handleVectors.js, which is generated in libid-contracts fromsolidity/contracts/identity/handles.jsonand does not exist here. That is the only structural break; everything else is self-contained apart fromviemandvitest.There is no
package.json, sopnpm -r build|test|typecheckskips the directory entirely and CI stays green.biome lintandbiome formatboth pass over it as-is.What still has to be decided
Nothing here is settled placement, and this PR is not asking to settle it:
@libid/ceremonydoes not exist yet. Its architecture and module layout are specified in docs(specs): define CCDP and ceremony service contracts #13, which is documentation only and unmerged. When that lands, these files should be reorganized to match it rather than adopted as they stand.profile.tsmixes two things. The pinned platform constants mirrorCeremonyProfile.solin libid-contracts. The token-exchange half —TOKEN_EXCHANGE_ROUTE, the size caps,TokenExchangeRequestV1/ResponseV1and their validators — is the HTTP contract of a server.ts/packages/ceremony/SERVER.mdas proposed there specifiesPOST /api/v1/ceremony/github-tokencarrying noschemamember, while mergedspecs/platform-ceremonies.md§6.3 fixes/oauth/github/token-exchangewithschema: 1. These files implement the merged specification. docs(specs): define CCDP and ceremony service contracts #13's spec diff does not touch §6.3, so as written that PR would merge aSERVER.mdcontradicting a spec section it leaves standing. Worth resolving before either lands.CeremonyAttestation.t.sol, andlibid-rs/crates/libid-ceremony— with nothing checking the copies match. Generating conformance vectors from one source, the way libid-contracts already generates its handle vectors, would fix that.Next step
Strip
ts/packages/contracts/src/ceremony/**and itssrc/index.tsexport from libid-contracts#13.🤖 Generated with Claude Code