{"_id":"@adlabs/nexus","_rev":"3-365e51f0b4eb8e76d6c019026669ef5f","name":"@adlabs/nexus","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@adlabs/nexus","version":"0.1.0","license":"MIT","_id":"@adlabs/nexus@0.1.0","maintainers":[{"name":"edridudi","email":"edridudi@gmail.com"}],"homepage":"https://github.com/Gero-Labs/nexus-sdk#readme","bugs":{"url":"https://github.com/Gero-Labs/nexus-sdk/issues"},"dist":{"shasum":"a9a5e2ea3c4cc92a6697ce3502fe451aa8538011","tarball":"https://registry.npmjs.org/@adlabs/nexus/-/nexus-0.1.0.tgz","fileCount":14,"integrity":"sha512-sJV+5LajIhOLXlpFyIo4FKvPhE57AyT+Gm36g2w154xJwgMRA1wlnvqH5u4ywL3bb+PTlpLkJVmVqaNvraYcEQ==","signatures":[{"sig":"MEYCIQC4aI9l7gOkt5BgBoIPh81DF3xqCAskTczvC5KWs0bDCAIhAJAo/aRYucuKPkuRlYYvD79fbe6GCxaEwpQ9mOgU27Gc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59735},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./lucid":{"import":{"types":"./dist/lucid/index.d.ts","default":"./dist/lucid/index.js"},"require":{"types":"./dist/lucid/index.d.cts","default":"./dist/lucid/index.cjs"}}},"gitHead":"eeadf8be307908a4006aba52439c9e28f21c8c0d","scripts":{"lint":"eslint src test","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"edridudi","email":"edridudi@gmail.com"},"repository":{"url":"git+https://github.com/Gero-Labs/nexus-sdk.git","type":"git"},"_npmVersion":"10.9.7","description":"TypeScript SDK for the Nexus Cardano API — typed client + lucid-evolution provider","directories":{},"sideEffects":false,"_nodeVersion":"22.22.2","dependencies":{"@lucid-evolution/core-types":"^0.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","eslint":"^9.0.0","vitest":"^3.0.0","typescript":"^5.5.0","@types/node":"^20.14.0","typescript-eslint":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nexus_0.1.0_1784660796008_0.4222762555398052","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@adlabs/nexus","version":"0.1.1","license":"MIT","_id":"@adlabs/nexus@0.1.1","maintainers":[{"name":"edridudi","email":"edridudi@gmail.com"}],"homepage":"https://github.com/Gero-Labs/nexus-sdk#readme","bugs":{"url":"https://github.com/Gero-Labs/nexus-sdk/issues"},"dist":{"shasum":"9a7c1fcaf71dbbe213b4d0a9661ccf16383f9b61","tarball":"https://registry.npmjs.org/@adlabs/nexus/-/nexus-0.1.1.tgz","fileCount":14,"integrity":"sha512-P8ETwU0sVZV7kPWMmR4Nc7AFZpPeyWjSd4f9Gu2L/ixzPRx2PhmpTvDF4WQnonsQigd9Wz+lMFqCAg/wSuqgqw==","signatures":[{"sig":"MEUCICrfWm/3TjDxRcI7Y+97nto7tizhABuvzrl1RA9RzG+WAiEA03udCkJ2z4/ogSIUy+mmUNNUaOiisMVJONvRe9m8PHU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61488},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./lucid":{"import":{"types":"./dist/lucid/index.d.ts","default":"./dist/lucid/index.js"},"require":{"types":"./dist/lucid/index.d.cts","default":"./dist/lucid/index.cjs"}}},"gitHead":"9597ff333b1788f14f8b7ef951ee9bea60262bdb","scripts":{"lint":"eslint src test","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"edridudi","email":"edridudi@gmail.com"},"repository":{"url":"git+https://github.com/Gero-Labs/nexus-sdk.git","type":"git"},"_npmVersion":"10.9.7","description":"TypeScript SDK for the Nexus Cardano API — typed client + lucid-evolution provider","directories":{},"sideEffects":false,"_nodeVersion":"22.22.2","dependencies":{"@lucid-evolution/core-types":"^0.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","eslint":"^9.0.0","vitest":"^3.0.0","typescript":"^5.5.0","@types/node":"^20.14.0","typescript-eslint":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nexus_0.1.1_1784662321129_0.22032567957231008","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@adlabs/nexus","version":"0.2.0","description":"TypeScript SDK for the Nexus API (Cardano, Bitcoin, Midnight) — typed, namespaced client","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Gero-Labs/nexus-sdk.git"},"publishConfig":{"access":"public"},"type":"module","engines":{"node":">=20"},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"sideEffects":false,"scripts":{"build":"tsup","test":"vitest run","test:watch":"vitest","lint":"eslint src test","typecheck":"tsc --noEmit","gen:types":"openapi-typescript ${NEXUS_OPENAPI_URL:-https://nexus.gerowallet.io/v3/api-docs} -o src/generated/schema.d.ts"},"dependencies":{},"devDependencies":{"@types/node":"^20.14.0","eslint":"^9.0.0","openapi-typescript":"^7.13.0","tsup":"^8.0.0","typescript":"^5.5.0","typescript-eslint":"^8.0.0","vitest":"^3.0.0"},"_id":"@adlabs/nexus@0.2.0","gitHead":"b5537102217b5e23828fab9a4ae730c60adc49a5","bugs":{"url":"https://github.com/Gero-Labs/nexus-sdk/issues"},"homepage":"https://github.com/Gero-Labs/nexus-sdk#readme","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-ZvcCCIBk1W+h+M0McEVvOL/KmfBmotsiLXLE8kkdB2deYA7zd4Jj71wOTL2VEHAD9Y8E9Q4BmuMRJuyCNVBc7A==","shasum":"8c20fd9d58191bc6d626246ff40c86c6ddb658ca","tarball":"https://registry.npmjs.org/@adlabs/nexus/-/nexus-0.2.0.tgz","fileCount":7,"unpackedSize":920177,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCJaIv8rc83cx/sFRJPjfyA9JzJ8QDVakrX84A7WaQ6HgIhANdyPF4+LAce6gbYBNaxsT2Q2jYWIL5walDIjzVx0e8M"}]},"_npmUser":{"name":"edridudi","email":"edridudi@gmail.com"},"directories":{},"maintainers":[{"name":"edridudi","email":"edridudi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nexus_0.2.0_1785333235092_0.3856133313739678"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-21T19:06:35.836Z","modified":"2026-07-29T13:53:55.382Z","0.1.0":"2026-07-21T19:06:36.159Z","0.1.1":"2026-07-21T19:32:01.269Z","0.2.0":"2026-07-29T13:53:55.224Z"},"bugs":{"url":"https://github.com/Gero-Labs/nexus-sdk/issues"},"license":"MIT","homepage":"https://github.com/Gero-Labs/nexus-sdk#readme","repository":{"type":"git","url":"git+https://github.com/Gero-Labs/nexus-sdk.git"},"description":"TypeScript SDK for the Nexus API (Cardano, Bitcoin, Midnight) — typed, namespaced client","maintainers":[{"name":"edridudi","email":"edridudi@gmail.com"}],"readme":"# @adlabs/nexus\n\nTypeScript SDK for the [Nexus](https://nexus.gerowallet.io) API — a typed, namespaced client\ncovering Cardano (chain + market data), Bitcoin, and Midnight.\n\n- Zero runtime dependencies.\n- Response and request types generated from the live Nexus OpenAPI spec.\n- `X-Api-Key` auth, automatic GET retries, per-request timeout.\n\n📚 **Full documentation:** [`docs/`](./docs/) — [getting started](./docs/getting-started.md),\n[migration](./docs/migration.md), [errors](./docs/errors.md),\n[pagination](./docs/pagination.md), and the per-namespace API\nreference ([Cardano](./docs/reference/cardano.md) ·\n[market data](./docs/reference/market.md) · [Bitcoin](./docs/reference/bitcoin.md) ·\n[Midnight](./docs/reference/midnight.md)).\n\n## Install\n\n```bash\nnpm install @adlabs/nexus\n```\n\n## Quick start\n\n```typescript\nimport { NexusClient } from \"@adlabs/nexus\";\n\nconst nexus = new NexusClient({\n  apiKey: process.env.NEXUS_API_KEY!,\n  network: \"CARDANO_MAINNET\", // optional; omit to use the API key's scoped network\n});\n\n// Cardano chain data\nconst utxos = await nexus.cardano.addresses.utxos(\"addr1...\");\nconst pool = await nexus.cardano.pools.byId(\"pool1...\");\nconst proposals = await nexus.cardano.governance.proposals();\nconst params = await nexus.cardano.epochs.latestParameters();\n\n// Bitcoin\nconst btcUtxos = await nexus.bitcoin.addresses.utxos(\"bc1q...\");\nconst tip = await nexus.bitcoin.chain.tip();\n\n// Midnight (network is a path segment)\nconst info = await nexus.midnight.info.get(\"undeployed\");\nconst dust = await nexus.midnight.dust.status(\"undeployed\", \"stake1...\");\n```\n\n## Namespaces\n\n| Namespace | Resources |\n|---|---|\n| `nexus.cardano` | `addresses`, `accounts`, `assets`, `blocks`, `epochs`, `network`, `pools`, `dreps`, `governance`, `scripts`, `policy`, `transactions`, `txBuilder`, `market` |\n| `nexus.bitcoin` | `addresses`, `txs`, `blocks`, `fees`, `mempool`, `chain`, `ordinals` |\n| `nexus.midnight` | `info`, `tx`, `dust`, `indexer` |\n\n### Cardano market data (`nexus.cardano.market`)\n\nToken prices, DEX pools/orders/swaps, NFT collections, wallet PnL, the swap aggregator,\nleaderboard, sync status, and blueprints:\n\n```typescript\nconst prices = await nexus.cardano.market.prices();\nconst pools = await nexus.cardano.market.dex.pools();\nconst floor = await nexus.cardano.market.nft.floor(\"policy...\");\nconst pnl = await nexus.cardano.market.wallet.pnl(\"stake1...\");\nconst quote = await nexus.cardano.market.aggregator.quote({ /* ... */ });\nconst candles = await nexus.cardano.market.candles.latest();\n```\n\n> **Mainnet only.** Market data is served from Cardano mainnet. If the client was\n> constructed with an explicit non-mainnet `network`, every `market` call throws\n> `NexusUsageError` before making a request. With no `network` set, the call proceeds and a\n> wrong-network or wrong-tier API key is rejected server-side as a `NexusApiError`.\n\n## Errors\n\n- `NexusApiError` — any non-2xx API response (`.status`, `.message`, `.code?`).\n- `NexusUsageError` — client-side misuse caught before a request (e.g. the market guard).\n\nSingle-item lookups (`.byId`, `.byHash`) resolve to `null` on 404; collections resolve to\nan array.\n\n## Types\n\nTypes are generated from the live OpenAPI document and shipped with the package. DTO shapes\nare available via the generated `components`:\n\n```typescript\nimport type { components } from \"@adlabs/nexus\";\ntype Pool = components[\"schemas\"][\"PoolDto\"];\n```\n\nRegenerate after an API change:\n\n```bash\nnpm run gen:types   # NEXUS_OPENAPI_URL overrides the source spec\n```\n\n## Use with lucid-evolution or Mesh\n\nThis package is the **raw data client**. To use Nexus as a transaction provider in a\nlucid-evolution or Mesh app, use each framework's **native Nexus provider** — no adapter\nfrom this package is needed:\n\n```ts\n// lucid-evolution (Anastasia-Labs/lucid-evolution#722)\nimport { Nexus } from \"@lucid-evolution/lucid\";\nconst provider = new Nexus({ apiKey: process.env.NEXUS_API_KEY! });\n\n// Mesh (MeshJS/providers)\nimport { NexusProvider } from \"@meshsdk/provider\";\nconst provider = new NexusProvider({ apiKey: process.env.NEXUS_API_KEY! });\n```\n\nSee the [migration guide](./docs/migration.md) for the drop-in provider swap.\n\n## Client options\n\n| Option | Default | Notes |\n|---|---|---|\n| `apiKey` | — | Nexus API key (`X-Api-Key`) |\n| `network` | key's scoped network | `CARDANO_MAINNET` / `CARDANO_PREPROD` / `CARDANO_PREVIEW` |\n| `baseUrl` | `https://nexus.gerowallet.io` | self-hosted Nexus deployments |\n| `timeoutMs` | `30000` | per-attempt timeout |\n| `retryDelaysMs` | `[250, 1000]` | GET retry backoff on 5xx / network errors |\n\n## Development\n\n```bash\nnpm install\nnpm run gen:types   # regenerate src/generated/schema.d.ts from the live spec\nnpm run typecheck\nnpm run lint\nnpm test            # unit tests\nnpm run build       # ESM + CJS + d.ts\nNEXUS_API_KEY=... npm test   # + live integration tests\n```\n","readmeFilename":"README.md"}