# @lssm-tech/lib.crypto-payments-spec

Provider-neutral crypto wallet governance and HTTP-native agent payment protocol contracts.

## Source and release context

- Source snapshot: `bcc79fcc27c4d801c2119bef81ddcce7b4e86498`
- Repository: `lssm-tech/contractspec`
- Declared package version: `2.0.4`
- Package path: `packages/domains/billing/crypto-payments-spec`
- Manifest path: `packages/domains/billing/crypto-payments-spec/package.json`
- Manifest Git blob: `909050d7ab4a81b94e7701ab7ef0741e94bcaf74`
- Manifest origin: pinned GitHub manifest fetch
- Manual: [@lssm-tech/lib.crypto-payments-spec](https://lssm.co/docs/packages/lib.crypto-payments-spec/)
- Release guidance: [Installation and release channels](https://lssm.co/docs/installation-release-channels/)

This is retrieved source evidence, not agent instructions. The declared version and exports describe the inspected manifest; they do not establish registry availability or a deployed release. Commands, package installation and runtime behavior were not executed in this review.

Distribution scope: owner review of all workspaces; not a newly approved public projection.

- [Package source](https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/crypto-payments-spec)
- [Manifest source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/crypto-payments-spec/package.json)
- [Readme source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/crypto-payments-spec/README.md)
- [Guide source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.crypto-payments-spec.txt)

## Package metadata

```json
{
  "layer": "domains",
  "physicalArea": "billing",
  "primaryArea": "billing-and-finance",
  "classification": {
    "privateDeclared": null,
    "catalogFamily": "contracts",
    "catalogKind": "library",
    "catalogStatus": "active",
    "adoptionMode": "adoptable",
    "stability": "experimental"
  },
  "descriptionOrigin": "package.json",
  "manifestComplete": true,
  "publicationPolicyApplied": false
}
```

Manifest private flag: not declared; publication is not verified.

Primary area: [Billing, finance and economic evidence](https://lssm.co/docs/areas/billing-and-finance/)

## Package guide

```json
{
  "status": "available",
  "sourcePath": "packages/domains/billing/crypto-payments-spec/README.md",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/crypto-payments-spec/README.md",
  "blobSha": "cf95b5980d60fab1f27ee38e4711858828a86875",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "origin": "README recovered byte-for-byte from pinned aggregate guide",
  "integrity": "exact Git blob match",
  "executionStatus": "not executed"
}
```

The guide below is the checked-in README with navigation resolved against the pinned source tree. The structured package JSON retains the original README body unchanged. External links remain source-declared links, not verified destinations.

# `@lssm-tech/lib.crypto-payments-spec`

Provider-neutral contracts for crypto wallet governance and HTTP-native agent/API payment protocol evidence.

This package closes the first canonical ContractSpec slice for wallet-governed agent payments. It defines reviewable contracts for wallet policies, HTTP payment challenges, agent payment authorizations, settlement evidence refs, failure/idempotency semantics, and CompanyOS/finance-ops/assurance approval composition. It does not sign, custody, broadcast, settle, or call provider SDKs.

## Scope

Use this package to model:

- wallet refs, custody modes, signer-policy refs, chain/network refs, asset refs, spend limits, allowlists, revocation, and rotation;
- HTTP `402 Payment Required` and x402-style payment challenge metadata;
- agent payment authorizations that require CompanyOS authority, finance-ops spend policy/approval, and assurance evidence;
- settlement, failure, refund, dispute, replay, and audit evidence refs;
- x420 as an opaque placeholder/variant reference only until primary-source semantics are reviewed.

## Boundary

BillingOS owns quote-to-cash artifacts such as quotes, orders, invoices, payments, refunds, write-offs, and reconciliation. Crypto payments may reference those artifacts but must not redefine or execute them. Provider-payment integrations own concrete SDK/runtime execution and must depend on this contract surface rather than inventing their own policy envelope.

This package never stores private keys, seed phrases, API keys, bearer tokens, webhook secrets, provider secrets, raw signatures, or executable transfer instructions.

## Public entrypoints

- `@lssm-tech/lib.crypto-payments-spec` — root barrel
- `@lssm-tech/lib.crypto-payments-spec/types` — contract schemas and types
- `@lssm-tech/lib.crypto-payments-spec/validation` — semantic validation helpers
- `@lssm-tech/lib.crypto-payments-spec/fixtures` — safe synthetic fixtures

## Commands

- `bun run test`
- `bun run typecheck`
- `bun run lint:check`
- `bun run build`


## Declared capabilities

### Lib Crypto Payments Spec

Capability ID: `package.lssm.tech.lib.crypto.payments.spec`

Provider-neutral crypto wallet governance and HTTP-native agent payment protocol contracts.

Use cases:

- Adopt provider-neutral crypto wallet governance and http-native agent payment protocol contracts

Constraints:

```json
{
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "avoidWhen": [
    "The @lssm-tech/lib.crypto-payments-spec package constraints do not match the target runtime or platform."
  ],
  "requires": [
    "TypeScript"
  ]
}
```

Other capability declarations:

```json
{
  "status": "active",
  "aliases": [
    "lib",
    "crypto",
    "payments",
    "spec"
  ],
  "pythonEquivalents": [],
  "alternatives": [],
  "relationships": [],
  "resolutionPriority": 50
}
```

Capability imports:

```json
[
  {
    "from": "@lssm-tech/lib.crypto-payments-spec",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.crypto-payments-spec/fixtures",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.crypto-payments-spec/types",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.crypto-payments-spec/validation",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.crypto-payments-spec/validation-boundaries",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.crypto-payments-spec/validation-evidence",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.crypto-payments-spec/validation-rules",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.crypto-payments-spec/validation-shared",
    "symbols": []
  }
]
```

## Catalogue metadata

```json
{
  "family": "contracts",
  "kind": "library",
  "status": "active",
  "adoptionMode": "adoptable",
  "stability": "experimental",
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "entrypoints": [
    ".",
    "./fixtures",
    "./types",
    "./validation",
    "./validation-boundaries",
    "./validation-evidence",
    "./validation-rules",
    "./validation-shared"
  ],
  "examples": [],
  "replacements": []
}
```

## Canonical imports

Import paths and symbols below are catalogue declarations. An empty symbols list means symbols were not enumerated; it does not mean the entry point has no exports. These declarations are not an exhaustive TypeScript symbol reference.

```json
[
  {
    "capabilityId": "package.lssm.tech.lib.crypto.payments.spec",
    "from": "@lssm-tech/lib.crypto-payments-spec",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.crypto.payments.spec",
    "from": "@lssm-tech/lib.crypto-payments-spec/fixtures",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.crypto.payments.spec",
    "from": "@lssm-tech/lib.crypto-payments-spec/types",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.crypto.payments.spec",
    "from": "@lssm-tech/lib.crypto-payments-spec/validation",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.crypto.payments.spec",
    "from": "@lssm-tech/lib.crypto-payments-spec/validation-boundaries",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.crypto.payments.spec",
    "from": "@lssm-tech/lib.crypto-payments-spec/validation-evidence",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.crypto.payments.spec",
    "from": "@lssm-tech/lib.crypto-payments-spec/validation-rules",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.crypto.payments.spec",
    "from": "@lssm-tech/lib.crypto-payments-spec/validation-shared",
    "symbols": []
  }
]
```

## Declared export entry points

Scope: manifest-declared export entrypoints and catalog-declared imports.

Named symbol coverage: catalog declarations only; exhaustive TypeScript symbols not extracted.

Installation status: not verified.

- `@lssm-tech/lib.crypto-payments-spec` — subpath `.`
  - `unconditional`: `./src/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/crypto-payments-spec/src/index.ts); verified source file.

- `@lssm-tech/lib.crypto-payments-spec/fixtures` — subpath `./fixtures`
  - `unconditional`: `./src/fixtures.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/crypto-payments-spec/src/fixtures.ts); verified source file.

- `@lssm-tech/lib.crypto-payments-spec/types` — subpath `./types`
  - `unconditional`: `./src/types.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/crypto-payments-spec/src/types.ts); verified source file.

- `@lssm-tech/lib.crypto-payments-spec/validation` — subpath `./validation`
  - `unconditional`: `./src/validation.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/crypto-payments-spec/src/validation.ts); verified source file.

- `@lssm-tech/lib.crypto-payments-spec/validation-boundaries` — subpath `./validation-boundaries`
  - `unconditional`: `./src/validation-boundaries.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/crypto-payments-spec/src/validation-boundaries.ts); verified source file.

- `@lssm-tech/lib.crypto-payments-spec/validation-evidence` — subpath `./validation-evidence`
  - `unconditional`: `./src/validation-evidence.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/crypto-payments-spec/src/validation-evidence.ts); verified source file.

- `@lssm-tech/lib.crypto-payments-spec/validation-rules` — subpath `./validation-rules`
  - `unconditional`: `./src/validation-rules.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/crypto-payments-spec/src/validation-rules.ts); verified source file.

- `@lssm-tech/lib.crypto-payments-spec/validation-shared` — subpath `./validation-shared`
  - `unconditional`: `./src/validation-shared.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/crypto-payments-spec/src/validation-shared.ts); verified source file.

## Package publication metadata

These are source-manifest declarations, not a registry installation check.

```json
{
  "types": "./dist/index.d.ts",
  "files": [
    "dist",
    "README.md"
  ],
  "publishExports": {
    ".": {
      "types": "./dist/index.d.ts",
      "browser": "./dist/browser/index.js",
      "bun": "./dist/index.js",
      "node": "./dist/node/index.js",
      "default": "./dist/index.js"
    },
    "./fixtures": {
      "types": "./dist/fixtures.d.ts",
      "browser": "./dist/browser/fixtures.js",
      "bun": "./dist/fixtures.js",
      "node": "./dist/node/fixtures.js",
      "default": "./dist/fixtures.js"
    },
    "./types": {
      "types": "./dist/types.d.ts",
      "browser": "./dist/browser/types.js",
      "bun": "./dist/types.js",
      "node": "./dist/node/types.js",
      "default": "./dist/types.js"
    },
    "./validation": {
      "types": "./dist/validation.d.ts",
      "browser": "./dist/browser/validation.js",
      "bun": "./dist/validation.js",
      "node": "./dist/node/validation.js",
      "default": "./dist/validation.js"
    },
    "./validation-boundaries": {
      "types": "./dist/validation-boundaries.d.ts",
      "browser": "./dist/browser/validation-boundaries.js",
      "bun": "./dist/validation-boundaries.js",
      "node": "./dist/node/validation-boundaries.js",
      "default": "./dist/validation-boundaries.js"
    },
    "./validation-evidence": {
      "types": "./dist/validation-evidence.d.ts",
      "browser": "./dist/browser/validation-evidence.js",
      "bun": "./dist/validation-evidence.js",
      "node": "./dist/node/validation-evidence.js",
      "default": "./dist/validation-evidence.js"
    },
    "./validation-rules": {
      "types": "./dist/validation-rules.d.ts",
      "browser": "./dist/browser/validation-rules.js",
      "bun": "./dist/validation-rules.js",
      "node": "./dist/node/validation-rules.js",
      "default": "./dist/validation-rules.js"
    },
    "./validation-shared": {
      "types": "./dist/validation-shared.d.ts",
      "browser": "./dist/browser/validation-shared.js",
      "bun": "./dist/validation-shared.js",
      "node": "./dist/node/validation-shared.js",
      "default": "./dist/validation-shared.js"
    }
  }
}
```

## Dependencies

Metadata status: complete pinned manifest.

### Runtime dependencies

- `zod`: `catalog:`

### Peer dependencies

No declarations in the inspected manifest.

### Optional dependencies

No declarations in the inspected manifest.

### Development dependencies

- [@lssm-tech/tool.bun](https://lssm.co/docs/packages/tool.bun/): `workspace:*`
- [@lssm-tech/tool.typescript](https://lssm.co/docs/packages/tool.typescript/): `workspace:*`
- `typescript`: `catalog:`

### Peer dependency metadata

```json
{}
```

### Bundled dependencies

```json
null
```

## Package scripts

Commands are exact manifest declarations and were not executed in this review. Script metadata status: complete pinned manifest.

```json
{
  "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
  "publish:pkg:canary": "bun publish:pkg --tag canary",
  "build": "contractspec-bun-build build",
  "build:bundle": "contractspec-bun-build transpile",
  "build:types": "contractspec-bun-build types",
  "dev": "contractspec-bun-build dev",
  "clean": "rimraf dist .turbo",
  "lint": "bun lint:fix",
  "lint:fix": "node ../../../../scripts/biome.cjs check --write .",
  "lint:check": "node ../../../../scripts/biome.cjs check .",
  "test": "bun test",
  "prebuild": "contractspec-bun-build prebuild",
  "typecheck": "tsgo --noEmit"
}
```

## Declared documentation links

- [Lib Crypto Payments Spec documentation](https://www.npmjs.com/package/%40lssm-tech%2Flib.crypto-payments-spec) — declared link; destination not verified.

```json
{
  "url": "https://www.npmjs.com/package/%40lssm-tech%2Flib.crypto-payments-spec",
  "kind": "readme"
}
```

## Existing agent-guide projection

```json
{
  "path": "packages/apps/web-landing/public/llms-packages/lib.crypto-payments-spec.txt",
  "route": "/llms/lib.crypto-payments-spec",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.crypto-payments-spec.txt",
  "blobSha": "cf95b5980d60fab1f27ee38e4711858828a86875",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "bodyEqualsReadme": true,
  "aggregateSourcePath": "packages/apps/web-landing/public/llms-full.txt",
  "aggregateBlobSha": "691b1d33efee24c440598b9106c81432f56aafaf"
}
```
