ai-gambling
v0.7.1
Published
AI gambling API SDK by Agent Casino (Rollhub) — provably fair dice, crypto betting, zero-trust verification for autonomous AI agents. 99% RTP, 70+ chains.
Maintainers
Readme
🎲 rollhub-dice
The AI agent gambling API SDK for JavaScript/TypeScript — provably fair dice & coinflip, crypto betting, and zero-trust verification for autonomous agents.
🎰 Agent Casino — The first provably fair crypto casino built for AI agents
What is this?
rollhub-dice is the core JS/TS SDK for Agent Casino, the provably fair crypto betting API built for AI agents. Every dice roll is cryptographically verified using SHA3-384 + AES-256-CTR commit-reveal — zero-trust gambling with 99% RTP. Supports 70+ cryptocurrency chains and autonomous agent operation.
Features
- Provably fair dice & coinflip gambling for AI agents — auto-verification of every bet
- Zero-trust gambling — SHA3-384 + AES-256-CTR cryptographic commit-reveal proof
- 70+ cryptocurrency chains for deposits and withdrawals (SOL, ETH, BTC, USDT, USDC...)
- 99% RTP, 1% house edge, transparent math
- 30% affiliate earnings — agent affiliate program with instant credit
- AI agent crypto — deposit, bet, verify, withdraw across 70+ blockchains
- Full TypeScript types, ESM + CJS dual build, zero dependencies
Quick Start
npm install rollhub-diceimport { DiceAgent } from 'rollhub-dice';
const agent = new DiceAgent({ apiKey: 'your-key' });
// Place a dice bet
const result = await agent.bet({ target: 50, direction: 'over', amount: 100 });
console.log(`Roll: ${result.roll}, Won: ${result.win}, Verified: ${result.proof?.verified}`);
// Coinflip
const flip = await agent.coinflip({ side: 'heads', amount: 50 });
console.log(`Result: ${flip.side}, Won: ${flip.win}`);🤖 Claude Desktop / MCP Integration
Use Agent Casino directly from Claude Desktop, Cursor, or any MCP client:
npm install -g rollhub-dice-mcpAdd to your claude_desktop_config.json:
{
"mcpServers": {
"rollhub-dice": {
"command": "npx",
"args": ["-y", "rollhub-dice-mcp"],
"env": {
"ROLLHUB_API_KEY": "your-api-key"
}
}
}
}Then ask Claude: "Roll a dice over 50 for 100 units" — it just works!
See rollhub-dice-mcp for full MCP server docs.
💰 Affiliate Program — Earn Crypto with AI
Earn 30% of house edge on every bet by agents you refer. The agent affiliate program provides instant credit — AI agents can earn money autonomously by referring other agents.
Use rollhub-affiliate-mcp to let your AI agent promote Agent Casino and earn commissions automatically.
Full Ecosystem
| Package | Registry | Description | |---------|----------|-------------| | rollhub-dice | PyPI | Core Python SDK for AI agent gambling API | | rollhub-dice | npm | Core JS/TS SDK for AI agent gambling API | | rollhub-dice-mcp | npm | MCP server casino for Claude Desktop & Cursor | | rollhub-affiliate-mcp | npm | Affiliate marketing MCP server | | langchain-rollhub | PyPI | LangChain gambling tool | | crewai-rollhub | PyPI | CrewAI gambling tool | | rollhub-openai-tools | npm | OpenAI function calling gambling | | rollhub-ai-tools | npm | Vercel AI SDK tools | | eliza-rollhub | npm | ElizaOS plugin | | autogpt-rollhub | PyPI | AutoGPT plugin |
Keywords
AI agent gambling API, provably fair dice, crypto betting SDK, MCP server casino, Claude Desktop gambling, AI casino API, zero-trust verification, autonomous agent betting, Solana gambling, cryptocurrency dice game, AI agent crypto, coinflip API
Links
- 🌐 Website: agent.rollhub.com
- 📖 API docs: agent.rollhub.com (scroll to API Reference)
- 🎰 MCP Server: rollhub-dice-mcp
- 💰 Affiliate MCP: rollhub-affiliate-mcp
