> ## 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 ja/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: >-
        ウィジェットのセッショントークンで識別する公開の読み取りエンドポイントで、APIキーは不要です。ウィジェットのコンテキストとすべての証明のステータスを返すため、ポーリングして完了を検出できます。証明が検証されると、completed_atがnull以外になります。SATOSHI_TESTの証明は、入金がオンチェーンで検出されたものの未承認である間、ステータスPENDINGのままになることがあります。バックグラウンドジョブが自動的に再確認し、入金が承認されると完了させるため、待機中にクライアント側でのアクションは不要です。各証明には、その方式に必要なフィールドが含まれます。SATOSHI_TESTではdeposit_address、expected_amount、および証明自体のexpires_at、MESSAGE_SIGNINGではchallengeです。セッションが送金に紐付いている場合は、ポーリングよりもtravel_rule.status.updated
        Webhookを優先してください。
      operationId: getTravelRuleWidgetContext
      parameters:
        - name: token
          in: path
          required: true
          description: ウィジェットセッションの発行時に返される不透明なセッショントークンです。
          schema:
            type: string
      responses:
        '200':
          description: ウィジェットのコンテキストと証明のステータス。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TravelRuleWidgetContext'
        '404':
          description: 不明なトークンです。
        '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のいずれかです。1つの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: 紐付けられたトラベルルール送金のステータスです。transaction_idなしでセッションが作成された場合はnullです。
        callback_url:
          type: string
          description: 完了後にウィジェットが顧客を戻す先です。未設定の場合は空です。
        expires_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: 証明が検証されると非nullになります。
        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:
            エンドユーザーがこの方法を選択し、証明がまだ判定されていない状態です。署名に失敗した場合や、テスト入金がまだ読み取れないか確認されていない場合、証明はfailure_reasonを伴ってPENDINGのままとなり、エンドユーザーは再試行できます。送信済みのSATOSHI_TEST入金は期間が終了するまで自動的に再確認され、送信済みのSCREENSHOTはお客様のレビューを待ちます。VERIFIED:
            ウォレットの所有権が証明されています。REJECTED:
            テスト入金が実際に誤っている場合（別の送金人からの入金、入金アドレスへの想定金額ではない入金、チャレンジより古い入金、またはすでに別のウォレットを証明した取引）か、お客様のレビュアーがスクリーンショットを却下した場合です。failure_reasonにその理由が示されます。却下された証明は確定であり、セッションの試行回数を1回消費します。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テスト期間の期限。SATOSHI_TESTのプルーフにのみ含まれます。SATOSHI_TESTが提示される場合、ウィジェットセッション自体のexpires_atはこの期限をカバーするよう延長されます。
        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: この証明のために証拠が提出された回数（署名、取引ID、アップロード）。
        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.