import { PublicKey } from '@solana/web3.js'; import { PartialKeys } from '../../utils'; import { OperationOptions } from '../../types'; import type { Convergence } from '../../Convergence'; import { AddInstrumentInput } from '../protocolModule'; import { SendTokensInput } from '../tokenModule'; import { Rfq } from './models'; import { RfqPdasClient } from './RfqPdasClient'; import { AddLegsToRfqInput, CancelResponseInput, CancelRfqsInput, CancelResponsesInput, CancelRfqInput, CleanUpResponseLegsInput, CleanUpRfqInput, ConfirmResponseInput, CreateRfqInput, CreateAndFinalizeRfqConstructionInput, FinalizeRfqConstructionInput, FindRfqsInput, FindRfqByAddressInput, FindResponseByAddressInput, FindResponsesByRfqInput, FindResponsesByOwnerInput, PartlyRevertSettlementPreparationInput, RevertSettlementPreparationInput, PrepareMoreLegsSettlementInput, PrepareSettlementInput, PrepareSettlementAndPrepareMoreLegsInput, RespondToRfqInput, SettleInput, CleanUpRfqsInput, CleanUpResponseInput, CleanUpResponsesInput, GetSettlementResultInput, CreatePrintTradeRfqInput, PreparePrintTradeSettlementInput, GetResponseStateAndActionInput } from './operations'; import { Response } from './models/Response'; import { GetRfqStateAndActionInput } from './operations/getRfqStateAndAction'; /** * This is a client for the Rfq module. * * It enables us to interact with the Rfq program in order to * manage Rfqs. * * You may access this client via the `rfqs()` method of your `Convergence` instance. * * ```ts * const rfqClient = convergence.rfqs(); * ``` * * @example * ```ts * const spotInstrumentClient = cvg.spotInstrument(); * const spotInstrument = spotInstrumentClient.createInstrument( * btcMint.address, * btcMint.decimals, * Side.Bid, * 1 * ); * const { rfq } = await cvg.rfqs().create({ * instruments: [spotInstrument], * quoteAsset: usdcMint, * }); * ``` * * @group Modules */ export declare class RfqClient { protected readonly convergence: Convergence; constructor(convergence: Convergence); /** * You may use the `pdas()` client to build PDAs related to this module. * * ```ts * const pdasClient = convergence.rfqs().pdas(); * ``` */ pdas(): RfqPdasClient; /** {@inheritDoc addInstrumentOperation} */ addInstrument(input: AddInstrumentInput, options?: OperationOptions): Promise; /** {@inheritDoc addLegsToRfqOperation} */ addLegsToRfq(input: AddLegsToRfqInput, options?: OperationOptions): Promise; /** {@inheritDoc cancelResponseOperation} */ cancelResponse(input: CancelResponseInput, options?: OperationOptions): Promise; /** {@inheritDoc cancelResponsesOperation} */ cancelResponses(input: CancelResponsesInput, options?: OperationOptions): Promise; /** {@inheritDoc cancelRfqOperation} */ cancelRfq(input: CancelRfqInput, options?: OperationOptions): Promise; /** {@inheritDoc cancelRfqsOperation} */ cancelRfqs(input: CancelRfqsInput, options?: OperationOptions): Promise; /** {@inheritDoc cleanUpResponseLegsOperation} */ cleanUpResponseLegs(input: CleanUpResponseLegsInput, options?: OperationOptions): Promise; /** {@inheritDoc cleanUpResponseOperation} */ cleanUpResponse(input: CleanUpResponseInput, options?: OperationOptions): Promise; /** {@inheritDoc cleanUpResponsesOperation} */ cleanUpResponses(input: CleanUpResponsesInput, options?: OperationOptions): Promise; /** {@inheritDoc cleanUpRfqOperation} */ cleanUpRfq(input: CleanUpRfqInput, options?: OperationOptions): Promise; /** {@inheritDoc cleanUpRfqsOperation} */ cleanUpRfqs(input: CleanUpRfqsInput, options?: OperationOptions): Promise; /** {@inheritDoc cleanUpRfqOperation} */ confirmResponse(input: ConfirmResponseInput, options?: OperationOptions): Promise; /** {@inheritDoc createRfqOperation} */ create(input: CreateRfqInput, options?: OperationOptions): Promise; /** {@inheritDoc createAndFinalizeRfqConstructionOperation} */ createAndFinalize(input: CreateAndFinalizeRfqConstructionInput, options?: OperationOptions): Promise; /** {@inheritDoc finalizeRfqConstructionOperation} */ finalizeRfqConstruction(input: FinalizeRfqConstructionInput, options?: OperationOptions): Promise; /** {@inheritDoc createPrintTradeRfqOperation} */ createPrintTrade(input: CreatePrintTradeRfqInput, options?: OperationOptions): Promise; /** {@inheritDoc findResponseByAddressOperation} */ findResponseByAddress(input: FindResponseByAddressInput, options?: OperationOptions): Promise; /** {@inheritDoc findResponsesByOwnerOperation} */ findResponsesByOwner(input: FindResponsesByOwnerInput, options?: OperationOptions): Promise; /** {@inheritDoc findRfqsOperation} */ findRfqs(input: FindRfqsInput, options?: OperationOptions): import("../operationModule/AsyncCollection").AsyncCollection; /** {@inheritDoc findResponsesByRfqOperation} */ findResponsesByRfq(input: FindResponsesByRfqInput, options?: OperationOptions): Promise; /** {@inheritDoc findRfqByAddressOperation} */ findRfqByAddress(input: FindRfqByAddressInput, options?: OperationOptions): Promise; /** {@inheritDoc partlyRevertSettlementPreparationOperation} */ partlyRevertSettlementPreparation(input: PartlyRevertSettlementPreparationInput, options?: OperationOptions): Promise; /** {@inheritDoc revertSettlementPreparationOperation} */ revertSettlementPreparation(input: RevertSettlementPreparationInput, options?: OperationOptions): Promise; /** {@inheritDoc prepareMoreLegsSettlementOperation} */ prepareMoreLegsSettlement(input: PrepareMoreLegsSettlementInput, options?: OperationOptions): Promise; /** {@inheritDoc prepareSettlementOperation} */ prepareSettlement(input: PrepareSettlementInput, options?: OperationOptions): Promise; /** {@inheritDoc prepareSettlementAndPrepareMoreLegsOperation} */ prepareSettlementAndPrepareMoreLegs(input: PrepareSettlementAndPrepareMoreLegsInput, options?: OperationOptions): Promise; /** {@inheritDoc preparePrintTradeSettlementOperation} */ preparePrintTradeSettlement(input: PreparePrintTradeSettlementInput, options?: OperationOptions): Promise; /** * Helper method that refetches a given model * and returns an instance of the same type. * * If the model we pass is an `Rfq`, we extract the pubkey and * pass to `findRfqByAddress`. Else, it's a pubkey and we pass * it directly. * * ```ts * rfq = await convergence.rfqs().refresh(rfq); * ``` */ refreshRfq(model: T, options?: OperationOptions): Promise; refreshResponse(model: T, options?: OperationOptions): Promise; /** {@inheritDoc respondToRfqOperation} */ respond(input: RespondToRfqInput, options?: OperationOptions): Promise; /** {@inheritDoc settleOperation} */ settle(input: SettleInput, options?: OperationOptions): Promise; /** {@inheritDoc sendTokensOperation} */ send(input: PartialKeys, options?: OperationOptions): Promise; /** {@inheritDoc getSettlementResultOperation} */ getSettlementResult(input: GetSettlementResultInput): import("./operations").GetSettlementResultOutput; /** {@inheritDoc getResponseStateAndAction} */ getResponseStateAndAction(input: GetResponseStateAndActionInput): import("./operations").GetResponseStateAndActionOutput; /** {@inheritDoc getRFqStateAndAction} */ getRfqStateAndAction(input: GetRfqStateAndActionInput): import("./operations/getRfqStateAndAction").GetRfqStateAndActionOutput; }