trade() response shape:
status === TxnStatus.success before using txnHash. Use errorMsg for user-facing messages.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
The trade() and zap() response shape, for error handling.
trade() response shape:
type DZapTransactionResponse = {
status: TxnStatus;
errorMsg?: string;
code: StatusCodes | number;
action?: "TRY_ANOTHER_ROUTE" | "INCREASE_SLIPPAGE" | "INCREASE_ALLOWANCE";
txnHash?: HexString;
error?: unknown;
additionalInfo?: Record<string, unknown>;
updatedQuotes?: Record<string, string>;
};
status === TxnStatus.success before using txnHash. Use errorMsg for user-facing messages.