> ## Documentation Index
> Fetch the complete documentation index at: https://docs.manthan.systems/llms.txt
> Use this file to discover all available pages before exploring further.

# ParmanaClient

> The canonical SDK entry point

`ParmanaClient` (`typescript/src/client/ParmanaClient.ts`) is a thin facade: it composes eight sub-APIs over a single `Transport` and exposes flat, top-level convenience methods. Its own doc comment is explicit about what it delegates rather than does itself: it does **not** evaluate policy, authorize execution, execute business logic, verify trust records, or replay executions — every one of those is delegated to the Runtime over HTTP.

## Methods

| Method                               | Delegates to               | REST endpoint             |
| ------------------------------------ | -------------------------- | ------------------------- |
| `health()`                           | `HealthApi.health()`       | `GET /health`             |
| `execute(transaction)`               | `ExecutionApi.execute()`   | `POST /execute`           |
| `verify(businessTransactionId)`      | `VerificationApi.verify()` | `GET /verification/:id`   |
| `replay(businessTransactionId)`      | `ReplayApi.replay()`       | `POST /replay`            |
| `receipt(businessTransactionId)`     | `ReceiptApi.generate()`    | `POST /receipt`           |
| `transaction(businessTransactionId)` | `TransactionApi.get()`     | `GET /transactions/:id`   |
| `transactions(page?, pageSize?)`     | `TransactionApi.list()`    | `GET /transactions`       |
| `trustRecord(businessTransactionId)` | `TrustRecordApi.get()`     | `GET /trust-records/:id`  |
| `validatePolicy(policy)`             | `PolicyApi.validate()`     | `POST /policies/validate` |

<Warning>
  `verify()` reads the **latest** Verification over `GET /verification/:id` — it does not call `POST /verify` to trigger a new one. See [REST API → Verify](/docs/api/verify) for the full explanation, including why the real path is `/verification/:id` and not `/verify/:id`.
</Warning>

```ts theme={null}
const client = new ParmanaClient(configuration);

const trustRecord = await client.execute(transaction);
const verification = await client.verify(trustRecord.businessTransactionId);
const receipt = await client.receipt(trustRecord.businessTransactionId);
const replay = await client.replay(trustRecord.businessTransactionId);
```

## Composition, not inheritance

`ParmanaClient` constructs one instance of each sub-API in its constructor, all sharing the same `Transport`:

```ts theme={null}
this.healthApi = new HealthApi(this.transport);
this.executionApi = new ExecutionApi(this.transport);
this.verificationApi = new VerificationApi(this.transport);
this.replayApi = new ReplayApi(this.transport);
this.receiptApi = new ReceiptApi(this.transport);
this.transactionApi = new TransactionApi(this.transport);
this.trustRecordApi = new TrustRecordApi(this.transport);
this.policyApi = new PolicyApi(this.transport);
```

These sub-APIs are also independently constructible and usable without `ParmanaClient` — see [APIs](/docs/typescript-sdk/apis) — with one exception: `PolicyApi` is not part of the package's public export list in `typescript/src/index.ts` (its export line is commented out: `// export { PolicyApi } from "./client/PolicyApi.js";`). It's still fully usable through `client.validatePolicy()`, since `ParmanaClient` imports it directly, but you cannot `import { PolicyApi } from "parmana"` and construct one standalone.

## Related

<CardGroup cols={2}>
  <Card title="Installation" href="/docs/typescript-sdk/installation">Configuration and transport setup.</Card>
  <Card title="APIs" href="/docs/typescript-sdk/apis">Each sub-API in detail.</Card>
  <Card title="Models" href="/docs/typescript-sdk/models">The domain types these methods accept and return.</Card>
  <Card title="Basic Execution Guide" href="/docs/guides/basic-execution">A full `execute` → `verify` → `receipt` walkthrough.</Card>
</CardGroup>
