feat(gl-sdk): add list_invoices, list_pays, and unified list_payments API#689
Open
feat(gl-sdk): add list_invoices, list_pays, and unified list_payments API#689
Conversation
High-level auth API: Config type (network + optional DeveloperCert) and four free functions — register(), recover(), connect(), register_or_recover() — replacing the multi-object auth ceremony. Node gains credentials(), disconnect() with AtomicBool guard on all RPC methods, and with_signer() internal constructor. Handle::spawn() runs signers on a dedicated tokio runtime to avoid block_on deadlock. NAPI fix: Node lost Clone when AtomicBool was added. Wrap inner GlNode in Arc at the NAPI wrapper level for spawn_blocking, matching the existing NodeEventStream pattern. Includes Python and Android instrumented tests for the auth API.
14b284f to
ae1c1fa
Compare
… API Three new Node methods for querying payment history: - list_invoices(): wraps CLN ListInvoices with full native filtering (label, invstring, payment_hash, offer_id) and pagination (index, start, limit) - list_pays(): wraps CLN ListPays with native filtering (bolt11, payment_hash, status) and pagination - list_payments(): merges both into a unified Payment timeline sorted newest-first, defaults to COMPLETE status filter New types: Invoice, InvoiceStatus, Pay, ListInvoicesResponse, ListPaysResponse, Payment, PaymentDirection, PaymentStatus, ListPaymentsResponse, ListIndex. Payment includes optional invoice/pay fields for drill-down access to full CLN-specific details. Kotlin extensions provide default null parameters for idiomatic API. Includes Python integration tests and Android instrumented tests.
ae1c1fa to
61a46c6
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.
Summary
list_invoices()andlist_pays()methods on Node, wrapping CLN's native gRPC RPCs with full filter and pagination supportlist_payments()that merges invoices and pays into a single chronological timeline, defaulting to COMPLETE statusInvoice,InvoiceStatus,Pay,Payment,PaymentDirection,PaymentStatus,ListIndex, and response wrappersPaymentincludes optionalinvoice/payfields for drill-down access to CLN-specific detailsAPI
Test plan
cargo build -p gl-sdkandcargo build -p gl-sdk-nodecompile cleancargo test -p gl-sdkpasses