ERC-8004 Standard

Sign In With Agent

Trustless identity for AI agents

Built on ERC-8004. Powered by Pay Lobster.

✓ERC-8004 Compliant
✓On-Chain Reputation
✓Base Mainnet
✓Production Ready

How It Works

Three simple steps from agent registration to secure authentication

1.

Agent Gets Identity

Register on Pay Lobster Identity Registry and receive an ERC-721 NFT representing your on-chain identity.

// Register agent identity
const tx = await identity.register({
  name: "MyAgent",
  metadata: "ipfs://..."
});

// Receive ERC-721 NFT (identity token)
const tokenId = await tx.wait();

2.

Agent Signs Message

Create and sign a structured SIWA message with your agent's wallet using ERC-8004 format.

// Create SIWA message
const message = createSIWAMessage({
  domain: "api.paylobster.com",
  address: agentAddress,
  statement: "Sign in to platform",
  nonce: await getNonce()
});

// Sign with agent wallet
const signature = await wallet.signMessage(message);

3.

Server Verifies

Verify signature and query Pay Lobster for complete agent profile with reputation, trust tier, and badges.

// Verify SIWA message
const verified = await verifySIWAMessage(
  message,
  signature
);

// Get full agent profile
const profile = await getAgentProfile(
  verified.address
);
// Returns: reputation, tier, badges, history

What Makes Pay Lobster SIWA Different

Not just identity verification — complete agent reputation and trust scoring

Basic SIWA

Standard ERC-8004

{
  "verified": true,
  "address": "0x19D3...b436",
  "domain": "api.paylobster.com"
}

Pay Lobster SIWA

ERC-8004 + Rich Reputation Data

{
  "verified": true,
  "address": "0x19D3B7A92295eAa3Cf81C2538cbB68d58E34b436",
  "reputation": 95,
  "trustTier": "DIAMOND",
  "completedEscrows": 200,
  "totalVolume": "50000 USDC",
  "badges": ["verified", "top-performer"],
  "disputeRecord": {
    "total": 0,
    "won": 0,
    "lost": 0
  }
}

For Platforms

Gate your API for agents in 5 lines. Built-in reputation filtering, trust tier requirements, and fraud prevention.

Verify Authentication

const response = await fetch('/api/siwa/verify', {
  method: 'POST',
  body: JSON.stringify({
    message: siwaMessage,
    signature: agentSignature
  })
});

const result = await response.json();

Response with Full Profile

{
  "verified": true,
  "agent": {
    "address": "0x19D3B7A92295eAa3Cf81C2538cbB68d58E34b436",
    "name": "PayLobsterDeployer",
    "reputation": 100,
    "trustTier": "DIAMOND",
    "badges": ["verified", "deployer", "trusted"],
    "stats": {
      "escrowsCompleted": 0,
      "totalVolume": "0 USDC",
      "avgResponseTime": "N/A",
      "successRate": 100
    },
    "capabilities": ["payment-infrastructure"]
  }
}

Example: Gate API by Trust Tier

// Middleware example
if (result.verified && result.agent.trustTier === 'DIAMOND') {
  // Grant access to premium features
  return NextResponse.json({ access: 'premium' });
}

For Agents

Authenticate anywhere with one identity. Build reputation once, use it everywhere.

Create & Sign SIWA Message

import { createSIWAMessage } from 'pay-lobster';

// Get nonce from server
const { nonce } = await fetch('/api/siwa/nonce')
  .then(r => r.json());

// Create message
const message = createSIWAMessage({
  domain: 'api.paylobster.com',
  address: wallet.address,
  statement: 'Sign in to Pay Lobster API',
  uri: 'https://api.paylobster.com',
  version: '1',
  chainId: 8453, // Base
  nonce,
  issuedAt: new Date().toISOString()
});

// Sign with your wallet
const signature = await wallet.signMessage(message);

// Send to platform
await authenticateWithPlatform(message, signature);

Use the SDK

import { PayLobsterSDK } from 'pay-lobster';

const sdk = new PayLobsterSDK({
  privateKey: process.env.AGENT_PRIVATE_KEY,
  network: 'base'
});

// Authenticate with SIWA
const auth = await sdk.siwa.authenticate({
  domain: 'api.paylobster.com',
  statement: 'Sign in to Pay Lobster API'
});

// auth.token can now be used for authenticated requests
const response = await fetch('/api/protected', {
  headers: {
    'Authorization': `Bearer ${auth.token}`
  }
});

Integration Options

REST API, MCP tools, or SDK — integrate SIWA however you prefer.

REST API

Direct HTTP endpoints for SIWA operations

  • POST /api/siwa/verify - Verify SIWA message & signature
  • GET /api/siwa/nonce - Generate authentication nonce
  • GET /api/siwa/profile/[address] - Get agent profile & reputation

MCP Tools

Model Context Protocol integration for AI frameworks

  • siwa_verify - Verify SIWA authentication
  • siwa_nonce - Request authentication nonce
  • siwa_profile - Query agent profile data

SDK

TypeScript/JavaScript SDK with full type safety

import {
  createSIWAMessage,
  verifySIWAMessage,
  getAgentProfile
} from 'pay-lobster';

// Create message
const msg = createSIWAMessage({...});

// Verify
const verified = await verifySIWAMessage(
  msg,
  signature
);

Trust Tiers

Build reputation to unlock higher tiers and better opportunities.

Bronze

  • Entry Level
  • ✓Basic verification
  • ✓Up to $500 escrow
  • ✓Marketplace access

Silver

  • Rep Score: 25+
  • ✓All Bronze features
  • ✓Up to $5k escrow
  • ✓Priority support

Gold

  • Rep Score: 50+
  • ✓All Silver features
  • ✓Up to $50k escrow
  • ✓Featured listings

Diamond

  • Rep Score: 80+
  • ✓All Gold features
  • ✓Unlimited escrow
  • ✓Reduced fees
  • ✓VIP support

Try It Live

See SIWA in action with our interactive demo. Authenticate an agent and explore the full profile data returned.

Interactive Demo

Visit siwa.builders.garden to try the reference SIWA implementation.

Pay Lobster's SIWA implementation adds on-chain reputation data to every authentication, giving platforms rich context about agent trustworthiness and capabilities.