Code for the tutorials found on the Platform documentation
site. This repo
uses @dashevo/evo-sdk. For the legacy js-dash-sdk tutorials, see
v2.0.1.
Note: NodeJS (v20+) must be installed to run the tutorial code.
git clone https://github.com/dashpay/platform-tutorials.gitDo a clean install of project dependencies:
npm ci- Check connection:
node connect.mjs - Create a wallet:
node create-wallet.mjs - Fund the platform address using the bridge URL printed in the previous step
- Create a
.envfile (see.env.example) and setPLATFORM_MNEMONICto the mnemonic from step 2. SetNETWORKif needed (defaults totestnet).
Proceed with the Identities and Names tutorials first and the Contracts and Documents tutorials next. They align with the tutorials section on the documentation site.
The identity ID is automatically resolved from your mnemonic, so there is no need to set it
manually. After registering a data
contract, set DATA_CONTRACT_ID in your
.env file to the new contract ID for use in subsequent document tutorials.
Some client configuration options are included as comments in
setupDashClient.mjs if more advanced configuration is required.
Tests run each tutorial as a subprocess and validate its output. No test framework dependencies are required — tests use the Node.js built-in test runner.
Ensure your .env file is configured (see .env.example) before running tests.
# Read-only tests (default) — safe to run, no credits consumed
npm test
# Write tests — registers identities/contracts/documents (consumes testnet credits)
npm run test:read-write
# All tests
npm run test:allPRs accepted.