Platform API
Native settlement, authenticated state, proof-backed outcomes and durable agent workflows across Paxeer X.
Choose an interface
The canonical gateway origin is https://api-mainnet-beta.paxeer.network. Use native JSON-RPC for activities and state, service HTTP for domain workflows, and the Agent API for preparation, policy and tracking. EVM chain ID 125 identifies the EVM environment; native configuration independently binds the protocol network and sequencer trust anchor.
| Surface | Transport | Purpose |
|---|---|---|
| Native RPC | POST /rpc | Accounts, assets, sequences, activities and evidence. |
| Native subscriptions | GET /rpc/ws | Receipt, checkpoint and account notifications. |
| Activities and receipts | POST /v1/activities; GET /v1/receipts/{activity_id} | Canonical activity submission and receipt retrieval. |
| Programs HTTP | /v1/programs/deploy, /upgrade, /wind-down, /simulate, /call | Deterministic program lifecycle and execution. |
| Agent API | Contract major 1, minor 2 | Scoped identities, disclosures, approvals, budgets and event streams. |
Authentication and signing
Public native reads do not require a gateway key. State-changing JSON-RPC uses Authorization: LayerX-Key <key-id>:<key-secret> with activity:write. Hosted identity sessions use Authorization: Bearer <session-token>. The gateway credential admits an operation; a cryptographic activity signature authorizes the exact protocol action. Use scoped identities and credentials and budget controls.
Query native state
POST /rpc
Content-Type: application/json
{"jsonrpc":"2.0","id":1,"method":"lx_getNodeInfo","params":[]}Parameters are positional. Account, activity, asset and checkpoint IDs are nonzero 32-byte hexadecimal strings. Canonical activities, proofs and receipts use hexadecimal bytes. Amounts and balances use decimal strings; preserve integer precision.
| Method | Exact parameters | Result |
|---|---|---|
lx_getNodeInfo | [] or omitted | Protocol handshake and heads. |
lx_getAccount, lx_getBalance | [account_id] | Authenticated account object with balance and asset ID. |
lx_getBalances | [did] | Complete bounded DID account list. |
lx_getSequence | [account_id] or [did, "identity"] | Account or authenticated identity next sequence. |
lx_getReceipt, lx_getActivityStatus | [activity_id] | Verified receipt, or unavailable while no receipt exists. |
lx_getBatchHeader | [batch_number] | Signed header; number is a canonical nonzero decimal u64 string. |
lx_getCheckpoint | [checkpoint_id] | Checkpoint evidence. |
lx_getProof | ["activity", id], ["receipt", id], ["account", id, account_id] | Proof and signed header, or exact native account-proof bytes. |
lx_getAsset | [asset_id] | Native asset metadata. |
lx_listAssets | [], [cursor], [cursor, limit] | Ascending assets and next cursor; cursor null or asset ID, limit 1–256. |
lx_estimateFee | [canonical_hex] | Committed-schedule estimate; no fee reservation. |
lx_register | [signer_public_key, registration_signature] | Self-registered identity principal. |
lx_requestFunds | [did, signer_public_key] | One bounded approved beta funding grant, authenticated by identity session. |
Prepare, sign and submit
- Verify the network handshake and read current identity and account sequences.
- Construct canonical activity bytes with an actor, authority, time bounds, fee limit, payload and stable idempotency key.
- Inspect the decoded disclosure and sign the exact signing preimage.
- Submit at the desired commitment and retain the activity ID and receipt.
- Verify the evidence before releasing goods, funds or dependent work.
POST /rpc
Authorization: LayerX-Key <key-id>:<key-secret>
Content-Type: application/json
{"jsonrpc":"2.0","id":2,"method":"lx_sendActivity",
"params":["<fresh-signed-canonical-activity-hex>","executed"]}Commitments are executed, batched and finalised. The response establishes exactly the requested level. Executed success includes a sequencer-signed receipt with result_code: 0. Admission alone is not execution. Retain activity ID, batch ID, global sequence, idempotency key, state root and receipt together.
Pending results and idempotency
A pending commitment returns -32001 with data.state: "pending", the requested commitment and available evidence. A timeout does not establish rejection. Reconcile the existing activity and reuse its canonical bytes and idempotency key rather than creating a second payment. Agent mutations return the same result for the same body and key; a changed body returns IdempotencyConflict.
Subscribe and reconcile
// WebSocket: wss://api-mainnet-beta.paxeer.network/rpc/ws
{"jsonrpc":"2.0","id":3,"method":"lx_subscribe","params":["receipts"]}
{"jsonrpc":"2.0","id":4,"method":"lx_subscribe","params":["account","<account-id>","<resume-cursor>"]}
{"jsonrpc":"2.0","id":5,"method":"lx_unsubscribe","params":["<subscription-id>"]}Subscribe to receipts, checkpoints or account with an account ID. Each permits an optional resume cursor. Subscribe returns a subscription ID; unsubscribe returns true when stopped. HTTPS subscription requests return -32004 WebSocket required. Reconcile events with verified reads.
Agent event streams
Agent subscriptions support create, list, health, acknowledge, pause, resume and delete. Their persisted cursor enables recovery. Scope evaluates tenant, capability, then filters for agents, accounts, activity types, modules, assets, counterparties and result classes. Delivery is at least once: deduplicate by deduplication_id and handle Event, Gap and Truncated variants.
Agent API pipeline
The wire envelope contains contract major and minor as big-endian u16, request ID as big-endian u64, operation as UTF-8 and a canonical-map payload. Amounts, sequences, limits and timestamps are decimal strings. Settlement domain is Paxeer.
| Operation | Inputs and outcome |
|---|---|
prepare | Actor, authority, account sequence, timestamp bound, idempotency key, fee limit, payload and payload hash produce unsigned canonical bytes, signing preimage, disclosure, preparation reference and expiry. |
sign, submit | Preparation reference and signature bind the signed activity and tracked submission. |
track | Submission reference returns state, evidence, verification level and transitions. |
wait | Submission reference, requested verification level and deadline return the actual level and whether the deadline elapsed. |
| Reads | read.balance, read.account, read.module_state, read.history, read.batch, read.checkpoint, read.proof_bundle. |
| Availability and projection | availability.fetch, export.offline, project. Projection is an estimate rather than a verified read. |
Submission progresses through Prepared, Signed, Queued, Submitted, Acknowledged, Unknown, Executed, Failed and Expired. Unknown is a first-class pending state. Verification levels are Unverified, SequencerSigned, BatchIncluded, StateProven, CheckpointFinalised and SettlementAnchored.
Errors and retries
| Code | Meaning | Action |
|---|---|---|
-32602 | Invalid parameters. | Correct encoding and positional order. |
-32601 | Unknown method. | Use the published contract. |
-32002 | Authentication or scope refusal. | Correct credentials and permissions. |
-32001 | Unavailable read/submission or pending commitment. | Inspect typed data and reconcile the existing activity. |
-32005 | Rate or capacity refusal. | Back off, retaining mutation identity. |
-32603 | Invalid upstream data. | Retain evidence and refuse success. |
Proxied failures preserve the upstream body in error.data. Agent errors distinguish TransportFailure, Deadline, ProtocolIncompatibility, UnavailableCapability, CoreRejection, VerificationFailure, PolicyRefusal, CapabilityRefusal, BudgetRefusal, RateLimit, IdempotencyConflict and InternalFault. Resolve authority and verification failures before retrying.
Continue with CLI workflows, SDK integration and EVM JSON-RPC.