---
title: TypeScript SDK
description: TypeScript SDK for creating, signing, and verifying Agent Receipts.
---

The TypeScript SDK (`@agnt-rcpt/sdk-ts`) provides tools for creating, signing, and verifying Agent Receipts in Node.js and browser environments.

**Repository:** [agent-receipts/sdk-ts](https://github.com/agent-receipts/ar/tree/main/sdk/ts)

## Features

- Create and sign Agent Receipts with Ed25519
- Build and verify receipt chains
- Validate receipts against the JSON Schema
- Action taxonomy helpers and risk level utilities
- TypeScript-first with full type definitions

## Quick example

```typescript
import { createReceipt, signReceipt, generateKeyPair } from "@agnt-rcpt/sdk-ts";

const keys = generateKeyPair();

const receipt = createReceipt({
  issuer: { id: "did:agent:my-agent" },
  action: {
    type: "filesystem.file.read",
    risk_level: "low",
  },
  principal: { id: "did:user:alice" },
  outcome: { status: "success" },
});

const signed = signReceipt(receipt, keys.privateKey, "did:agent:my-agent#key-1");
```

See [Installation](/sdk-ts/installation/) to get started.
