Claimable-balances guide says getLedgerEntries finds the Balance ID, but the method needs the ID as input

Đang mở Phù hợp với người mới
#2,998 2 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
78/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript
Lĩnh vực
documentation

Hướng nghiên cứu

Câu gây hiểu nhầm nằm khoảng dòng 366 của docs/build/guides/transactions/claimable-balances.mdx. Hãy đọc các dòng 170-200, nơi trang đã lấy Balance ID bằng transaction.getClaimableBalanceId(0) và từ kết quả của thao tác. Viết lại câu để getLedgerEntries đọc mục nhập cho một Balance ID đã biết, và tham chiếu lại các bước trước đó. Hoàn thành khi câu không còn ngụ ý rằng phương thức tìm ra ID và tài liệu build thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

raven

[!NOTE]
Automated notice: Stellar Raven filed this issue from its automated evaluation pipeline. The issue includes evidence and a public source record. Please verify the live surface before you act.

Finding

The claimable-balances guide says that RPC getLedgerEntries gets the Balance ID. The sample
that follows needs the Balance ID as its input.

getLedgerEntries reads ledger entries by ledger key. A claimable-balance ledger key contains the
Balance ID. The method cannot find a Balance ID from a claimant or from a transaction.

A reader can expect getLedgerEntries to discover the ID and look for a search parameter that
does not exist.

Evidence

The live guide says: "At this point, the ClaimableBalanceEntry exists in the ledger, but we'll
need its Balance ID to claim it. You can call the RPC's getLedgerEntries endpoint to do this."

The JavaScript sample then sets BALANCE_ID to a fixed 72-character hex value with the comment
"Replace with your actual Claimable Balance ID". It parses the ID and builds
xdr.LedgerKey.claimableBalance from it.

Earlier on the same page, the creation sample gets the ID with
transaction.getClaimableBalanceId(0) before submission. It also reads the ID from the
operation result after submission.

Additional recorded evidence:

  • 2026-11-02T17:17:27Z GET https://developers.stellar.org/docs/build/guides/transactions/claimable-balances returned HTTP 200 with "we'll need its Balance ID to claim it. You can call the RPC's getLedgerEntries endpoint to do this."
  • stellar/stellar-docs main 7cb5e8a492706d2ae95bbb14be737fbf96100058 docs/build/guides/transactions/claimable-balances.mdx line 366 carries the sentence; the JavaScript sample that follows starts with "// Replace with your actual Claimable Balance ID" and builds xdr.LedgerKey.claimableBalance from that ID
  • the same page at lines 170-200 already derives the ID before submission with transaction.getClaimableBalanceId(0) and reads it from the operation result
  • golden case q-aas-claim-received-claimable-balances (golden audit pass 2, 2026-11-02) records that RPC getLedgerEntries reads a claimable balance only by a known balance id and has no claimant filter
  • stellar/stellar-docs main 5142b219 docs/data/apis/migrate-from-horizon-to-rpc.mdx lines 46-47 say GET /claimable_balances has "No direct RPC equivalent" and that getLedgerEntries retrieves "a specific claimable balance by ID"
  • the sentence came from stellar/stellar-docs#1784 (merged 2025-09-17), which replaced the earlier "can be done in several ways" text

Recommendation

Change the sentence to say that getLedgerEntries reads the entry for a known Balance ID. Point
to the earlier steps that get the ID from the transaction or the operation result.

Optional: say that RPC has no claimant filter, and that Horizon /claimable_balances?claimant=
lists the balances for a claimant.

Draft PR stellar/stellar-docs#2752 rewrites this sentence as part of a full guide refresh. That PR
is not merged and has merge conflicts with main. The one-sentence fix can land on its own.

Source Record

Raven recorded this finding as sd-061 (stellar-docs, discovered 2026-11-02).

Public source record: improvements/stellar-docs/sd-061-claimable-balance-id-via-getledgerentries.md

Immutable source snapshot: cb9360f3cdfd

Resolution Handoff

When you deploy a fix, link the resolving issue or pull request to the source record.
Then notify Raven through:

https://github.com/stellar-experimental/stellar-raven/issues/new?template=upstream-improvement-ready.yml&title=%5Bupstream-ready%5D%20sd-061%3A%20

Include the finding ID and the resolving issue or pull request.
Include the deployed version or timestamp. Include the smallest live recheck.
Raven verifies the live surface before it sets the finding to fixed-upstream.
An issue closure or merged pull request does not prove the fix.
A separate reviewer repeats the live check before Raven retires the active finding.
Raven keeps a commit-pinned snapshot when one is available.

Ngôn ngữ chính
MDX
Star
145
Fork
326
Merge trung bình
2 ngày 18 giờ
Pull request đã merge (30 ngày)
109

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của stellar/stellar-docs

Tất cả issue của stellar/stellar-docs

Issue tương tự

Thêm issue về Documentation

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.