open-index/open-npm huggingface dataset:
npm package: @iricity/sdk-js
Description: JavaScript SDK for Iricity machine-payment, catalog, quote, execute, and wait flows.
Latest version: 0.1.6

# @iricity/sdk-js

Thin JavaScript client for:
- catalog
- developer purchase orchestration
- API key creation from a session
- quote
- execute
- wait
- provenance-aware settled responses

## Install from repo

```bash
npm install ./apps/sdk-js
```

## Publish-ready install target

```bash
npm install @iricity/sdk-js
```

## Install Verification

```bash
npm view @iricity/sdk-js
node -e "import('@iricity/sdk-js').then((m) => console.log(Object.keys(m)))"
```

## Example

```js
import { IricityClient } from "@iricity/sdk-js";

const client = new IricityClient({ apiKey: process.env.IRICITY_API_KEY });

const result = await client.run({
  featureId: "analysis-job",
  input: {
    primary: {
      documentText: "Paste your source text here...",
      goal: "Summarize key points and actions",
      audience: "Operations leadership"
    },
    options: {
      outputMode: "brief",
      urgency: "normal",
      includeArtifacts: false
    }
  },
  wait: true
});

console.log(result);
```

## Developer Bootstrap Flow

Use a session token when you want to orchestrate the compliant purchase/bootstrap path before switching to an API key.

```js
import { IricityClient } from "@iricity/sdk-js";

const sessionClient = new IricityClient({ sessionToken: process.env.IRICITY_SESSION_TOKEN });

const checkout = await sessionClient.createPackCheckoutIntent("starter-api");
console.log(checkout.orderId, checkout.paddle);

// Finish Paddle checkout in the browser, then poll the order:
const order = await sessionClient.waitForOrder(checkout.orderId);
console.log(order.status);

const created = await sessionClient.createApiKey({ label: "cli-bootstrap" });
console.log(created.apiKey.token);
```