import * as anchor from "@project-serum/anchor"; import { ZetaFlex } from "../types/zeta_flex"; import { Network } from "../common/network"; import { PublicKey, Connection } from "@solana/web3.js"; import { Underlying, Auction, Option, Bid, ComboOption, FlexOptionType, UnderlyingType, SettlementAccount } from "./types"; import * as programTypes from "./program-types"; import { DummyWallet, TransactionMethodReturnData } from "../common/types"; import { State } from "./program-types"; import { EventType } from "../common/events"; export declare class Flex { /** * Whether the object has been loaded. */ get isInitialized(): boolean; private _isInitialized; /** * Anchor program instance. */ get program(): anchor.Program; private _program; get programId(): PublicKey; /** * The solana network being used. */ get network(): Network; private _network; /** * Anchor provider instance. */ get provider(): anchor.AnchorProvider; private _provider; /** * Account storing the zeta-flex state. */ get state(): State; private _state; /** * Address of the state account */ get stateAddress(): PublicKey; private _stateAddress; /** * zeta-flex mint authority address */ get mintAuthorityAddress(): PublicKey; private _mintAuthorityAddress; /** * zeta-flex vault authority address */ get vaultAuthorityAddress(): PublicKey; private _vaultAuthorityAddress; /** * A collection of all the current live auctions on zeta-flex */ get liveAuctions(): Auction[]; private _liveAuctions; /** * A collection of all auctions including historical on zeta-flex */ get auctions(): Auction[]; private _auctions; /** * A collection of all current live options on zeta-flex. */ get liveOptions(): Option[]; private _liveOptions; /** * A collection of all created options on zeta-flex. */ get options(): Option[]; private _options; /** * A collection of all current live options on zeta-flex. */ get liveComboOptions(): ComboOption[]; private _liveComboOptions; /** * A collection of all created combo options on zeta-flex. */ get comboOptions(): ComboOption[]; private _comboOptions; /** * A collection of all the bid accounts created on zeta-flex. */ get bids(): Bid[]; private _bids; get underlyings(): Underlying[]; private _underlyings; /** * Stores the latest timestamp received by websocket subscription * to the system clock account. */ get clockTimestamp(): number; private _clockTimestamp; /** * Websocket subscription id for clock. */ private _clockSubscriptionId; load(programId: PublicKey, network: Network, connection: Connection, wallet?: DummyWallet, callback?: (event: EventType, data: any) => void): Promise; initializeState(settlementPriceThresholdSeconds: number, mintOptionFee: number, feeRecipient: PublicKey, accountCloseThresholdSecs: number): Promise; updateStateAccount(args: programTypes.UpdateStateAccountArgs): Promise; initializeWhitelistFeesAccount(userToWhitelist: PublicKey): Promise; initializeUnderlying(underlyingMint: PublicKey, oracle: PublicKey, underlyingType: UnderlyingType): Promise; expireOptionOverride(overrideSettlementPrice: number, optionAccount: PublicKey, optionType: FlexOptionType): Promise; expireOption(optionAccount: PublicKey, optionType: FlexOptionType): Promise; private updateUnderlyings; getUnderlying(underlyingMint: PublicKey): Underlying; private updateOptions; getSettlementAccountForOption(optionAccount: PublicKey, optionType: FlexOptionType): Promise; getSettlementAccount(settlementAccount: PublicKey): Promise; getOption(optionAccount: PublicKey, optionType: FlexOptionType): Option | ComboOption | null; getOptionByMint(optionMint: PublicKey, optionType: FlexOptionType): Option | ComboOption | null; getOptionsByCreator(creator: PublicKey, optionType: FlexOptionType): Option[] | ComboOption[]; getLiveOptionsByCreator(creator: PublicKey, optionType: FlexOptionType): Option[] | ComboOption[]; getLiveAuctionsByCreator(creator: PublicKey): Auction[]; getAuctionsByCreator(creator: PublicKey): Auction[]; getAuctionByKey(auctionAccount: PublicKey): Auction; getBidByKey(bidAccount: PublicKey): Bid; private updateBidsAndAuctions; updateState(refreshStateAccount?: boolean): Promise; closeOptionAccount(optionAccount: PublicKey, optionType: FlexOptionType, returnInstructions?: boolean): Promise; closeAuctionAccount(auctionAccount: PublicKey, returnInstructions?: boolean): Promise; private subscribeClock; close(): Promise; } export declare const flex: Flex;