> ## 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 per il contesto del widget di proprietà del wallet

> Didit: leggi con il token il contesto pubblico del widget di proprietà del wallet, con metodi di prova consentiti, avanzamento e stato di completamento.

Prompt API per ottenere il contesto del widget
Copia il prompt negli appunti

<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>

Incolla in


## OpenAPI

````yaml it/openapi-25.json GET /v3/travel-rule/widget/{token}/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: API di verifica dell'identità. Autenticati con l'intestazione x-api-key.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/travel-rule/widget/{token}/:
    get:
      tags:
        - Travel Rule
      summary: Recupera contesto del widget di titolarità del wallet
      description: >-
        Endpoint pubblico di lettura associato al token di sessione del widget,
        nessuna chiave API richiesta. Restituisce il contesto del widget e lo
        stato di ogni prova, consentendoti di effettuare il polling per
        rilevarne il completamento; completed_at diventa non nullo una volta
        verificata una prova. Una prova SATOSHI_TEST può rimanere nello stato
        PENDING mentre il relativo deposito è visibile on-chain ma non
        confermato: un job in background la ricontrolla automaticamente e la
        completa una volta confermato il deposito, quindi non è richiesta alcuna
        azione da parte del client durante l'attesa. Ciascuna prova include i
        campi richiesti dal rispettivo metodo: deposit_address, expected_amount
        e il proprio expires_at per SATOSHI_TEST; challenge per MESSAGE_SIGNING.
        È preferibile utilizzare il webhook travel_rule.status.updated rispetto
        al polling quando la sessione è collegata a un trasferimento.
      operationId: getTravelRuleWidgetContext
      parameters:
        - name: token
          in: path
          required: true
          description: >-
            Token di sessione opaco restituito quando la sessione del widget è
            stata creata.
          schema:
            type: string
      responses:
        '200':
          description: Il contesto del widget e gli stati della prova.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TravelRuleWidgetContext'
        '404':
          description: Token sconosciuto.
        '410':
          description: La sessione è scaduta senza essere completata.
      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: >-
            Ragione sociale ricavata dal profilo VASP, mostrata al cliente nel
            widget. Vuota quando non è presente alcun profilo.
        wallet_address:
          type: string
        chain:
          type: string
          description: >-
            La chain con cui è stata generata la sessione, così come l'hai
            inviata.
        chain_family:
          type: string
          nullable: true
          enum:
            - EVM
            - BTC
            - SOL
            - TRON
            - null
          description: >-
            La famiglia di chiavi alla base della chain: EVM (Ethereum, BNB
            Chain, Polygon, Arbitrum, Base, Optimism, Avalanche, Linea e le
            altre chain EVM), BTC, SOL o TRON. Una singola chiave EVM controlla
            lo stesso indirizzo su ogni chain EVM. Null quando non è possibile
            verificare alcuna firma sulla chain.
        holder_name:
          type: string
        allowed_methods:
          type: array
          items:
            type: string
            enum:
              - MESSAGE_SIGNING
              - SCREENSHOT
              - SATOSHI_TEST
              - SELF_DECLARATION
          description: >-
            Metodi di prova disponibili per questa sessione. MESSAGE_SIGNING
            richiede una chain con una chain_family, SATOSHI_TEST richiede un
            satoshi_deposit_address sulla sessione e una chain i cui depositi
            possono essere letti da Didit, SCREENSHOT richiede l'impostazione
            allow_screenshot_proof e SELF_DECLARATION richiede l'impostazione
            allow_self_declaration.
        transfer_status:
          type: string
          nullable: true
          description: >-
            Stato del trasferimento Travel Rule collegato. Null quando la
            sessione è stata creata senza un transaction_id.
        callback_url:
          type: string
          description: >-
            Indica dove il widget reindirizza il cliente dopo il completamento.
            Vuoto se non impostato.
        expires_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: Non nullo una volta che la prova è stata verificata.
        proofs:
          type: array
          items:
            $ref: '#/components/schemas/TravelRuleWidgetProofSummary'
        max_attempts:
          type: integer
          description: >-
            Prove di possesso del wallet rifiutate consentite da questa
            sessione.
        attempts_used:
          type: integer
          description: Prove rifiutate finora.
        attempts_remaining:
          type: integer
          description: >-
            Quando è 0, l'avvio di un'altra prova risponde con 409 e generi una
            nuova sessione di widget.
        customization:
          type: object
          nullable: true
          description: >-
            La personalizzazione White label dell'applicazione (colori, logo,
            famiglia di caratteri) quando il White label è abilitato: il widget
            viene visualizzato con la stessa identità visiva del flusso di
            verifica. Null in caso contrario.
    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: l'utente finale ha scelto questo metodo e la prova non è
            ancora decisa. Una firma non riuscita o un deposito di prova non
            ancora leggibile o confermato mantiene la prova in stato PENDING con
            un failure_reason, consentendo all'utente finale di riprovare; un
            deposito SATOSHI_TEST inviato viene ricontrollato automaticamente
            fino alla chiusura della relativa finestra temporale, mentre uno
            SCREENSHOT inviato rimane in attesa della tua revisione. VERIFIED:
            l'assetto proprietario è dimostrato. REJECTED: il deposito di prova
            è effettivamente errato (un altro mittente, importo non
            corrispondente a quello previsto verso l'indirizzo di deposito,
            anteriore alla richiesta di verifica o transazione che ha già
            provato un altro wallet) oppure il tuo revisore ha rifiutato lo
            screenshot; failure_reason specifica quale. Una prova rifiutata è
            definitiva e consuma uno dei tentativi della sessione. EXPIRED: la
            prova non può più essere decisa (la finestra temporale si è chiusa,
            l'utente finale ha cambiato metodo, la sessione del widget è scaduta
            o il titolare del wallet è cambiato); failure_reason specifica
            quale.
        wallet_address:
          type: string
        chain:
          type: string
          description: >-
            Identificatore canonico della rete blockchain della voce della
            rubrica a cui si riferisce la prova, ad es. ETH, BTC, SOL, TRX.
        deposit_address:
          type: string
          nullable: true
          description: >-
            Indirizzo di deposito a cui il cliente deve inviare l'importo del
            test Satoshi. Presente solo su una prova SATOSHI_TEST.
        expected_amount:
          type: string
          nullable: true
          description: >-
            Importo on-chain esatto, nella valuta nativa del deposito, a cui il
            deposito di test Satoshi deve corrispondere. Presente solo su una
            prova SATOSHI_TEST.
        expires_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            Scadenza per la finestra del Satoshi test di questa prova. Presente
            solo su una prova SATOSHI_TEST; il valore expires_at della sessione
            del widget viene esteso per coprirla quando viene offerto
            SATOSHI_TEST.
        challenge:
          type: string
          nullable: true
          description: >-
            Messaggio emesso da Didit che il cliente firma con il proprio
            wallet. Presente solo in una prova MESSAGE_SIGNING.
        rejection_reason:
          type: string
          description: >-
            Il motivo per cui la prova è stata rifiutata, come frase in inglese
            per l'utente finale. Presente solo quando `status` è REJECTED; vuoto
            quando il tuo revisore ha rifiutato uno screenshot (la tua nota
            rimane visibile solo a te).
        created_at:
          type: string
          format: date-time
        attempts:
          type: integer
          description: >-
            Quante volte sono state inviate prove per questa prova (firme, ID di
            transazione, caricamenti).
        failure_reason:
          allOf:
            - $ref: '#/components/schemas/TravelRuleWalletProofFailureReason'
          description: >-
            Perché l'ultimo tentativo non è andato a buon fine, o perché la
            prova si è conclusa. Vuoto se non si è verificato alcun errore.
    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: >-
        Il motivo per cui una prova di titolarità del wallet, o il suo ultimo
        tentativo, non ha raggiunto lo stato VERIFIED. Vuoto se non si è
        verificato alcun errore. Una prova PENDING può contenerne uno: l'ultimo
        tentativo è fallito e l'utente finale può riprovare. DEPOSIT_MISMATCH,
        DEPOSIT_STALE, TXID_REUSED e REVIEW_REJECTED chiudono la prova come
        REJECTED. SIGNATURE_INVALID: la firma non corrisponde al wallet e alla
        challenge. SIGNATURE_UNSUPPORTED_SCHEME: il wallet ha firmato in un
        formato non verificato da Didit. DEPOSIT_NOT_FOUND, DEPOSIT_UNCONFIRMED,
        DEPOSIT_LOOKUP_FAILED: il deposito di prova non è leggibile o non è
        ancora confermato; Didit continua a verificarlo fino alla chiusura della
        finestra di prova. DEPOSIT_MISMATCH: la transazione non invia l'importo
        previsto dal wallet all'indirizzo di deposito. DEPOSIT_STALE: la
        transazione è antecedente alla challenge. TXID_REUSED: la transazione ha
        già dimostrato la titolarità di un altro wallet. CHAIN_UNSUPPORTED: il
        metodo non è disponibile su questa blockchain. WINDOW_EXPIRED: la
        finestra di prova si è chiusa. OWNERSHIP_CHANGED: il titolare del wallet
        è cambiato, oppure il wallet è stato eliminato dalla tua rubrica, dopo
        la generazione della sessione del widget. METHOD_SWITCHED: l'utente
        finale ha scelto un altro metodo prima di completare questo.
        REVIEW_REJECTED: il tuo revisore ha rifiutato lo screenshot. ABANDONED:
        la sessione del widget è scaduta prima che l'utente finale terminasse.

````

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