公共 - 鏈與資產目錄
取得 SureLink 網關當前支援的公鏈網路及資產配置目錄。在建立鏈上充幣或提幣訂單前,建議先通過本介面取得有效的網路代碼(Chain Code)。
1. 查詢支援鏈列表
GET /api/v1/chains
請求頭 (Headers)
需攜帶標準 HMAC 鑑權請求頭(X-Api-Key、X-Timestamp、X-Nonce、X-Signature)。
Query 參數
| 參數名 | 類型 | 是否必填 | 預設值 | 描述 |
|---|---|---|---|---|
asset | string | 否 | USDT | 按資產代碼過濾(如 USDT) |
請求範例
bash
curl -X GET "https://api-sandbox.surelink.io/api/v1/chains?asset=USDT" \
-H "X-Api-Key: mch_key_your_api_key" \
-H "X-Timestamp: 1715000000000" \
-H "X-Nonce: 9f8e7d6c5b4a392817263544a1b2c3d4" \
-H "X-Signature: c8b9...f01"typescript
import { sendSignedRequest } from './signer';
const result = await sendSignedRequest({
apiKey: 'mch_key_...',
apiSecret: 'sec_...',
method: 'GET',
url: 'https://api-sandbox.surelink.io/api/v1/chains?asset=USDT'
});
console.log(result.items);回應說明 (Response)
- HTTP 狀態碼:
200 OK
json
{
"items": [
{
"code": "TRON",
"name": "Tron (TRC20)",
"protocol": "TRC20"
},
{
"code": "ETH",
"name": "Ethereum (ERC20)",
"protocol": "ERC20"
},
{
"code": "BSC",
"name": "BNB Smart Chain (BEP20)",
"protocol": "BEP20"
},
{
"code": "ARBITRUM",
"name": "Arbitrum One",
"protocol": "ERC20"
},
{
"code": "POLYGON",
"name": "Polygon PoS",
"protocol": "ERC20"
}
]
}返回欄位描述
| 欄位 | 類型 | 說明 |
|---|---|---|
items | Array<ChainOption> | 支援的鏈列表陣列 |
items[].code | string | 鏈標識代碼(建立充提訂單時填入 chain 欄位) |
items[].name | string | 網路友好展示名稱 |
items[].protocol | string | 代幣協議標準(TRC20, ERC20, BEP20 等) |
