import type { RequestOptions } from "./http-helpers/index.ts"; import type { SignedOrder } from "./order-utils/index.ts"; import type { ClobSigner } from "./signer.ts"; import type { AcceptQuoteParams, ApiKeyCreds, ApproveOrderParams, CancelRfqQuoteParams, CancelRfqRequestParams, CreateOrderOptions, GetRfqBestQuoteParams, GetRfqQuotesParams, GetRfqRequestsParams, RfqQuote, RfqQuoteResponse, RfqQuotesResponse, RfqRequestResponse, RfqRequestsResponse, RfqUserOrder, RfqUserQuote, TickSize, UserOrder } from "./types.ts"; /** * Minimal surface from the core CLOB client that RFQ functionality depends on. */ export interface RfqDeps { host: string; signer?: ClobSigner; creds?: ApiKeyCreds; useServerTime?: boolean; geoBlockToken?: string; /** * Numeric user type (backed by SignatureType in the order builder). */ userType: number; getServerTime(): Promise; getTickSize(tokenID: string): Promise; resolveTickSize(tokenID: string, tickSize?: TickSize): Promise; createOrder(userOrder: UserOrder, options?: Partial): Promise; get(endpoint: string, options?: RequestOptions): Promise; post(endpoint: string, options?: RequestOptions): Promise; put(endpoint: string, options?: RequestOptions): Promise; del(endpoint: string, options?: RequestOptions): Promise; } /** * Public RFQ surface exposed from a CLOB client. * * This is what `ClobClient.rfq` is typed as, and what `RfqClient` implements. */ export interface IRfqClient { createRfqRequest(userOrder: RfqUserOrder, options?: Partial): Promise; cancelRfqRequest(request: CancelRfqRequestParams): Promise<"OK">; getRfqRequests(params?: GetRfqRequestsParams): Promise; createRfqQuote(userQuote: RfqUserQuote, options?: Partial): Promise; getRfqRequesterQuotes(params?: GetRfqQuotesParams): Promise; getRfqQuoterQuotes(params?: GetRfqQuotesParams): Promise; getRfqBestQuote(params?: GetRfqBestQuoteParams): Promise; cancelRfqQuote(quote: CancelRfqQuoteParams): Promise<"OK">; rfqConfig(): Promise; acceptRfqQuote(payload: AcceptQuoteParams): Promise<"OK">; approveRfqOrder(payload: ApproveOrderParams): Promise<"OK">; }