Skip to content

Generate ec.ready / ec.auth types from the OpenRPC spec#330

Draft
markmur wants to merge 4 commits into
mainfrom
protocol-delegations
Draft

Generate ec.ready / ec.auth types from the OpenRPC spec#330
markmur wants to merge 4 commits into
mainfrom
protocol-delegations

Conversation

@markmur

@markmur markmur commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Direction

This branch: generate ec.ready/ec.auth request + result types from the OpenRPC spec so codec fidelity can't drift. Drops delegate from ReadyResult (wire: {ucp,delegate}{ucp}); delegation negotiation stays on the ec_delegate URL param with implicit acceptance.

Follow-up (not here): three generators exist — quicktype models (Swift/Kotlin/TS) + two hand-rolled OpenRPC catalog walkers (Swift, TS). quicktype only models data shapes, so all method-wiring lives outside it and is copy-pasted per language. That split is what forces MethodDescriptor (untyped string) + a hand-written RequestDescriptor to coexist, and duplicates the ec.ready string.

Target: one OpenRPC-driven pipeline that runs quicktype for shapes and emits typed RequestDescriptors in the same pass — the generator knows the type names because it just assigned them. Collapses 3 generators → 1, gives Kotlin a catalog, and deletes MethodDescriptor, the hand descriptor bodies, and the duplicate string. Tracked separately — too big for this branch.

@markmur markmur changed the title Protocol delegations Generate ec.ready / ec.auth types from the OpenRPC spec Jun 24, 2026
Base automatically changed from support/auth-color-scheme to main June 25, 2026 09:23
@markmur markmur force-pushed the protocol-delegations branch from 26713b9 to 36777cb Compare June 25, 2026 09:23
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