Use these examples when you want runnable samples behind the inline exchange-integration snippets. They are intentionally offline-first: tests do not require funded accounts or live RPC calls.

Download

Download c8ntinuum-exchange-integration-examples.zip and unzip it:
The archive unpacks to examples/exchange-integration/, which holds a README.md, the JavaScript sample in javascript/ and the Java sample in java/. Run the commands on this page from the directory where you unzipped the archive.

Layout

Prerequisites

Install the JavaScript dependencies and run the full JavaScript test suite:
Run the full Java test suite. It needs Maven and a JDK, and Maven downloads the Java dependencies on the first mvn run:
To run one group of tests at a time, use the commands in the sections below.

Address generation and validation

The tested samples back the snippets in Address Generation and Validation.

Offline signing and decoding

The tested samples back the snippets in Offline Signing and Broadcasting. They assert decoded transaction fields before any broadcast step: chain ID, sender, nonce, recipient, value, gas fields, data selector, and raw transaction hash.
Never use the demonstration private keys or generated addresses in production systems.