feat(provider): add Nexus provider - #722
Open
edridudi wants to merge 1 commit into
Open
Conversation
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.
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 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsschemas + pure mappers,HttpUtils).What's included
packages/provider/src/nexus.ts—Nexus implements Provider(+NexusErrortagged error): protocol parameters, utxos by address/credential/unit/outref (paginated, 100/page), delegation, reward account, datums, submit, evaluate (Ogmios v6additionalUtxovia the existingtoOgmiosUTxOs), awaitTxpackages/provider/src/internal/nexus.ts— wire schemas + mappers (incl. CIP-3382 0Xreference-script language-tag unwrapping)test/nexus.test.ts— live preprod suite, env-gated onVITE_NEXUS_KEY(skips without it, like the Blockfrost/Maestro key-gated suites): 13/13 passing against the production backend, including the sharedPreprodConstantsfixtures (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)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