Skip to content

feat(provider): add Nexus provider - #722

Open
edridudi wants to merge 1 commit into
Anastasia-Labs:mainfrom
edridudi:feat/nexus-provider
Open

feat(provider): add Nexus provider#722
edridudi wants to merge 1 commit into
Anastasia-Labs:mainfrom
edridudi:feat/nexus-provider

Conversation

@edridudi

Copy link
Copy Markdown

Adds Nexus — a multi-provider Cardano data API by Gero with automatic failover across chain indexers — as a built-in provider, following the Koios provider's structure (Effect pipelines, internal/nexus.ts schemas + pure mappers, HttpUtils).

What's included

  • packages/provider/src/nexus.tsNexus implements Provider (+ NexusError tagged error): protocol parameters, utxos by address/credential/unit/outref (paginated, 100/page), delegation, reward account, datums, submit, evaluate (Ogmios v6 additionalUtxo via the existing toOgmiosUTxOs), awaitTx
  • packages/provider/src/internal/nexus.ts — wire schemas + mappers (incl. CIP-33 82 0X reference-script language-tag unwrapping)
  • test/nexus.test.ts — live preprod suite, env-gated on VITE_NEXUS_KEY (skips without it, like the Blockfrost/Maestro key-gated suites): 13/13 passing against the production backend, including the shared PreprodConstants fixtures (discoveryUTxO, eval samples 1/2/4 — sample 4 asserts ExUnits within ±10% since ExUnits are evaluator-version-sensitive; Nexus evaluates on cardano-node 11.x)
  • test/nexus.unit.test.ts — 46 offline unit tests (mappers, pagination, chunking, error envelope, null tolerance)
  • docs page + nav entry; changeset (minor, @lucid-evolution/provider)

Supersedes #721 (docs-only) — happy to close that one in favor of this.

Maintainer note: happy to provide a test API key for CI if you'd like the live suite wired into your workflow; without the env var the suite self-skips.

🤖 Generated with Claude Code

Adds Nexus (https://nexus.gerowallet.io) as a built-in provider — a
multi-provider Cardano data API with automatic failover across chain
indexers, following the Koios provider structure (Effect pipelines,
internal schemas + pure mappers).

Implements the full Provider interface: protocol parameters, utxos by
address/credential/unit/outref (paginated), delegation, reward account,
datums, submit, evaluate (Ogmios-compatible additionalUtxoSet), awaitTx.

Verified against the live Nexus preprod backend: the env-gated test suite
(VITE_NEXUS_KEY) passes 13/13, including the shared PreprodConstants
fixtures (discoveryUTxO, eval samples). 46 offline unit tests cover the
mappers, script_ref language-tag unwrapping, pagination, and error paths.

Docs: provider page + nav entry.
@edridudi

Copy link
Copy Markdown
Author

@colll78 would you be able to take a look at this when you have a moment? 🙏

It adds a native Nexus provider (Gero's hosted Cardano API) to @lucid-evolution/provider, implementing the Effect-based Provider interface alongside Blockfrost/Kupmios/Maestro/Koios — with docs and tests.

I've since verified the mapping thoroughly against live mainnet (protocol params, UTxOs, delegation, datum, submit, evaluate) and confirmed the returned shapes match the other providers. Happy to rebase or address any feedback.

Also — CI doesn't seem to have run on the branch (first-time fork contributor); let me know if it needs a workflow approval or a rebase on main. Thanks for maintaining lucid-evolution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant