Generate ec.ready / ec.auth types from the OpenRPC spec#330
Draft
markmur wants to merge 4 commits into
Draft
Conversation
26713b9 to
36777cb
Compare
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.
Direction
This branch: generate
ec.ready/ec.authrequest + result types from the OpenRPC spec so codec fidelity can't drift. DropsdelegatefromReadyResult(wire:{ucp,delegate}→{ucp}); delegation negotiation stays on theec_delegateURL 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-writtenRequestDescriptorto coexist, and duplicates theec.readystring.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 deletesMethodDescriptor, the hand descriptor bodies, and the duplicate string. Tracked separately — too big for this branch.