import { AccountInfo, Connection, PublicKey } from '@solana/web3.js';
import SwitchboardProgram from '@switchboard-xyz/sbv2-lite';
import Big from 'big.js';
import BN from 'bn.js';
import { I80F48, I80F48Dto } from '../numbers/I80F48';
export declare const USDC_MINT_MAINNET: PublicKey;
export declare const SOL_MINT_MAINNET: PublicKey;
export declare let sbOnDemandProgram: any;
export declare enum OracleProvider {
    Pyth = 0,// V1
    PythV2 = 1,// V2
    Switchboard = 2,// V1+V2
    SwitchboardOnDemand = 3,// On Demand
    Stub = 4
}
export declare class StubOracle {
    publicKey: PublicKey;
    group: PublicKey;
    mint: PublicKey;
    lastUpdateTs: BN;
    lastUpdateSlot: BN;
    price: I80F48;
    deviation: I80F48;
    static from(publicKey: PublicKey, obj: {
        group: PublicKey;
        mint: PublicKey;
        price: I80F48Dto;
        lastUpdateTs: BN;
        lastUpdateSlot: BN;
        deviation: I80F48Dto;
    }): StubOracle;
    constructor(publicKey: PublicKey, group: PublicKey, mint: PublicKey, price: I80F48Dto, lastUpdateTs: BN, lastUpdateSlot: BN, deviation: I80F48Dto);
}
export declare function parseSwitchboardOracleV1(accountInfo: AccountInfo<Buffer>): {
    price: number;
    lastUpdatedSlot: number;
    uiDeviation: number;
    provider: OracleProvider;
};
export declare function switchboardDecimalToBig(sbDecimal: {
    mantissa: BN;
    scale: number;
}): Big;
export declare function parseSwitchboardOracleV2(program: SwitchboardProgram, accountInfo: AccountInfo<Buffer>, oracle: PublicKey): {
    price: number;
    lastUpdatedSlot: number;
    uiDeviation: number;
    provider: OracleProvider;
};
export declare function getStandardDeviation(array: number[]): number;
export declare function parseSwitchboardOnDemandOracle(program: any, accountInfo: AccountInfo<Buffer>, oracle: PublicKey): {
    price: number;
    lastUpdatedSlot: number;
    uiDeviation: number;
    provider: OracleProvider;
};
export declare function parseSwitchboardOracle(oracle: PublicKey, accountInfo: AccountInfo<Buffer>, connection: Connection): Promise<{
    price: number;
    lastUpdatedSlot: number;
    uiDeviation: number;
    provider: OracleProvider;
}>;
export declare function isSwitchboardOracle(accountInfo: AccountInfo<Buffer>): boolean;
export declare function isPythOracle(accountInfo: AccountInfo<Buffer>): boolean;
export declare function isOrcaOracle(accountInfo: AccountInfo<Buffer>): boolean;
export declare function isRaydiumOracle(accountInfo: AccountInfo<Buffer>): boolean;
export declare function isClmmOracle(accountInfo: AccountInfo<Buffer>): boolean;
export declare function parsePythOracle(accountInfo: AccountInfo<Buffer>, connection: Connection): {
    price: number;
    lastUpdatedSlot: number;
    uiDeviation: number;
    provider: OracleProvider;
};
export declare function isOracleStaleOrUnconfident(nowSlot: number, maxStalenessSlots: number, oracleLastUpdatedSlot: number | undefined, deviation: I80F48 | undefined, confFilter: I80F48, price: I80F48): boolean;
export declare function deriveFallbackOracleQuoteKey(accountInfo: AccountInfo<Buffer>): PublicKey;
export declare function createFallbackOracleMap(conn: Connection, oracles: PublicKey[], fallbacks: PublicKey[]): Promise<Map<string, [PublicKey, PublicKey]>>;
