← 返回
安全合规 Key 中文

GiftDrop

Send, manage, and claim Solana crypto red packets via the GiftDrop API using wallet-authenticated requests and customizable gift parameters.
通过GiftDrop API,使用钱包身份验证请求和可自定义礼品参数,发送、管理和领取Solana加密红包。
tiancookie
安全合规 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 660
下载
💾 5
安装
1
版本
#latest

概述

GiftDrop Skill

Send and claim crypto red packets on Solana via the GiftDrop API. Humans and AI Agents are equal participants — wallets don't care who holds the private key.

Prerequisites

  • A Solana wallet keypair (for signing transactions and API key registration)
  • An API key from GiftDrop (register via wallet signature)

API Base URL

https://giftdrop.fun/api/v1

Authentication

All requests require an X-API-Key header:

X-API-Key: gd_<your_key>

Key format: gd_ + 32 hex chars (35 chars total).

Register an API Key

Sign a message with your Solana wallet to get an API key. The message must:

  • Contain "GiftDrop API Key"
  • Contain an ISO timestamp within 5 minutes of current time
  • Each signature can only be used once
MESSAGE="GiftDrop API Key request at $(date -u +%Y-%m-%dT%H:%M:%SZ)"

curl -X POST https://giftdrop.fun/api/v1/keys \
  -H "Content-Type: application/json" \
  -d '{
    "wallet": "<WALLET_ADDRESS>",
    "signature": "<BASE64_ED25519_SIGNATURE_OF_MESSAGE>",
    "message": "'"$MESSAGE"'"
  }'
# Response: { "success": true, "apiKey": "gd_..." }
# Save this key! It won't be shown again.

Max 3 keys per wallet. Max 10 registration attempts per IP per hour.

Commands

Create a Gift Drop

  1. Send SOL/SPL tokens to host wallet: 3sZVJLG64tGyAzfNNau3nks7i44oVR6fAmoAjF5A5b7N
    • For SPL tokens, also send 0.003 SOL × totalClaims as gas reserve
  2. Register the gift drop:
curl -X POST https://giftdrop.fun/api/v1/gift \
  -H "X-API-Key: gd_..." \
  -H "Content-Type: application/json" \
  -d '{
    "fundingTx": "<SOLANA_TX_SIGNATURE>",
    "totalAmount": 1.0,
    "totalClaims": 10,
    "tokenSymbol": "SOL",
    "tokenMint": "So11111111111111111111111111111111111111112",
    "decimals": 9,
    "title": "Happy Birthday!",
    "luckyBonusPercent": 30,
    "expiryDays": 7
  }'
# Response: { "success": true, "id": "gift_...", "url": "https://giftdrop.fun/g/gift_..." }

Each funding transaction can only be used once.

Parameters:

FieldRequiredTypeDescription
------------------------------------
fundingTxstringSolana tx signature (base58, 64-128 chars)
totalAmountnumberTotal token amount (positive finite)
totalClaimsintegerNumber of claims (3-100)
tokenSymbolstringToken symbol, max 10 chars
tokenMintstringSPL token mint address (base58)
decimalsintegerToken decimals, 0-18 (default: 9)
titlestringOptional title, max 40 chars
passwordstringPassword protection, 4-20 chars
passwordHintstringHint for password, max 50 chars
luckyBonusPercentintegerLucky bonus: 0, 30, 50, 70, or 100 (default: 30)
expiryDaysintegerExpiry: 1, 3, 7, or 30 (default: 7)

Claim a Gift Drop

curl -X POST https://giftdrop.fun/api/v1/gift/<GIFT_ID>/claim \
  -H "X-API-Key: gd_..." \
  -H "Content-Type: application/json" \
  -d '{"password": "optional_if_protected"}'
# Response: { "success": true, "amount": 0.15, "isLucky": false, "signature": "..." }

Uses the wallet associated with your API key as the claimant.

Check Gift Drop Status

curl https://giftdrop.fun/api/v1/gift/<GIFT_ID> \
  -H "X-API-Key: gd_..."
# Response: { "success": true, "gift": { "totalAmount": 1.0, "claimed": 3, "remaining": 7, ... } }

List My Gift Drops

curl https://giftdrop.fun/api/v1/gifts \
  -H "X-API-Key: gd_..."
# Response: { "success": true, "gifts": [...] }

Rate Limits

ActionLimit
---------------
Key registration10/hr per IP, 3 keys per wallet
Gift creation5/hr per wallet
Claims10/min per wallet
General API60/min per key

Fees

  • 1% platform fee (deducted from total amount)
  • SPL tokens: 0.003 SOL × totalClaims as gas reserve

Token Limits

TokenMax per drop
--------------------
SOL10
USDC1,000
USDT1,000
OthersNo limit

Error Codes

StatusMeaning
-----------------
400Validation error
401Invalid or missing API key
404Gift drop not found
409Duplicate (tx already used, gift already exists)
410Expired or sold out
429Rate limit exceeded
503Service unavailable

Example: Full Agent Workflow (Python)

from solders.keypair import Keypair
from solders.pubkey import Pubkey
from solders.transaction import VersionedTransaction
from solders.message import MessageV0
from solders.system_program import transfer, TransferParams
from solders.hash import Hash
import requests, json, base64, time, struct

API = "https://giftdrop.fun/api/v1"
HOST = Pubkey.from_string("3sZVJLG64tGyAzfNNau3nks7i44oVR6fAmoAjF5A5b7N")
SOL_MINT = "So11111111111111111111111111111111111111112"
RPC = "https://api.mainnet-beta.solana.com"

# Load your keypair
kp = Keypair()  # or Keypair.from_base58_string("your_private_key")

# Step 1: Register API Key
msg = f"GiftDrop API Key request at {time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime())}"
sig = kp.sign_message(msg.encode())
r = requests.post(f"{API}/keys", json={
    "wallet": str(kp.pubkey()),
    "signature": base64.b64encode(bytes(sig)).decode(),
    "message": msg,
})
api_key = r.json()["apiKey"]
headers = {"X-API-Key": api_key, "Content-Type": "application/json"}

# Step 2: Send SOL to host wallet
bh_resp = requests.post(RPC, json={"jsonrpc":"2.0","id":1,"method":"getLatestBlockhash","params":[{"commitment":"finalized"}]})
blockhash = Hash.from_string(bh_resp.json()["result"]["value"]["blockhash"])
ix = transfer(TransferParams(from_pubkey=kp.pubkey(), to_pubkey=HOST, lamports=500_000_000))  # 0.5 SOL
msg = MessageV0.try_compile(kp.pubkey(), [ix], [], blockhash)
tx = VersionedTransaction(msg, [kp])
tx_resp = requests.post(RPC, json={"jsonrpc":"2.0","id":1,"method":"sendTransaction","params":[base64.b64encode(bytes(tx)).decode(),{"encoding":"base64"}]})
funding_tx = tx_resp.json()["result"]
time.sleep(15)  # wait for confirmation

# Step 3: Create gift drop
r = requests.post(f"{API}/gift", headers=headers, json={
    "fundingTx": funding_tx,
    "totalAmount": 0.5,
    "totalClaims": 10,
    "tokenSymbol": "SOL",
    "tokenMint": SOL_MINT,
    "title": "Agent Gift 🤖",
})
gift = r.json()
print(f"Gift URL: {gift['url']}")

# Step 4: Check status
r = requests.get(f"{API}/gift/{gift['id']}", headers=headers)
print(r.json())

# Step 5: Claim (with a different wallet/key)
r = requests.post(f"{API}/gift/{gift['id']}/claim", headers=headers)
print(r.json())

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 19:24 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,212 📥 266,272
security-compliance

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,142
security-compliance

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 89 📥 30,594