chore: upgrade evo-sdk to 4.0.0-rc.1 and fix example-app CI#95
Conversation
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>
📝 WalkthroughWalkthroughThis PR upgrades the example applications and core infrastructure to SDK 4.0.0-rc.1 while centralizing platform version management. The changes extract ChangesSDK 4.0.0-rc.1 Upgrade and Platform Version Management
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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
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. Comment |
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (5)
example-apps/dashmint-lab/package-lock.jsonis excluded by!**/package-lock.jsonexample-apps/dashnote-starter/package-lock.jsonis excluded by!**/package-lock.jsonexample-apps/dashnote/package-lock.jsonis excluded by!**/package-lock.jsonexample-apps/dashproof-lab/package-lock.jsonis excluded by!**/package-lock.jsonpackage-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (12)
.github/workflows/deploy-example-apps.ymlexample-apps/dashmint-lab/package.jsonexample-apps/dashnote-starter/package.jsonexample-apps/dashnote-starter/src/dash/createNote.tsexample-apps/dashnote/package.jsonexample-apps/dashnote/src/dash/createNote.tsexample-apps/dashproof-lab/package.jsonpackage.jsonplatformVersion.d.mtsplatformVersion.mjssetupDashClient-core.d.mtssetupDashClient-core.mjs
| export declare class IdentityKeyManager { | ||
| static create(opts: { | ||
| sdk: ConnectedDashClientLike; | ||
| sdk: unknown; |
There was a problem hiding this comment.
🧩 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.mjsRepository: 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:
- 1: https://dashpay.github.io/platform/evo-sdk/overview.html
- 2: https://dashpay.github.io/platform/evo-sdk/state-transitions.html
🏁 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.mtsRepository: 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 -nRepository: 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.
Summary
Upgrades
@dashevo/evo-sdkto4.0.0-rc.1across the root tutorials and all four example apps, and repairs the GitHub Pages CI that builds the example apps.SDK upgrade
@dashevo/evo-sdkto4.0.0-rc.1in the root and in dashmint-lab, dashnote, dashnote-starter, and dashproof-lab; project version →4.0-rc.PLATFORM_VERSION_OVERRIDEinto a sharedplatformVersion.mjsmodule, consumed by the dashnotecreateNote.tsapps (passed todocument.toJSON) and re-exported fromsetupDashClient-core.mjs.CI fixes
@emnapi/wasi-threadsgraph was internally inconsistent (top-level1.2.2vs nested1.0.0-rc.15-era1.2.1). These are optionalwasm32-wasideps not installed on CI's linux-x64, sonpm installleft the stale graph in place whilenpm cirejected it. All four apps now passnpm ci.Notes
PLATFORM_VERSION_OVERRIDEis 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
PLATFORM_VERSION_OVERRIDEconstant for platform version management.Chores
@dashevo/evo-sdkversion4.0.0-rc.1across all example applications.4.0-rc.