Add hook schemas with msggen and crate integration#9058
Open
daywalker90 wants to merge 4 commits intoElementsProject:masterfrom
Open
Add hook schemas with msggen and crate integration#9058daywalker90 wants to merge 4 commits intoElementsProject:masterfrom
daywalker90 wants to merge 4 commits intoElementsProject:masterfrom
Conversation
Added schemas for: peer_connected, recover, commitment_revocation, db_write, invoice_payment, openchannel, openchannel2, openchannel2_changed, openchannel2_sign, rbf_channel, htlc_accepted, rpc_command, custommsg, onion_message_recv and onion_message_recv_secret Changelog-None
…arameters We use it later for the `rpc_command` hook Changelog-None
hooks are not for grpc, so we create a new object "rpc-only-enum-map" in .msggen.json and don't generate any grpc related code Changelog-None
We can now make practical use of the generated code from the hook schemas.
c9928ba to
1586e51
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.
Added schemas for:
peer_connectedrecovercommitment_revocationdb_writeinvoice_paymentopenchannelopenchannel2openchannel2_changedopenchannel2_signrbf_channelhtlc_acceptedrpc_commandcustommsgonion_message_recvonion_message_recv_secretTwo new primitives
JsonObjectOrArrayandJsonScalarto represent the raw json passed inrpc_commandmore cleanly.Also added new ways to register hooks in cln-plugin, so you can do something like: