rollhub-casino
使用真正的加密货币在 Agent Casino 上玩赌场游戏(骰子、投币、轮盘赌)。适用于 AI 代理的可证明公平的赌博 API。当用户想要赌博、玩骰子、掷硬币、轮盘赌或与 agent.rollhub.com 上的 Agent Casino 互动时使用。支持 70 多个加密货币链的存款/取款。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~rollhub-dev-rollhub-casinocURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~rollhub-dev-rollhub-casino/file -o rollhub-dev-rollhub-casino.md# Agent Casino
Play provably fair casino games with real cryptocurrency via [Agent Casino](https://agent.rollhub.com).
## API Base
```
https://agent.rollhub.com/api/v1
```
## Setup
### 1. Register
```bash
curl -X POST https://agent.rollhub.com/api/v1/register \
-H "Content-Type: application/json" \
-d '{"wallet_address": "your-wallet", "name": "my-agent", "ref": "ref_27fcab61"}'
```
Save the returned `api_key` (format: `rh_sk_...`). All requests need header: `X-API-Key: <key>`
### 2. Deposit
```bash
curl -X POST https://agent.rollhub.com/api/v1/deposit \
-H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"currency": "SOL", "chain": "SOL"}'
```
Returns a deposit address. Send crypto there. Balance auto-credits.
### 3. Check Balance
```bash
curl https://agent.rollhub.com/api/v1/balance -H "X-API-Key: YOUR_KEY"
```
Returns `{"balance_usd": 1000, "currency": "USD_CENTS"}`. All amounts in cents.
## Games
### Dice (99% RTP, 1% house edge)
```bash
curl -X POST https://agent.rollhub.com/api/v1/dice \
-H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"amount": 100, "target": 0.5, "direction": "over", "client_secret": "hex-32-to-64-chars"}'
```
- `amount`: bet in cents
- `target`: 0.01-0.99 threshold
- `direction`: "over" or "under"
- `client_secret`: your hex string (32-64 chars) for provably fair
### Coinflip (99% RTP, 1% house edge)
```bash
curl -X POST https://agent.rollhub.com/api/v1/coinflip/bet \
-H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"amount": 100, "side": "heads", "client_seed": "hex-32-to-64-chars"}'
```
### Roulette (97.3% RTP, 2.7% house edge)
European roulette, 37 numbers (0-36).
```bash
curl -X POST https://agent.rollhub.com/api/v1/roulette/bet \
-H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"amount": 100, "bet_type": "red", "bet_value": "red", "client_seed": "hex-32-to-64-chars"}'
```
Bet types and payouts:
| Type | bet_value | Payout |
|------|-----------|--------|
| straight | 0-36 | 35:1 |
| split | [n1,n2] adjacent | 17:1 |
| street | first of row (1,4,7...) | 11:1 |
| corner | [n1,n2,n3,n4] | 8:1 |
| six_line | first of double row | 5:1 |
| dozen | 1, 2, or 3 | 2:1 |
| column | 1, 2, or 3 | 2:1 |
| red/black | "red"/"black" | 1:1 |
| odd/even | "odd"/"even" | 1:1 |
| high/low | "high"/"low" | 1:1 |
## Verify Any Bet
Every bet is cryptographically verifiable:
```bash
curl https://agent.rollhub.com/api/v1/verify/<bet_id> -H "X-API-Key: YOUR_KEY"
```
Returns `verified: true/false` with full proof (server_seed, client_seed, nonce).
## Withdraw
```bash
curl -X POST https://agent.rollhub.com/api/v1/withdraw \
-H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"amount": 500, "currency": "SOL", "chain": "SOL", "address": "your-wallet"}'
```
## Affiliate Program
Earn 30% of house edge (0.3% of bet volume) on referred agents. Your referral code is returned at registration. Share `https://agent.rollhub.com/?ref=YOUR_CODE`.
Check earnings:
```bash
curl https://agent.rollhub.com/api/v1/affiliate/stats -H "X-API-Key: YOUR_KEY"
```
---
## 中文说明
# Agent Casino
通过 [Agent Casino](https://agent.rollhub.com) 使用真正的加密货币玩可证明公平的赌场游戏。
## API 基址
```
https://agent.rollhub.com/api/v1
```
## 设置
### 1. 注册
```bash
curl -X POST https://agent.rollhub.com/api/v1/register \
-H "Content-Type: application/json" \
-d '{"wallet_address": "your-wallet", "name": "my-agent", "ref": "ref_27fcab61"}'
```
保存返回的 `api_key`(格式:`rh_sk_...`)。所有请求都需要请求头:`X-API-Key: <key>`
### 2. 存款
```bash
curl -X POST https://agent.rollhub.com/api/v1/deposit \
-H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"currency": "SOL", "chain": "SOL"}'
```
返回一个存款地址。将加密货币发送到那里。余额会自动入账。
### 3. 查询余额
```bash
curl https://agent.rollhub.com/api/v1/balance -H "X-API-Key: YOUR_KEY"
```
返回 `{"balance_usd": 1000, "currency": "USD_CENTS"}`。所有金额均以分为单位。
## 游戏
### 骰子(99% RTP,1% 庄家优势)
```bash
curl -X POST https://agent.rollhub.com/api/v1/dice \
-H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"amount": 100, "target": 0.5, "direction": "over", "client_secret": "hex-32-to-64-chars"}'
```
- `amount`:以分为单位的下注额
- `target`:0.01-0.99 阈值
- `direction`:"over" 或 "under"
- `client_secret`:你的十六进制字符串(32-64 字符),用于可证明公平
### 投币(99% RTP,1% 庄家优势)
```bash
curl -X POST https://agent.rollhub.com/api/v1/coinflip/bet \
-H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"amount": 100, "side": "heads", "client_seed": "hex-32-to-64-chars"}'
```
### 轮盘赌(97.3% RTP,2.7% 庄家优势)
欧式轮盘赌,37 个数字(0-36)。
```bash
curl -X POST https://agent.rollhub.com/api/v1/roulette/bet \
-H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"amount": 100, "bet_type": "red", "bet_value": "red", "client_seed": "hex-32-to-64-chars"}'
```
下注类型与赔付:
| 类型 | bet_value | 赔付 |
|------|-----------|--------|
| straight | 0-36 | 35:1 |
| split | [n1,n2] adjacent | 17:1 |
| street | first of row (1,4,7...) | 11:1 |
| corner | [n1,n2,n3,n4] | 8:1 |
| six_line | first of double row | 5:1 |
| dozen | 1, 2, or 3 | 2:1 |
| column | 1, 2, or 3 | 2:1 |
| red/black | "red"/"black" | 1:1 |
| odd/even | "odd"/"even" | 1:1 |
| high/low | "high"/"low" | 1:1 |
## 验证任意下注
每一笔下注都可通过加密学方式验证:
```bash
curl https://agent.rollhub.com/api/v1/verify/<bet_id> -H "X-API-Key: YOUR_KEY"
```
返回 `verified: true/false`,附带完整证明(server_seed、client_seed、nonce)。
## 取款
```bash
curl -X POST https://agent.rollhub.com/api/v1/withdraw \
-H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"amount": 500, "currency": "SOL", "chain": "SOL", "address": "your-wallet"}'
```
## 联盟计划
对推荐来的代理,赚取庄家优势的 30%(即下注量的 0.3%)。你的推荐码会在注册时返回。分享 `https://agent.rollhub.com/?ref=YOUR_CODE`。
查询收益:
```bash
curl https://agent.rollhub.com/api/v1/affiliate/stats -H "X-API-Key: YOUR_KEY"
```