Provisioning: 5 Lines
Autonomous corporate rebalancing (USDC to CETES) in production.
import { Agent } from "nirium";
const agent = new Agent({
apiKey: process.env.NIRIUM_API_KEY,
baseUrl: "https://nirium-agent.fly.dev",
});
// Live market data — rates attributed to their source
const market = await agent.getMarket();
// The node catalog: what runs, on which network
const nodes = await agent.getNodes();
// Anchor evidence to IPFS and get a verifiable CID back
const { cid } = await agent.anchorAuditRecord({ hash: "<sha256>" });B2B Micropayments for Agents
x402 for API-level atomic payments. MPP Charge for per-request settlement without an external facilitator.
x402 — Atomic Per-call Payment
Linux Foundation Standard
import { Agent } from "nirium";
const agent = new Agent({ baseUrl: "https://nirium-agent-mainnet.fly.dev" });
// PAY for someone else's API. The 402, the signature and the retry
// happen underneath — you just await a fetch.
agent.initX402({
secretKey: process.env.STELLAR_SECRET_KEY, // or { signer } from a wallet
network: "stellar:pubnet",
});
const res = await agent.x402Fetch(
"https://nirium-agent-mainnet.fly.dev/api/v1/premium/market", // $0.05 USDC
);
const data = await res.json();
// ─────────────────────────────────────────────────────────────
// CHARGE for YOUR OWN API. Same rail, other side of the counter.
// Funds go payer → you. They never touch Nirium.
// Third-party facilitator use is invite-only while legal review closes —
// same gate as Treasury and Payouts. Request access before integrating.
import { x402Serve } from "nirium";
app.use("/premium", x402Serve({
payTo: "G...", // your Stellar address
routes: { "GET /signals": "$0.02" },
facilitatorApiKey: process.env.X402_FACILITATOR_API_KEY,
}));Pay per request
The same wallet that signed you in can pay for an API call. $0.02 USDC, no card, no subscription — and no XLM: Pollar sponsors the account reserve and the x402 facilitator sponsors the network fee.
MPP — Corporate Settlement
Stripe/Tempo Spec
import { Agent } from "nirium";
const agent = new Agent({ baseUrl: "https://nirium-agent-mainnet.fly.dev" });
// MPP Charge: the client signs a full USDC transfer inside each request.
// No external facilitator — the server validates by simulation and submits.
agent.initMpp({
secretKey: process.env.STELLAR_SECRET_KEY,
network: "stellar:pubnet",
});
// $0.05 USDC — charges and delivers on mainnet
const res = await agent.mppFetch(
"https://nirium-agent-mainnet.fly.dev/api/v1/mpp/market",
);
// Note: /signals and /execute are testnet-only. Signals come from the
// autonomous loop and execution needs a signing key; the mainnet box has
// neither by design, so it answers 501 without charging you.
| Endpoint | Price | Network |
|---|---|---|
| GET /api/v1/premium/signals | $0.02 | Testnet onlyneeds the autonomous loop, disabled on the mainnet box |
| GET /api/v1/premium/market | $0.05 | Mainnet + testnet |
| POST /api/v1/premium/execute | $0.25 | Testnet onlyneeds a signing key the mainnet box deliberately does not hold |
| GET /api/v1/mpp/signals | $0.02 | Testnet onlyneeds the autonomous loop, disabled on the mainnet box |
| GET /api/v1/mpp/market | $0.05 | Mainnet + testnet |
| POST /api/v1/mpp/execute | $0.25 | Testnet onlyneeds a signing key the mainnet box deliberately does not hold |
| Feature | x402 | MPP Charge | MPP Channel |
|---|---|---|---|
| On-chain tx per call | ✓ | ✓ | ✗ |
| Requires SaaS facilitator | ✓ | ✗ | ✗ |
| Institution needs XLM | ✗ | Opt. | ✓ |
| Optimized for | Rapid Integration | Native B2B P2P | High-Freq Settlement |
The table compares the three protocols. Nirium runs x402 and MPP Charge today, on testnet and mainnet. MPP Channel requires a funded on-chain channel contract, so it stays behind the same external-audit gate as the treasury vault — the endpoints exist and report channel mode as disabled.
MCP Server
Claude & Cursor
Connect your Claude Desktop or Cursor instance to your infrastructure in 2 minutes. Enable your node to manage corporate capital securely and auditably.
// Claude Desktop config (~/.claude/claude_desktop_config.json)
{
"mcpServers": {
"nirium": {
"command": "npx",
"args": ["-y", "nirium-mcp"],
"env": {
"NIRIUM_API_KEY": "your_key_here"
}
}
}
}11 Base Operations
get_market_stateGet live tickers: XLM/USDC price, base fee, Blend supply rate
get_loop_statusCheck autonomous loop status, scan count, and uptime
start_loopStart the autonomous market scanning loop (Auth)
stop_loopStop the autonomous market scanning loop (Auth)
execute_demoSimulate a strategy via Soroban dry-run (Free)
get_premium_signalsMarket signals from the autonomous loop, testnet only — factual data, not a recommendation ($0.02 USDC)
get_premium_marketMarket state with reference rates attributed to their source, via x402 ($0.05 USDC)
execute_paid_strategyExecute strategy on-chain via x402, testnet only — needs a signing key the mainnet box does not hold ($0.25 USDC)
Telemetry Hub
86 Endpoints architected strictly for institutional autonomous routing and forensic export (for operators subject to Fintech Law).
Core B2B Infrastructure
/healthLiveness probe
/api/infoAgent metadata, network and version
/api/tickersCETES + Blend reference rates
/api/nodesExecution Node catalog (status + custody)
/api/loop/statusAutonomous loop state + last decision
/api/execute-demoRun a demo rebalance — no key required
/api/auth/tokenExchange credentials for a JWT
/api/auth/keysIssue an API key (also GET / DELETE)
Compliance Explorer
Auth & Security
/api/auth/token/api/auth/keys/api/health/api/authenticateTreasury Engine
/api/loop/start/api/loop/stop/api/execute/api/loop/statusCompliance & IPFS
/api/audit/log/api/audit/info/api/reporting/summary/api/reporting/exportMarket Intelligence
/api/market/api/tickers/api/strategies/api/signals/recentDisbursement & Nodes
/api/nodes/api/payroll/run/api/payroll/submit/api/payroll/onboard+18 Modular subsystems for Institutional Orchestration
Hardened Execution Nodes
Non-custodial Soroban smart contracts deployed on Stellar Testnet.
CBTWMZCG3P72EHFAQ4ZLSEBIOFYJC244H5J6DHZIJ56FHFWJ2CFAWSZUCC2TU5BDTKTPRRRQPEF77I54XYHFQ25XGIRO2TCWKSR7NRJDFR5L5NR5CC72F57YTPX76HAA64JQOEGHQAPSADQWSY5DWVBR66JINPFDLNCQYHICCBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMA