diff --git a/.gitignore b/.gitignore index 6003099a..93223874 100644 --- a/.gitignore +++ b/.gitignore @@ -1,226 +1,59 @@ -node_modules/ -**/node_modules/ -dist/ -**/dist/ -.turbo/ -**/ .turbo/ -/.pnpm-debug.log* -/.next-internal - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env*.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts - -# Rust / Soroban -/target/ -target/ -**/target/ -Cargo.lock -# fuzz/ is a standalone binary-only crate (never published, never a -# dependency of anything) run only in CI -- committing its lockfile is -# the standard cargo-fuzz convention and is what keeps a loose upstream -# dependency spec (see fuzz/Cargo.toml's ed25519-dalek comment) from -# silently breaking CI again whenever crates.io publishes something new. -!fuzz/Cargo.lock -# Root workspace lockfile (nirium-soroban-contracts + protocol/) -- these compile -# to deployed WASM artifacts, not a library other Rust projects depend on, -# so the usual "don't commit a library's Cargo.lock" advice doesn't apply -# here; reproducible builds matter more than resolution flexibility. Same -# root cause as fuzz/Cargo.lock: without this, `ethnum` floated to 1.5.2 -# and broke CI's contracts build against the current rustc (fixed via -# `cargo update -p ethnum --precise 1.5.3`) with nobody noticing until CI -# finally got far enough to reach that step. -!/Cargo.lock -fuzz/corpus/ -fuzz/artifacts/ -nirium-soroban-contracts/test_snapshots/ -*.wasm - - - -# --------------------------------------------- -# AI Agent Generated Documentation (Ignored) -# --------------------------------------------- -# Ignoring prompts and plans generated for other networks/hackathons -# Ignore all root markdown files except core documentation -*.md -# 13-sep-2026: the *.md rule above is repo-wide (no leading /), so it was -# also silently swallowing every SKILL.md under .agents/skills/ and -# .claude/skills/ — only nirium-core-context/SKILL.md survived, via a past -# `git add -f`. Everything else (full-context-loading, nirium-github-sweep, -# npm-tarball-verify, cross-repo-content-sync, claude-antigravity-setup) -# existed only on this machine's filesystem, not in git — a fresh clone or -# machine swap would have lost them. First pass only excepted SKILL.md -# itself, then found companion .md files (cross-chain/{cctp,axelar, -# layerzero}.md, pitch-deck/references/*.md, copywriting/references/*.md, -# spec-to-code-compliance/resources/*.md) still silently caught by the same -# rule — widened to the whole directory so no future companion file repeats -# this. Explicit exception, not a `git add -f` workaround, so it survives -# future edits to the *.md list above. -!.agents/skills/** -!.claude/skills/** -!README.md -!DECISION_LOG.md -!CONTRIBUTING.md -!NIRIUM_TECHNICAL_PAPER.md -!DEMO_SCRIPT.md -!SECURITY.md -!SECURITY_AUDIT_V2.md -!claude.md -!AGENTS.md -!IsacapKey.md -!SDKs.md -!MCP_INTEGRATION_GUIDE.md -!MARKETING_PLAN_APRIL_2026.md -!Pitch_Alberto_Stellar_House_CDMX.md -!Playbook_Stellar_House_CDMX.md -!SCF_Pitch_Deck_Completo.md -!Elevator_Pitches.md -# Servable legal docs live under public/ — not internal docs, must ship. -!apps/web/public/legal/*.md -!CODE_OF_CONDUCT.md -!LICENSING.md -!SCF_Pitch_Deck_REFINED.md -!INTERNAL_SECURITY_AUDIT.md -!supanirium.md - -# --------------------------------------------- -# Legal-sensitive docs: explicit rule, not just *.md -# --------------------------------------------- -# 20-ago-2026: PAQUETE-ABOGADO-2026.md ended up committed (b117f70) with no -# rule covering it at all — the *.md pattern above never protected it, an -# earlier oversight, not a later exception overriding it. Stripped from -# history and given its own explicit rule here so a future edit to the *.md -# exception list above can't silently re-expose it the same way. -PAQUETE-ABOGADO-2026.md - -# 20-ago-2026: NiriumMainnet.md is different from the case above — the rule -# for it already existed (see the "Internal product strategy docs" list -# further down), added in the very same commit (1a384b9, 16-jul-2026) that -# ALSO force-added the file to git anyway (git add -f), contradicting the -# rule it had just written. A gitignore rule can't un-track a file once -# tracked — that's what let it stay committed for over a month despite the -# rule existing the whole time. Stripped from history (4 commits rewritten, -# main rebase); no new line needed here, the existing one below already -# covers it correctly now that the file is untracked again. - -# Ignoring plans generated if any -implementation_plan.json - -# Internal product strategy docs (not committed) -nodos.md -qapitch.md -instaward2-plan.md -propuesta-remzy.md -contrato-remzy-msa.md -SDF.md -boxb-mainnet.md -NiriumMainnet.md - -# Secrets -.env -.env.* - -# AI config -.gemini/ - -# Benchmarking -# Python / Local Dev Extras -.venv/ -**/.venv/ -venv/ -**/venv/ -*.log -.pyre_configuration -pyrightconfig.json -apps/web/.env.local -*.map -arbitrumagents.md -agent_*_keys.json - -# Compliance (internal docs - gitignored) -compliance/eligibility-checklist.md -compliance/social-media-guide.md -compliance/video-demo-script.md -compliance/out-of-scope-findings.md -# Note: claude.md is tracked (see !claude.md exception above) - -# JARGUS — Framework propietario de Gio Vargas (pentesting) -# Tracked en el repo PRIVADO — nunca sincronizar al repo público -# (el script de sync solo copia README/SECURITY/SDKs/TECHNICAL_PAPER) - -# Working/throwaway dirs (local only) -scratch/ -.vercel-backup/ -.vercel.bak/ -.env* -pitch-deploy/ - -# Salida generada por scripts/rebuild-public-repo.sh — nunca trackear -nirium-public-rebuilt/ - -# Python bytecode -__pycache__/ -*.pyc - -# Preparación de consulta legal — interno, no va al repo público -legal-preguntas-tesoreria.md - -# --------------------------------------------- -# Contexto de estrategia SCF — SOLO en el privado -# --------------------------------------------- -# Instalado el 7-ago-2026 con stellar-build. Nada de esto va al repo público -# (nirium-protocol/nirium-core, antes Eras256/Nirium) ni al de la organización (nirium-protocol/nirium-sdk). -# -# Por qué importa aunque hoy viva fuera del repo: ECOSYSTEM.md es el catálogo -# de LumenLoop con los 728 proyectos y sus montos de award, y las notas de -# estrategia dicen contra quién competimos y qué track vamos a usar. Publicar -# eso es regalarle a otro postulante el análisis que nos costó construir — y -# `*.md` ya lo cubre, pero un `!ECOSYSTEM.md` distraído lo desharía en un -# segundo. La redundancia aquí es a propósito. -ECOSYSTEM.md -PROMPT-nirium-audit.md -PROMPT-periplo-build.md -submission-*.md -dossier-*.html -correo-scf-*.md -scheme_upto_stellar.md - -# Referencias de terceros clonadas para consulta (viven en ~/stellar-ref). -# Si alguna vez se copian aquí, no se versionan: la mayoría no publica licencia, -# y la que sí la publica se consume como dependencia de npm/crates, no vendorizada. -stellar-ref/ -stellar-build/ -.stellar-build/ - -# Catálogo y skills instalados por stellar-build (viven en ~/.claude/skills). -# Se ignoran por si alguien los copia al repo para "tenerlos a mano". -**/skills/data/lumenloop/ -**/projects.json -packages/agent/central_issuer.json - -# stale deploy artifacts -nirium-soroban-contracts/deployment_id.txt -nirium-soroban-contracts/deploy_output.log +# Public mirror of the Nirium monorepo. Generic rules only: this file is +# published, so it names no internal file. + +# Dependencies +node_modules/ +.pnpm-store/ + +# Build output (root-anchored where a folder name is also a site route) +/dist/ +/build/ +/out/ +apps/web/out/ +.next/ +.next-internal/ +*.tsbuildinfo +next-env.d.ts + +# Rust / Soroban +target/ +**/test_snapshots/ +fuzz/artifacts/ +fuzz/corpus/ +fuzz/coverage/ + +# Python +__pycache__/ +*.py[cod] +.venv/ +venv/ +*.egg-info/ + +# Secrets and local configuration: never commit these +.env +.env.* +!.env.example +*.pem +*.key +*secret*.json +*_keys.json +central_issuer.json +.contract-ids.env + +# Deployment and tooling state +.vercel/ +.turbo/ +coverage/ + +# Logs and OS files +*.log +npm-debug.log* +pnpm-debug.log* +.DS_Store +Thumbs.db + +# Editors and local AI tooling +.idea/ +.vscode/ +.claude/ +.agents/ diff --git a/API_DOCUMENTATION_OPENAPI.yaml b/API_DOCUMENTATION_OPENAPI.yaml index fbf32390..0038314e 100644 --- a/API_DOCUMENTATION_OPENAPI.yaml +++ b/API_DOCUMENTATION_OPENAPI.yaml @@ -51,30 +51,30 @@ info: ## Base URLs - - **Production:** `https://nirium-agent.fly.dev` - - **Staging:** `https://api-staging.nirium.xyz` - - **Local Dev:** `http://localhost:3002` + - **Testnet agent:** `https://nirium-agent.fly.dev` + - **Mainnet agent:** `https://nirium-agent-mainnet.fly.dev` (receive-only) + - **Local Dev:** `http://localhost:3001` ## Support - - **Documentation:** https://docs.nirium.xyz + - **Documentation:** https://nirium.xyz/docs - **Email:** niriumprotocol@gmail.com - - **Discord:** https://discord.gg/nirium + - **Discord:** https://discord.gg/gAAznKrSQZ contact: name: Nirium Protocol Support email: niriumprotocol@gmail.com url: https://nirium.xyz license: - name: MIT + name: Apache-2.0 url: https://github.com/nirium-protocol/nirium-core/blob/main/LICENSE servers: - url: https://nirium-agent.fly.dev - description: Production Server - - url: https://api-staging.nirium.xyz - description: Staging Server - - url: http://localhost:3002 - description: Local Development + description: Testnet agent (full feature set) + - url: https://nirium-agent-mainnet.fly.dev + description: Mainnet agent (receive-only; holds no signing key, so signals and execute answer 501) + - url: http://localhost:3001 + description: Local development tags: - name: Public @@ -100,6 +100,80 @@ tags: paths: # ======================================== + # EXECUTION NODES, AUDIT TRAIL, REPORTING, x402 + # Added 22 Nov 2026 after checking each route against the live agents. + # Request and response shapes: the nirium SDK README + # (https://github.com/nirium-protocol/nirium/tree/main/packages/sdk). + # ======================================== + /api/nodes: + get: + tags: [Public] + summary: Execution nodes, their status, custody model and network + responses: + '200': { description: Node list } + /api/audit/info: + get: + tags: [Public] + summary: Audit Trail node info, including which pinning copies are live + responses: + '200': { description: Node info } + /api/audit/log: + post: + tags: [Public] + summary: Anchor a record or a hash to IPFS and return its CID (tamper-evident, optionally signed by the caller's own key) + description: Anchor hashes, not personal data. An invalid signature returns 400 and nothing is anchored. Rate limited to 20 requests/min. + responses: + '200': { description: CID and content hash } + '400': { description: Invalid record or signature; nothing anchored } + '429': { description: Rate limited } + /api/reporting/info: + get: + tags: [Public] + summary: Reporting node info + responses: + '200': { description: Node info } + /api/reporting/summary: + get: + tags: [Public] + summary: Read-only summary of payouts, received payments and anchors, by network + responses: + '200': { description: Summary } + /api/treasury/info: + get: + tags: [Public] + summary: Treasury node info (mainnet execution is invite-only) + responses: + '200': { description: Node info } + /api/payroll/info: + get: + tags: [Public] + summary: Payouts node info (mainnet is invite-only) + responses: + '200': { description: Node info } + /api/v1/premium/signals: + get: + tags: [Market Data] + summary: Paid signals over x402, 0.02 USDC (testnet only) + responses: + '200': { description: Paid response } + '402': { description: x402 payment requirements in the PAYMENT-REQUIRED header } + '501': { description: Not available on the mainnet agent } + /api/v1/premium/market: + get: + tags: [Market Data] + summary: Paid market data over x402, 0.05 USDC (testnet and mainnet) + responses: + '200': { description: Paid response } + '402': { description: x402 payment requirements in the PAYMENT-REQUIRED header } + /api/v1/premium/execute: + post: + tags: [Execution] + summary: Paid strategy execution over x402, 0.25 USDC (testnet only) + responses: + '200': { description: Paid response } + '402': { description: x402 payment requirements in the PAYMENT-REQUIRED header } + '501': { description: Not available on the mainnet agent } + # ======================================== # PUBLIC ENDPOINTS # ======================================== diff --git a/apps/web/app/(app)/docs/page.tsx b/apps/web/app/(app)/docs/page.tsx index 7c92cbb6..36bde864 100644 --- a/apps/web/app/(app)/docs/page.tsx +++ b/apps/web/app/(app)/docs/page.tsx @@ -1073,7 +1073,7 @@ payment-required: eyJ4NDAyVmVyc2lvbiI6MiwiZXJyb3IiOiJQYXltZW50IHJlcXVpcmVkIi... { proves: lang("Pre-sign policy hook (§7): ALLOW decision, payment settled (0.02 USDC)", "Hook de política antes de firmar (§7): decisión ALLOW, pago liquidado (0.02 USDC)"), ref: "eefd57995733c29fd1ba8244b783419015af642073e9c918a0d732a6bb81a6b3", date: "2026-10-01", link: "https://stellar.expert/explorer/testnet/tx/eefd57995733c29fd1ba8244b783419015af642073e9c918a0d732a6bb81a6b3" }, { proves: lang("Trustless Work escrow pilot (§8): deploy", "Piloto de escrow de Trustless Work (§8): despliegue"), ref: "a0ed118a0a02ad87e09f0a743cc90d32199c931baf01b052cf49393e85719850", date: "2026-10-10", link: "https://stellar.expert/explorer/testnet/tx/a0ed118a0a02ad87e09f0a743cc90d32199c931baf01b052cf49393e85719850" }, { proves: lang("Same pilot: fund", "Mismo piloto: fondeo"), ref: "8769aba1b652b01ee2aafc9083fd1a775722690757e560fb43bd49f98e4856cf", date: "2026-10-11", link: "https://stellar.expert/explorer/testnet/tx/8769aba1b652b01ee2aafc9083fd1a775722690757e560fb43bd49f98e4856cf" }, - { proves: lang("Same pilot: tampered evidence, decision gate refuses before touching the network", "Mismo piloto: evidencia alterada, la compuerta de decisión se niega antes de tocar la red"), ref: "Qmbwr5eYNex7pzvCSWVu8Q7h4bvfLzkukDu7XXtR7fnkYs", date: "2026-10-11", link: "https://gateway.pinata.cloud/ipfs/Qmbwr5eYNex7pzvCSWVu8Q7h4bvfLzkukDu7XXtR7fnkYs" }, + { proves: lang("Same pilot: tampered evidence, decision gate refuses before touching the network. This record itself does not verify (its content_sha256 is the hash of an empty input); the refusal shows as the absence of a release transaction", "Mismo piloto: evidencia alterada, la compuerta de decisión se niega antes de tocar la red. Este registro no verifica (su content_sha256 es el hash de una entrada vacía); la negativa se ve en que no hay transacción de liberación"), ref: "Qmbwr5eYNex7pzvCSWVu8Q7h4bvfLzkukDu7XXtR7fnkYs", date: "2026-10-11", link: "https://gateway.pinata.cloud/ipfs/Qmbwr5eYNex7pzvCSWVu8Q7h4bvfLzkukDu7XXtR7fnkYs" }, { proves: lang("Same pilot: valid evidence, decision gate authorizes - the approve+release in §8", "Mismo piloto: evidencia válida, la compuerta de decisión autoriza (el approve+release del §8)"), ref: "QmSpgUkiJnCfdALUtHXocKQ8GtGaG4LsxUWEoUDFDruWXN", date: "2026-10-11", link: "https://gateway.pinata.cloud/ipfs/QmSpgUkiJnCfdALUtHXocKQ8GtGaG4LsxUWEoUDFDruWXN" }, { proves: lang("MPP Charge: settled payment", "MPP Charge: pago liquidado"), ref: "4d20d8648ce001c4e8e894725ad08a8dbcd3904e0024ca440728bc91e6c10236", date: "2026-10-15", link: "https://stellar.expert/explorer/testnet/tx/4d20d8648ce001c4e8e894725ad08a8dbcd3904e0024ca440728bc91e6c10236" }, { proves: lang("MPP Charge: settled payment", "MPP Charge: pago liquidado"), ref: "e70cfcb884c17d946210a000a627b7a9c316737a61a66ad2e42d905df679f167", date: "2026-10-15", link: "https://stellar.expert/explorer/testnet/tx/e70cfcb884c17d946210a000a627b7a9c316737a61a66ad2e42d905df679f167" }, diff --git a/apps/web/app/(app)/keys/layout.tsx b/apps/web/app/(app)/keys/layout.tsx index e9719037..a53e1037 100644 --- a/apps/web/app/(app)/keys/layout.tsx +++ b/apps/web/app/(app)/keys/layout.tsx @@ -3,7 +3,7 @@ import { pageMetadata } from "@/lib/pageMetadata"; export const metadata = pageMetadata({ path: "/keys", title: "API Keys", - description: "Issue a free Nirium API key tied to your Stellar wallet, proven by signature. One key works on testnet and mainnet.", + description: "Issue a free Nirium API key tied to your Stellar wallet, proven by signature. One key works on testnet and mainnet; mainnet Payouts and Treasury are invite-only.", }); export default function KeysLayout({ children }: { children: React.ReactNode }) { diff --git a/apps/web/app/(app)/payouts/page.tsx b/apps/web/app/(app)/payouts/page.tsx index 62c3b7fe..051f83da 100644 --- a/apps/web/app/(app)/payouts/page.tsx +++ b/apps/web/app/(app)/payouts/page.tsx @@ -365,8 +365,8 @@ export default function PayrollPage() { declaración que nadie leyó no declara nada. */}
{lang( - 'By continuing you represent, on this and every occasion of use, that you are not located in or a resident of a prohibited jurisdiction, that you are not a sanctioned person or acting for one, and that Payouts is not offered where you are (today this excludes the EEA, the UK and the US). Nirium relies on this.', - 'Al continuar declaras, en esta y en cada ocasión de uso, que no te encuentras ni resides en una jurisdicción prohibida, que no eres una persona sancionada ni actúas por cuenta de una, y que Payouts no se ofrece donde estás (hoy quedan fuera el EEE, el Reino Unido y Estados Unidos). Nirium confía en esta declaración.')} + 'By continuing you represent, on this and every occasion of use, that you are not located in or a resident of a prohibited jurisdiction, that you are not a sanctioned person or acting for one, and, on mainnet, that Payouts is offered where you are (today mainnet excludes the EEA, the UK and the US; testnet is open there as a demonstration). Nirium relies on this.', + 'Al continuar declaras, en esta y en cada ocasión de uso, que no te encuentras ni resides en una jurisdicción prohibida, que no eres una persona sancionada ni actúas por cuenta de una, y, en mainnet, que Payouts se ofrece donde estás (hoy mainnet excluye al EEE, el Reino Unido y Estados Unidos; testnet está abierto ahí como demostración). Nirium confía en esta declaración.')}
- {run.totalAmount} {run.asset} - · {run.recipientCount} {p.runs.recipients} + {Number.isFinite(Number(run.totalAmount)) ? Number(run.totalAmount).toLocaleString('en-US', { maximumFractionDigits: 7 }) : run.totalAmount} {run.asset} + · {run.recipientCount} {Number(run.recipientCount) === 1 ? lang('recipient', 'destinatario') : lang('recipients', 'destinatarios')}