Skip to content

chore: upgrade evo-sdk to 4.0.0-rc.1 and fix example-app CI#95

Open
thephez wants to merge 7 commits into
dashpay:mainfrom
thephez:chore/v4.0-beta
Open

chore: upgrade evo-sdk to 4.0.0-rc.1 and fix example-app CI#95
thephez wants to merge 7 commits into
dashpay:mainfrom
thephez:chore/v4.0-beta

Conversation

@thephez

@thephez thephez commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Upgrades @dashevo/evo-sdk to 4.0.0-rc.1 across the root tutorials and all four example apps, and repairs the GitHub Pages CI that builds the example apps.

SDK upgrade

  • Bump @dashevo/evo-sdk to 4.0.0-rc.1 in the root and in dashmint-lab, dashnote, dashnote-starter, and dashproof-lab; project version → 4.0-rc.
  • Extract PLATFORM_VERSION_OVERRIDE into a shared platformVersion.mjs module, consumed by the dashnote createNote.ts apps (passed to document.toJSON) and re-exported from setupDashClient-core.mjs.

CI fixes

  • Bump the deploy workflow to Node 24, clearing a deprecation warning.
  • Regenerate the dashmint-lab / dashnote / dashnote-starter lockfiles whose @emnapi/wasi-threads graph was internally inconsistent (top-level 1.2.2 vs nested 1.0.0-rc.15-era 1.2.1). These are optional wasm32-wasi deps not installed on CI's linux-x64, so npm install left the stale graph in place while npm ci rejected it. All four apps now pass npm ci.
  • Refresh in-range transitive dev dependencies in the dashnote / dashproof-lab lockfiles (rolldown, vitest, eslint, type packages).

Notes

PLATFORM_VERSION_OVERRIDE is a temporary pin (see the TODO referencing dashpay/platform#3809) and should be removed once the protocol-version auto-detection fix lands in a consumed SDK release.

Summary by CodeRabbit

  • New Features

    • Added PLATFORM_VERSION_OVERRIDE constant for platform version management.
  • Chores

    • Upgraded to @dashevo/evo-sdk version 4.0.0-rc.1 across all example applications.
    • Updated package version to 4.0-rc.
    • Updated GitHub Actions build workflow to use Node.js 24.

thephez and others added 7 commits June 11, 2026 16:23
Bump @dashevo/evo-sdk to 4.0.0-rc.1 across the root tutorials and example apps, and bump the project version to 4.0-rc.

Extract PLATFORM_VERSION_OVERRIDE into a shared platformVersion.mjs module so the dashnote createNote example apps can pin the protocol version when calling document.toJSON.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The dashmint-lab, dashnote, and dashnote-starter lockfiles had an inconsistent dependency graph: the top-level @emnapi/wasi-threads was pinned at 1.2.2 while the copy nested under @rolldown/binding-wasm32-wasi still required 1.2.1. These are optional wasm32-wasi deps that aren't installed on CI's linux-x64, so a plain npm install left the stale graph in place, but npm ci validates the full lockfile and rejected it.

Regenerate each lockfile so the graph resolves consistently and npm ci passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pull in the latest in-range transitive dev dependencies (rolldown 1.0.0-rc.15 to 1.0.3, vitest 4.1.5 to 4.1.8, eslint 8.58.2 to 8.61.0, and related type packages). No package.json changes; @dashevo/evo-sdk is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR upgrades the example applications and core infrastructure to SDK 4.0.0-rc.1 while centralizing platform version management. The changes extract PLATFORM_VERSION_OVERRIDE to a dedicated module, relax key manager SDK type constraints, integrate the override into document serialization, and update all dependencies, package versions, and CI environments accordingly.

Changes

SDK 4.0.0-rc.1 Upgrade and Platform Version Management

Layer / File(s) Summary
Platform version override module creation
platformVersion.mjs, platformVersion.d.mts
New constant PLATFORM_VERSION_OVERRIDE with value 11 is introduced with TypeScript declaration, including comments indicating this is a temporary network protocol version pin awaiting upstream resolution.
setupDashClient-core refactoring and type updates
setupDashClient-core.mjs, setupDashClient-core.d.mts
Imports PLATFORM_VERSION_OVERRIDE from platformVersion module instead of defining locally, adds public type declaration, and relaxes IdentityKeyManager and AddressKeyManager SDK parameter type from ConnectedDashClientLike to unknown.
Root package version and SDK dependency update
package.json
Package version bumped from 3.1-dev to 4.0-rc; @dashevo/evo-sdk dependency upgraded from 3.1.0-dev.6 to 4.0.0-rc.1.
Example app SDK dependency updates
example-apps/dashmint-lab/package.json, example-apps/dashnote-starter/package.json, example-apps/dashnote/package.json, example-apps/dashproof-lab/package.json
All four example apps updated to @dashevo/evo-sdk 4.0.0-rc.1 across their respective package.json files.
Example app platform version integration
example-apps/dashnote-starter/src/dash/createNote.ts, example-apps/dashnote/src/dash/createNote.ts
Both dashnote and dashnote-starter import PLATFORM_VERSION_OVERRIDE and pass it to document.toJSON(PLATFORM_VERSION_OVERRIDE) during note serialization to ensure protocol-compatible ID derivation.
CI environment Node.js upgrade
.github/workflows/deploy-example-apps.yml
Node.js version updated from 20 to 24 in both the build and deploy job workflow steps.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • dashpay/platform-tutorials#93: Both PRs modify setupDashClient-core.d.mts's exported SDK type declarations and the module's export surface, including IdentityKeyManager and AddressKeyManager signatures.

Poem

🐰 A rabbit hops through versions with glee,
From 3.1 to 4.0, SDK's free!
Platform versions centralized tight,
Document serialization done just right,
Node 24 speeds up the test flight! 🚀

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the two main changes: upgrading evo-sdk to 4.0.0-rc.1 and fixing example-app CI (Node.js version bump).
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed due to a network error.


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@setupDashClient-core.d.mts`:
- Line 156: Replace the sdk parameter type currently declared as unknown in
setupDashClient-core.d.mts for IdentityKeyManager.create,
IdentityKeyManager.createForNewIdentity, and AddressKeyManager.create with a
concrete type (EvoSDK or a minimal structural interface) that includes the
methods accessed by the implementation—specifically
identities.byPublicKeyHash(...), identities.fetch(...), and addresses.get(...);
update the type declaration so callers and editors see the correct contract
rather than an opaque unknown while leaving PLATFORM_VERSION_OVERRIDE: number
unchanged.
🪄 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: cb328a6b-229f-4fb4-a2f1-c0d11cc589fb

📥 Commits

Reviewing files that changed from the base of the PR and between a719917 and 43e5bc6.

⛔ Files ignored due to path filters (5)
  • example-apps/dashmint-lab/package-lock.json is excluded by !**/package-lock.json
  • example-apps/dashnote-starter/package-lock.json is excluded by !**/package-lock.json
  • example-apps/dashnote/package-lock.json is excluded by !**/package-lock.json
  • example-apps/dashproof-lab/package-lock.json is excluded by !**/package-lock.json
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (12)
  • .github/workflows/deploy-example-apps.yml
  • example-apps/dashmint-lab/package.json
  • example-apps/dashnote-starter/package.json
  • example-apps/dashnote-starter/src/dash/createNote.ts
  • example-apps/dashnote/package.json
  • example-apps/dashnote/src/dash/createNote.ts
  • example-apps/dashproof-lab/package.json
  • package.json
  • platformVersion.d.mts
  • platformVersion.mjs
  • setupDashClient-core.d.mts
  • setupDashClient-core.mjs

export declare class IdentityKeyManager {
static create(opts: {
sdk: ConnectedDashClientLike;
sdk: unknown;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify actual SDK usage within IdentityKeyManager and AddressKeyManager
# to determine minimum required interface shape

rg -nP --type=js -A5 -B2 'this\.sdk\.' setupDashClient-core.mjs

Repository: dashpay/platform-tutorials

Length of output: 772


🌐 Web query:

Does @dashevo/evo-sdk 4.0.0-rc.1 EvoSDK type structure match the ConnectedDashClientLike interface pattern with contracts, documents, identities, tokens, dpns, and addresses properties?

💡 Result:

The EvoSDK instance in @dashevo/evo-sdk version 4.0.0-rc.1 matches the structure of the pattern described, as it organizes its API into distinct domain-specific facades, each of which is accessible as a property on the EvoSDK instance [1]. The specific properties you referenced correspond to the following facades in the EvoSDK [1]: - contracts: sdk.contracts [1] - documents: sdk.documents [1] - identities: sdk.identities [1] - tokens: sdk.tokens [1] - dpns: sdk.dpns [1] - addresses: sdk.addresses [1] These properties provide the methods necessary for interacting with their respective domains on the Dash Platform, such as fetching, creating, or updating identities, contracts, and documents, as well as managing tokens and resolving DPNS names [1][2]. The EvoSDK is designed as a strongly-typed facade, and while the exact name "ConnectedDashClientLike" is not a standard exported interface name in the public documentation, the structural pattern of the EvoSDK instance properties aligns with the interface pattern you described [1].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Confirm which EvoSDK members are used from IdentityKeyManager/AddressKeyManager
rg -n --type=js 'byPublicKeyHash|identities\.fetch|addresses\.get' setupDashClient-core.mjs

# 2) Confirm JSDoc types for sdk in setupDashClient-core.mjs (create/createForNewIdentity)
rg -n --type=js '`@param` \{EvoSDK\} sdk|opts\.sdk|createForNewIdentity|create\(' setupDashClient-core.mjs

# 3) Confirm the .d.mts declarations for opts.sdk around the reported lines
rg -n --type=mts 'IdentityKeyManager\.create|IdentityKeyManager\.createForNewIdentity|AddressKeyManager\.create|opts: \{[^}]*sdk|sdk: unknown|sdk\?: unknown' setupDashClient-core.d.mts

Repository: dashpay/platform-tutorials

Length of output: 1255


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="setupDashClient-core.d.mts"

echo "== sdk: unknown occurrences =="
rg -n 'sdk\??:\s*unknown' "$FILE" || true

echo
echo "== ConnectedDashClientLike definition (context) =="
sed -n '1,220p' "$FILE" | nl -ba | sed -n '1,220p'

echo
echo "== Around reported lines 140-200 =="
sed -n '130,210p' "$FILE" | nl -ba | sed -n '130,210p'

echo
echo "== Around AddressKeyManager.create() declaration =="
rg -n 'class AddressKeyManager|static async create\(' "$FILE"
# Print around first match
LINE="$(rg -n 'class AddressKeyManager|static async create\(' "$FILE" | head -n1 | cut -d: -f1)"
START=$((LINE-60)); END=$((LINE+120))
sed -n "${START},${END}p" "$FILE" | nl -ba | sed -n "${START},${END}p"

Repository: dashpay/platform-tutorials

Length of output: 281


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="setupDashClient-core.d.mts"

echo "== ConnectedDashClientLike (lines 1-220) =="
sed -n '1,220p' "$FILE" | cat -n

echo
echo "== sdk unknown lines neighborhood (140-200) =="
sed -n '130,210p' "$FILE" | cat -n

echo
echo "== AddressKeyManager create neighborhood (160-220) =="
sed -n '160,230p' "$FILE" | cat -n

Repository: dashpay/platform-tutorials

Length of output: 11761


Use EvoSDK (or a minimal structural interface) instead of unknown for sdk in key managers.

setupDashClient-core.d.mts declares opts.sdk: unknown for IdentityKeyManager.create() / createForNewIdentity() and AddressKeyManager.create() (lines 156, 163, 183), but setupDashClient-core.mjs documents these params as {EvoSDK} and the implementation uses sdk.identities.byPublicKeyHash(...), sdk.identities.fetch(...), and sdk.addresses.get(...).

Since ConnectedDashClientLike doesn’t define those members (identities only has nonce/balance, and there is no addresses), unknown hides the real TS contract; replace it with EvoSDK or a minimal structural type covering only the accessed facades/methods.

PLATFORM_VERSION_OVERRIDE: number looks correct.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@setupDashClient-core.d.mts` at line 156, Replace the sdk parameter type
currently declared as unknown in setupDashClient-core.d.mts for
IdentityKeyManager.create, IdentityKeyManager.createForNewIdentity, and
AddressKeyManager.create with a concrete type (EvoSDK or a minimal structural
interface) that includes the methods accessed by the implementation—specifically
identities.byPublicKeyHash(...), identities.fetch(...), and addresses.get(...);
update the type declaration so callers and editors see the correct contract
rather than an opaque unknown while leaving PLATFORM_VERSION_OVERRIDE: number
unchanged.

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