Extract a CIP-179 common reusable package - #2
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Records, dedupe, cancellation, proof, audit, answer, govLink and survey aggregation move to cip-179/domain. source.ts keeps the Tessera DataSource seam and list/health payloads; aggregateSurveyList becomes a core adapter over the domain aggregate primitive. @tessera/core re-exports the moved names so downstream importers are unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tally, weightedTally, tallyInput, canonical, wire and artifact move to cip-179/tally. @tessera/core re-exports them and now retains only the Tessera-specific source seam, surveyList adapter, page paging, and config. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
decodeTxProof and the bech32/CIP-129 id helpers move to cip-179/txproof (evolution-sdk optional peer). @tessera/koios imports them directly at its three call sites and drops the re-exports. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The sealed-submission stack (drand math, tlock client, cbor envelope, seal/reveal, padding, size) and its quicknet beacon fixture move to cip-179/tlock. App shims, backend finalize/reveal, and the verifier import cip-179/tlock directly; each now declares the tlock-js/evolution-sdk optional peers it needs. @tessera/tlock is removed from the workspace. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…verifier The serving tier, verifier and koios now import domain/tally/txproof names straight from the cip-179 subpaths instead of routing them through @tessera/core, so the eventual repo split is a no-op for them. @tessera/core keeps only the DataSource seam, list/health payloads, paging, surveyList adapter and config (plus the domain/tally re-export the app still relies on), and drops its now-unused @noble/hashes dependency. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rewrite the cip-179 README around the subpath surface (codec / domain / tally / txproof / tlock), the optional-peer requirements, and the interim tally-artifact spec with a version-to-ruleset-hash compatibility table. Split a build tsconfig so dist ships no test files, and refresh stale doc paths. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The txproof and tlock stacks no longer import a Cardano-serialization library. What they need — canonical metadatum CBOR, tx decode, bech32 / CIP-129 ids — is now two small ports (MetadatumCodec, TxProofCodec) injected by the caller. cip-179 keeps the CIP-179 interpretation (mechanism A/B, Conway voter-tag semantics, native-script hashing) over a library-neutral DecodedTx. evolution-sdk is confined to the new cip-179/evolution adapter, the only module that imports it; it ships evolutionCodec satisfying both ports. Downstream implementers on any other stack (Lucid, Mesh, CSL, …) provide their own codec, never import cip-179/evolution, and never install evolution — while reusing all interpretation logic unchanged. - decodeTxProof / sealAnswers / revealWithBeacon / revealResponses take a codec as their first argument; decodeTxProof is now sync. - Consumers (koios, backend, verifier, app) inject evolutionCodec. - Removes evolution from the cip-179/tlock barrel, so static tlock imports no longer drag the CBOR codec into the bundle. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…anups - cip-179 exports point at src like every sibling package (live workspace edits, no stale-dist tests); dist mappings moved under publishConfig for npm, prepare replaced by prepublishOnly, build cleans dist first (drops orphaned pre-refactor modules from the tarball). - Drop the cip-179 alias blocks from the app's tsconfig/vite/vitest configs; the exports map is now the single source of truth (fixes the missing cip-179/evolution paths entry by construction). - TxProofCodec gains govActionId; DecodedVote carries raw (txIdHex, index) pairs and decodeTxProof filters credential-less voters before encoding — restores main's ordering so an abstain-entry encoding failure can't null a proof with a valid vote, and adapters no longer own CIP-129 encoding. Hoist the gov_action bech32 encoder to module level. - Respond/Survey: import sealAnswers/revealResponses statically (the dynamic import was defeated by the same-file static barrel import); keep only the ~/wallet/cbor gate lazy. Verifier CLI reuses revealResponses. - Docs: core no longer claims to re-export the cip-179 surface; repoint the ARCHITECTURE.md credential-encodings entry; document the optional-peer behavior for prod-only workspace installs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extract a reusable
cip-179packagePulls everything CIP-179-generic out of the app packages into one publishable package,
cip-179(packages/cip179), so other implementations can build on the same codec, domain semantics, and tally — and produce hash-identical result artifacts.cip-179frontend/cip179cip-179/domain@tessera/corecip-179/tally@tessera/corecip-179/txproofTxProofinterpretation +TxProofCodecport@tessera/koioscip-179/tlockMetadatumCodecport@tessera/tlock(deleted)cip-179/evolutionSerialization is injected, not imported:
decodeTxProof/sealAnswers/revealResponsestake a codec object, andcip-179/evolutionships the evolution-sdk implementation — another Cardano stack brings its own and never installs evolution-sdk (it and tlock-js are optional peers).@tessera/coreslims down to the app seam; all consumers import the subpaths directly. Workspace consumption stays live-from-source (exports→src), with the compileddistmapping underpublishConfigfor publishing.