Open
Conversation
Add typed accessors for receiver JsonReply and sender WellKnownError across the core and FFI layers. This lets bindings inspect structured error data without reparsing raw JSON strings. Fix the receiver-side version-unsupported reply shape at the same time so supported versions are emitted as a JSON array, while still accepting the legacy string form for backward compatibility. Add focused Rust and Python tests to lock in both the new accessors and the wire-format compatibility.
Collaborator
Pull Request Test Coverage Report for Build 23355389027Details
💛 - Coveralls |
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.
Closes #1271.
This PR fixes a gap between the core library and the FFI surface around structured BIP78 reply data. The core already modeled reply fields like
errorCode,message, status code, and supported versions, but bindings mostly had to treat replies as opaque JSON blobs. There was also a real compatibility bug here: receiver-sideJsonReplyserializedsupportedas a JSON string, while sender-side parsing expected an array.The change adds typed accessors for
JsonReplyandWellKnownError, exposes reply data directly fromHasReplyableError, and fixes receiver-sidesupportedserialization to use the correct array shape. Sender-side parsing remains backward compatible by still accepting the older broken format, so this improves the wire behavior without making the transition brittle.The net effect is that bindings can branch on structured receiver replies without reparsing raw JSON, and version-negotiation replies now line up correctly across sender and receiver. This also establishes the object-plus-getters pattern that the rest of the receiver-side FFI error work can follow.