/// import { BN, BorshAccountsCoder } from "@project-serum/anchor"; import { AccountMeta, PublicKey } from "@solana/web3.js"; export declare enum AccountName { EscrowConfig = "EscrowConfig", MarketState = "MarketState", Trade = "Trade", KycCert = "KycCert", ArbitratorCert = "ArbitratorCert", TokenInfo = "TokenInfo", Offer = "Offer" } export declare const ESCROW_CODER: BorshAccountsCoder; export declare const sizeOf: (accountName: AccountName) => number; export declare const MARKET_STATE_SIZE: number; export declare const TRADE_SIZE = 582; export declare const OFFER_SIZE = 629; export type MarketStateData = { marketId: string; configAccount: PublicKey; deployerAuthority: PublicKey; tradeConfigAuthority: PublicKey; amlPolicyAuthority: PublicKey; treasuryPubkey: PublicKey; marketAccount: PublicKey; marketTokenVaultAccount: PublicKey; marketNativeVaultAccount: PublicKey; tokenMint: PublicKey; tokenDecimals: number; totalDepositAmount: BN; totalPendingAmount: BN; totalAvailableAmount: BN; totalBondAmountInToken: BN; totalBondAmountInNative: BN; bondSize: BN; minimumOfferSize: BN; arbitratorCommission: BN; treasuryShare: BN; paymentDuration: BN; cancelPenaltyRate: BN; tokenMetadata: TokenMetaData; oracleTokenMetadata: TokenMetaData; lastApplicableTime: BN; limitActiveBondlessTrade: number; totalActiveBondlessTrade: number; expo: number; }; export type TokenMetaData = { renecRate: BN; usdRate: BN; quota24Hours: BN[]; quota30Days: BN[]; renecOraclePubkey: PublicKey; }; export type KycCertData = { level: number; totalTradedAmount: BN; bump: number; dayVolumesHistory: VolumeHistory30Days; hourVolumesHistory: VolumeHistory24Hours; }; export type VolumeHistory30Days = { head: number; volumes: BN[]; lastApplicableTime: BN; }; export type VolumeHistory24Hours = { head: number; volumes: BN[]; lastApplicableTime: BN; }; export declare const TradeState: { Awaiting: { awaiting: {}; }; Deposited: { deposited: {}; }; Disputed: { disputed: {}; }; Released: { released: {}; }; Canceled: { canceled: {}; }; }; export declare const OfferState: { Awaiting: { awaiting: {}; }; Canceled: { canceled: {}; }; OutOfFund: { outOfFund: {}; }; Fulfilled: { fulfilled: {}; }; }; export declare const TradeSide: { Buy: { buy: {}; }; Sell: { sell: {}; }; }; export declare const BondType: { Native: { native: {}; }; Spl: { spl: {}; }; }; export declare const DisputeAction: { Release: { release: {}; }; Cancel: { cancel: {}; }; }; export declare const CompensationAction: { NoCompensate: { noCompensate: {}; }; CompensateSeller: { compensateSeller: {}; }; CompensateBuyer: { compensateBuyer: {}; }; }; export type TradeData = { sellOfferId: BN; buyOfferId: BN; tradeId: BN; tradeIdSeed: number[]; state: object; side: object; sellerBondType: object; buyerBondType: object; marketAccount: PublicKey; sellerAuthority: PublicKey; sellerTokenAccount: PublicKey; buyerAuthority: PublicKey; buyerTokenAccount: PublicKey; tokenMint: PublicKey; configAccount: PublicKey; bondAmountSpl: BN; bondAmountNative: BN; tradeAmount: BN; fiatAmount: BN; fiatCurrency: string; createdAt: BN; finishedAt: BN; bump: number[]; bankName: string | null; accountNumber: string | null; accountName: string | null; nonce: string | null; useBondless: boolean; }; export type NormalizedTradeData = { sellOfferId: BN; buyOfferId: BN; tradeId: BN; tradeIdSeed: number[]; state: object; side: object; sellerBondType: object; buyerBondType: object; marketAccount: PublicKey; sellerAuthority: PublicKey; sellerTokenAccount: PublicKey; buyerAuthority: PublicKey; buyerTokenAccount: PublicKey; tokenMint: PublicKey; configAccount: PublicKey; bondAmountSpl: BN; bondAmountNative: BN; tradeAmount: BN; fiatAmount: number; fiatCurrency: string; createdAt: BN; finishedAt: BN; bump: number[]; bankName: string | null; accountNumber: string | null; accountName: string | null; nonce: string | null; useBondless: boolean; }; export type TradeDataInfo = NormalizedTradeData & { pubkey: PublicKey; }; export type OfferData = { offerId: BN; offerIdSeed: number[]; side: object; state: object; bondType: object; marketAccount: PublicKey; makerAuthority: PublicKey; makerTokenAccount: PublicKey; tokenMint: PublicKey; configAccount: PublicKey; bondAmountSpl: BN; bondAmountNative: BN; rate: BN; fiatCurrency: string; totalAmount: BN; pendingAmount: BN; availableAmount: BN; filledAmount: BN; minTradeSize: BN; createdAt: BN; finishedAt: BN; bump: number[]; bankName: string | null; accountNumber: string | null; accountName: string | null; nonce: string | null; }; export type NormalizedOfferData = { offerId: BN; offerIdSeed: number[]; side: object; state: object; bondType: object; marketAccount: PublicKey; makerAuthority: PublicKey; makerTokenAccount: PublicKey; tokenMint: PublicKey; configAccount: PublicKey; bondAmountSpl: BN; bondAmountNative: BN; rate: number; fiatCurrency: string; totalAmount: BN; pendingAmount: BN; availableAmount: BN; filledAmount: BN; minTradeSize: BN; createdAt: BN; finishedAt: BN; bump: number[]; bankName: string | null; accountNumber: string | null; accountName: string | null; nonce: string | null; }; export type OfferDataInfo = NormalizedOfferData & { pubkey: PublicKey; }; export type ConfigData = { currentTradeId: BN; currentOfferId: BN; }; export type ConfigDataInfo = ConfigData & { pubkey: PublicKey; }; export type ArbitratorCert = { bump: number; }; export type EvidenceAccountData = { bump: number; sellerData: string; arbitratorData: string; nonce: string; trade: PublicKey; }; export type OfferQuotes = { estimateFiatAmount: BN; offerQuantity: number; tradeQuantity: number; transactionQuantity: number; remainingAccounts: AccountMeta[]; tradeIds: BN[]; bumps: number[]; tradeAmounts: BN[]; rates: BN[]; }; export type MatchingData = { offerQuantity: number; tradeIds: BN[]; bumps: number[]; remainingAccounts: AccountMeta[]; rates: BN[]; };