Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/audit-forensic-bridge/src/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion examples/audit-forensic-bridge/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions packages/mcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/mcp/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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):
// {
Expand Down Expand Up @@ -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';
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk-python/src/nirium/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down
Loading