Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/dashmint-lab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: DashMint Lab CI

on:
push:
branches: [main]
paths:
- 'example-apps/dashmint-lab/**'
- '.github/workflows/dashmint-lab-ci.yml'
pull_request:
branches: [main]
paths:
- 'example-apps/dashmint-lab/**'
- '.github/workflows/dashmint-lab-ci.yml'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: dashmint-lab-ci-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
name: test + build
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: example-apps/dashmint-lab
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: example-apps/dashmint-lab/package-lock.json

- name: Show Node/npm versions
run: |
node -v
npm -v

- name: Install
run: npm ci

- name: Test
run: npm test

# tsc -b runs as part of build, so this covers the typecheck too.
- name: Build
run: npm run build
57 changes: 57 additions & 0 deletions .github/workflows/dashnote-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Dashnote CI

# Unit tests and typechecked build. Playwright coverage lives in
# dashnote-e2e.yml, which serves the app via the dev server and so
# never runs tsc or the vitest suite.

on:
push:
branches: [main]
paths:
- 'example-apps/dashnote/**'
- '.github/workflows/dashnote-ci.yml'
pull_request:
branches: [main]
paths:
- 'example-apps/dashnote/**'
- '.github/workflows/dashnote-ci.yml'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: dashnote-ci-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
name: test + build
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: example-apps/dashnote
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: example-apps/dashnote/package-lock.json

- name: Show Node/npm versions
run: |
node -v
npm -v

- name: Install
run: npm ci

- name: Test
run: npm test

# tsc -b runs as part of build, so this covers the typecheck too.
- name: Build
run: npm run build
53 changes: 53 additions & 0 deletions .github/workflows/dashproof-lab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: DashProof Lab CI

on:
push:
branches: [main]
paths:
- 'example-apps/dashproof-lab/**'
- '.github/workflows/dashproof-lab-ci.yml'
pull_request:
branches: [main]
paths:
- 'example-apps/dashproof-lab/**'
- '.github/workflows/dashproof-lab-ci.yml'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: dashproof-lab-ci-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
name: test + build
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: example-apps/dashproof-lab
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: example-apps/dashproof-lab/package-lock.json

- name: Show Node/npm versions
run: |
node -v
npm -v

- name: Install
run: npm ci

- name: Test
run: npm test

# tsc -b runs as part of build, so this covers the typecheck too.
- name: Build
run: npm run build
2 changes: 1 addition & 1 deletion 1-Identities-and-Names/identity-withdraw-credits.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ console.log('Identity balance before withdrawal:', identity.balance);
// Default: testnet faucet address. Replace or override via WITHDRAWAL_ADDRESS.
const toAddress =
process.env.WITHDRAWAL_ADDRESS || 'yXWJGWuD4VBRMp9n2MtXQbGpgSeWyTRHme';
const amount = 1000000n; // Credits to withdraw (protocol minimum)
const amount = 1190000n; // Credits to withdraw (protocol minimum)
const amountDash = Number(amount) / (1000 * 100000000);

console.log(`Withdrawing ${amount} credits (${amountDash} DASH)`);
Expand Down
6 changes: 6 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ npm run test:setup # Mocha tests for setupDashClient configuration

npm run lint # TypeScript type-check all JS files (tsc)
npm run fmt # Format with Prettier

bash scripts/run-tests.sh # Root suites + every example app's unit tests (no testnet writes)
bash scripts/run-tests.sh --e2e # ...plus each app's Playwright e2e (some specs write to testnet)
bash scripts/run-tests.sh --all # Everything, including root read-write (spends testnet credits)
```

## Node / npm Toolchain
Expand All @@ -40,6 +44,8 @@ npm ci

The root package and each standalone example app declare `engines.node` for the tested Node minor version. The example apps have their own `package-lock.json` files, and npm's optional native/WASM dependency resolution can differ across Node/npm versions. For contributor work, prefer `npm ci` under `nvm use`; do not commit lockfile rewrites from another Node/npm version.

**Bumping `@dashevo/evo-sdk`:** use `bash scripts/bump-sdk.sh <version>` (under `nvm use`) — it updates every `package.json`, lockfile, and `*-lite.html` import. Then validate with `run-tests.sh`. Read-write and e2e tests write to testnet — only run them with user approval.

**Running a single tutorial directly:**

```bash
Expand Down
16 changes: 8 additions & 8 deletions example-apps/dashmint-lab/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions example-apps/dashmint-lab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"preview": "vite preview"
},
"dependencies": {
"@dashevo/evo-sdk": "4.1.1",
"@dashevo/evo-sdk": "5.0.0",
"@tailwindcss/vite": "^4.2.2",
"react": "^19.2.4",
"react-dom": "^19.2.4",
Expand All @@ -31,13 +31,13 @@
"devDependencies": {
"@eslint/js": "^9.39.4",
"@playwright/test": "^1.59.1",
"dotenv": "^17.3.1",
"@testing-library/react": "^16.3.2",
"@types/node": "^24.12.2",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^6.0.1",
"@vitest/coverage-v8": "^4.1.5",
"dotenv": "^17.3.1",
"eslint": "^9.39.4",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.5.2",
Expand Down
2 changes: 1 addition & 1 deletion example-apps/dashmint-lab/public/dashmint-lite.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ <h2>Browse cards</h2>
// package and serves it as a browser-native ES module. Pinned to the same
// version the React app at ../package.json depends on so both UIs behave
// identically against the same testnet contract.
import { EvoSDK } from 'https://esm.sh/@dashevo/evo-sdk@4.1.1';
import { EvoSDK } from 'https://esm.sh/@dashevo/evo-sdk@5.0.0';

// The token-enabled "card" data contract is already published on testnet by
// the React app. Anyone querying with the same contract id hits the same
Expand Down
16 changes: 8 additions & 8 deletions example-apps/dashnote-starter/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example-apps/dashnote-starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"preview": "vite preview"
},
"dependencies": {
"@dashevo/evo-sdk": "4.1.1",
"@dashevo/evo-sdk": "5.0.0",
"react": "^19.2.4",
"react-dom": "^19.2.4"
},
Expand Down
16 changes: 8 additions & 8 deletions example-apps/dashnote/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example-apps/dashnote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"preview": "vite preview"
},
"dependencies": {
"@dashevo/evo-sdk": "4.1.1",
"@dashevo/evo-sdk": "5.0.0",
"@tailwindcss/vite": "^4.2.2",
"react": "^19.2.4",
"react-dom": "^19.2.4",
Expand Down
2 changes: 1 addition & 1 deletion example-apps/dashnote/public/dashnote-lite.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ <h2>Get note by ID</h2>
// package and serves it as a browser-native ES module. Pinned to the same
// version the React app at ../package.json depends on so both UIs behave
// identically against the same testnet contract.
import { EvoSDK } from 'https://esm.sh/@dashevo/evo-sdk@4.1.1';
import { EvoSDK } from 'https://esm.sh/@dashevo/evo-sdk@5.0.0';

// The "note" data contract is already published on testnet by the React app.
// Anyone querying with the same contract id hits the same documents.
Expand Down
Loading
Loading