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

# Confirm Asset Data Attestation

> Verify a mined asset data attestation and record it

Records an attestation once its transaction has mined. The receipt is read from the chain and checked before anything is written. The transaction must have succeeded, targeted the lending factory, and called `attestAssetData` for this market or `deployMarket`. The factory must also have emitted `AssetDataAttested` for this market. The recorded version, hash and attestor come from that event, never from the request.

A `deployMarket` receipt is accepted because the first attestation travels inside the deployment. The deployment confirm on [Deploy Market](/endpoints/lending/deploy-market) already records it, so this route is for re-attestations built with [Attest Asset Data](/endpoints/lending/attest-asset-data).

The transaction must have been signed by one of this instance's verified wallets. The same market access check as [Get Asset Data](/endpoints/lending/get-asset-data#who-can-read-it) runs first.

## Path Parameters

<ParamField path="market" type="string" required>
  The market contract address, as 40 hex characters with a `0x` prefix.
</ParamField>

## Body Parameters

<ParamField body="txHash" type="string" required>
  Hash of the mined attestation transaction, as `0x` and 64 hex characters.
</ParamField>

## Response Fields

Confirming returns `201`.

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="txHash" type="string">The confirmed transaction.</ResponseField>
    <ResponseField name="signer" type="string">The wallet that sent it, lowercased.</ResponseField>

    <ResponseField name="attestation" type="object">
      Read from the `AssetDataAttested` event.

      <Expandable>
        <ResponseField name="contentHash" type="string">The hash attested.</ResponseField>
        <ResponseField name="previousHash" type="string">The attestation it replaced. The zero hash for a first attestation.</ResponseField>
        <ResponseField name="version" type="integer">The version it became.</ResponseField>
        <ResponseField name="attestor" type="string">The attesting wallet.</ResponseField>
        <ResponseField name="bundleAvailable" type="boolean">`true` when the platform holds the bytes behind this hash.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="assetData" type="object">The market's record after the confirm, in the shape of [Get Asset Data](/endpoints/lending/get-asset-data) without `origin`.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.trusset.org/lending-external-securities-v2/api/markets/0x70a0e25c7b768b87e658348b3b577678a173e038/asset-data/attest/confirm" \
    -H "X-API-Key: trusset_your_key_here" \
    -H "Content-Type: application/json" \
    -d '{ "txHash": "0x94c206e7614a93e3194caffa428756827f9c0f4d042de189439ffe2f225f822f" }'
  ```

  ```typescript TypeScript theme={null}
  const res = await fetch(
    `https://api.trusset.org/lending-external-securities-v2/api/markets/${marketAddress}/asset-data/attest/confirm`,
    {
      method: 'POST',
      headers: {
        'X-API-Key': 'trusset_your_key_here',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({ txHash })
    }
  );
  const { success, data, error } = await res.json();
  if (!success) throw new Error(`${error.code}: ${error.message}`);
  console.log(`Version ${data.attestation.version} stands, status ${data.assetData.status}`);
  ```
</RequestExample>

<ResponseExample>
  ```json Confirmed Response theme={null}
  {
    "success": true,
    "data": {
      "txHash": "0x94c206e7614a93e3194caffa428756827f9c0f4d042de189439ffe2f225f822f",
      "signer": "0x511f527bcee080ac9b88afbf24386baedf393948",
      "attestation": {
        "contentHash": "0xba94f849b5852511dd4cc5a0d2cf10d2edbd51d27a69f4f434db122b5fbb0f1a",
        "previousHash": "0x65ed3a41511863cfbeacd3617041f1ccfcf281ab1a29bd7c08002a15cb427ccb",
        "version": 2,
        "attestor": "0x511f527bcee080ac9b88afbf24386baedf393948",
        "bundleAvailable": true
      },
      "assetData": {
        "marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
        "family": "FUNGIBLE",
        "factory": "0xf1ad12f5698f58badd8a662acffccb067a2ddb8a",
        "factorySupport": true,
        "status": "DIVERGED",
        "record": {
          "attested": "0xba94f849b5852511dd4cc5a0d2cf10d2edbd51d27a69f4f434db122b5fbb0f1a",
          "acknowledged": "0x65ed3a41511863cfbeacd3617041f1ccfcf281ab1a29bd7c08002a15cb427ccb",
          "attestor": "0x511f527bcee080ac9b88afbf24386baedf393948",
          "version": 2,
          "attestedAt": 1789899340,
          "acknowledgedAt": 1789398168,
          "diverged": true
        },
        "diverged": true,
        "attested": {
          "contentHash": "0xba94f849b5852511dd4cc5a0d2cf10d2edbd51d27a69f4f434db122b5fbb0f1a",
          "version": 2,
          "attestor": "0x511f527bcee080ac9b88afbf24386baedf393948",
          "attestedAt": "2026-09-20T10:15:40.000Z",
          "txHash": "0x94c206e7614a93e3194caffa428756827f9c0f4d042de189439ffe2f225f822f",
          "schemaVersion": "1.0.0",
          "bundleAvailable": true,
          "storedAt": "2026-09-20T10:14:02.000Z"
        },
        "acknowledged": {
          "contentHash": "0x65ed3a41511863cfbeacd3617041f1ccfcf281ab1a29bd7c08002a15cb427ccb",
          "version": 1,
          "acknowledgedAt": "2026-09-14T15:02:48.000Z",
          "txHash": "0xb5968bce29317b97e5a3df1a4b5aeef2867ceef13147c8e1aab443eb541ff8ad",
          "schemaVersion": "1.0.0",
          "bundleAvailable": true,
          "storedAt": "2026-09-12T08:31:05.000Z"
        },
        "authority": {
          "attestor": "0x511f527bcee080ac9b88afbf24386baedf393948",
          "attestorRole": "ISSUER",
          "acknowledgers": [
            "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
            "0x89b1dc3d25b4fbd80e4b2bdb7ed01c4560325c52"
          ],
          "seekingCurator": false
        },
        "viewer": {
          "wallets": ["0x511f527bcee080ac9b88afbf24386baedf393948"],
          "canAttest": true,
          "canAcknowledge": false
        },
        "profile": {
          "available": true,
          "currentHash": "0xba94f849b5852511dd4cc5a0d2cf10d2edbd51d27a69f4f434db122b5fbb0f1a",
          "schemaVersion": "1.0.0",
          "changedSinceAttestation": false
        }
      }
    }
  }
  ```

  ```json Error - Not Mined Yet theme={null}
  {
    "success": false,
    "data": null,
    "error": {
      "code": "TX_NOT_FOUND",
      "message": "Transaction not found or not yet mined"
    }
  }
  ```
</ResponseExample>

## Error Codes

The asset data routes report a validation failure with the first failing rule as `message` and no `details` list. A malformed `txHash` is therefore `VALIDATION_ERROR` here, not `INVALID_TX`. Every access code from [Get Asset Data](/endpoints/lending/get-asset-data#error-codes) applies here too.

| Code                        | HTTP  | Cause                                                                                                |
| --------------------------- | ----- | ---------------------------------------------------------------------------------------------------- |
| `VALIDATION_ERROR`          | `400` | `market` is not a 40-character hex address, or `txHash` is missing or not `0x` and 64 hex characters |
| `TX_REVERTED`               | `400` | The transaction was mined but reverted                                                               |
| `TX_WRONG_TARGET`           | `400` | The transaction was not sent to the lending factory                                                  |
| `TX_WRONG_FUNCTION`         | `400` | The transaction calls neither `attestAssetData` nor `deployMarket`                                   |
| `TX_WRONG_ARGS`             | `400` | The transaction attested asset data for a different market                                           |
| `TX_NOT_VERIFIED`           | `400` | The factory emitted no `AssetDataAttested` for this market in this transaction                       |
| `ATTEST_NOT_INSTANCE_BOUND` | `403` | The transaction was signed by a wallet that is not verified for this instance                        |
| `TX_NOT_FOUND`              | `404` | No receipt yet. The transaction is unmined, dropped, or on another network                           |
| `ATTEST_CONFIRM_FAILED`     | `500` | The confirm failed for a reason the service did not classify                                         |
