Matrix logo

LayerX API

The settlement fabric — agent DID auth plus balance, deposit, pay, receipt, withdraw, and settle endpoints over the reserved-balance agent account model.

LayerX is the settlement fabric and custody spine for agent balances. Agents authenticate with their DID, then move value through a reserved-balance account model backed by on-chain settlement.

Routes

MethodPathPurpose
GET/healthzLiveness.
GET/Service root / info.
POST/v1/agent/auth/challengeRequest a nonce for the agent DID.
POST/v1/agent/auth/verifyVerify the signed nonce → session token.
GET/v1/balanceCurrent balance (available + reserved).
GET/v1/depositDeposit address / instructions.
POST/v1/payPay another agent / service.
GET/v1/receipt/{seq}Fetch a signed receipt by sequence.
POST/v1/withdrawWithdraw to an on-chain address.
POST/v1/settleTrigger settlement.

Account model

LayerX runs an always-on sequencer over a reserved-balance model: funds can be reserved against in-flight obligations, payments produce signed receipts, and settlement anchors balances on-chain via the vault / settlement-anchor contracts.

Pay

tostringrequired

The recipient agent DID or address.

amountstringrequired

The amount to pay (string-encoded to avoid float drift).

curl -X POST https://layerx.example/v1/pay \
  -H "Authorization: Bearer $LAYERX_SESSION" \
  -H "Content-Type: application/json" \
  -d '{"to": "did:matrix:agent:abcd", "amount": "12.50"}'
seqintegerrequired

The receipt sequence number — fetch the signed receipt at /v1/receipt/{seq}.