/** * Client for interacting with the Renegade external matching API. * * This client handles authentication and provides methods for requesting quotes, * assembling matches, and executing trades. */ import { ExchangeMetadataResponse, type ExternalMatchResponse, type ExternalOrder, type GetDepthForAllPairsResponse, MalleableExternalMatchResponse, type OrderBookDepth, type SignedExternalQuote, type SupportedTokensResponse, type TokenPricesResponse } from "./types/index.js"; import type { GetMarketDepthByMintResponse, GetMarketDepthsResponse, GetMarketsResponse } from "./types/v2Types.js"; /** * Options for requesting a quote. */ export declare class RequestQuoteOptions { disableGasSponsorship: boolean; gasRefundAddress?: string; refundNativeEth: boolean; static new(): RequestQuoteOptions; withGasSponsorshipDisabled(disableGasSponsorship: boolean): this; withGasRefundAddress(gasRefundAddress: string): this; withRefundNativeEth(refundNativeEth: boolean): this; buildRequestPath(): string; } /** * Options for requesting an external match directly. */ export declare class RequestExternalMatchOptions { disableGasSponsorship: boolean; gasRefundAddress?: string; refundNativeEth: boolean; doGasEstimation: boolean; receiverAddress?: string; static new(): RequestExternalMatchOptions; withGasSponsorshipDisabled(disableGasSponsorship: boolean): this; withGasRefundAddress(gasRefundAddress: string): this; withRefundNativeEth(refundNativeEth: boolean): this; withGasEstimation(doGasEstimation: boolean): this; withReceiverAddress(receiverAddress: string): this; buildRequestPath(): string; } /** * Options for assembling an external match. */ export declare class AssembleExternalMatchOptions { doGasEstimation: boolean; receiverAddress?: string; updatedOrder?: ExternalOrder; static new(): AssembleExternalMatchOptions; withGasEstimation(doGasEstimation: boolean): AssembleExternalMatchOptions; withReceiverAddress(receiverAddress: string): AssembleExternalMatchOptions; withUpdatedOrder(updatedOrder: ExternalOrder): AssembleExternalMatchOptions; buildRequestPath(): string; } /** * Options for assembling a malleable external match. */ export declare class AssembleMalleableExternalMatchOptions extends AssembleExternalMatchOptions { static new(): AssembleMalleableExternalMatchOptions; } /** * Error thrown by the ExternalMatchClient. */ export declare class ExternalMatchClientError extends Error { statusCode?: number; constructor(message: string, statusCode?: number); } /** * Client for interacting with the Renegade external matching API. */ export declare class ExternalMatchClient { private apiKey; private httpClient; /** * Initialize a new ExternalMatchClient. * * @param apiKey The API key for authentication * @param apiSecret The API secret for request signing * @param baseUrl The base URL of the auth server API */ constructor(apiKey: string, apiSecret: string, baseUrl: string); /** * Create a new client configured for the Arbitrum Sepolia testnet. */ static newArbitrumSepoliaClient(apiKey: string, apiSecret: string): ExternalMatchClient; /** * Create a new client configured for the Base Sepolia testnet. */ static newBaseSepoliaClient(apiKey: string, apiSecret: string): ExternalMatchClient; /** * Create a new client configured for the Arbitrum One mainnet. */ static newArbitrumOneClient(apiKey: string, apiSecret: string): ExternalMatchClient; /** * Create a new client configured for the Base mainnet. */ static newBaseMainnetClient(apiKey: string, apiSecret: string): ExternalMatchClient; /** * Request a quote for the given order. */ requestQuote(order: ExternalOrder): Promise; /** * Request a quote for the given order with custom options. */ requestQuoteWithOptions(order: ExternalOrder, options: RequestQuoteOptions): Promise; /** * Assemble a quote into a match bundle with default options. */ assembleQuote(quote: SignedExternalQuote): Promise; /** * Assemble a quote into a match bundle with custom options. */ assembleQuoteWithOptions(quote: SignedExternalQuote, options: AssembleExternalMatchOptions): Promise; /** * Request an external match directly with default options. */ requestExternalMatch(order: ExternalOrder): Promise; /** * Request an external match directly with custom options. */ requestExternalMatchWithOptions(order: ExternalOrder, options: RequestExternalMatchOptions): Promise; /** * Request a malleable external match directly with default options. */ requestMalleableExternalMatch(order: ExternalOrder): Promise; /** * Request a malleable external match directly with custom options. */ requestMalleableExternalMatchWithOptions(order: ExternalOrder, options: RequestExternalMatchOptions): Promise; /** * Assemble a quote into a malleable match bundle with default options. */ assembleMalleableQuote(quote: SignedExternalQuote): Promise; /** * Assemble a quote into a malleable match bundle with custom options. */ assembleMalleableQuoteWithOptions(quote: SignedExternalQuote, options: AssembleMalleableExternalMatchOptions): Promise; /** * Get all tradable markets. */ getMarkets(): Promise; /** * Get market depth for a given base token mint. */ getMarketDepth(mint: string): Promise; /** * Get market depth for all pairs. */ getMarketDepthsAllPairs(): Promise; /** * @deprecated Use getMarkets() instead */ getSupportedTokens(): Promise; /** * @deprecated Use getMarkets() instead */ getTokenPrices(): Promise; /** * @deprecated Use getMarketDepth() instead */ getOrderBookDepth(mint: string): Promise; /** * @deprecated Use getMarketDepthsAllPairs() instead */ getOrderBookDepthAllPairs(): Promise; /** * Get exchange metadata including chain ID, settlement contract address, and supported tokens */ getExchangeMetadata(): Promise; private handleOptionalResponse; private extractErrorMessage; private getHeaders; } //# sourceMappingURL=client.d.ts.map