> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# واجهة API للحصول على سياق أداة إثبات ملكية المحفظة

> تعرض Didit السياق العام لجلسة أداة إثبات ملكية المحفظة عبر الرمز: طرق الإثبات المسموح بها، وتقدم الإثبات، وحالة الاكتمال.

موجّه API للحصول على سياق الأداة
نسخ الموجّه إلى الحافظة

<pre>
  \`Read the public context of a wallet-ownership widget session - the same endpoint the hosted widget page itself is driven by. Poll it to track proof progress from your backend.

  Endpoint:
  GET [https://verification.didit.me/v3/travel-rule/widget/\{token}/](https://verification.didit.me/v3/travel-rule/widget/\{token}/)

  Authentication:
  None - the widget token in the URL path is the credential. Treat the token as a secret.

  What to read from the response:

  * completed\_at - non-null once a proof has been verified. This is the completion signal.
  * allowed\_methods - which proof methods this session offers (MESSAGE\_SIGNING, SATOSHI\_TEST, SCREENSHOT, SELF\_DECLARATION).
    MESSAGE\_SIGNING works with wallets installed in the customer's browser, discovered in the page (EIP-6963 / Wallet Standard).
    Pairing a mobile wallet app (for example by scanning a QR code) is not available in production today.
  * transfer\_status - the linked Travel Rule transfer's status, when the session was minted with a transaction\_id.
  * proofs\[] - per-proof progress. A SATOSHI\_TEST proof carries deposit\_address, expected\_amount, and its own expires\_at; a MESSAGE\_SIGNING proof carries the challenge string. A SATOSHI\_TEST proof can sit at status PENDING while its deposit is seen on-chain but unconfirmed - a background job completes it automatically once it confirms. Each proof also carries attempts and failure\_reason (why the last attempt fell short, or why the proof closed; empty when nothing failed). A REJECTED proof carries rejection\_reason, an English sentence for the end user.
  * max\_attempts, attempts\_used, attempts\_remaining - how many rejected proofs this session allows, has had and has left. When attempts\_remaining is 0, starting another proof answers 409: mint a new session.
  * chain\_family - EVM, BTC, SOL or TRON: the key family behind chain, so a client picks the right wallet. One EVM key holds the same address on every EVM chain.
  * wallet\_address, chain (as minted, for example "ETH"), holder\_name, vasp\_name, callback\_url, expires\_at.

  Failure modes:

  * 404 - unknown token.
  * 410 - the session expired without completing.

  Prefer travel\_rule.status.updated webhooks over polling when the session is linked to a transfer.

  Full guide: /transaction-monitoring/wallet-ownership-widget#detect-completion.\`
</pre>

الصق في


## OpenAPI

````yaml ar/openapi-25.json GET /v3/travel-rule/widget/{token}/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: API التحقق من الهوية. قم بالمصادقة باستخدام الرأس x-api-key.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/travel-rule/widget/{token}/:
    get:
      tags:
        - Travel Rule
      summary: الحصول على سياق أداة إثبات ملكية المحفظة
      description: >-
        endpoint قراءة عام مفتاحه هو token جلسة عنصر واجهة المستخدم - ولا يتطلب
        أي مفتاح API. يُرجع سياق عنصر واجهة المستخدم بالإضافة إلى حالة كل إثبات،
        حتى تتمكن من استطلاعه دورياً لاكتشاف الاكتمال؛ وتصبح قيمة completed_at
        غير مساوية لـ null بمجرد التحقق من الإثبات. يمكن أن يظل إثبات
        SATOSHI_TEST في الحالة PENDING بينما تظهر عملية الإيداع الخاصة به على
        السلسلة ولكنها غير مؤكدة بعد - حيث تعيد مهمة في الخلفية التحقق منه
        تلقائياً وتكمله بمجرد تأكيد الإيداع، لذا لا يلزم اتخاذ أي إجراء من جانب
        العميل أثناء الانتظار. يحمل كل إثبات الحقول التي تتطلبها طريقته:
        deposit_address وexpected_amount وقيمة expires_at الخاصة به لـ
        SATOSHI_TEST؛ وchallenge لـ MESSAGE_SIGNING. يُفضل استخدام webhook لـ
        travel_rule.status.updated بدلاً من الاستطلاع الدوري عندما تكون الجلسة
        مرتبطة بتحويل.
      operationId: getTravelRuleWidgetContext
      parameters:
        - name: token
          in: path
          required: true
          description: token جلسة مبهم يُعاد عند إنشاء جلسة الأداة.
          schema:
            type: string
      responses:
        '200':
          description: سياق الأداة وحالات الإثبات.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TravelRuleWidgetContext'
        '404':
          description: token غير معروف.
        '410':
          description: انتهت صلاحية الجلسة دون اكتمالها.
      security:
        - {}
      x-codeSamples:
        - lang: curl
          label: curl
          source: curl https://verification.didit.me/v3/travel-rule/widget/{token}/
components:
  schemas:
    TravelRuleWidgetContext:
      type: object
      properties:
        vasp_name:
          type: string
          description: >-
            الاسم القانوني من ملف VASP التعريفي الخاص بك، والذي يظهر للعميل في
            الأداة. يكون فارغاً في حال عدم وجود ملف تعريفي.
        wallet_address:
          type: string
        chain:
          type: string
          description: السلسلة التي تم صك الجلسة بها، كما أرسلتها.
        chain_family:
          type: string
          nullable: true
          enum:
            - EVM
            - BTC
            - SOL
            - TRON
            - null
          description: >-
            عائلة المفاتيح المرتبطة بالسلسلة: EVM (سلاسل Ethereum وBNB Chain
            وPolygon وArbitrum وBase وOptimism وAvalanche وLinea وسلاسل EVM
            الأخرى)، أو BTC، أو SOL، أو TRON. يتحكم مفتاح EVM واحد في العنوان
            نفسه عبر كل سلسلة EVM. تكون القيمة فارغة (Null) عندما يتعذر التحقق
            من أي توقيع على السلسلة.
        holder_name:
          type: string
        allowed_methods:
          type: array
          items:
            type: string
            enum:
              - MESSAGE_SIGNING
              - SCREENSHOT
              - SATOSHI_TEST
              - SELF_DECLARATION
          description: >-
            طرق الإثبات المتاحة لهذه الجلسة. يتطلب MESSAGE_SIGNING سلسلة تحتوي
            على chain_family، ويتطلب SATOSHI_TEST وجود satoshi_deposit_address
            في الجلسة وسلسلة يمكن لـ Didit قراءة إيداعاتها، ويتطلب SCREENSHOT
            الإعداد allow_screenshot_proof، ويتطلب SELF_DECLARATION الإعداد
            allow_self_declaration.
        transfer_status:
          type: string
          nullable: true
          description: >-
            حالة تحويل Travel Rule المرتبط. تكون Null عندما تم إنشاء الجلسة بدون
            transaction_id.
        callback_url:
          type: string
          description: >-
            المكان الذي تعيد أداة الواجهة العميل إليه بعد الإكمال. فارغ عندما لا
            يكون معيناً.
        expires_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: غير فارغة بمجرد التحقق من الإثبات.
        proofs:
          type: array
          items:
            $ref: '#/components/schemas/TravelRuleWidgetProofSummary'
        max_attempts:
          type: integer
          description: إثباتات المحفظة المرفوضة التي تسمح بها هذه الجلسة.
        attempts_used:
          type: integer
          description: الإثباتات المرفوضة حتى الآن.
        attempts_remaining:
          type: integer
          description: >-
            عندما تكون القيمة 0، فإن بدء إثبات آخر يُرجع الرمز 409 وتُنشئ جلسة
            جديدة لعنصر واجهة المستخدم.
        customization:
          type: object
          nullable: true
          description: >-
            تخصيص العلامة البيضاء للتطبيق (الألوان، الشعار، عائلة الخط) عند
            تفعيل العلامة البيضاء - تظهر أداة الواجهة بنفس الهوية البصرية لمسار
            التحقق. يكون Null في خلاف ذلك.
    TravelRuleWidgetProofSummary:
      type: object
      properties:
        proof_id:
          type: string
          format: uuid
        method:
          type: string
          enum:
            - MESSAGE_SIGNING
            - SATOSHI_TEST
            - SCREENSHOT
            - SELF_DECLARATION
        status:
          type: string
          enum:
            - PENDING
            - VERIFIED
            - REJECTED
            - EXPIRED
          description: >-
            PENDING: اختار المستخدم النهائي هذه الطريقة ولم يُبت في الإثبات بعد.
            يؤدي التوقيع الفاشل أو الإيداع التجريبي غير القابل للقراءة أو غير
            المؤكد بعد إلى إبقاء الإثبات PENDING مع وجود failure_reason، حتى
            يتمكن المستخدم النهائي من المحاولة مجددًا؛ ويُعاد فحص إيداع
            SATOSHI_TEST المُرسل تلقائيًا حتى تُغلق نافذته الزمنية، بينما تنتظر
            لقطة شاشة SCREENSHOT المُرسلة مراجعتك. VERIFIED: تم إثبات الملكية.
            REJECTED: الإيداع التجريبي غير صحيح فعليًا (مُرسِل آخر، أو ليس
            المبلغ المتوقع إلى عنوان الإيداع، أو أقدم من التحدي، أو معاملة أثبتت
            بالفعل محفظة أخرى) أو قام المراجِع برفض لقطة الشاشة؛ ويوضح
            failure_reason السبب بدقة. الإثبات المرفوض نهائي ويستهلك إحدى
            محاولات الجلسة. EXPIRED: لم يعد بالإمكان البت في الإثبات (أُغلقت
            نافذته الزمنية، أو غيّر المستخدم النهائي الطريقة، أو انتهت جلسة
            الأداة، أو تغيّر حامل المحفظة)؛ ويوضح failure_reason السبب بدقة.
        wallet_address:
          type: string
        chain:
          type: string
          description: >-
            معرّف السلسلة القياسي لإدخال دفتر العناوين الذي يخصه الإثبات، على
            سبيل المثال ETH، BTC، SOL، TRX.
        deposit_address:
          type: string
          nullable: true
          description: >-
            عنوان الإيداع الذي يجب على العميل إرسال مبلغ اختبار Satoshi إليه.
            يتوفر فقط في إثبات SATOSHI_TEST.
        expected_amount:
          type: string
          nullable: true
          description: >-
            المبلغ الدقيق على السلسلة، بالعملة الأصلية للإيداع، الذي يجب أن
            يتطابق معه إيداع اختبار Satoshi. موجود فقط في إثبات SATOSHI_TEST.
        expires_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            الموعد النهائي للنافذة الزمنية لاختبار ساتوشي الخاص بهذا الإثبات.
            يظهر فقط في إثبات من نوع SATOSHI_TEST؛ ويتم تمديد expires_at الخاص
            بجلسة عنصر الواجهة لتغطيته عند تقديم SATOSHI_TEST.
        challenge:
          type: string
          nullable: true
          description: >-
            رسالة صادرة عن Didit يوقّعها العميل بمحفظته. تتوفر فقط في إثبات
            MESSAGE_SIGNING.
        rejection_reason:
          type: string
          description: >-
            سبب رفض الإثبات، كجملة باللغة الإنجليزية للمستخدم النهائي. يظهر فقط
            عندما تكون `status` هي REJECTED؛ ويكون فارغاً عندما يرفض المراجِع
            لقطة شاشة (تبقى ملاحظتك لديك).
        created_at:
          type: string
          format: date-time
        attempts:
          type: integer
          description: >-
            عدد المرات التي تم فيها تقديم أدلة لهذا الإثبات (التوقيعات، معرّفات
            المعاملات، عمليات الرفع).
        failure_reason:
          allOf:
            - $ref: '#/components/schemas/TravelRuleWalletProofFailureReason'
          description: >-
            سبب عدم نجاح المحاولة الأخيرة، أو سبب إغلاق الإثبات. يكون فارغاً إذا
            لم يفشل أي شيء.
    TravelRuleWalletProofFailureReason:
      type: string
      enum:
        - ''
        - SIGNATURE_INVALID
        - SIGNATURE_UNSUPPORTED_SCHEME
        - DEPOSIT_NOT_FOUND
        - DEPOSIT_UNCONFIRMED
        - DEPOSIT_LOOKUP_FAILED
        - DEPOSIT_MISMATCH
        - DEPOSIT_STALE
        - TXID_REUSED
        - CHAIN_UNSUPPORTED
        - WINDOW_EXPIRED
        - OWNERSHIP_CHANGED
        - METHOD_SWITCHED
        - REVIEW_REJECTED
        - ABANDONED
      description: >-
        سبب عدم وصول إثبات ملكية المحفظة، أو المحاولة الأخيرة له، إلى حالة
        VERIFIED. يكون فارغاً عند عدم وجود أي إخفاق. يمكن أن يحمل الإثبات ذو
        الحالة PENDING سبباً: أخفقت المحاولة الأخيرة ويمكن للمستخدم النهائي
        المحاولة مجدداً. تؤدي الحالات DEPOSIT_MISMATCH وDEPOSIT_STALE
        وTXID_REUSED وREVIEW_REJECTED إلى إغلاق الإثبات بحالة REJECTED. الحالة
        SIGNATURE_INVALID: لا يتطابق التوقيع مع المحفظة والتحدي. الحالة
        SIGNATURE_UNSUPPORTED_SCHEME: وقّعت المحفظة بتنسيق لا تتحقق منه Didit.
        الحالات DEPOSIT_NOT_FOUND وDEPOSIT_UNCONFIRMED وDEPOSIT_LOOKUP_FAILED:
        إيداع الاختبار غير قابل للقراءة أو لم يتم تأكيده بعد؛ تواصل Didit فحصه
        حتى تنتهي نافذة الاختبار. الحالة DEPOSIT_MISMATCH: المعاملة لا ترسل
        المبلغ المتوقع من المحفظة إلى عنوان الإيداع. الحالة DEPOSIT_STALE: تاريخ
        المعاملة يسبق التحدي. الحالة TXID_REUSED: أثبتت المعاملة بالفعل ملكية
        محفظة أخرى. الحالة CHAIN_UNSUPPORTED: الطريقة غير متوفرة على هذه
        السلسلة. الحالة WINDOW_EXPIRED: أُغلقت نافذة الاختبار. الحالة
        OWNERSHIP_CHANGED: تغيّر صاحب المحفظة، أو حُذفت المحفظة من دفتر العناوين
        الخاص بك، بعد إنشاء جلسة عنصر واجهة المستخدم. الحالة METHOD_SWITCHED:
        اختار المستخدم النهائي طريقة أخرى قبل إنهاء هذه الطريقة. الحالة
        REVIEW_REJECTED: رفض المراجِع الخاص بك لقطة الشاشة. الحالة ABANDONED:
        انقضت صلاحية جلسة عنصر واجهة المستخدم قبل أن يُنهي المستخدم النهائي
        العملية.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.