DOCUMENTATION

Build with Conduit

Everything you need to integrate permissionless micropayments into your AI agents. From zero to your first paid API call in minutes.

Quickstart

Install the SDK, open a state channel, and make your first paid API call — all in under 10 lines of TypeScript.

npm install conduit-pay

SDK Reference

Full API documentation for the conduit-pay package: ConduitSession, channel management, IOU signing, and settlement.

import { ConduitSession } from "conduit-pay";

const session = new ConduitSession({
  gatewayUrl: "http://localhost:4020",
  agentKeypair,
  providerAddress,
  depositLamports: 10_000_000,   // 10 USDC
});

await session.open();
const result = await session.call({ input: "..." });
await session.close();

Protocol Overview

How state channels work under the hood: deposit → off-chain IOUs → single on-chain settlement. Crash safety, timeout claims, and the escrow contract.

How the protocol works

1

Deposit

Agent locks USDC into an escrow PDA on Solana. One on-chain transaction creates the state channel.

2

Use & Sign IOUs

Each API call, the agent signs a cumulative IOU off-chain. The gateway verifies and forwards. No gas fees.

3

Settle

Gateway submits the final IOU. The contract verifies the signature, pays the provider, and refunds the rest.

4

Crash Safety

If the gateway disappears, the agent reclaims the full deposit after a timeout. Funds are never stuck.