list_supported_pairs
Retrieve all chain-qualified token pairs supported for RFQ/swap to verify market availability before creating a quote.
Instructions
List the chain-qualified token pairs Hashlock supports for RFQ/swap. Read-only, no auth side effects.
USE WHEN: before create_rfq if unsure a token/chain is supported, or to show the user available markets instead of guessing. DO NOT USE WHEN: you already know the pair is supported — this is discovery, not a precondition.
Each entry is SYMBOL/chain. Same symbol on different chains (e.g. SUI/sui vs SUI/sui-testnet) are distinct markets — pass baseChain/quoteChain explicitly to create_rfq.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:234-248 (registration)Registration of 'list_supported_pairs' tool via server.tool(). Name + description + empty schema + handler.
// ─── list_supported_pairs ──────────────────────────────────── server.tool( 'list_supported_pairs', [ 'List the chain-qualified token pairs Hashlock supports for RFQ/swap. Read-only, no auth side effects.', '', 'USE WHEN: before create_rfq if unsure a token/chain is supported, or to show the user available markets instead of guessing.', 'DO NOT USE WHEN: you already know the pair is supported — this is discovery, not a precondition.', '', 'Each entry is SYMBOL/chain. Same symbol on different chains (e.g. SUI/sui vs SUI/sui-testnet) are distinct markets — pass baseChain/quoteChain explicitly to create_rfq.', ].join('\n'), {}, wrapTool(async () => okContent({ pairs: SUPPORTED_PAIRS })), ); - src/index.ts:234-248 (handler)Handler function: wrapTool(async () => okContent({ pairs: SUPPORTED_PAIRS })). Wraps the logic in error-handling and returns the pairs data.
// ─── list_supported_pairs ──────────────────────────────────── server.tool( 'list_supported_pairs', [ 'List the chain-qualified token pairs Hashlock supports for RFQ/swap. Read-only, no auth side effects.', '', 'USE WHEN: before create_rfq if unsure a token/chain is supported, or to show the user available markets instead of guessing.', 'DO NOT USE WHEN: you already know the pair is supported — this is discovery, not a precondition.', '', 'Each entry is SYMBOL/chain. Same symbol on different chains (e.g. SUI/sui vs SUI/sui-testnet) are distinct markets — pass baseChain/quoteChain explicitly to create_rfq.', ].join('\n'), {}, wrapTool(async () => okContent({ pairs: SUPPORTED_PAIRS })), ); - src/lib/pairs.ts:1-12 (helper)SUPPORTED_PAIRS constant - the canonical data source listing all chain-qualified token pairs (ETH, BTC, USDC, USDT, WBTC, WETH, SUI on various chains).
/** Canonical chain-qualified pairs. Single source of truth for the * list_supported_pairs tool (and future use). The create_rfq description * keeps its own prose copy intentionally — its pin tests assert that text. */ export const SUPPORTED_PAIRS = [ 'ETH/sepolia', 'ETH/ethereum', 'BTC/bitcoin-signet', 'BTC/bitcoin', 'USDC/sepolia', 'USDC/ethereum', 'USDT/ethereum', 'WBTC/ethereum', 'WETH/ethereum', 'SUI/sui', 'SUI/sui-testnet', ] as const; export const SUPPORTED_PAIRS_LINE = SUPPORTED_PAIRS.join(', ') + '.'; - src/lib/result.ts:8-10 (helper)okContent helper used by the handler to format the response as JSON text content.
export function okContent(value: unknown): ToolContent { return { content: [{ type: 'text', text: JSON.stringify(value, null, 2) }] }; } - src/lib/errors.ts:85-95 (helper)wrapTool helper that wraps the handler with try/catch error handling.
export function wrapTool<A extends unknown[]>( handler: (...args: A) => Promise<ToolContent>, ): (...args: A) => Promise<ToolContent> { return async (...args: A) => { try { return await handler(...args); } catch (err) { return toErrorEnvelope(err); } }; }