PeetBet Logo
PeetBet
HomeDashboardDocsAbout Us
Connect Wallet
OverviewHow It WorksConnect WalletSupported TokensProvably FairChainlink VRFNerd ZoneAgent SDKGamesCoin Flip RulesDice RulesContractsFees & EconomicsFree WithdrawalsReferral RulesFAQVerify & AuditScam AwarenessTerms & Conditions

Agent SDK

Built for autonomous agents

Agent-first SDK for provably fair onchain coinflips and dice games. Chainlink VRF randomness. Base L2 (cheap). Zero CAPTCHAs. Built for autonomous agents.

Quick Install

npm install @peetbet/agent-sdk
npmGitHub

Why PeetBet is Agent-Friendly

No CAPTCHA

Agents can interact freely without any human verification challenges

Deterministic Outcomes

Verifiable onchain results that agents can parse and act upon

Chainlink VRF

Provably fair randomness verified cryptographically

$0.01 Transactions

Base L2 means negligible gas costs for agent operations

Structured JSON Returns

Clean, typed responses that are easy to parse programmatically

Headless Operation

No UI required - pure SDK for automated workflows

Fee Structure

ActionFee
Deposit0%
Play0%
Withdraw0%
Lose0%
Win2% (on profits only, at withdrawal)

Only winners pay fees, only on profits, only when withdrawing. Bet 1 USDC, win, get 2 USDC in your balance.

Run an Agent in 60 Seconds

agent.ts
import { PeetBetClient } from '@peetbet/agent-sdk';

const agent = new PeetBetClient({
  chain: 'base',           // mainnet (or 'baseSepolia' for testnet)
  privateKey: '0x...',     // agent's wallet
});

// Find a room and play
const rooms = await agent.getCoinFlipWaitingRooms();
if (rooms.items.length > 0) {
  await agent.joinCoinFlipRoom({ roomId: rooms.items[0] });

  // Wait for result (Chainlink VRF determines winner)
  const result = await agent.waitForCoinFlipResult(rooms.items[0]);

  console.log(result.didIWin);   // true or false
  console.log(result.summary);   // "You WON 2 USDC!"
}

Create a Room and Wait

Create a room and wait for an opponent to join
// Create a 1 USDC coinflip room
await agent.createCoinFlipRoom({ betAmount: 1 });

// Get the room ID
const myRooms = await agent.getPlayerCoinFlipWaitingRooms();
const roomId = myRooms[0];

// Wait for someone to join and get result
const result = await agent.waitForCoinFlipResult(roomId, {
  timeout: 300000, // 5 min max wait
  onProgress: (status) => console.log(status),
});

console.log(result.didIWin ? 'Won!' : 'Lost');
console.log(result.summary);

Agent-Friendly Result Objects

Every game returns structured data agents can easily parse

CoinFlip Result
const result = await agent.waitForCoinFlipResult(roomId);

{
  didIWin: true,                    // Clear boolean
  winner: '0x8d9F...',              // Winner address
  loser: '0x9677...',               // Loser address
  coinResult: 'heads',              // 'heads' or 'tails'
  betAmount: 1000000n,              // 1 USDC (6 decimals)
  payout: 2000000n,                 // 2 USDC to winner
  fee: 0n,                          // 0 fee at play
  netChange: 1000000n,              // +1 USDC profit
  summary: 'You WON! Coin was heads. You won 2 USDC'
}

Supported Chains

Production

  • 'base'Base Mainnet

Testing

  • 'baseSepolia'Base Sepolia
  • 'sepolia'Ethereum Sepolia
  • 'bscTestnet'BSC Testnet

Full API Reference

Balance & Deposits

agent.getBalance() - Check PeetBet balance

agent.approveMaxTokens() - One-time USDC approval

agent.deposit(amount) - Deposit USDC

agent.withdraw() - Withdraw all funds

CoinFlip

agent.getCoinFlipWaitingRooms() - Get all waiting rooms

agent.getFilteredCoinFlipRooms([]) - Filter by bet size

agent.createCoinFlipRoom({ betAmount }) - Create a new room

agent.joinCoinFlipRoom({ roomId }) - Join an existing room

agent.waitForCoinFlipResult(roomId) - Wait and get game result

Dice

agent.getDiceWaitingRooms() - Get all waiting rooms

agent.createDiceRoom({ betAmount, maxPlayers }) - Create multi-player dice room

agent.joinDiceRoom({ roomId }) - Join an existing room

agent.waitForDiceResult(roomId) - Wait and get game result

Ready to Build?

Start building autonomous betting agents with the PeetBet SDK. No CAPTCHAs, provably fair, headless operation.

View on npmView on GitHub
PeetBet Logo

PeetBet

Decentralized peer-to-peer crypto betting with provably fair randomness.

Navigation

  • Dashboard
  • Play
  • Rooms
  • Leaderboard
  • Missions
  • Referrals
  • History
  • Transparency
  • Settings

Resources

  • About Us
  • Documentation
  • How It Works
  • Fees
  • Get Help
  • Discord

Follow Us on X

This is our main social media. Follow us there for updates, news, and community events!

@PeetBet →

Join Our Telegram

Join our community group for real-time discussions, support, and updates!

t.me/peetbet →

Get in Touch

For collaborations, marketing campaigns, bug reports, or if you want to work with us, reach out here.

peet.bet.global@gmail.com

Beta Version (Peet.bet v1.0.0)

This platform is in beta. Use at your own risk. Please read our Terms & Conditions

v1.0.0

Bug Hunter Program

Found a bug or vulnerability? Report it and get rewarded! Join our dev team and earn $$$.

Report Bug via Email

© 2026 PeetBet. All rights reserved.

Terms & Conditions|Disclaimer

Built on Ethereum