> ## 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 Travel Rule: avvia prova di proprietà wallet

> Con Didit avvia la prova di proprietà del wallet dal token widget: firma, test Satoshi, screenshot o autodichiarazione. Risceglierlo la riprende.

Prompt dell'API per avviare la prova del widget
Copia il prompt negli appunti

<pre>
  \`Start a wallet-ownership proof for a widget session. This is the call the hosted widget makes when the end user picks a proof method; use it only if I build my own widget UI.

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

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

  Body:

  * method - one of the context's allowed\_methods: MESSAGE\_SIGNING, SATOSHI\_TEST, SCREENSHOT or SELF\_DECLARATION.
  * wallet\_address, chain - optional, default to the session's.

  Behavior:

  * 201 with a new PENDING proof. MESSAGE\_SIGNING returns the challenge to sign; SATOSHI\_TEST returns deposit\_address, expected\_amount and expires\_at; SELF\_DECLARATION is verified at once.
  * 200 with the proof already open when the same method is picked again (same challenge or amount): resume it, do not treat it as an error.
  * Picking another method closes the unfinished proof as METHOD\_SWITCHED, except a submitted screenshot or a test deposit still being checked.
  * After a REJECTED proof, picking a method starts a new one (201). A session takes a limited number of rejected proofs: the context reports max\_attempts, attempts\_used and attempts\_remaining.
  * Message signing works on EVM chains (Ethereum, BNB Chain, Polygon, Arbitrum, Base, Optimism, Avalanche, Linea and others), Bitcoin (BIP-137 and BIP-322 simple), Solana and Tron.

  Failure modes (errors carry a code to translate):

  * 400 - code CHAIN\_UNSUPPORTED when the method is not available on the chain; also an invalid body or a wallet that does not match the transfer.
  * 403 - SELF\_DECLARATION not allowed for the application.
  * 409 - code OWNERSHIP\_CHANGED: mint a new session for the current holder.
  * 409 - no attempts left (no code; the body carries attempts\_remaining 0): mint a new session.
  * 404 - unknown token. 410 - the session expired.

  Full guide: /transaction-monitoring/wallet-ownership-widget#what-it-proves.\`
</pre>

Incolla in


## OpenAPI

````yaml it/openapi-25.json POST /v3/travel-rule/widget/{token}/proofs/
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}/proofs/:
    post:
      tags:
        - Travel Rule
      summary: Avvia una prova di titolarità del wallet
      description: >-
        Endpoint pubblico associato al token di sessione del widget, nessuna
        chiave API richiesta: il widget ospitato lo chiama quando l'utente
        finale sceglie un metodo di prova. Una prova esiste, e conta nel tuo
        funnel di prova, solo a partire da questa chiamata. Scegliere di nuovo
        lo stesso metodo restituisce la prova già aperta (200, stesso challenge
        o importo del deposito) invece di avviarne una seconda; scegliere un
        altro metodo chiude quella non completata come METHOD_SWITCHED, ad
        eccezione di uno screenshot inviato o di un deposito di prova ancora in
        fase di verifica. MESSAGE_SIGNING restituisce il challenge da firmare;
        SATOSHI_TEST l'indirizzo di deposito, l'importo esatto e la finestra
        temporale; SELF_DECLARATION viene verificata immediatamente (stato
        VERIFIED). Formati di firma verificati per famiglia di catena: le catene
        EVM accettano una firma personal_sign (EIP-191), codificata in hex;
        Bitcoin accetta una firma signmessage BIP-137 (indirizzi P2PKH,
        P2SH-P2WPKH e P2WPKH) o una firma semplice BIP-322 (indirizzi P2WPKH e
        P2TR), codificata in base64; Solana accetta una firma Ed25519 sul
        challenge, codificata in base58; Tron accetta una firma signMessageV2
        (TIP-191), codificata in hex. Una firma BIP-322 completa o di prova dei
        fondi, oppure un indirizzo multisig, fallisce con
        SIGNATURE_UNSUPPORTED_SCHEME.
      operationId: createTravelRuleWidgetProof
      parameters:
        - name: token
          in: path
          required: true
          description: >-
            Token di sessione opaco restituito quando la sessione del widget è
            stata creata.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TravelRuleWidgetProofCreate'
      responses:
        '200':
          description: La prova già aperta per questo metodo, ripresa.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TravelRuleWidgetProofSummary'
        '201':
          description: Una nuova prova PENDING (VERIFIED per SELF_DECLARATION).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TravelRuleWidgetProofSummary'
        '400':
          description: >-
            Corpo non valido, un wallet che non corrisponde al trasferimento,
            SCREENSHOT non consentito o codice CHAIN_UNSUPPORTED quando il
            metodo non è disponibile sulla blockchain.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TravelRuleWidgetProofError'
        '403':
          description: SELF_DECLARATION non è consentito per questa applicazione.
        '404':
          description: Token sconosciuto.
        '409':
          description: >-
            codice OWNERSHIP_CHANGED: il titolare del wallet è cambiato o il
            wallet è stato eliminato dopo la creazione della sessione; crea una
            nuova sessione per il titolare attuale. Restituito anche per
            SATOSHI_TEST quando la sessione non ha satoshi_deposit_address e
            quando la sessione non ha tentativi rimanenti (nessun codice; il
            corpo contiene max_attempts, attempts_used e attempts_remaining 0):
            crea una nuova sessione.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TravelRuleWidgetProofError'
        '410':
          description: La sessione è scaduta.
      security:
        - {}
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            https://verification.didit.me/v3/travel-rule/widget/{token}/proofs/
            \
              -H 'Content-Type: application/json' \
              -d '{"method": "MESSAGE_SIGNING"}'
components:
  schemas:
    TravelRuleWidgetProofCreate:
      type: object
      required:
        - method
      properties:
        method:
          type: string
          enum:
            - MESSAGE_SIGNING
            - SATOSHI_TEST
            - SCREENSHOT
            - SELF_DECLARATION
          description: >-
            Il metodo di prova scelto dall'utente finale. Deve essere uno dei
            allowed_methods del contesto.
        wallet_address:
          type: string
          maxLength: 128
          description: >-
            Assume come valore predefinito il wallet_address della sessione.
            Deve corrispondere al wallet del trasferimento quando la sessione è
            collegata a un trasferimento.
        chain:
          type: string
          maxLength: 32
          description: Assume come valore predefinito la rete della sessione.
    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.
    TravelRuleWidgetProofError:
      type: object
      properties:
        detail:
          type: string
          description: Messaggio di facile lettura in inglese.
        code:
          allOf:
            - $ref: '#/components/schemas/TravelRuleWalletProofFailureReason'
          description: >-
            Motivo leggibile dalla macchina, che consente a un client di
            mostrare il proprio messaggio tradotto.
        status:
          type: string
          enum:
            - PENDING
            - VERIFIED
            - REJECTED
            - EXPIRED
          description: >-
            Presente quando la prova è chiusa: REJECTED dal deposito appena
            inviato (400), oppure REJECTED o EXPIRED quando viene inviata
            un'evidenza a una prova già chiusa (409).
        proof_id:
          type: string
          format: uuid
          description: 'Presente con status: la prova chiusa.'
        method:
          type: string
          enum:
            - MESSAGE_SIGNING
            - SATOSHI_TEST
            - SCREENSHOT
            - SELF_DECLARATION
          description: 'Presente con status: il metodo della prova chiusa.'
        max_attempts:
          type: integer
          description: >-
            Presente con status: prove del wallet rifiutate consentite da questa
            sessione.
        attempts_used:
          type: integer
          description: 'Presente con status: prove rifiutate finora.'
        attempts_remaining:
          type: integer
          description: >-
            Presente con status: quando è 0, l'avvio di un'altra prova
            restituisce 409 e crei una nuova sessione del widget.
    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.