open-index/open-npm huggingface dataset:
npm package: @foundation0/auth
Description: SDK for Auth verification, capability, receipt, revocation, pricing, and sidecar workflows.
Latest version: 0.0.1

# @foundation0/auth

TypeScript SDK for Authorization and Delegation Layer workflows. Use it when you
want one root client for capabilities, verification, receipts, services,
revocations, pricing, sidecar, batches, release validation, and data-lifecycle
helpers.

## Install

```bash
pnpm add @foundation0/auth
```

Compatibility alias: `adl-sdk` remains available for migration-safe installs and
imports while `@foundation0/auth` is the canonical public package name.

## Quickstart

```ts
import { createAuth } from "@foundation0/auth";

const auth = createAuth();
const result = await auth.verify.token({
  capability: process.env["F0_CAP"] ?? "<paste capability token>",
  servicePid: "did:example:svc:reference-ep",
});

console.log(result.ok);
```

## Public Surface

- root client: `createAuth(options?)`
- stable subpaths:
  - `@foundation0/auth/errors`
  - `@foundation0/auth/testing`
  - `@foundation0/auth/json`
  - `@foundation0/auth/compat`

## What The Client Exposes

- `auth.capabilities`
- `auth.verify`
- `auth.receipts`
- `auth.services`
- `auth.revocations`
- `auth.pricing`
- `auth.sidecar`
- `auth.batches`
- `auth.release`
- `auth.data`

## Related Docs

- [SDK quickstart](../../docs/getting-started/quickstart-sdk.md)
- [Verification cookbook](../../docs/cookbook/verify-token-from-string.md)
- [SDK reference](../../docs/reference/sdk/index.md)
- [Auth rename baseline](../../docs/migration/auth-rename-baseline.md)
- [Migration guide](../../docs/migration/unified-surface.md)
- [Validated example](../../examples/sdk-verify-token/README.md)

## Local Validation

- `pnpm --filter @foundation0/auth typecheck`
- `pnpm --filter @foundation0/auth build`
- `pnpm docs:sdk-reference`
- `pnpm docs:sdk-reference:check`
npm package: @foundation0/auth-cli
Description: Auth operator CLI for verification, publication, sidecar, receipt, and release workflows.
Latest version: 0.0.2

# Auth CLI (`@foundation0/auth-cli`)

The canonical CLI binary is `auth`.

This package publishes the canonical `auth` executable only. The deprecated `adl` launcher remains in the compatibility CLI package and should not be used for new automation or documentation.

- Migration baseline: [`docs/migration/auth-rename-baseline.md`](../../docs/migration/auth-rename-baseline.md)
- CLI reference: [`docs/reference/cli/index.md`](../../docs/reference/cli/index.md)

## Install

```bash
pnpm add -D @foundation0/auth-cli
```

## Commands

Grouped command families:

- `capabilities`: issue and delegate capabilities
- `verify`: validate tokens and bound operations
- `receipts`: verify signed receipts
- `services`: publish and resolve service descriptors
- `revocations`: publish and check revocations
- `pricing`: fetch pricing artifacts
- `sidecar`: call the verification sidecar APIs
- `batches`: build, verify, and export receipt batches
- `release`: validate and generate release artifacts
- `data`: run deletion and erasure workflows

## Usage

```bash
auth --help
auth verify token --help
auth services resolve --help
```

## JSON Output

Use `--json` for automation-safe output.

```bash
auth verify token --capability "$TOKEN" --service-pid eip155:1:0xabc --json
```

Automation paths should prefer `auth` and can combine `--json`, `--quiet`, or `--non-interactive` as needed.

## Automation Example

```bash
auth sidecar verify \
  --service-pid eip155:1:0xabc \
  --token-b64url "$TOKEN" \
  --base-url https://sidecar.example.com \
  --json
```