# @isis/output-registry

@isis/output-registry — part of the Oshun monorepo.

## Required configuration

`ISIS_OUTPUT_CURSOR_HMAC_KEY` must be a deployment secret containing at least 32
bytes. The service fails readiness rather than issuing unsigned or predictable
output-list cursors when the key is absent. Rotate it as a coordinated API
change because cursors signed by the previous key become invalid.

`GET /api/v1/outputs` uses forward-only keyset pagination. A response with
`hasNext: true` includes an opaque `nextCursor`; pass that value back unchanged
with the same filters, authorization scope, sort field, and sort direction. This
contract provides continuation consistency and deliberately does not claim a
transaction snapshot across requests.

`GET /api/v1/outputs/page` uses the same deployment key and adds a scan-wide
creation-time snapshot bound. Its cursor is a distinct versioned contract and
must only be returned to that endpoint.

TypeScript package. Built with tsc/tsup; consumed by other workspaces.

## Scripts

| Command      | Definition                                                 |
| ------------ | ---------------------------------------------------------- |
| `pnpm build` | nx build @isis/output-registry                             |
| `pnpm serve` | nx serve @isis/output-registry                             |
| `pnpm dev`   | nx serve @isis/output-registry --configuration=development |
| `pnpm lint`  | nx lint @isis/output-registry                              |
| `pnpm test`  | nx test @isis/output-registry                              |

## Layout

- `src/`

## Working on this package

The fastest local loop is via Nx:

```bash
pnpm nx test isis-output-registry
pnpm nx lint isis-output-registry
pnpm nx build isis-output-registry
```

When Nx is unhappy (usually because another worktree has duplicate project
names), bypass it with the underlying tools from this directory:

```bash
npx tsc --noEmit
npx vitest run
```

See the [root README](../../../README.md) for monorepo-wide conventions (catalog
deps, commit format, git workflow). See the
[Contributor Guide](../../../docs/CONTRIBUTING.md) for the full PR workflow.
