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

# CCTP API

> Estimate bridge fees and monitor cross-chain execution by source transaction hash

## Overview

The CCTP API exposes the parts of the cross-chain flow that matter to integrators:

* supported Circle domains and receiver addresses,
* fast vs standard transfer fee estimates,
* relay job lookup by source transaction hash,
* and a manual fallback endpoint to start relay for a known source transaction.

In production, the normal relay path is **event-driven**:

1. your user executes the router transaction on the source chain,
2. 1tx receives the router bridge event through a webhook,
3. 1tx waits for Circle attestation,
4. 1tx redeems on the destination chain,
5. your client polls relay status by source tx hash.

## Get CCTP Config

<span style={{color: '#10B981', fontWeight: 'bold'}}>GET</span> `/cctp/config`

Returns the supported CCTP chains together with Circle domain IDs and destination receiver addresses.

```bash theme={null}
curl "https://api.1tx.fi/api/v1/cctp/config"
```

### Response

```json theme={null}
{
  "supportedChains": [
    {
      "chainId": 8453,
      "name": "Base Mainnet",
      "cctpDomain": 6,
      "tokenMessenger": "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
      "messageTransmitter": "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64",
      "cctpReceiver": "0xAA4a2CFd29734dA2041a56A716e408F1A610f85E"
    },
    {
      "chainId": 42161,
      "name": "Arbitrum One",
      "cctpDomain": 3,
      "tokenMessenger": "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
      "messageTransmitter": "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64",
      "cctpReceiver": "0xFCc3e94Eb1A6942a462Be9ADB657076AcD8954cB"
    }
  ]
}
```

***

## Get Transfer Fee

<span style={{color: '#10B981', fontWeight: 'bold'}}>GET</span> `/cctp/fee/:sourceDomain/:destDomain`

Returns Circle fee estimates for both fast and standard transfer modes.

```bash theme={null}
curl "https://api.1tx.fi/api/v1/cctp/fee/6/3"
```

### Response

```json theme={null}
{
  "fastFeeBps": "1.3",
  "standardFeeBps": "0",
  "fastTransferEta": "~20 seconds",
  "standardTransferEta": "~15-19 minutes"
}
```

***

## Get Relay Status By Source Transaction Hash

<span style={{color: '#10B981', fontWeight: 'bold'}}>GET</span> `/cctp/relay/tx/:sourceTxHash`

Look up the bridge job created for a specific source-chain router transaction.

This is the primary endpoint clients should poll after submitting a cross-chain buy.

```bash theme={null}
curl "https://api.1tx.fi/api/v1/cctp/relay/tx/0xf43f4d3b56d8ca26615dcfc11c036096d3b39266e74b3151b78e2dcb5026951c"
```

### Response

```json theme={null}
{
  "jobId": "339f5b0b-99cb-40ba-a497-d849bec20e42",
  "status": "waiting_attestation",
  "sourceTxHash": "0xf43f4d3b56d8ca26615dcfc11c036096d3b39266e74b3151b78e2dcb5026951c",
  "sourceChainId": 8453,
  "destinationChainId": 42161,
  "senderAddress": "0x59f84af036712afe2fd0ec77f4d9a6f0a612f1fe",
  "attempts": 1,
  "createdAt": 1775742368892,
  "updatedAt": 1775742368897
}
```

### Status Values

| Status                | Meaning                                                                |
| --------------------- | ---------------------------------------------------------------------- |
| `pending`             | Relay job has been created but attestation polling has not started yet |
| `waiting_attestation` | Waiting for Circle IRIS attestation                                    |
| `redeeming`           | Relayer is submitting the destination-chain `redeem()` transaction     |
| `success`             | Destination execution succeeded                                        |
| `failed`              | Relay failed. Check `error`                                            |

### 404 Behavior

Immediately after a source transaction confirms, this endpoint may briefly return `404 Job not found` until the bridge webhook is ingested and the relay job is created.

Clients should treat an early `404` as a retry signal, not as a permanent failure.

***

## Manual Relay Fallback

<span style={{color: '#EAB308', fontWeight: 'bold'}}>POST</span> `/cctp/relay`

Manually start or resume relay for a known source transaction.

This is mainly useful for operator tooling, support flows, or emergency recovery when a webhook was missed.

```bash theme={null}
curl -X POST "https://api.1tx.fi/api/v1/cctp/relay" \
  -H "Content-Type: application/json" \
  -d '{
    "sourceTxHash": "0xc6ff364bc4caf71fde5bb1393d641cbe76710a214c51b95fd6fd4751f12fd8a2",
    "sourceChainId": 8453,
    "destinationChainId": 42161
  }'
```

### Response

```json theme={null}
{
  "jobId": "ae983759-88eb-455a-9fa5-4a7c322fbabe",
  "status": "pending",
  "sourceTxHash": "0xc6ff364bc4caf71fde5bb1393d641cbe76710a214c51b95fd6fd4751f12fd8a2"
}
```

***

## Webhook Endpoint

<span style={{color: '#10B981', fontWeight: 'bold'}}>POST</span> `/cctp/webhooks/bridge`

This endpoint is used by 1tx bridge-event subscriptions to start relay jobs automatically when `SwapDepositRouter` emits `CCTPBridgeInitiated`.

It is not part of the normal client integration flow, but is useful if you run your own event delivery.

## Recommended Cross-Chain Client Flow

1. Call `POST /transactions/buy`.
2. Execute the returned transactions on `sourceChainId`.
3. Capture the source router transaction hash.
4. Poll `GET /cctp/relay/tx/:sourceTxHash` until:
   * `success`, then use `destinationTxHash` for explorers/UI, or
   * `failed`, then surface the error to the user.
