Background
This issue originated from a request by @thephez to verify the tutorial code:
"Can you take the documentation on this page and build the app from the tutorial? Use the provided code as-is without modification. Basically just want to confirm it's a working app. Put it in a repo of your own."
The tutorials were built exactly as written, revealing that none of the code compiles or runs against the published SDK.
The 4 tutorials added in #3422 (book/src/evo-sdk/tutorials/) contain code that does not compile or run against @dashevo/evo-sdk@3.1.0-dev.1. The code appears to have been written against a planned convenience API that was never implemented.
Affected tutorials:
- React Integration (
react-integration.md)
- Car Sales Management (
car-sales.md)
- Creating a Basic Token (
basic-token.md)
- Card Game with Tokens (
card-game.md)
Issue categories
API signature mismatches (code won't compile)
contracts.publish() expects { dataContract, identityKey, signer }, not { identityId, documentSchemas, privateKeyWif }
documents.create/replace/transfer() expect constructed Document objects + identityKey + signer, not inline field dicts
documents.query() uses dataContractId/documentTypeName, not contractId/documentType
tokens.mint/transfer/burn() use dataContractId + tokenPosition, not tokenId; require identityKey + signer, not privateKeyWif
- Token config requires full
TokenConfiguration class hierarchy, not plain objects
identity.getId() / identity.getBalance() / identity.getPublicKeys() → .id / .balance / .publicKeys
doc.getData() → doc.properties
Schema/runtime issues (code won't execute even with correct signatures)
- Schema properties missing required
position fields
- Indexed string properties use
maxLength: 64 (must be ≤ 63)
- Index definitions use
desc sort direction (only asc supported)
identityNonce needs to be nonce + 1n (next unused, not last used)
- Token operations require CRITICAL security level key (tutorials use Master/High)
- Integer properties return as
bigint from queries (need conversion for replace())
Verification
All issues were verified by building the tutorials as a standalone project and running them on testnet:
Fix
PR #3423 corrects all code blocks while preserving the tutorial prose and structure.
Background
This issue originated from a request by @thephez to verify the tutorial code:
The tutorials were built exactly as written, revealing that none of the code compiles or runs against the published SDK.
The 4 tutorials added in #3422 (
book/src/evo-sdk/tutorials/) contain code that does not compile or run against@dashevo/evo-sdk@3.1.0-dev.1. The code appears to have been written against a planned convenience API that was never implemented.Affected tutorials:
react-integration.md)car-sales.md)basic-token.md)card-game.md)Issue categories
API signature mismatches (code won't compile)
contracts.publish()expects{ dataContract, identityKey, signer }, not{ identityId, documentSchemas, privateKeyWif }documents.create/replace/transfer()expect constructedDocumentobjects +identityKey+signer, not inline field dictsdocuments.query()usesdataContractId/documentTypeName, notcontractId/documentTypetokens.mint/transfer/burn()usedataContractId+tokenPosition, nottokenId; requireidentityKey+signer, notprivateKeyWifTokenConfigurationclass hierarchy, not plain objectsidentity.getId()/identity.getBalance()/identity.getPublicKeys()→.id/.balance/.publicKeysdoc.getData()→doc.propertiesSchema/runtime issues (code won't execute even with correct signatures)
positionfieldsmaxLength: 64(must be ≤ 63)descsort direction (onlyascsupported)identityNonceneeds to benonce + 1n(next unused, not last used)bigintfrom queries (need conversion forreplace())Verification
All issues were verified by building the tutorials as a standalone project and running them on testnet:
Fix
PR #3423 corrects all code blocks while preserving the tutorial prose and structure.