import { BorshAccountsCoder } from '@coral-xyz/anchor';
import { Market, Orderbook } from '@project-serum/serum';
import { AccountInfo, AddressLookupTableAccount, PublicKey } from '@solana/web3.js';
import BN from 'bn.js';
import { MangoClient } from '../client';
import { Id } from '../ids';
import { I80F48 } from '../numbers/I80F48';
import { PriceImpact } from '../risk';
import { Bank, MintInfo, TokenIndex } from './bank';
import { OracleProvider } from './oracle';
import { BookSide, PerpMarket, PerpMarketIndex } from './perp';
import { MarketIndex, Serum3Market } from './serum3';
export declare class Group {
    publicKey: PublicKey;
    creator: PublicKey;
    groupNum: number;
    admin: PublicKey;
    fastListingAdmin: PublicKey;
    mngoTokenIndex: TokenIndex;
    insuranceMint: PublicKey;
    insuranceVault: PublicKey;
    testing: number;
    version: number;
    buybackFees: boolean;
    buybackFeesMngoBonusFactor: number;
    addressLookupTables: PublicKey[];
    securityAdmin: PublicKey;
    depositLimitQuote: any;
    ixGate: BN;
    buybackFeesSwapMangoAccount: PublicKey;
    buybackFeesExpiryInterval: BN;
    fastListingIntervalStart: BN;
    fastListingsInInterval: number;
    allowedFastListingsPerInterval: number;
    collateralFeeInterval: BN;
    addressLookupTablesList: AddressLookupTableAccount[];
    banksMapByName: Map<string, Bank[]>;
    banksMapByMint: Map<string, Bank[]>;
    banksMapByTokenIndex: Map<TokenIndex, Bank[]>;
    banksMapByOracle: Map<string, Bank[]>;
    serum3MarketsMapByExternal: Map<string, Serum3Market>;
    serum3MarketsMapByMarketIndex: Map<MarketIndex, Serum3Market>;
    serum3ExternalMarketsMap: Map<string, Market>;
    perpMarketsMapByOracle: Map<string, PerpMarket>;
    perpMarketsMapByMarketIndex: Map<PerpMarketIndex, PerpMarket>;
    perpMarketsMapByName: Map<string, PerpMarket>;
    mintInfosMapByTokenIndex: Map<TokenIndex, MintInfo>;
    mintInfosMapByMint: Map<string, MintInfo>;
    vaultAmountsMap: Map<string, BN>;
    pis: PriceImpact[];
    groupLastUpdatedSlot: number;
    static from(publicKey: PublicKey, obj: {
        creator: PublicKey;
        groupNum: number;
        admin: PublicKey;
        fastListingAdmin: PublicKey;
        mngoTokenIndex: number;
        insuranceMint: PublicKey;
        insuranceVault: PublicKey;
        testing: number;
        version: number;
        buybackFees: number;
        buybackFeesMngoBonusFactor: number;
        addressLookupTables: PublicKey[];
        securityAdmin: PublicKey;
        depositLimitQuote: BN;
        ixGate: BN;
        buybackFeesSwapMangoAccount: PublicKey;
        buybackFeesExpiryInterval: BN;
        fastListingIntervalStart: BN;
        fastListingsInInterval: number;
        allowedFastListingsPerInterval: number;
        collateralFeeInterval: BN;
    }): Group;
    constructor(publicKey: PublicKey, creator: PublicKey, groupNum: number, admin: PublicKey, fastListingAdmin: PublicKey, mngoTokenIndex: TokenIndex, insuranceMint: PublicKey, insuranceVault: PublicKey, testing: number, version: number, buybackFees: boolean, buybackFeesMngoBonusFactor: number, addressLookupTables: PublicKey[], securityAdmin: PublicKey, depositLimitQuote: any, ixGate: BN, buybackFeesSwapMangoAccount: PublicKey, buybackFeesExpiryInterval: BN, fastListingIntervalStart: BN, fastListingsInInterval: number, allowedFastListingsPerInterval: number, collateralFeeInterval: BN, addressLookupTablesList: AddressLookupTableAccount[], banksMapByName: Map<string, Bank[]>, banksMapByMint: Map<string, Bank[]>, banksMapByTokenIndex: Map<TokenIndex, Bank[]>, banksMapByOracle: Map<string, Bank[]>, serum3MarketsMapByExternal: Map<string, Serum3Market>, serum3MarketsMapByMarketIndex: Map<MarketIndex, Serum3Market>, serum3ExternalMarketsMap: Map<string, Market>, perpMarketsMapByOracle: Map<string, PerpMarket>, perpMarketsMapByMarketIndex: Map<PerpMarketIndex, PerpMarket>, perpMarketsMapByName: Map<string, PerpMarket>, mintInfosMapByTokenIndex: Map<TokenIndex, MintInfo>, mintInfosMapByMint: Map<string, MintInfo>, vaultAmountsMap: Map<string, BN>, pis: PriceImpact[], groupLastUpdatedSlot: number);
    reloadAll(client: MangoClient): Promise<void>;
    updateLastUpdatedSlot(client: MangoClient): Promise<void>;
    reloadPriceImpactData(): Promise<void>;
    reloadAlts(client: MangoClient): Promise<void>;
    reloadBanks(client: MangoClient, ids?: Id): Promise<void>;
    reloadMintInfos(client: MangoClient, ids?: Id): Promise<void>;
    reloadSerum3Markets(client: MangoClient, ids?: Id): Promise<void>;
    reloadSerum3ExternalMarkets(client: MangoClient, ids?: Id): Promise<void>;
    reloadPerpMarkets(client: MangoClient, ids?: Id): Promise<void>;
    reloadBankOraclePrices(client: MangoClient): Promise<void>;
    reloadPerpMarketOraclePrices(client: MangoClient): Promise<void>;
    decodePriceFromOracleAi(coder: BorshAccountsCoder<string>, oracle: PublicKey, ai: AccountInfo<Buffer>, baseDecimals: number, client: MangoClient): Promise<{
        price: I80F48;
        uiPrice: number;
        lastUpdatedSlot: number;
        provider: OracleProvider;
        deviation: I80F48;
    }>;
    reloadVaults(client: MangoClient): Promise<void>;
    getMintDecimals(mintPk: PublicKey): number;
    getMintDecimalsByTokenIndex(tokenIndex: TokenIndex): number;
    getInsuranceMintDecimals(): number;
    getFirstBankByMint(mintPk: PublicKey): Bank;
    getFirstBankByTokenIndex(tokenIndex: TokenIndex): Bank;
    getFirstBankByOracle(oraclePk: PublicKey): Bank;
    /**
     * Returns a price impact in percentage, between 0 to 100 for a token,
     * returns -1 if data is bad
     */
    getPriceImpactByTokenIndex(tokenIndex: TokenIndex, usdcAmountUi: number): number;
    getFirstBankForMngo(): Bank;
    getFirstBankForPerpSettlement(): Bank;
    getTokenVaultBalanceByMint(mintPk: PublicKey): BN;
    /**
     *
     * @param mintPk
     * @returns sum of ui balances of vaults for all banks for a token
     */
    getTokenVaultBalanceByMintUi(mintPk: PublicKey): number;
    getSerum3MarketByMarketIndex(marketIndex: MarketIndex): Serum3Market;
    getSerum3MarketByName(name: string): Serum3Market;
    getSerum3MarketByExternalMarket(externalMarketPk: PublicKey): Serum3Market;
    getSerum3ExternalMarket(externalMarketPk: PublicKey): Market;
    loadSerum3BidsForMarket(client: MangoClient, externalMarketPk: PublicKey): Promise<Orderbook>;
    loadSerum3AsksForMarket(client: MangoClient, externalMarketPk: PublicKey): Promise<Orderbook>;
    findPerpMarket(marketIndex: PerpMarketIndex): PerpMarket;
    getPerpMarketByOracle(oracle: PublicKey): PerpMarket;
    getPerpMarketByMarketIndex(marketIndex: PerpMarketIndex): PerpMarket;
    getPerpMarketByName(perpMarketName: string): PerpMarket;
    loadPerpBidsForMarket(client: MangoClient, perpMarketIndex: PerpMarketIndex): Promise<BookSide>;
    loadPerpAsksForMarket(client: MangoClient, group: Group, perpMarketIndex: PerpMarketIndex): Promise<BookSide>;
    consoleLogBanks(): void;
    toUiPrice(price: I80F48 | number, baseDecimals: number): number;
    toNativePrice(uiPrice: number, baseDecimals: number): I80F48;
    toNativeDecimals(uiAmount: number, mintPk: PublicKey): BN;
    toString(): string;
}
