docs: add Evo SDK chapters#3422
Conversation
Add six new chapters covering the JavaScript/TypeScript Evo SDK, filling gaps not covered by the external API reference at https://dashpay.github.io/evo-sdk-website/docs.html: - Overview: architecture diagram, facades table, how WASM/gRPC works - Getting Started: install, quick start, connection options, logging - Trusted Mode and Proofs: what trusted mode is, when to use it, proof variants (WithProof, Unproved) - State Transitions: identity/document/token/DPNS write operations, nonce management, signing flow - Wallet Utilities: mnemonic generation, key derivation (BIP-44, DIP-9, DIP-13), key pairs, address validation, message signing - Networks and Environments: testnet/mainnet/local, custom addresses, browser vs Node.js differences Rename existing "SDK" section to "Rust SDK" for clarity. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
📖 Book Preview built successfully. Download the preview from the workflow artifacts. Updated at 2026-04-02T10:45:08.081Z |
📝 WalkthroughWalkthroughAdded a new "Evo SDK (JavaScript/TypeScript)" section and multiple documentation pages and tutorials for the Evo SDK, and renamed the original SDK section to "Rust SDK" in the book table of contents. New pages cover overview, getting started, networks, trusted mode, state transitions, wallet utilities, and tutorials. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 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 docstrings
🧪 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 |
Review GateCommit:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
book/src/evo-sdk/overview.md (1)
13-32: Consider adding language identifier to the ASCII diagram fence.The ASCII architecture diagram would benefit from a
textlanguage identifier to clarify intent and satisfy linting tools.📝 Proposed improvement
-``` +```text ┌──────────────────┐ │ Your TypeScript │🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@book/src/evo-sdk/overview.md` around lines 13 - 32, The fenced ASCII diagram in the overview.md file lacks a language identifier; update the code fence that contains the diagram (the triple-backtick block showing the EvoSDK/WASM/DAPI diagram) to use a "text" language identifier (i.e., change ``` to ```text) so linters and readers know it is plain text and the diagram renders as intended.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@book/src/evo-sdk/overview.md`:
- Around line 13-32: The fenced ASCII diagram in the overview.md file lacks a
language identifier; update the code fence that contains the diagram (the
triple-backtick block showing the EvoSDK/WASM/DAPI diagram) to use a "text"
language identifier (i.e., change ``` to ```text) so linters and readers know it
is plain text and the diagram renders as intended.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 31fd7ba6-f06d-4153-8155-e767d6ec4b5a
📒 Files selected for processing (7)
book/src/SUMMARY.mdbook/src/evo-sdk/getting-started.mdbook/src/evo-sdk/networks-and-environments.mdbook/src/evo-sdk/overview.mdbook/src/evo-sdk/state-transitions.mdbook/src/evo-sdk/trusted-mode.mdbook/src/evo-sdk/wallet-utilities.md
Three step-by-step tutorials demonstrating real-world applications: - Car Sales Management: data contract design, document CRUD, querying with filters, reviews system - Basic Token: token contract deployment, minting, transferring, balance queries, burning, full lifecycle - Card Game with Tokens: combining documents (cards, decks, matches) with an in-game token economy, card packs, player trading, match recording, and leaderboards Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| npm install @dashevo/evo-sdk | ||
| ``` | ||
|
|
||
| The package is **ESM-only** (`"type": "module"`). In CommonJS projects use a |
There was a problem hiding this comment.
It's actually TypeScript no?
There was a problem hiding this comment.
Fixed — updated to note it's TypeScript with full type definitions included.
| console.log('Current epoch:', epoch.index); | ||
|
|
||
| // Fetch an identity by its base58 ID | ||
| const identity = await sdk.identities.fetch('4EfA9Jrvv3nnCFdSf7fad59851iiTRZ6Wcu6YVJ4iSeF'); |
There was a problem hiding this comment.
you need to fetch something existing
There was a problem hiding this comment.
Fixed — the example now fetches an existing identity by its ID and the comment says "Fetch an existing identity".
| import { EvoSDK } from '@dashevo/evo-sdk'; | ||
|
|
||
| // Create a trusted testnet instance and connect | ||
| const sdk = EvoSDK.testnetTrusted(); |
There was a problem hiding this comment.
you need to decided mainnet or testnet
There was a problem hiding this comment.
Fixed — added a comment: // Pick your network: testnetTrusted() for development, mainnetTrusted() for production
|
|
||
| ```typescript | ||
| const sdk = new EvoSDK({ network: 'testnet', trusted: true }); | ||
| await sdk.connect(); |
There was a problem hiding this comment.
calling connect is optional, when you call any method it will be connecting automatically
There was a problem hiding this comment.
Fixed — rewrote the Connecting section to say connect() is optional and the SDK auto-connects on first facade call. Removed the explicit connect() from the quick start example.
Covers SDK initialization with a React context/provider, reusable query and mutation hooks, components for identity viewing, document listing, and form submission, plus production considerations for key management, bundle size, error boundaries, and network switching. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| @@ -0,0 +1,237 @@ | |||
| # Tutorial: Creating a Basic Token | |||
There was a problem hiding this comment.
Mention that it's a node js example
There was a problem hiding this comment.
Fixed — added a callout at the top noting this is a Node.js tutorial and that browser apps should deploy contracts from Node.js first.
| @@ -0,0 +1,223 @@ | |||
| # Tutorial: Car Sales Management | |||
There was a problem hiding this comment.
this is browser app but explain how you create a contract in nodes separately with dev identity
There was a problem hiding this comment.
Fixed — added a callout explaining that steps 1-2 (contract design and deployment) are run from a Node.js script with a dev identity, while steps 3+ can run in either Node.js or the browser.
| @@ -0,0 +1,223 @@ | |||
| # Tutorial: Car Sales Management | |||
|
|
|||
There was a problem hiding this comment.
Fixed — same clarification added to the card game tutorial as well.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Note that SDK is TypeScript with full type definitions - Clarify connect() is optional (auto-connects on first facade call) - Add comment about choosing testnet vs mainnet - Use an existing identity ID in quick start example - Mark basic-token as a Node.js tutorial - Clarify car-sales and card-game: contract deployment via Node.js with dev identity, then browser app uses published contract ID Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Issue being fixed or feature implemented
The Platform book had no documentation for the JavaScript/TypeScript Evo SDK beyond a one-line table entry. The external API reference at https://dashpay.github.io/evo-sdk-website/docs.html covers per-method documentation, but lacks conceptual guides, installation instructions, architecture explanation, and wallet utilities documentation.
What was done?
Added six new chapters to the book under a new Evo SDK (JavaScript/TypeScript) section, covering topics not in the external API reference:
Also renamed the existing "SDK" section to "Rust SDK" for clarity now that there are two SDK sections.
All chapters link to the external API reference for detailed per-method docs.
How Has This Been Tested?
mdbook buildsucceeds with no warningsBreaking Changes
None.
Checklist:
Summary by CodeRabbit