Skip to content

docs(tutorials): migrate more tutorials to evo sdk#134

Merged
thephez merged 8 commits intodashpay:3.1.0from
thephez:feat/v3-evo-sdk-tutorials-2
Mar 11, 2026
Merged

docs(tutorials): migrate more tutorials to evo sdk#134
thephez merged 8 commits intodashpay:3.1.0from
thephez:feat/v3-evo-sdk-tutorials-2

Conversation

@thephez
Copy link
Collaborator

@thephez thephez commented Mar 10, 2026

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

  • Migrate identity tutorials to EVO SDK: Topup, credit transfer, credit withdrawal, and update identity now use setupDashClient/keyManager/addressKeyManager patterns
  • Update What's Happening sections: Rewrite prose to accurately describe the new EVO SDK code flow
  • Remove obsolete tutorials: Delete retrieve-an-accounts-identities (mnemonic-based retrieval) and use-dapi-client-methods (no longer applicable)
  • Remove stale out-of-date banners: Clear attention banners from migrated tutorials
  • Standardize file names: Sync caption names with platform-tutorial repo conventions (e.g. identity-topup.mjs, document-delete.mjs)
  • Export dip13KeyPath: Make the helper available for the update-an-identity add-key tutorial

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

Summary by CodeRabbit

  • Documentation
    • Standardized example naming across tutorials for consistency.
    • Updated identity and contract tutorials to reflect current SDK flows and examples.
    • Removed outdated tutorial pages from the documentation index.
    • Clarified client setup and key-derivation guidance in setup docs.
    • Improved formatting and example error-handling descriptions.

Topup,credit  transfer, and credit withdraw
@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

Warning

Rate limit exceeded

@thephez has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 1 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 819b1829-f1a8-4c02-8390-1e1437263081

📥 Commits

Reviewing files that changed from the base of the PR and between 573fbff and 63bbe32.

📒 Files selected for processing (1)
  • docs/tutorials/identities-and-names/withdraw-an-identity-balance.md
📝 Walkthrough

Walkthrough

Documentation 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

Cohort / File(s) Summary
Docs index & removals
docs/index.md, docs/tutorials/use-dapi-client-methods.md, docs/tutorials/identities-and-names/retrieve-an-accounts-identities.md
Removed toctree entries and deleted two tutorial files (DAPI methods and account identities retrieval).
Caption renames — connecting & wallet
docs/tutorials/connecting-to-testnet.md, docs/tutorials/create-and-fund-a-wallet.md
Renamed code-block captions and example script names (e.g., dashConnect.mjsconnect.mjs, generateWallet.mjscreate-wallet.mjs).
Caption renames — contracts & documents
docs/tutorials/contracts-and-documents/delete-documents.md, .../retrieve-documents.md, .../submit-documents.md, .../update-documents.md, .../retrieve-a-data-contract.md, .../retrieve-data-contract-history.md, .../register-a-data-contract.md
Standardized code-block captions (e.g., deleteDocument.mjsdocument-delete.mjs, getDocuments.mjsdocument-retrieve.mjs) and small formatting of indices array; no logic changes.
Caption renames — identities (minor)
docs/tutorials/identities-and-names/register-a-name-for-an-identity.md, .../retrieve-a-name.md, .../retrieve-an-identity.md
Renamed example captions to kebab-case (e.g., registerName.mjsname-register.mjs, multiple resolve/search captions updated).
Identity tutorials — SDK refactor
docs/tutorials/identities-and-names/register-an-identity.md, .../topup-an-identity-balance.md, .../transfer-credits-to-an-identity.md, .../update-an-identity.md, .../withdraw-an-identity-balance.md
Rewrote examples to use modern SDK patterns: ES module imports, setupDashClient usage, signer-based flows via keyManager, new sdk.identity methods (e.g., topUpIdentity, creditTransfer, creditWithdrawal, sdk.identities.update) and updated example code and explanatory text.
Setup client changes
docs/tutorials/setup-sdk-client.md
Exposed dip13KeyPath as a public export and removed the default identityIndex = 0 from setupDashClient signature, allowing auto-selection when omitted.
Formatting / error message tweaks
docs/tutorials/contracts-and-documents/update-a-data-contract.md, docs/tutorials/identities-and-names/register-a-name-for-an-identity.md
Minor reformatting: wrapping of DATA_CONTRACT_ID and error logging reflowed to multi-line; no behavior changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I hopped through docs with tidy paws,
captions trimmed and old ones paused.
Signers, keys, and SDK gleam,
tutorials whisper a modern dream.
Hooray for changes — carrots and steam! 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'docs(tutorials): migrate more tutorials to evo sdk' clearly and accurately reflects the main objective: migrating documentation tutorials to the evo SDK. The title is specific, concise, and directly related to the substantial changes across multiple tutorial files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

thephez and others added 5 commits March 10, 2026 15:51
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
@thephez thephez marked this pull request as ready for review March 10, 2026 20:50
Copy link

@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: 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 | 🟡 Minor

Document the newly exported helper.

dip13KeyPath() is now part of the public module surface, and docs/tutorials/identities-and-names/update-an-identity.md already 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

📥 Commits

Reviewing files that changed from the base of the PR and between 5dc2f45 and 92daa29.

📒 Files selected for processing (23)
  • docs/index.md
  • docs/tutorials/connecting-to-testnet.md
  • docs/tutorials/contracts-and-documents/delete-documents.md
  • docs/tutorials/contracts-and-documents/register-a-data-contract.md
  • docs/tutorials/contracts-and-documents/retrieve-a-data-contract.md
  • docs/tutorials/contracts-and-documents/retrieve-data-contract-history.md
  • docs/tutorials/contracts-and-documents/retrieve-documents.md
  • docs/tutorials/contracts-and-documents/submit-documents.md
  • docs/tutorials/contracts-and-documents/update-a-data-contract.md
  • docs/tutorials/contracts-and-documents/update-documents.md
  • docs/tutorials/create-and-fund-a-wallet.md
  • docs/tutorials/identities-and-names.md
  • docs/tutorials/identities-and-names/register-a-name-for-an-identity.md
  • docs/tutorials/identities-and-names/register-an-identity.md
  • docs/tutorials/identities-and-names/retrieve-a-name.md
  • docs/tutorials/identities-and-names/retrieve-an-accounts-identities.md
  • docs/tutorials/identities-and-names/retrieve-an-identity.md
  • docs/tutorials/identities-and-names/topup-an-identity-balance.md
  • docs/tutorials/identities-and-names/transfer-credits-to-an-identity.md
  • docs/tutorials/identities-and-names/update-an-identity.md
  • docs/tutorials/identities-and-names/withdraw-an-identity-balance.md
  • docs/tutorials/setup-sdk-client.md
  • docs/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

Copy link

@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

♻️ Duplicate comments (1)
docs/tutorials/identities-and-names/transfer-credits-to-an-identity.md (1)

14-16: ⚠️ Potential issue | 🟡 Minor

Clarify 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

📥 Commits

Reviewing files that changed from the base of the PR and between 92daa29 and 573fbff.

📒 Files selected for processing (3)
  • docs/tutorials/identities-and-names/topup-an-identity-balance.md
  • docs/tutorials/identities-and-names/transfer-credits-to-an-identity.md
  • docs/tutorials/identities-and-names/withdraw-an-identity-balance.md

@thephez thephez merged commit c71143e into dashpay:3.1.0 Mar 11, 2026
1 check passed
@thephez thephez deleted the feat/v3-evo-sdk-tutorials-2 branch March 11, 2026 13:15
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