This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Interactive web-based testing and documentation platform for the Dash Platform Evo JS SDK. Users can execute queries and state transitions against testnet/mainnet without writing code. Pure vanilla JavaScript frontend — no frameworks.
Live site: https://dashpay.github.io/evo-sdk-website/
yarn serve # Serve on http://localhost:8081 (Python HTTP server)
yarn generate # Regenerate docs from api-definitions.json
yarn check # Validate documentation is currentyarn test # Full suite: unit tests then Playwright E2E
yarn test:unit # Vitest unit tests + type-extraction tests
yarn test:types # Type-extraction tests (node --test)
yarn test:unit:watch # Vitest in watch mode
yarn test:unit:coverage # Vitest with coveragePlaywright E2E:
yarn test:smoke # Quick UI validation tests
yarn test:queries # Query execution tests (parallel)
yarn test:playground # Playground example tests
yarn test:transitions # State transition tests (sequential, slow)
yarn test:ui # Interactive Playwright UI
yarn test:report # View HTML reportRun a single test by pattern:
yarn playwright test --grep "getIdentity"Test against remote site:
PLAYWRIGHT_BASE_URL=https://dashpay.github.io/evo-sdk-website/ yarn test:smokepublic/app.js— One-line entrypoint shim (import './src/main.js'); the service worker caches this pathpublic/playground.html— Code playground for writing and running SDK snippets directly; linked from the main nav and driven bypublic/src/playground.jspublic/src/— Application logic, split into focused ES modules:operations.js(thecallEvo()dispatcher),sdk-client.js(SDK client lifecycle),main.js(entrypoint/wiring),playground.js(playground page), plus form, auth, and rendering modulespublic/api-definitions.json— Single source of truth for documented API operation definitionspublic/sdk-operation-catalog.json— Versioned operation catalog generated from the installed declarations: per-operation signatures, parameters, return types, and a recursive map of referenced SDK input/output types. Consumed by the docs generator and checked for drift byyarn checkpublic/dist/evo-sdk.module.js— Bundled SDK, copied fromnode_modules/@dashevo/evo-sdk/distbyyarn generate(not generated here)scripts/generate_docs.py— Generatesdocs.html,AI_REFERENCE.md, both type references, the SDK operation catalog, documentation manifest, and version information fromapi-definitions.jsonand installed SDK declarations; also refreshespublic/distfrom the installed SDK packagescripts/extract_sdk_types.mjs— Extracts typed operation metadata (signatures, parameters, return types) and recursively resolves referenced SDK input/output types from the installed TypeScript declarations, emittingsdk-operation-catalog.jsonscripts/check_documentation.py— Validates that generated documentation is current (yarn check)
import { EvoSDK, wallet, IdentitySigner, Document } from './dist/evo-sdk.module.js';
const client = new EvoSDK({ network: 'testnet' });
await client.connect();State transitions require identity + signer:
const identity = await client.identities.fetch(identityId);
const signer = new IdentitySigner();
signer.addKeyFromWif(privateKeyWif);
await client.identities.creditTransfer({ identity, recipientId, amount: BigInt(amount), signer });
// Document/contract operations also need the identity key
const identityKey = identity.getPublicKeyById(0);
await client.documents.create({ document, identityKey, signer });client.identities.*— Identity queries and state transitionsclient.contracts.*— Data contract operationsclient.documents.*— Document CRUDclient.tokens.*— Token operations (mint, burn, transfer, freeze)client.dpns.*— DPNS name resolutionclient.voting.*— Contested resource votingclient.epoch.*— Blockchain epoch queriesclient.system.*— Platform status and utilities
tests/e2e/utils/sdk-page.js— Page Object Model for the SDK UItests/e2e/utils/parameter-injector.js— Automated test data injection from api-definitions.jsontests/e2e/utils/base-test.js— Base test utilities (navigation, UI interaction, assertions)tests/e2e/fixtures/test-data.js— Centralized test parameters (identity IDs, contract IDs, etc.)
Playwright config defines 4 test projects: site-tests, smoke-tests, parallel-e2e-tests, and sequential-e2e-tests (transitions, omitted in CI). Timeouts: 120s per test, 30s action, 30s navigation.
- Add definition to
public/api-definitions.json - Implement a query handler in the
callEvo()switch statement inpublic/src/operations.js, or add a state-transition implementation to the appropriate module underpublic/src/transitions/and export it throughpublic/src/transitions/registry.js - Run
yarn generateto update documentation - Add test parameters to
tests/e2e/fixtures/test-data.js
Documentation is auto-generated from api-definitions.json:
public/docs.html— Human-readable interactive docspublic/AI_REFERENCE.md— AI assistant referencepublic/TYPE_REFERENCE.html— Human-readable SDK type referencepublic/TYPE_REFERENCE.md— Markdown SDK type declarationspublic/sdk-operation-catalog.json— Declaration-derived operation metadatapublic/docs_manifest.json— Generated-file metadata and content hashespublic/version-info.json— SDK version and build metadata
Always run yarn generate after modifying api-definitions.json.
- Tests run on PR/push to master via GitHub Actions
- Transition tests are skipped in CI (too slow)
- Site deploys to GitHub Pages after tests pass
- SDK version auto-updates daily via workflow