feat:align async_order JSON types with rgb-lightning-node dev - #17
Merged
Conversation
txalkan
approved these changes
Jun 1, 2026
Member
|
Thank you, @bandrivskiy! |
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.
fix(apay): align async_order JSON types with rgb-lightning-node dev
Summary
Align
utexo-lspwith the currentrgb-lightning-nodedevbranch for APay (Async Payments / Lightning Address): bump the submodule and fix JSON types onPOST /internal/async_order/newso they match the RLN contract.Problem
After moving
rgb-lightning-nodeforward ondev, the async order contract changed:async_order.newresponse,accepted_through_index,next_index_expected,unused_hashes, andrefill_batch_sizeare integers (peropenapi.yaml), not strings.hash_indexin the hash batch may be sent as a JSON number (1), not only as a string ("1").The previous
utexo-lspcode serialized those response fields asstringand did not accept numerichash_index, so the LSP JSON-RPC payload no longer matched what RLN expects/sends. That broke integration tests and recipient hash-pool bootstrap viaasync_order.new.The submodule was pinned to
4e8c7f4(an olderdev), missing recent UTEXO changes (gossip, Dockerfile, RLN-side APay updates, etc.).Changes
internal/lspapi/models.goAsyncOrderNewResponse:AcceptedThroughIndex,NextIndexExpected,UnusedHashes,RefillBatchSizeareuint64instead ofstring.AsyncOrderNewHashInput.UnmarshalJSON: acceptshash_indexas either a string or a number (compatible with RLN serialization).internal/lspapi/async_order.goasyncOrderSnapshotTxreturns numeric fields in the JSON-RPCresult(nostrconv.FormatInt→ string).internal/lspapi/api_async_order_test.gouint64.TestInternalAsyncOrderNewAcceptsNumericHashIndexfor a batch with"hash_index": 1.Submodule
rgb-lightning-node4e8c7f4→72b8d10(UTEXO-Protocol/rgb-lightning-node@dev— adjust dockerfile and dockerignore #56).rust-lightningrevision from that commit.