Skip to content

feat(ucn): add pail based UCN#664

Open
hannahhoward wants to merge 6 commits intomainfrom
feat/ucn-pail
Open

feat(ucn): add pail based UCN#664
hannahhoward wants to merge 6 commits intomainfrom
feat/ucn-pail

Conversation

@hannahhoward
Copy link
Member

Goals

Provide an out of box way to use Pail with UCAN authorized merkle clocks by expanding the UCN package to support not only raw values but actual pail data structures (and a generics package for future UCN based implementations)

Implementation

We also extract core name/revision logic to a generic

Then we provide a backward compatible implementation of the original package using that generic (a bit messy but didn't want to mess with a breaking change for now)

Then we build a Pail based version of UCN mixing Pail + UCN logic>

The core technique here utilizes the basic logic from Pail's CRDT package, but paired down to it's key contribution -- the "root" method that extracts the current CID from the merkle clock head.

Like the root package, Revisions are not mean to be values until they're realized via Value.from

Like all pail methods you get a diff of blocks -- additions and removals -- whose persistence is left as a separate concern.

For discussion

Still needs tests and some export adjustments, but I like the basic seperate of concerns -- though there remains some weird cross package imports (at this point, I think pail's clock stuff should probably live inside of.... w3clock)

extract core name/revision logic to a generic, then create a pail vase version for using UCN with
pail
@hannahhoward hannahhoward requested a review from alanshaw February 8, 2026 02:24
adds some tests (thanks claude) and also fixes linting issues
@hannahhoward hannahhoward marked this pull request as ready for review February 10, 2026 22:47
@hannahhoward hannahhoward requested a review from travis as a code owner February 10, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant