# @lilith/token-core

Shared token/NFT primitives for Lilith services. This package is intentionally small and focuses on cross-domain types and helpers so the individual tokenized services (achievement-token, creator-royalty, native-token, ritual-access, sacred-art, sacred-music, sacred-space, token-access) can stay focused on their domain logic.

## What’s Included

- **Types**: base metadata envelope, mint receipts, storage URIs, chain/network info, royalty recipients, allocation buckets, access policy pieces, and token launch config.
- **Helpers**: minimal address validator (`isAddress`) and royalty recipient validation (`validateRecipients`).

## Usage

```ts
import { isAddress, MintResult, RoyaltyRecipient } from '@lilith/token-core';

if (!isAddress(wallet)) throw new Error('bad address');

const receipt: MintResult = {
  tokenId: 1n,
  transactionHash: '0xabc',
  network: 'polygon',
};
```

## Notes

- Keep scope narrow—avoid pulling domain-specific flows here. If you need a new primitive that multiple token services share, add the type and a brief test/validation helper.
- Address validation matches current tests (40 or 41 hex chars after `0x`). If stricter checksum logic is needed, extend the helper here and adopt incrementally.
- This package is private and used inside the monorepo; no publication intended.
