Skip to content

rpcclient: add helpers for common ledger entry fetches - #5992

Open
ke7haav wants to merge 6 commits into
stellar:mainfrom
ke7haav:issue-5854-rpcclient-ledger-entry-helpers
Open

ke7haav wants to merge 6 commits into
stellar:mainfrom
ke7haav:issue-5854-rpcclient-ledger-entry-helpers

Conversation

@ke7haav

@ke7haav ke7haav commented Aug 26, 2026

Copy link
Copy Markdown

Summary

  • add typed rpcclient helpers for account, trustline, and claimable-balance ledger entries
  • accept claimable-balance IDs as strkeys, full XDR hex, or raw hash hex
  • reuse the account-entry helper in LoadAccount and document the new API

Testing

  • go test -race -cover ./clients/rpcclient
  • go vet ./clients/rpcclient
  • repository-pinned staticcheck for ./clients/rpcclient
  • go build ./...

The full go test ./... run passed for non-database packages. The local support/db tests require PostgreSQL credentials unavailable in this environment.

Closes #5854

Add typed wrappers for fetching account, trustline, and claimable balance entries. Reuse the account helper in LoadAccount and accept claimable balance IDs in strkey or hex form.
Copilot AI balanced review requested due to automatic review settings August 26, 2026 12:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds typed RPC helpers for common Stellar ledger-entry lookups.

Changes:

  • Adds account, trustline, and claimable-balance helpers with validation and tests.
  • Reuses account lookup logic in LoadAccount.
  • Documents the new APIs and changelog entry.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
clients/rpcclient/main.go Refactors LoadAccount.
clients/rpcclient/ledger_entries.go Implements ledger-entry helpers.
clients/rpcclient/ledger_entries_test.go Adds helper tests.
clients/rpcclient/doc.go Documents new methods.
CHANGELOG.md Records the feature.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread clients/rpcclient/ledger_entries.go Outdated
Comment thread clients/rpcclient/ledger_entries.go
Accept all trustline-capable asset types in GetTrustline and reject native XLM before making an RPC request. Correct the liquidity-pool-share XDR discriminator and cover both pool-share representations with regression tests.
Copilot AI review requested due to automatic review settings August 30, 2026 12:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings September 2, 2026 09:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@ke7haav

ke7haav commented Sep 2, 2026

Copy link
Copy Markdown
Author

Hi @leighmcculloch , friendly ping on this PR. I’ve synced the branch with the latest main, and Copilot’s latest review generated no new comments. The Go and linter workflows are currently awaiting maintainer approval.

When you have a moment, could you please approve the workflows and review the proposed rpcclient helpers/API? I’m happy to make any changes needed. Thanks!

@leighmcculloch
leighmcculloch requested a review from a team September 3, 2026 00:39
Copilot AI review requested due to automatic review settings September 9, 2026 11:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread clients/rpcclient/ledger_entries.go
Reject incomplete liquidity pool change-trust assets and unsupported fees before deriving their trustline pool ID. Reuse the validation for GetLiquidityPoolID, add RPC and txnbuild regression coverage, and satisfy the repository shadow vet check.
Copilot AI review requested due to automatic review settings September 16, 2026 09:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add wrappers to rpcclient to simplify for common ledger entry fetches

2 participants