CLI: ndsr
ndsr 1.0.0 — Necter Distributed State Runtime
Usage: ndsr <COMMAND>
Commands: run Execute one function of a .hbc artifact and print the signed receipt compile Compile an AssemblyScript module into a .hbc artifact inspect Validate a .hbc artifact and print its manifest and address serve Run a node: HTTP API, optional chunk storage, CCS registration keygen Create the node key in DATA_DIR (if missing) and print the identity id Print the identity of the existing key in DATA_DIRndsr run
Section titled “ndsr run”ndsr run [OPTIONS] <HBC> <FUNCTION> --input <INPUT> Input passed to the function as-is [default: ""] --input-file <INPUT_FILE> --gas <GAS> [default: 1000000] --data-dir <DATA_DIR> Persist key/state/ledger here; omit for an ephemeral runPrints {success, output, error, gas_limit, gas_used, receipt} where receipt is the signed envelope. A
function that is not exported is refused before execution:
Error: invalid request: function 'nope' is not exported by this module.
NDSR_ENGINE=pulley forces the interpreter (native forbids it).
ndsr inspect
Section titled “ndsr inspect”ndsr inspect <HBC>Prints JSON: manifest, manifest_address, functions with func_id, wasm_bytes, abi_valid,
abi_error.
ndsr compile
Section titled “ndsr compile”ndsr compile [OPTIONS] <SOURCE> -o, --out <OUT> --name <NAME> Module name (defaults to the file stem) --module-version <MODULE_VERSION>Compiles AssemblyScript with the pinned [email protected] (needs Node.js and npm; installed on first use
into $NDSR_ASC_HOME, default ~/.cache/ndsr/assemblyscript-0.28.20).
ndsr keygen / ndsr id
Section titled “ndsr keygen / ndsr id”ndsr keygen --data-dir ./node # {"key_file":"./node/node.key","node_id":"ndsr-…","public_key":"0x…"}ndsr id --data-dir ./nodendsr serve
Section titled “ndsr serve”Runs a node with an HTTP API. See Run a validator for the flags that matter on the
testnet; ndsr serve --help lists all of them. The node refuses a non-loopback --bind without
NDSR_API_TOKEN (at least 16 characters).
| Route | Auth | |
|---|---|---|
GET /health, GET /node |
open | liveness, identity |
POST /execute |
bearer | execute a round |
PUT /modules/:address |
bearer | store a .hbc whose computed address equals :address |
POST /consensus/votes, /consensus/reward-proposals, /consensus/task-rounds, /consensus/committee-sets |
node-signed or bearer | consensus traffic |
GET /consensus/rounds/:id, GET /consensus/evidence |
open | round tallies, slashing evidence |
GET /ledger?module=&function=&limit= |
open | recent signed receipts |
GET /status |
open (redacted) / bearer (full) | node state |
GET /sync/modules[…] |
node-signed validator | state sync |