/// import { Buffer } from 'buffer'; import { QuoteAsset, Quote } from '@convergence-rfq/rfq'; import BN from 'bn.js'; import { Pda, Program, PublicKey } from '../../types'; import type { Convergence } from '../../Convergence'; import { Option } from '../../utils'; import { FixedSize } from './models'; import { OrderType } from './models/OrderType'; /** * This client allows you to build PDAs related to the RFQ module. * * @see {@link RfqClient} * @group Module Pdas */ export declare class RfqPdasClient { protected readonly convergence: Convergence; constructor(convergence: Convergence); /** Finds the PDA of a given quote asset. */ quote({ quoteAsset }: QuoteInput): Pda; /** Finds the PDA of an RFQ. */ rfq({ taker, legsHash, printTradeProvider, orderType, quoteAsset, fixedSize, activeWindow, settlingWindow, recentTimestamp, }: RfqInput): Pda; /** Finds the PDA of a Response. */ response({ rfq, maker, bid, ask, pdaDistinguisher }: ResponseInput): Pda; private programId; } type QuoteInput = { /** The quote asset. */ quoteAsset: QuoteAsset; /** An optional set of programs that override the registered ones. */ programs?: Program[]; }; type RfqInput = { /** The taker's public key address. */ taker: PublicKey; /** The SHA256 hash of the serialized legs of the RFQ. */ legsHash: Buffer; printTradeProvider: PublicKey | null; /** The order type of the Rfq. */ orderType: OrderType; /** The quote asset of the Rfq. */ quoteAsset: QuoteAsset; /** * The type of the Rfq, specifying whether we fix the number of * base assets to be exchanged, the number of quote assets, * or neither. */ fixedSize: FixedSize; /** The number of seconds during which this Rfq can be responded to. */ activeWindow: number; /** * The number of seconds within which this Rfq must be settled * after starting the settlement process. * */ settlingWindow: number; /** A recent timestamp. */ recentTimestamp: BN; }; type ResponseInput = { /** The Rfq public key. */ rfq: PublicKey; /** The maker's public key address. */ maker: PublicKey; /** Optional `bid` quote. */ bid: Option; /** Optional `ask` quote. */ ask: Option; /** A number to distinguish this response from other responses, * in the case that the maker responds to the same RFQ multiple * times with the same response. Otherwise it will always be 0. */ pdaDistinguisher: number; }; export {};