Skip to content

docs: Building Apps how-to guides, per-language SDK pages and Ride REPL page (ECO-190) - #32

Merged
33imattei33 merged 4 commits into
devfrom
docs/eco-190-how-tos-sdk
Oct 27, 2026
Merged

33imattei33 merged 4 commits into
devfrom
docs/eco-190-how-tos-sdk

Conversation

@33imattei33

Copy link
Copy Markdown
Contributor

Closes ECO-190.

What's in it

How-to guides: new pages in 04_building-apps/how-to/, linked from 03_how-to-guides.md. Each page has a sample in docs/_samples.

Page Sample What it shows
Airdrop a Token airdrop.ts Mass Transfer in batches of 100, fee formula
Accept Payments payments.ts Invoice ID in the transfer attachment, matched with node-api-js
Exchange Tokens with a dApp token-exchange.ts, ride/token-exchange.ride Fixed-price buy and sell dApp
Run a Simple Vote voting.ts, ride/voting.ride One vote per address, verifier locks the poll
Pass a List to a dApp list-argument.ts, ride/list-argument.ride Two list parameters, FOLD<10>

SDK pages: 02_client-libraries-and-sdk.md is now an overview. Each language page covers install, connecting to the Testnet, and signing and broadcasting, including error handling.

  • sdk/01_typescript.md now holds the package table. check_sdk_table.py and the drift workflow point to it.
  • sdk/02_java.md covers java-sdk 2.0.2, the latest release on Maven Central. Samples are in docs/_samples/java.

Tools

  • 01_developer-tools.md is expanded: the node's compileCode, estimate and decompile endpoints, and the current state of surfboard, ride-js and @decentralchain/ride.
  • New page developer-tools/01_ride-repl.md covers @decentralchain/ride-repl@1.6.2.

CI: new java_samples_compile job in docs_checks.yml. It runs mvn -q compile on Temurin 25.

Facts that differ from the old pages or the package READMEs

  • Java SDK 2.0.x needs Java 25. Its jars are class file version 69. The old page and the README say Java 11, which only holds for older releases. The README's Asset.DCC is also wrong: the class is AssetId.DCC.
  • Java transaction builders default to the Mainnet chain ID. Testnet code has to call .chainId(ChainId.TESTNET).
  • The REPL needs host globals. It calls httpGet and the hash functions (blake2b256, keccak256, sha256) as globals, which a host has to provide. The sample provides them from ts-lib-crypto.
  • surfboard 2.2.6 and ride-js 2.3.0 still depend on compiler packages outside the DecentralChain org. The page says so without naming that project.

Verification

  • sphinx-build -W: no warnings. The independence grep and Vale are clean.
  • npm run typecheck passes in docs/_samples. mvn -q compile passes on JDK 25.
  • check_install_snippets.py (15 snippets) and check_sdk_table.py (22 rows) pass.
  • check_ride_samples.py: all 7 Ride samples compile on the public Testnet node.
  • Run against the Testnet: ride-repl.ts, CreateAccount.java and ConnectToTestnet.java. The other samples haven't been broadcast, because that needs funded accounts. That is ECO-201.

Notes for the reviewer

🤖 Generated with Claude Code

jourlez and others added 4 commits October 21, 2026 21:56
release: Building Apps concept pages (#28) and published-locales fix (#29) to main
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ide REPL page (ECO-190)

How-to guides (04_building-apps/how-to/), each with a sample in docs/_samples:
airdrop (mass transfer in batches of 100), payments (transfer attachment as
invoice reference, checked with node-api-js), token exchange (fixed-price
dApp), voting (one vote per address, locked verifier) and list arguments
(FOLD over two list parameters). The three Ride scripts compile on the
public Testnet node.

SDK: 02_client-libraries-and-sdk.md becomes an overview; the TypeScript
package table moves to sdk/01_typescript.md (check_sdk_table.py follows it)
and sdk/02_java.md covers java-sdk 2.0.2, the latest on Maven Central. Its
jars are compiled for Java 25 (class file version 69), not Java 11 as the
old page said. Java samples live in docs/_samples/java and CI compiles them
with JDK 25 (new java_samples_compile job).

Tools: 01_developer-tools.md documents the node's compileCode, estimate and
decompile endpoints and the current state of surfboard, ride-js and
@decentralchain/ride; developer-tools/01_ride-repl.md covers
@decentralchain/ride-repl 1.6.2, including the host globals (httpGet and
hash functions) it needs to run outside a browser IDE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@33imattei33
33imattei33 merged commit 5318d1e into dev Oct 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants