Skip to content

docs(reference): update dapi to correct audit findings#141

Merged
thephez merged 6 commits intodashpay:3.1.0from
thephez:chore/v3.1-ref-dapi-endpoints
Apr 8, 2026
Merged

docs(reference): update dapi to correct audit findings#141
thephez merged 6 commits intodashpay:3.1.0from
thephez:chore/v3.1-ref-dapi-endpoints

Conversation

@thephez
Copy link
Copy Markdown
Collaborator

@thephez thephez commented Apr 7, 2026

Description

Updates the DAPI endpoint reference documentation based on a baseline audit against v3.1-dev source. Fixes several accuracy issues in the existing platform endpoint docs and adds documentation for 15 new RPC methods introduced in v3.x for address balance queries and shielded transactions.

Highlights

Accuracy fixes

  • Corrected JavaScript proof support claim — getProof() is fully supported via the response object's method, not "not yet available"
  • Updated stale proto source link anchors for the Proof and ResponseMetadata message definitions
  • Fixed broken packages/dapi-grpc/protos folder hyperlink in the gRPC overview
  • Fixed duplicate tab labels in the getBlock disabled section
  • Suppressed getEstimatedTransactionFee (defined in proto but never server-implemented) using a source comment block

New endpoint documentation

Address Info (6 endpoints) — fully documented with verified gRPCurl examples from testnet:

  • getAddressInfo, getAddressesInfos, getAddressesTrunkState, getAddressesBranchState
  • getRecentAddressBalanceChanges, getRecentCompactedAddressBalanceChanges

Shielded Transactions (9 endpoints) — parameters documented; endpoints are defined in the protocol but not yet available on public nodes:

  • getShieldedEncryptedNotes, getShieldedAnchors, getMostRecentShieldedAnchor, getShieldedPoolState
  • getShieldedNullifiers, getNullifiersTrunkState, getNullifiersBranchState
  • getRecentNullifierChanges, getRecentCompactedNullifierChanges

Preview build: https://dash-docs-platform--141.org.readthedocs.build/en/141/

Summary by CodeRabbit

  • Documentation
    • Clarified gRPC example tab labels to distinguish request variants (by height / by hash).
    • Marked getEstimatedTransactionFee as an unimplemented, commented placeholder.
    • Noted proofs are supported in the js-evo-sdk client.
    • Added Address System endpoints for balances, nonces, proofs, and recent changes (v3.0.0).
    • Added Shielded Transaction endpoints with availability note for public nodes (v3.1.0).
    • Updated protocol reference links and proof line references for accuracy.

thephez and others added 3 commits April 6, 2026 16:56
- Disambiguate duplicate "JavaScript (dapi-grpc)" tab labels for getBlock by height vs hash (#F-007)
- Fix proto line number references for proofs (#F-003) and metadata (#F-004)
- Update proofs note to reflect current JS client support (#F-001)
- Add comment noting getEstimatedTransactionFee was never implemented server-side (#F-002)
- Fix broken proto folder link in gRPC overview (#F-005)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
No examples since they are not available on a network yet
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 2026

📝 Walkthrough

Walkthrough

Documentation-only changes: clarified gRPC JavaScript example tabs for getBlock, added a commented note about unimplemented getEstimatedTransactionFee, updated the gRPC proto link to a GitHub URL, and added Platform Endpoint docs for Address System (v3.0.0) and Shielded Transactions (v3.1.0) with examples and availability notes.

Changes

Cohort / File(s) Summary
gRPC Core Examples
docs/reference/dapi-endpoints-core-grpc-endpoints.md
Renamed disabled JavaScript example tabs to distinguish getBlock by height vs. by hash; inserted a commented {eval-rst} note stating getEstimatedTransactionFee is defined in proto but not implemented server-side.
gRPC Overview
docs/reference/dapi-endpoints-grpc-overview.md
Replaced plain proto folder reference with explicit GitHub tree URL to packages/dapi-grpc/protos.
Platform Endpoints — Address System
docs/reference/dapi-endpoints-platform-endpoints.md
Added Address System endpoints (v3.0.0): getAddressInfo, getAddressesInfos, getAddressesTrunkState, getAddressesBranchState, getRecentAddressBalanceChanges, getRecentCompactedAddressBalanceChanges; included parameter tables, examples, and proof-related proto line updates; adjusted JS client proof support wording.
Platform Endpoints — Shielded Transactions & Summary
docs/reference/dapi-endpoints-platform-endpoints.md, docs/reference/dapi-endpoints.md
Added Shielded Transaction endpoints (v3.1.0): encrypted notes, anchors, latest anchor, pool state, nullifiers, trunk/branch proofs, recent and compacted nullifier change queries; added attention note that shielded endpoints are not available on public nodes and updated summary entries.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I nibbled through docs with a curious hop,
Tabs split clean, and proto links I did drop.
Addresses counted, shields tucked away,
I penned the notes and bounded into day. 🌿✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'docs(reference): update dapi to correct audit findings' is vague about what specific audit findings were corrected. While it relates to the actual changes (documentation updates to DAPI endpoints following an audit), it lacks specificity about the key improvements and new endpoints added. Consider a more descriptive title that highlights the main changes, such as: 'docs(reference): add address system and shielded transaction endpoints, fix audit findings' or 'docs(reference): update dapi endpoints with v3.x address and shielded transaction documentation'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/reference/dapi-endpoints-platform-endpoints.md`:
- Around line 4074-4402: The MD031 lint errors are caused by missing blank lines
around fenced code blocks in the new tabbed examples (the :::
{tab-set}/{tab-item} sections containing grpcurl blocks and Response (gRPCurl)
JSON blocks); fix by adding a blank line immediately before each ```shell and
```json fence and a blank line immediately after each closing ``` fence in those
tab-item blocks (search for tab-item blocks with grpcurl and Response (gRPCurl)
examples to locate the affected fences).
- Around line 4290-4293: The table incorrectly labels numeric uint64 parameters
as "Integer" while their descriptions state they are sent as strings; update the
Type column for the affected parameters (e.g., `start_height` and any other
uint64 params like those in the later blocks) to read "String (uint64)" so the
type column matches the description and prevents client confusion—ensure `prove`
stays `Boolean`, and adjust all other occurrences noted (`start_height`,
`start_height_exclusive`, and similar uint64 fields) to the same "String
(uint64)" format.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4e6aa1e9-ce63-4b3b-b46b-1e6a78220ea6

📥 Commits

Reviewing files that changed from the base of the PR and between 74992af and 830644a.

📒 Files selected for processing (4)
  • docs/reference/dapi-endpoints-core-grpc-endpoints.md
  • docs/reference/dapi-endpoints-grpc-overview.md
  • docs/reference/dapi-endpoints-platform-endpoints.md
  • docs/reference/dapi-endpoints.md

Comment thread docs/reference/dapi-endpoints-platform-endpoints.md
Comment thread docs/reference/dapi-endpoints-platform-endpoints.md Outdated
thephez added 2 commits April 7, 2026 15:09
Update `start_height` and `start_block_height` Type column from "Integer" to "String (uint64)" to match proto jstype=JS_STRING annotation and align with the field descriptions.
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/reference/dapi-endpoints-platform-endpoints.md`:
- Line 18: The sentence "Proofs are supported in the JavaScript client" is
ambiguous and incorrect; update the wording in
docs/reference/dapi-endpoints-platform-endpoints.md to state that proofs are
supported via the low-level dapi-grpc library for JavaScript (referencing
"dapi-grpc") and explicitly note that the JavaScript SDK (see
docs/sdk-rs/quick-start.md) does not support Dash Platform proofs, replacing the
ambiguous phrase "JavaScript client" with this clear distinction.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fbd09b72-b5b1-44aa-abfe-aaedde618b54

📥 Commits

Reviewing files that changed from the base of the PR and between 1b92069 and 266795a.

📒 Files selected for processing (2)
  • docs/reference/dapi-endpoints-platform-endpoints.md
  • docs/reference/dapi-endpoints.md
✅ Files skipped from review due to trivial changes (1)
  • docs/reference/dapi-endpoints.md

Comment thread docs/reference/dapi-endpoints-platform-endpoints.md Outdated
Evo SDK does support proofs (old SDK did not)
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/reference/dapi-endpoints-platform-endpoints.md (1)

4413-4529: Consider adding placeholder examples for completeness.

The shielded transaction endpoints lack the "Example Request and Response" sections that are present for all other endpoints in this document. While the attention note explains these endpoints aren't yet available on public nodes, the documentation structure would be more consistent and user-friendly with either:

  1. Placeholder examples showing the expected request/response format (with a note that responses are illustrative), or
  2. An explicit note under each endpoint explaining why examples are omitted

This would maintain documentation consistency and set clearer expectations for users.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/reference/dapi-endpoints-platform-endpoints.md` around lines 4413 -
4529, Add consistent placeholder "Example Request and Response" sections for
each shielded endpoint (getShieldedEncryptedNotes, getShieldedAnchors,
getMostRecentShieldedAnchor, getShieldedPoolState, getShieldedNullifiers,
getNullifiersTrunkState, getNullifiersBranchState, getRecentNullifierChanges,
getRecentCompactedNullifierChanges) showing the expected request parameters and
a minimal illustrative JSON response; label each example as "illustrative" and
include the existing attention note that these endpoints are not available on
public nodes. Ensure each endpoint block mirrors the other documented endpoints'
structure (Example Request, Example Response) so users see the expected format
even if responses are mocked.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/reference/dapi-endpoints-platform-endpoints.md`:
- Around line 4413-4529: Add consistent placeholder "Example Request and
Response" sections for each shielded endpoint (getShieldedEncryptedNotes,
getShieldedAnchors, getMostRecentShieldedAnchor, getShieldedPoolState,
getShieldedNullifiers, getNullifiersTrunkState, getNullifiersBranchState,
getRecentNullifierChanges, getRecentCompactedNullifierChanges) showing the
expected request parameters and a minimal illustrative JSON response; label each
example as "illustrative" and include the existing attention note that these
endpoints are not available on public nodes. Ensure each endpoint block mirrors
the other documented endpoints' structure (Example Request, Example Response) so
users see the expected format even if responses are mocked.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b11bcc79-5a56-4988-8194-38caf3d2dee6

📥 Commits

Reviewing files that changed from the base of the PR and between 266795a and 6da8df3.

📒 Files selected for processing (1)
  • docs/reference/dapi-endpoints-platform-endpoints.md

@thephez thephez merged commit 19078a9 into dashpay:3.1.0 Apr 8, 2026
1 check passed
@thephez thephez deleted the chore/v3.1-ref-dapi-endpoints branch April 8, 2026 17:12
@thephez thephez added this to the v3.1 milestone Apr 9, 2026
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.

1 participant