> For the complete documentation index, see [llms.txt](https://docs.blockchainsecurity.asia/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blockchainsecurity.asia/documentation/cross-chain/cross-chain.md).

# 跨鏈追蹤

追蹤一筆交易的資金跨鏈去向：當資金透過跨鏈橋轉到另一條鏈時，也能接上並還原來源鏈、目的鏈與兩端的交易與收付地址。成功扣除 **5 credit**，回應包在 `{ data, meta }` 信封。

查詢需要來源交易 txhash，以及跨鏈協議或橋接服務識別 label，例如 `across`、`axelar`、`celer`、`wormhole`。查無結果時回 `404`。

## 單筆追蹤

```bash
curl "https://api.blockchainsecurity.asia/v1/cross-chain?txhash=0x11ce7a536a3ec57699c918ecd43424ea97b928cfee38508814b40e48cb79fe15&label=across" \
  -H "X-API-Key: ak_live_YOUR_KEY"
```

| 參數       | 必填 | 說明                          |
| -------- | -- | --------------------------- |
| `txhash` | 是  | 來源交易 hash                   |
| `label`  | 是  | protocol label（協定關鍵字，用來比對橋） |

```json
{
  "data": {
    "results": [
      {
        "label": "Across Protocol",
        "result": {
          "source_chain": "Arbitrum",
          "destination_chain": "Hyperliquid",
          "source_tx_hash": "0x11ce7a536a3ec57699c918ecd43424ea97b928cfee38508814b40e48cb79fe15",
          "destination_tx_hash": "0x6133d3c95096173c0b96be38612133af52e4c4ed05eb703639ca85b7dad99397",
          "sender_address": "0xd0d80284e8db5b36373185b9ecaabe43350306e3",
          "receiver_address": "0xd0d80284e8db5b36373185b9ecaabe43350306e3"
        }
      }
    ]
  },
  "meta": { "request_id": "..." }
}
```

| 欄位                                                        | 說明          |
| --------------------------------------------------------- | ----------- |
| `results[].label`                                         | 比對到的跨鏈橋協定名稱 |
| `results[].result.source_chain` / `destination_chain`     | 來源鏈 / 目的鏈   |
| `results[].result.source_tx_hash` / `destination_tx_hash` | 兩端交易 hash   |
| `results[].result.sender_address` / `receiver_address`    | 兩端收付地址      |

## 批次追蹤

一次追蹤多筆，省去逐筆呼叫。

```bash
curl -X POST "https://api.blockchainsecurity.asia/v1/cross-chain/batch" \
  -H "X-API-Key: ak_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "queries": [
      { "txhash": "0x11ce7a536a3ec57699c918ecd43424ea97b928cfee38508814b40e48cb79fe15", "label": "across" }
    ]
  }'
```

請求 body：

| 欄位        | 必填 | 說明                               |
| --------- | -- | -------------------------------- |
| `queries` | 是  | 查詢清單，不可為空，每筆含 `txhash` 與 `label` |

回應為各筆查詢的跨鏈交易詳情陣列，欄位同單筆。

## 端點與計費

| Method | 路徑                      | 說明     | Credit   |
| ------ | ----------------------- | ------ | -------- |
| `GET`  | `/v1/cross-chain`       | 單筆跨鏈追蹤 | 5        |
| `POST` | `/v1/cross-chain/batch` | 批次跨鏈追蹤 | 5/ 筆成功查詢 |
