ARMS REST API
arms-service is a thin Axum HTTP wrapper around the ARMS core crate. It binds
0.0.0.0:8080 by default (--bind) with dimensionality 64 (--dim).
cargo run --release -p arms-service -- --dim 64
Routes
GET /healthz
Returns ok as plain text when the service is up.
POST /place
Insert a point.
// request
{ "id": "wallet-1", "coord": [0.1, 0.2, /* … dim values */], "payload": { "label": "dex" } }
// response
{ "id": "wallet-1" }
POST /get
Fetch a previously placed point by id.
// request
{ "id": "wallet-1" }
// response
{ "coord": [0.1, 0.2, /* … */], "payload": { "label": "dex" } }
POST /query
k-nearest-neighbour search (brute-force over the in-memory index for now).
// request
{ "embedding": [0.1, 0.2, /* … */], "k": 10 }
// response
{ "neighbors": [ { "id": "wallet-1", "coord": [/* … */], "distance": 0.42, "payload": {} } ] }
GET /state-root
Current Merkle root over indexed state.
// response
{ "root": "<hex>", "count": 1234 }
TypeScript client
import { ArmsClient } from "@lumi-node/locus-sdk";
const arms = new ArmsClient("http://localhost:8080");
await arms.place("wallet-1", coord, { label: "dex" });
const neighbors = await arms.query(embedding, 10);
const { root, count } = await arms.stateRoot();
const up = await arms.healthz();