Thesettlementlayerforthemachineeconomy.

LayerX agent domain

Typed subaccounts from readable account names

Agent wallets and account namespaces

Each agent holds main, budget, escrow, stream, margin and per-asset accounts.

Name an account agent:<did>:budget:<id> and the kernel parses it into one of 14 account kinds, then hashes the name into a 32-byte account ID. Because the ID comes from the name, you can derive an agent's holding address offline and read it without a directory lookup. Every balance stays attributable to a named purpose, so operating float, budgets, escrow holds and margin postings sit in separate accounts. Opening one takes credit, genesis or governance authority.

What it does

In LayerX, the agent domain of Paxeer X, an account is a canonical name such as agent:<did>:main, agent:<did>:budget:<id>, agent:<did>:escrow:<id>, agent:<did>:stream:<id>, agent:<did>:margin:<position> or agent:<did>:asset:<hex64>. The kernel parses that name into one of 14 account kinds and hashes it into a 32-byte account ID, so the purpose of a balance is carried by its address. System accounts for liquidity, long and short funding, insurance, fees, the Paxeer reserve and Paxeer withdrawals use the same derivation. Accounts are opened under credit, genesis or governance authority, never implicitly.

Key capabilities

  • Typed subaccounts per agent: main, budget, escrow, stream, margin and per-asset holdings.
  • Account ID derived by hash from the name, so any client can compute it.
  • Name parsing rejects anything outside the known namespaces before state is touched.
  • Opening an account requires credit, genesis or governance authority.
  • Closing an account requires a zero balance and no open reference.
  • System and module balances live under the same named-account scheme as agents.

Who it's for

Developers and operators building agents that hold and move funds on Paxeer X.

Why it matters

A balance is always attributable to a named purpose, so an agent's operating float, a budget, an escrow hold and a margin posting are separate accounts rather than one pooled balance. Because the account ID is a hash of the name, a client can derive the address for an agent's holding offline and read it without a directory lookup.

Differentiators

Account addresses are derived from readable names rather than allocated, so the purpose of every balance is verifiable from its address alone; account opening is authority-gated rather than implicit.

Outcomes

  • Derive any account address from its name, with no lookup
  • Separate accounts for float, budgets, escrow and margin per agent
  • Account opening is authority-gated, never implicit

Technical notes

  • LX_ACCOUNT_ID_BYTES = 32, LX_ACCOUNT_NAME_MAX = 512; the account registry starts at 512 slots and holds up to 1,048,576.
  • Account ID = SHA-256("LX:ACCOUNT:v1" || name_length:u32 big-endian || name). Module-value accounts instead take their ID from the trailing 64 hex characters of the name.
  • Name bytes are restricted to a-z, 0-9, ., _, - and :, with no empty segment and no trailing colon.
  • Opening is idempotent for an existing name, refuses a presented ID that does not match the derived one (-409), and refuses a system account opened under credit authority.
  • Errors: -208 unknown account namespace, -409 account ID mismatch, -407 account not empty.
  • A LayerX agent account is a derived kernel subaccount, not a deployed contract.
  • Runtime floors: Node.js 22 or newer, Python 3.11 or newer.
import { JsonRpcClient, walletAccount } from "layerx-sdk";

export async function readAgentMain(
  client: JsonRpcClient,
  did: string,
  nativeAsset: string,
) {
  const main = walletAccount(did, nativeAsset, nativeAsset);
  const account = await client.getAccount(main);
  const balances = await client.wallet(nativeAsset).accounts(did);
  return { account, balances };
}

More in LayerX agent domain

Build on Paxeer.

Give your agent a wallet, set its policy, and settle your first call on LayerX.