الانتقال إلى المحتوى الرئيسي

ابدأ في 4 خطوات

أنشئ حسابًا، وفَعِّل الأتمتة، وأنشئ مفتاح API، وقم بأول طلب.

الخطوة 1: تسجيل الدخول

قم بتسجيل الدخول عبر app.afkcrypto.com.

الخطوة 2: تفعيل الأتمتة (المحافظ)

في صفحة Wallets فعِّل Automation لعنوانك. يتيح ذلك لـ AFK توقيع المعاملات لتدفقات العمل المؤتمتة باستخدام توقيع غير احتجازي قائم على الجلسات. يمكنك الإلغاء في أي وقت.

الخطوة 3: إنشاء مفتاح API (أتمتة المحفظة)

من API Keys في لوحة التحكم، أنشئ مفتاحًا لأتمتة المحفظة.
  • الترويسة: x-api-key: afk_<prefix>_<random>
  • احتفظ به سريًا؛ بدّله عند التسريب
لمزيد من التفاصيل، راجع المصادقة.

الخطوة 4: تنفيذ استدعاءات API

عرّف مفتاح API كمتغير بيئة لإعادة الاستخدام:
export AFK_API_KEY="afk_abcd_xxx"
curl -s -H "x-api-key: $AFK_API_KEY" \
  "https://api.afkcrypto.com/v1/wallets?chain=ethereum"
{
  "wallets": [
    {
      "address": "0xabc...",
      "chainType": "ethereum",
      "isDefault": true,
      "automationEnabled": true,
      "providerType": "embedded",
      "clientType": "privy"
    }
  ]
}
استخدم Idempotency-Key: <uuid> في جميع نقاط الكتابة.
curl -s -X POST https://api.afkcrypto.com/v1/send \
  -H "x-api-key: $AFK_API_KEY" -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "chain":"base-sepolia",
    "asset":"erc20",
    "token":"0xToken",
    "to":"0xRecipient",
    "amount":"1000000000000000000"
  }'
{ "id": "tx_...", "status": "SUBMITTED", "hash": "0x...", "explorerUrl": "https://basescan.org/tx/0x...", "chainName": "Base" }
curl -s -X POST https://api.afkcrypto.com/v1/contracts/send \
  -H "x-api-key: $AFK_API_KEY" -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "chain":"base-sepolia",
    "to":"0xContract",
    "data":"0xabcdef...",
    "value":"0"
  }'
curl -s -X POST https://api.afkcrypto.com/v1/send \
  -H "x-api-key: $AFK_API_KEY" -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "chain":"solana-devnet",
    "asset":"spl",
    "token":"MintAddress",
    "to":"RecipientOwnerAddress",
    "amount":"1000000"
  }'
curl -s -H "x-api-key: $AFK_API_KEY" \
  "https://api.afkcrypto.com/v1/tx/tx_cuid_here"
{
  "id":"tx_cuid_here",
  "status":"PENDING",
  "hash": null,
  "explorerUrl": null,
  "chainName":"Base",
  "chainType":"ethereum",
  "chainId":8453,
  "to":"0xrecipient...",
  "value":"1000000000000000",
  "error": null,
  "createdAt":"2025-08-25T08:00:00.000Z",
  "updatedAt":"2025-08-25T08:00:00.000Z"
}

الخطوات التالية

استكشف نقاط النهاية الأساسية:
تحتاج مساعدة؟ راسلنا على hello@afkcrypto.com أو تواصل عبر Twitter.