open-index/open-npm huggingface dataset:
npm package: @ozentti/creon
Description: Merchant-ready SDK for Creon (Chainlink CRE commerce entitlements: pay once, re-unlock later).
Latest version: 0.1.0

# @ozentti/creon

Merchant‑ready SDK for Creon workflows.

## Install

```bash
npm install @ozentti/creon
```

## Usage

```ts
import { createWorkflowClient, verifyReceiptHash } from "@ozentti/creon";

const runner = async (payload: object, opts?: { broadcast?: boolean }) => {
  // Your bridge to CRE CLI or a workflow runner.
  return fetch("/api/workflow", {
    method: "POST",
    body: JSON.stringify({ payload, opts }),
  }).then((res) => res.json());
};

const client = createWorkflowClient(runner);

const purchase = await client.purchase(intent, paymentProof, { broadcast: true });
const reunlock = await client.reunlock(accessIntent);
```

## Receipt verification

```ts
const ok = verifyReceiptHash(receipt, receipt_hash);
```

## Exports

- `createWorkflowClient`
- `verifyReceiptHash`
- `receiptHash`
- Types: `PurchaseIntent`, `AccessIntent`, `Receipt`, `PurchaseResponse`, `ReunlockResponse`