docs(reference): update dapi to correct audit findings#141
docs(reference): update dapi to correct audit findings#141thephez merged 6 commits intodashpay:3.1.0from
Conversation
- 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
📝 WalkthroughWalkthroughDocumentation-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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (4)
docs/reference/dapi-endpoints-core-grpc-endpoints.mddocs/reference/dapi-endpoints-grpc-overview.mddocs/reference/dapi-endpoints-platform-endpoints.mddocs/reference/dapi-endpoints.md
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.
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
docs/reference/dapi-endpoints-platform-endpoints.mddocs/reference/dapi-endpoints.md
✅ Files skipped from review due to trivial changes (1)
- docs/reference/dapi-endpoints.md
Evo SDK does support proofs (old SDK did not)
There was a problem hiding this comment.
🧹 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:
- Placeholder examples showing the expected request/response format (with a note that responses are illustrative), or
- 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
📒 Files selected for processing (1)
docs/reference/dapi-endpoints-platform-endpoints.md
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
getProof()is fully supported via the response object's method, not "not yet available"ProofandResponseMetadatamessage definitionspackages/dapi-grpc/protosfolder hyperlink in the gRPC overviewgetBlockdisabled sectiongetEstimatedTransactionFee(defined in proto but never server-implemented) using a source comment blockNew endpoint documentation
Address Info (6 endpoints) — fully documented with verified gRPCurl examples from testnet:
getAddressInfo,getAddressesInfos,getAddressesTrunkState,getAddressesBranchStategetRecentAddressBalanceChanges,getRecentCompactedAddressBalanceChangesShielded Transactions (9 endpoints) — parameters documented; endpoints are defined in the protocol but not yet available on public nodes:
getShieldedEncryptedNotes,getShieldedAnchors,getMostRecentShieldedAnchor,getShieldedPoolStategetShieldedNullifiers,getNullifiersTrunkState,getNullifiersBranchStategetRecentNullifierChanges,getRecentCompactedNullifierChangesPreview build: https://dash-docs-platform--141.org.readthedocs.build/en/141/
Summary by CodeRabbit