diff --git a/examples/audit-forensic-bridge/src/export.ts b/examples/audit-forensic-bridge/src/export.ts index 5f21296..e39c3e0 100644 --- a/examples/audit-forensic-bridge/src/export.ts +++ b/examples/audit-forensic-bridge/src/export.ts @@ -8,7 +8,7 @@ import path from 'node:path'; dotenv.config(); const NIRIUM_API_KEY = process.env.NIRIUM_API_KEY || 'nrm_test_key'; -const NIRIUM_BASE_URL = process.env.NIRIUM_BASE_URL || 'http://localhost:3001'; +const NIRIUM_BASE_URL = process.env.NIRIUM_BASE_URL || 'http://localhost:3002'; const IPFS_GATEWAY = process.env.IPFS_GATEWAY || 'https://ipfs.io/ipfs/'; const agent = new Agent({ diff --git a/examples/audit-forensic-bridge/src/server.ts b/examples/audit-forensic-bridge/src/server.ts index 1c26cfe..16bf170 100644 --- a/examples/audit-forensic-bridge/src/server.ts +++ b/examples/audit-forensic-bridge/src/server.ts @@ -11,7 +11,7 @@ app.use(express.json()); const PORT = Number(process.env.PORT) || 3000; const AGENT_SECRET = process.env.STELLAR_SECRET_KEY; const NIRIUM_API_KEY = process.env.NIRIUM_API_KEY || 'nrm_test_key'; -const NIRIUM_BASE_URL = process.env.NIRIUM_BASE_URL || 'http://localhost:3001'; +const NIRIUM_BASE_URL = process.env.NIRIUM_BASE_URL || 'http://localhost:3002'; const agentClient = new Agent({ apiKey: NIRIUM_API_KEY, diff --git a/packages/mcp/README.md b/packages/mcp/README.md index 5b544f5..933c253 100644 --- a/packages/mcp/README.md +++ b/packages/mcp/README.md @@ -72,7 +72,7 @@ Reading a DeFindex vault is free. Changing one needs the key, and ten of these e | Variable | Required | Purpose | |---|---|---| -| `AGENT_API_URL` | No (defaults to `http://127.0.0.1:3001`) | Nirium agent API base URL | +| `AGENT_API_URL` | No (defaults to `http://127.0.0.1:3002`) | Nirium agent API base URL | | `STELLAR_SECRET_KEY` | For paid tools | Funds x402 and MPP payments | | `NIRIUM_API_KEY` | For `start_loop`/`stop_loop` | Agent API key from [nirium.xyz/keys](https://nirium.xyz/keys) | | `STELLAR_NETWORK` | No (defaults to `testnet`) | `testnet` or `mainnet` | @@ -90,7 +90,7 @@ Anchor a **hash** of your data rather than the data itself. IPFS content cannot git clone https://github.com/nirium-protocol/nirium cd nirium/packages/mcp npm install -STELLAR_SECRET_KEY=S... AGENT_API_URL=http://localhost:3001 npx tsx src/index.ts +STELLAR_SECRET_KEY=S... AGENT_API_URL=http://localhost:3002 npx tsx src/index.ts ``` ## License diff --git a/packages/mcp/src/index.ts b/packages/mcp/src/index.ts index 9a0b161..c63bdc7 100644 --- a/packages/mcp/src/index.ts +++ b/packages/mcp/src/index.ts @@ -20,7 +20,7 @@ // (Stellar publishes no open mainnet RPC). Free tools need neither. // // Usage (stdio transport, from source): -// STELLAR_SECRET_KEY=S... AGENT_API_URL=http://localhost:3001 npx tsx src/index.ts +// STELLAR_SECRET_KEY=S... AGENT_API_URL=http://localhost:3002 npx tsx src/index.ts // // Claude Desktop config (published package): // { @@ -49,7 +49,7 @@ import { stellar as mppStellar } from '@stellar/mpp/charge/client'; // ─── Configuration ──────────────────────────────────────────── -const API_URL = process.env.AGENT_API_URL || 'http://127.0.0.1:3001'; +const API_URL = process.env.AGENT_API_URL || 'http://127.0.0.1:3002'; const STELLAR_KEY = process.env.STELLAR_SECRET_KEY || ''; const NIRIUM_API_KEY = process.env.NIRIUM_API_KEY || ''; const IS_MAINNET = process.env.STELLAR_NETWORK === 'mainnet'; diff --git a/packages/sdk-python/src/nirium/client.py b/packages/sdk-python/src/nirium/client.py index 1e525e2..d65ea91 100644 --- a/packages/sdk-python/src/nirium/client.py +++ b/packages/sdk-python/src/nirium/client.py @@ -45,12 +45,12 @@ class Agent: Nirium Agent — Full API + WebSocket client for the Nirium autonomous agent. Usage: - agent = Agent(api_url="http://localhost:3001", api_key="nrm_your_key") + agent = Agent(api_url="http://localhost:3002", api_key="nrm_your_key") market = await agent.get_market() print(f"XLM Price: ${market['xlmPrice']:.4f}") """ - def __init__(self, api_url: str = "http://localhost:3001", api_key: Optional[str] = None, token: Optional[str] = None): + def __init__(self, api_url: str = "http://localhost:3002", api_key: Optional[str] = None, token: Optional[str] = None): self.api_url = api_url.rstrip('/') self.ws_url = self.api_url.replace("http", "ws") + "/ws/signals" self.api_key = api_key diff --git a/packages/sdk/src/index.ts b/packages/sdk/src/index.ts index 257b436..cb1d8b1 100644 --- a/packages/sdk/src/index.ts +++ b/packages/sdk/src/index.ts @@ -577,7 +577,7 @@ function queryString(params?: object): string { * * const agent = new Agent({ * apiKey: 'nrm_your_key_here', - * baseUrl: 'http://localhost:3001', + * baseUrl: 'http://localhost:3002', * }); * * // Check health @@ -616,7 +616,7 @@ export class Agent { constructor(config: AgentConfig) { this.apiKey = config.apiKey; - this.baseUrl = (config.baseUrl || 'http://localhost:3001').replace(/\/$/, ''); + this.baseUrl = (config.baseUrl || 'http://localhost:3002').replace(/\/$/, ''); this.wsUrl = config.wsUrl || this.baseUrl.replace(/^http/, 'ws') + '/ws/signals'; this.token = config.token || null; }