Skip to content

docs: add Evo SDK chapters#3422

Merged
QuantumExplorer merged 5 commits into
v3.1-devfrom
docs/evo-sdk-book-chapters
Apr 2, 2026
Merged

docs: add Evo SDK chapters#3422
QuantumExplorer merged 5 commits into
v3.1-devfrom
docs/evo-sdk-book-chapters

Conversation

@QuantumExplorer
Copy link
Copy Markdown
Member

@QuantumExplorer QuantumExplorer commented Apr 2, 2026

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:

Chapter What it covers
Overview Architecture diagram (TypeScript → WASM → gRPC → DAPI), facades table, link to API reference
Getting Started npm install, ESM usage, quick start code, factory helpers, connection options, logging
Trusted Mode and Proofs What trusted mode is, why it's needed, trust model, when to use it, proof/unproved variants
State Transitions Identity/document/token/DPNS write operations, signing flow, nonce management
Wallet Utilities Mnemonic generation, key derivation (BIP-44, DIP-9, DIP-13), key pairs, addresses, signing
Networks and Environments Testnet/mainnet/local setup, custom addresses, Docker local dev, browser vs Node.js

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 build succeeds with no warnings
  • All internal links resolve correctly

Breaking Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

Summary by CodeRabbit

  • Documentation
    • Reorganized SDK docs and navigation; added Evo SDK overview, getting-started, networks & environments, trusted mode, state transitions, and wallet utilities pages
  • Tutorials
    • Added hands-on tutorials: Creating a Basic Token, Car Sales workflow, and Card Game with Tokens

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>
@github-actions github-actions Bot added this to the v3.1.0 milestone Apr 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

📖 Book Preview built successfully.

Download the preview from the workflow artifacts.
To view locally: download the artifact, unzip, and open index.html.

Updated at 2026-04-02T10:45:08.081Z

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 2, 2026

📝 Walkthrough

Walkthrough

Added 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

Cohort / File(s) Summary
Table of Contents
book/src/SUMMARY.md
Reorganized SDK TOC: introduced # Evo SDK (JavaScript/TypeScript) with linked subsections and tutorials; renamed original # SDK header to # Rust SDK.
Evo SDK Core Docs
book/src/evo-sdk/overview.md, book/src/evo-sdk/getting-started.md, book/src/evo-sdk/networks-and-environments.md, book/src/evo-sdk/state-transitions.md, book/src/evo-sdk/trusted-mode.md, book/src/evo-sdk/wallet-utilities.md
Added six new pages describing SDK purpose/architecture, installation and connection patterns (ESM/Node/browser/WASM), network/environment options, trusted-mode proof handling, state-transition flows and examples, and offline wallet utilities (mnemonics, key derivation, signing).
Evo SDK Tutorials
book/src/evo-sdk/tutorials/basic-token.md, book/src/evo-sdk/tutorials/car-sales.md, book/src/evo-sdk/tutorials/card-game.md
Added three tutorial walkthroughs: creating a basic token, a car-sales contract/workflow, and a card-game with tokens—each includes end-to-end examples (publish contract, mint/transfer tokens, queries, and sample code).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through docs with nimble feet,
New Evo pages tidy and neat.
From wallets, proofs, to networks wide,
JS rabbits now have a comfy guide.
✨📚

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 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.
Title check ✅ Passed The title 'docs: add Evo SDK chapters' directly and clearly summarizes the main change: adding new documentation chapters for the Evo SDK.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/evo-sdk-book-chapters

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.

@thepastaclaw
Copy link
Copy Markdown
Collaborator

thepastaclaw commented Apr 2, 2026

Review Gate

Commit: 6be2a552

  • Debounce: 1m ago (need 30m)

  • CI checks: build failure: PR title

  • CodeRabbit review: comment found

  • Run review now (check to override)

Copy link
Copy Markdown
Contributor

@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)
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 text language 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

📥 Commits

Reviewing files that changed from the base of the PR and between a101903 and 5ec85f3.

📒 Files selected for processing (7)
  • book/src/SUMMARY.md
  • book/src/evo-sdk/getting-started.md
  • book/src/evo-sdk/networks-and-environments.md
  • book/src/evo-sdk/overview.md
  • book/src/evo-sdk/state-transitions.md
  • book/src/evo-sdk/trusted-mode.md
  • book/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>
Comment thread book/src/evo-sdk/getting-started.md Outdated
npm install @dashevo/evo-sdk
```

The package is **ESM-only** (`"type": "module"`). In CommonJS projects use a
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It's actually TypeScript no?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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');
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

you need to fetch something existing

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

you need to decided mainnet or testnet

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed — added a comment: // Pick your network: testnetTrusted() for development, mainnetTrusted() for production

Comment thread book/src/evo-sdk/getting-started.md Outdated

```typescript
const sdk = new EvoSDK({ network: 'testnet', trusted: true });
await sdk.connect();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

calling connect is optional, when you call any method it will be connecting automatically

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Mention that it's a node js example

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this is browser app but explain how you create a contract in nodes separately with dev identity

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed — same clarification added to the card game tutorial as well.

QuantumExplorer and others added 2 commits April 2, 2026 13:39
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>
@QuantumExplorer QuantumExplorer changed the title docs(book): add Evo SDK chapters docs: add Evo SDK chapters Apr 2, 2026
@QuantumExplorer QuantumExplorer merged commit 19261a6 into v3.1-dev Apr 2, 2026
13 of 14 checks passed
@QuantumExplorer QuantumExplorer deleted the docs/evo-sdk-book-chapters branch April 2, 2026 10:48
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.

3 participants