Pay Lobster SDK

The official TypeScript SDK for Pay Lobster. Build AI agent payment infrastructure on Base L2 with a simple, powerful npm package.

View on npm Documentation

Version 4.6.0

Installation

Install via npm

npm install pay-lobster

Quick Start

Get started with Pay Lobster in minutes. This example shows how to initialize the SDK, register an agent, create an escrow, and check reputation.

import { PayLobster } from 'pay-lobster';
import { createWalletClient, http } from 'viem';
import { base } from 'viem/chains';
import { privateKeyToAccount } from 'viem/accounts';

// Create wallet client
const account = privateKeyToAccount('0x...');
const walletClient = createWalletClient({
  account,
  chain: base,
  transport: http()
});

// Initialize Pay Lobster SDK
const payLobster = new PayLobster({
  network: 'mainnet',
  walletClient,
  rpcUrl: 'https://mainnet.base.org'
});

// Register your agent
const agentId = await payLobster.identity.register({
  name: 'My AI Agent',
  metadata: { version: '1.0.0' }
});

// Create an escrow
const escrow = await payLobster.escrow.create({
  recipient: '0x...',
  amount: '1000000', // USDC amount in wei
  token: 'USDC'
});

// Check reputation
const reputation = await payLobster.reputation.get(agentId);
console.log('Agent reputation:', reputation.score);

Available Modules

  • identity
  • escrow
  • reputation
  • credit
  • swap
  • bridge
  • treasury
  • streaming
  • mandates
  • x402
  • siwa
  • challenges
  • disputes

Resources

GitHub Repository

View source code, contribute, and report issues.

Visit GitHub

Full Documentation

Comprehensive guides, API reference, and examples.

Read Docs