docs(tutorials): migrate more tutorials to evo sdk#134
docs(tutorials): migrate more tutorials to evo sdk#134thephez merged 8 commits intodashpay:3.1.0from
Conversation
Topup,credit transfer, and credit withdraw
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDocumentation updates: renamed many example captions to kebab-case, removed two tutorial pages and their toctree entries, made minor formatting tweaks in contract tutorials, and revised multiple identity tutorials to reflect modern SDK signer-based method usage and updated setupDashClient exports/signature. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
Migrate code to use setupDashClient/keyManager patterns, update What's Happening prose, export dip13KeyPath, and remove stale banner. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove obsolete mnemonic-based identity retrieval tutorial that relied on old SDK wallet account methods no longer available in evo-sdk.
To sync with platform-tutorial repo file names
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/tutorials/setup-sdk-client.md (1)
78-84:⚠️ Potential issue | 🟡 MinorDocument the newly exported helper.
dip13KeyPath()is now part of the public module surface, anddocs/tutorials/identities-and-names/update-an-identity.mdalready imports it, but this file’s export table and walkthrough still describe only the old exports. That leaves the setup tutorial internally inconsistent for readers copying the module verbatim.Suggested doc update
| `setupDashClient()` | Connects and creates key managers from `clientConfig` | | `createClient()` | Connects to the network | +| `dip13KeyPath()` | Builds the DIP-13 derivation path for an identity key | | `IdentityKeyManager` | Derives identity keys and provides signers for write operations | | `AddressKeyManager` | Derives platform address keys for address operations | | `clientConfig` | Shared network and mnemonic configuration |🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/tutorials/setup-sdk-client.md` around lines 78 - 84, Update the docs/tutorials/setup-sdk-client.md to include the newly exported helper dip13KeyPath in the module export table and any walkthrough snippets that list or import exported helpers; ensure references mention dip13KeyPath(network, identityIndex, keyIndex) alongside the other helpers so the example imports match the actual public surface and the tutorial code that imports dip13KeyPath in identities-and-names/update-an-identity.md works as-is.
🤖 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/tutorials/identities-and-names/topup-an-identity-balance.md`:
- Line 11: Replace the incorrect single-word verb "topup" with the two-word verb
"top up" in the sentence that begins "Eventually it will be necessary to topup
the balance..." so it reads "Eventually it will be necessary to top up the
balance..."; update any other occurrences of the token "topup" in this document
to "top up" to maintain consistent grammar.
- Around line 22-52: Replace the incorrect call to
sdk.addresses.topUpIdentity(...) with the correct SDK method
sdk.platform.identities.topUp(identity, amount): remove the inputs array and
signer parameter, pass the identity object and a numeric amount (e.g., 200000n)
as the single arguments, handle the Boolean return value (success/failure)
instead of expecting a result with newBalance, and update the console output to
report success or failure (e.g., "Top-up succeeded" or "Top-up failed") rather
than printing Start/Final balance; update any references to result.newBalance
accordingly.
In `@docs/tutorials/identities-and-names/transfer-credits-to-an-identity.md`:
- Around line 14-18: Update the prerequisites to reflect that the example
transfers credits from an identity using keyManager.getTransfer(), not from a
platform address: replace the bullet "A platform address with a balance" with a
clear requirement like "A source identity with sufficient credits" (or similar
wording) so readers know they must fund the identity used as the sender; ensure
the rest of the prerequisites (configured client and two identities) remain and
optionally link to the identity funding/register tutorial referenced by Register
an Identity to show how to add credits to the source identity.
In `@docs/tutorials/identities-and-names/update-an-identity.md`:
- Around line 27-52: The fenced JavaScript example (caption
identity-update-disable-key.mjs) in update-an-identity.md ends the closing ```
fence and immediately follows with the tab terminator :::, which triggers MD031;
fix by inserting a single blank line between the closing ``` and the following
::: so the code fence is separated from the tab-item terminator.
In `@docs/tutorials/identities-and-names/withdraw-an-identity-balance.md`:
- Around line 33-35: The comment above the toAddress assignment uses the wrong
env var name; update the comment to reference WITHDRAWAL_ADDRESS to match the
code (process.env.WITHDRAWAL_ADDRESS) so readers can actually override the
default, or alternatively change the code to use process.env.WITHDRAW_ADDRESS if
you prefer that variable name; locate the toAddress declaration and make the
comment and the env var name consistent (referencing toAddress and
process.env.WITHDRAWAL_ADDRESS).
---
Outside diff comments:
In `@docs/tutorials/setup-sdk-client.md`:
- Around line 78-84: Update the docs/tutorials/setup-sdk-client.md to include
the newly exported helper dip13KeyPath in the module export table and any
walkthrough snippets that list or import exported helpers; ensure references
mention dip13KeyPath(network, identityIndex, keyIndex) alongside the other
helpers so the example imports match the actual public surface and the tutorial
code that imports dip13KeyPath in identities-and-names/update-an-identity.md
works as-is.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3a73eaf3-b0a5-4256-ad7f-2ec93a58f3d2
📒 Files selected for processing (23)
docs/index.mddocs/tutorials/connecting-to-testnet.mddocs/tutorials/contracts-and-documents/delete-documents.mddocs/tutorials/contracts-and-documents/register-a-data-contract.mddocs/tutorials/contracts-and-documents/retrieve-a-data-contract.mddocs/tutorials/contracts-and-documents/retrieve-data-contract-history.mddocs/tutorials/contracts-and-documents/retrieve-documents.mddocs/tutorials/contracts-and-documents/submit-documents.mddocs/tutorials/contracts-and-documents/update-a-data-contract.mddocs/tutorials/contracts-and-documents/update-documents.mddocs/tutorials/create-and-fund-a-wallet.mddocs/tutorials/identities-and-names.mddocs/tutorials/identities-and-names/register-a-name-for-an-identity.mddocs/tutorials/identities-and-names/register-an-identity.mddocs/tutorials/identities-and-names/retrieve-a-name.mddocs/tutorials/identities-and-names/retrieve-an-accounts-identities.mddocs/tutorials/identities-and-names/retrieve-an-identity.mddocs/tutorials/identities-and-names/topup-an-identity-balance.mddocs/tutorials/identities-and-names/transfer-credits-to-an-identity.mddocs/tutorials/identities-and-names/update-an-identity.mddocs/tutorials/identities-and-names/withdraw-an-identity-balance.mddocs/tutorials/setup-sdk-client.mddocs/tutorials/use-dapi-client-methods.md
💤 Files with no reviewable changes (4)
- docs/tutorials/identities-and-names.md
- docs/tutorials/identities-and-names/retrieve-an-accounts-identities.md
- docs/tutorials/use-dapi-client-methods.md
- docs/index.md
docs/tutorials/identities-and-names/topup-an-identity-balance.md
Outdated
Show resolved
Hide resolved
docs/tutorials/identities-and-names/transfer-credits-to-an-identity.md
Outdated
Show resolved
Hide resolved
docs/tutorials/identities-and-names/withdraw-an-identity-balance.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
docs/tutorials/identities-and-names/transfer-credits-to-an-identity.md (1)
14-16:⚠️ Potential issue | 🟡 MinorClarify that the sender identity must already have credits.
The current prerequisites mention two identities, but Line 26 transfers from the configured identity. Readers can meet the listed prerequisites and still fail unless that source identity is already funded.
Suggested doc fix
- A configured client: [Setup SDK Client](../setup-sdk-client.md) -- Two Dash Platform Identities: [Tutorial: Register an - Identity](../../tutorials/identities-and-names/register-an-identity.md) +- A Dash Platform identity with sufficient credits to act as the sender: + [Tutorial: Register an Identity](../../tutorials/identities-and-names/register-an-identity.md) +- A recipient Dash Platform identity ID🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/tutorials/identities-and-names/transfer-credits-to-an-identity.md` around lines 14 - 16, Update the prerequisites in transfer-credits-to-an-identity.md to explicitly state that the source/sender identity (the configured SDK client identity referenced as "from the configured identity") must already have sufficient credits before attempting the transfer; modify the bullet list that currently mentions "Two Dash Platform Identities" to either add a separate bullet like "A funded sender identity (the configured identity must have credits)" or append a parenthetical note to the existing identity bullet so readers know the sender must be funded.
🤖 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/tutorials/identities-and-names/withdraw-an-identity-balance.md`:
- Around line 16-19: Remove the incorrect prerequisite bullet "A platform
address with a balance: [Tutorial: Create and Fund a
Wallet](../../tutorials/create-and-fund-a-wallet.md)" from the prerequisites
list in withdraw-an-identity-balance.md so the prerequisites only list the
configured client, a Dash Platform Identity with credits (Register an Identity
tutorial), and a Core chain recipient address; update the bullet list to reflect
that this flow withdraws identity credits to toAddress and does not require a
funded platform address.
---
Duplicate comments:
In `@docs/tutorials/identities-and-names/transfer-credits-to-an-identity.md`:
- Around line 14-16: Update the prerequisites in
transfer-credits-to-an-identity.md to explicitly state that the source/sender
identity (the configured SDK client identity referenced as "from the configured
identity") must already have sufficient credits before attempting the transfer;
modify the bullet list that currently mentions "Two Dash Platform Identities" to
either add a separate bullet like "A funded sender identity (the configured
identity must have credits)" or append a parenthetical note to the existing
identity bullet so readers know the sender must be funded.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 98400c74-8042-44ba-9024-e5bc7f805513
📒 Files selected for processing (3)
docs/tutorials/identities-and-names/topup-an-identity-balance.mddocs/tutorials/identities-and-names/transfer-credits-to-an-identity.mddocs/tutorials/identities-and-names/withdraw-an-identity-balance.md
Summary
Continues the EVO SDK migration for the remaining identity and name tutorials (topup, transfer, withdraw, update), removes obsolete tutorials no longer applicable to the new SDK, and standardizes file naming and formatting across all tutorial files.
Highlights
setupDashClient/keyManager/addressKeyManagerpatternsretrieve-an-accounts-identities(mnemonic-based retrieval) anduse-dapi-client-methods(no longer applicable)identity-topup.mjs,document-delete.mjs)dip13KeyPath: Make the helper available for the update-an-identity add-key tutorialPreview build: https://dash-docs-platform--134.org.readthedocs.build/en/134/
Summary by CodeRabbit