import * as solana_agent_kit from 'solana-agent-kit';
import { BaseWallet } from 'solana-agent-kit';
import { SwapApi, QuoteResponse, SwapResponse } from '@jup-ag/api';
import { Connection, PublicKey, Transaction, VersionedTransaction } from '@solana/web3.js';

declare class CoingeckoPriceApi {
    api: string;
    apiKey: string;
    constructor(apiEndpoint?: string, apiKey?: string);
    getTokenList(): Promise<CoingeckoSupportedTokens | undefined>;
    getTokenInfo(tokenId: string): Promise<CoinFullInfo | undefined>;
    getBatchMarketInfo(identifiers: string[], currency?: string, page?: number, perPage?: number): Promise<CoinMarket[] | undefined>;
    getHistoricalChart(identifier: string, days: number, currency?: string): Promise<CoinMarketChartResponse | undefined>;
    getOHLCHistoricalChart(identifier: string, days: number, currency?: string): Promise<Array<Array<number>> | undefined>;
}
interface CoingeckoSupportedTokens {
    tickerToToken: Record<string, CoingeckoTokenId>;
    nameToToken: Record<string, CoingeckoTokenId>;
    addressToToken: Record<string, CoingeckoTokenId>;
}
interface CoingeckoTokenId {
    id: string;
    symbol: string;
    solana_address: string | null;
}
interface CoinMarket extends CoingeckoTokenId {
    image?: string;
    current_price?: number;
    market_cap?: number;
    market_cap_rank?: number;
    fully_diluted_valuation?: number | null;
    total_volume?: number;
    high_24h?: number;
    low_24h?: number;
    price_change_24h?: number;
    price_change_percentage_24h?: number;
    market_cap_change_24h?: number;
    market_cap_change_percentage_24h?: number;
    circulating_supply?: number;
    total_supply?: number;
    max_supply?: number | null;
    ath?: number;
    ath_change_percentage?: number;
    ath_date?: Date;
    atl?: number;
    atl_change_percentage?: number;
    atl_date?: Date;
    roi?: null;
    last_updated?: Date;
    mint: string;
}
interface CoinFullInfo {
    id?: string;
    symbol?: string;
    name?: string;
    asset_platform_id?: null;
    platforms?: PLATFORMS;
    block_time_in_minutes?: number;
    hashing_algorithm?: string;
    categories?: string[];
    public_notice?: null;
    additional_notices?: any[];
    localization?: {
        [x: string]: string;
    };
    description?: {
        [x: string]: string;
    };
    links?: Links;
    image?: Image;
    country_origin?: string;
    genesis_date?: null;
    sentiment_votes_up_percentage?: null;
    sentiment_votes_down_percentage?: null;
    market_cap_rank?: number;
    coingecko_rank?: number;
    coingecko_score?: number;
    developer_score?: number;
    community_score?: number;
    liquidity_score?: number;
    public_interest_score?: number;
    market_data?: MarketData;
    community_data?: CommunityData;
    developer_data?: DeveloperData;
    public_interest_stats?: PublicInterestStats;
    status_updates?: any[];
    last_updated?: Date;
    tickers?: Ticker[];
}
interface ReposURL {
    github?: string[];
    bitbucket?: any[];
}
interface Links {
    homepage?: string[];
    blockchain_site?: string[];
    official_forum_url?: string[];
    chat_url?: string[];
    announcement_url?: string[];
    twitter_screen_name?: string;
    facebook_username?: string;
    bitcointalk_thread_identifier?: number;
    telegram_channel_identifier?: string;
    subreddit_url?: string;
    repos_url?: ReposURL;
}
interface PublicInterestStats {
    alexa_rank?: number;
    bing_matches?: null;
}
interface MarketData {
    current_price?: {
        [key: string]: number;
    };
    total_value_locked?: null;
    mcap_to_tvl_ratio?: null;
    fdv_to_tvl_ratio?: null;
    roi?: null;
    ath?: {
        [key: string]: number;
    };
    ath_change_percentage?: {
        [key: string]: number;
    };
    ath_date?: {
        [key: string]: Date;
    };
    atl?: {
        [key: string]: number;
    };
    atl_change_percentage?: {
        [key: string]: number;
    };
    atl_date?: {
        [key: string]: Date;
    };
    market_cap?: {
        [key: string]: number;
    };
    market_cap_rank?: number;
    fully_diluted_valuation?: any;
    total_volume?: {
        [key: string]: number;
    };
    high_24h?: {
        [key: string]: number;
    };
    low_24h?: {
        [key: string]: number;
    };
    price_change_24h?: number;
    price_change_percentage_24h?: number;
    price_change_percentage_7d?: number;
    price_change_percentage_14d?: number;
    price_change_percentage_30d?: number;
    price_change_percentage_60d?: number;
    price_change_percentage_200d?: number;
    price_change_percentage_1y?: number;
    market_cap_change_24h?: number;
    market_cap_change_percentage_24h?: number;
    price_change_24h_in_currency?: {
        [key: string]: number;
    };
    price_change_percentage_1h_in_currency?: {
        [key: string]: number;
    };
    price_change_percentage_24h_in_currency?: {
        [key: string]: number;
    };
    price_change_percentage_7d_in_currency?: {
        [key: string]: number;
    };
    price_change_percentage_14d_in_currency?: {
        [key: string]: number;
    };
    price_change_percentage_30d_in_currency?: {
        [key: string]: number;
    };
    price_change_percentage_60d_in_currency?: {
        [key: string]: number;
    };
    price_change_percentage_200d_in_currency?: {
        [key: string]: number;
    };
    price_change_percentage_1y_in_currency?: {
        [key: string]: number;
    };
    market_cap_change_24h_in_currency?: {
        [key: string]: number;
    };
    market_cap_change_percentage_24h_in_currency?: {
        [key: string]: number;
    };
    total_supply?: number;
    max_supply?: null;
    circulating_supply?: number;
    last_updated?: Date;
}
interface Market$1 {
    name?: string;
    identifier?: string;
    has_trading_incentive?: boolean;
}
interface Ticker {
    base?: string;
    target?: string;
    market?: Market$1;
    last?: number;
    volume?: number;
    converted_last?: {
        [key: string]: number;
    };
    converted_volume?: {
        [key: string]: number;
    };
    trust_score?: string;
    bid_ask_spread_percentage?: number;
    timestamp?: Date;
    last_traded_at?: Date;
    last_fetch_at?: Date;
    is_anomaly?: boolean;
    is_stale?: boolean;
    trade_url?: string;
    token_info_url?: null;
    coin_id?: string;
    target_coin_id?: string;
}
interface Image {
    thumb?: string;
    small?: string;
    large?: string;
}
interface CommunityData {
    facebook_likes?: null;
    twitter_followers?: number;
    reddit_average_posts_48h?: number;
    reddit_average_comments_48h?: number;
    reddit_subscribers?: number;
    reddit_accounts_active_48h?: number;
    telegram_channel_user_count?: number;
}
interface DeveloperData {
    forks?: number;
    stars?: number;
    subscribers?: number;
    total_issues?: number;
    closed_issues?: number;
    pull_requests_merged?: number;
    pull_request_contributors?: number;
    code_additions_deletions_4_weeks?: CodeAdditionsDeletions4_Weeks;
    commit_count_4_weeks?: number;
    last_4_weeks_commit_activity_series?: number[];
}
interface CodeAdditionsDeletions4_Weeks {
    additions?: number;
    deletions?: number;
}
interface CoinMarketChartResponse {
    prices: Array<Array<number>>;
    market_caps: Array<Array<number>>;
    total_volumes: Array<Array<number>>;
}
/**
 * @description if any platform enums is missing please visit https://www.coingecko.com/en/api/documentation
 */
type PLATFORMS = "ethereum" | "polygon-pos" | "energi" | "harmony-shard-0" | "avalanche" | "fantom" | "binance-smart-chain" | "xdai" | "aurora" | "smartbch" | "near-protocol" | "arbitrum-one" | "solana" | "klay-token" | "bitgert" | "tron" | "cardano" | "optimistic-ethereum" | "sora" | "huobi-token" | "conflux" | "aptos" | "polkadot" | "moonbeam" | "chiliz" | "boba" | "komodo" | "base" | "Bitcichain" | "zksync" | "metis-andromeda" | "elrond" | "ardor" | "qtum" | "stellar" | "cronos" | "osmosis" | "syscoin" | "stacks" | "algorand" | "moonriver" | "celo" | "eos" | "astar" | "kusama" | "the-open-network" | "terra" | "polygon-zkevm" | "telos" | "pulsechain" | "core" | "evmos" | "arbitrum-nova" | "cosmos" | "kardiachain" | "okex-chain" | "songbird" | "terra-2" | "proof-of-memes" | "velas" | "sui" | "oasis" | "secret" | "kava" | "ronin" | "linea" | "icon" | "ordinals" | "fuse" | "nem" | "binancecoin" | "thundercore" | "iotex" | "elastos" | "milkomeda-cardano" | "theta" | "meter" | "hedera-hashgraph" | "hoo" | "kucoin-community-chain" | "bittorrent" | "xdc-network" | "zilliqa" | "oasys" | "nuls" | "rootstock" | "mixin-network" | "canto" | "mantle" | "fusion-network" | "hydra" | "xrp" | "tomochain" | "neo" | "tezos" | "step-network" | "defi-kingdoms-blockchain" | "bitkub-chain" | "factom" | "dogechain" | "ethereum-classic" | "vechain" | "waves" | "bitcoin-cash" | "empire" | "kujira" | "everscale" | "exosama" | "findora" | "godwoken" | "coinex-smart-chain" | "trustless-computer" | "ethereumpow" | "stratis" | "cube" | "shiden network" | "tombchain" | "sx-network" | "ontology" | "eos-evm" | "omni" | "onus" | "bitshares" | "flare-network" | "rollux" | "wanchain" | "function-x" | "skale" | "callisto" | "wemix-network" | "tenet" | "neon-evm" | "thorchain" | "gochain" | "celer-network" | ("vite" & string);

declare function getJupiterQuote(jupiterClient: SwapApi, inputToken: string, outputToken: string, amount: number): Promise<QuoteResponse>;
declare function getJupiterSwapUnsigned(quote: QuoteResponse, jupiterClient: SwapApi, userPublicAddress: string): Promise<SwapResponse>;

/**
 * Transfer SOL or SPL tokens to a recipient
 * @param connection Connection to the Solana cluster
 * @param to Recipient's public key
 * @param amount Amount to transfer
 * @param mint Optional mint address for SPL tokens
 * @returns Transaction signature
 */
declare function transferUnsigned(connection: Connection, from: PublicKey, to: PublicKey, amount: number, mint?: PublicKey): Promise<{
    tx: Transaction;
    serializedTx: string;
}>;

declare function getTokenList(): CoingeckoSupportedTokens;
declare function getTokenInfo(id: string, apiKey?: string): Promise<CoinFullInfo | undefined>;
declare function supportedTokenAddress(id: string): string | undefined;
declare function getTokenMarketInfo(identifiers: string[], apiKey?: string): Promise<CoinMarket[] | undefined>;

/**
 * Fetches a detailed report for a specific token.
 * @async
 * @param {string} tokenID - The mint address or ticker of the token.
 * @returns {Promise<TokenCheck>} The detailed token report.
 * @throws {Error} If the API call fails.
 */
declare function donutFetchTokenDetailedReport(tokenID: string): Promise<DonutRugcheckReport | undefined>;
interface Holder {
    address: string;
    amount: number;
    decimals: number;
    pct: number;
    uiAmount: number;
    uiAmountString: string;
    owner: string;
    insider: boolean;
}
interface TokenMetadata {
    name: string;
    symbol: string;
    uri: string;
    mutable: boolean;
    updateAuthority: string | null;
}
interface Lockers {
    [key: string]: {
        programID: string;
        tokenAccount: string;
        owner: string;
        uri: string;
        unlockDate: number;
        usdcLocked: number;
        type: string;
    };
}
interface Risk {
    name: string;
    value: string;
    description: string;
    score: number;
    level: string;
}
interface Market {
    pubkey: string;
    marketType: string;
    mintA: string;
    mintB: string;
    mintLP: string;
    liquidityA: string;
    liquidityB: string;
    mintAAccount: MintAccount;
    mintBAccount: MintAccount;
    mintLPAccount: MintAccount;
    liquidityAAccount: MintAccount;
    liquidityBAccount: MintAccount;
    lp: LP[];
}
interface MintAccount {
    mintAuthority: string | null;
    supply: number | null;
    decimals: number | null;
    isInitialized: boolean | null;
    freezeAuthority: string | null;
}
interface LP {
    baseMint: string;
    quoteMint: string;
    lpMint: string;
    quotePrice: number;
    basePrice: number;
    base: number;
    quote: number;
    reserveSupply: number;
    currentSupply: number;
    quoteUSD: number;
    baseUSD: number;
    pctReserve: number;
    pctSupply: number;
    holders: Holder[];
}
interface TransferFee {
    pct: number;
    maxAmount: number;
    authority: string;
}
interface KnownAccount {
    [key: string]: {
        name: string;
        type: string;
    };
}
interface InsiderNetwork {
    id: string;
    size: number;
    type: string;
    tokenAmount: number;
    activeAccounts: number;
}
interface Verification {
    mint: string;
    payer: string;
    name: string;
    symbol: string;
    description: string;
    jup_verified: boolean | null;
    jup_strict: boolean | null;
    links: string[] | null;
}
interface DonutRugcheckReport {
    mint: string | null;
    tokenProgram: string | null;
    creator: string | null;
    creatorBalance: number;
    token: {
        mintAuthority: string | null;
        supply: number;
        decimals: number;
        isInitialized: boolean;
        freezeAuthority: string | null;
    };
    token_extensions: string | null;
    tokenMeta: TokenMetadata;
    topHolders: Holder[];
    freezeAuthority: string | null;
    mintAuthority: string | null;
    risks: Risk[];
    score: number;
    score_normalised: number;
    fileMeta: string | null;
    lockerOwners: null;
    lockers: Lockers;
    markets: Market[];
    totalMarketLiquidity: number | null;
    totalLPProviders: number;
    totalHolders: number | null;
    price: number | null;
    rugged: boolean | null;
    tokenType: string;
    transferFee: TransferFee | null;
    knownAccounts: KnownAccount;
    events: [] | null;
    verification: Verification;
    graphInsidersDetected: number | null;
    insiderNetworks: InsiderNetwork[];
    detectedAt: Date | null;
    creatorTokens: null;
}

/**
 * Fetches a detailed report for a specific token.
 * @async
 * @param {string} tokenID - The mint address or ticker of the token.
 * @returns {Promise<TokenCheck>} The detailed token report.
 * @throws {Error} If the API call fails.
 */
declare function fetchSolsnifferReport(tokenID: string, apiKey?: string): Promise<any>;

declare const DonutPlugin: {
    name: string;
    methods: {
        getJupiterQuote: typeof getJupiterQuote;
        getJupiterSwapUnsigned: typeof getJupiterSwapUnsigned;
        transferUnsigned: typeof transferUnsigned;
        getTokenList: typeof getTokenList;
        supportedTokenAddress: typeof supportedTokenAddress;
        getTokenMarketInfo: typeof getTokenMarketInfo;
        getTokenInfo: typeof getTokenInfo;
        donutFetchTokenDetailedReport: typeof donutFetchTokenDetailedReport;
        fetchSolsnifferReport: typeof fetchSolsnifferReport;
    };
    actions: solana_agent_kit.Action[];
    initialize: () => void;
};
/**
 * A mock wallet implementation that cannot sign transactions
 */
declare const mockBaseWallet: BaseWallet;

declare class MockWallet implements BaseWallet {
    readonly publicKey: PublicKey;
    signTransaction<T extends Transaction | VersionedTransaction>(_transaction: T): Promise<T>;
    signAllTransactions<T extends Transaction | VersionedTransaction>(_transactions: T[]): Promise<T[]>;
    signAndSendTransaction(_transaction: Transaction | VersionedTransaction): Promise<{
        signature: string;
    }>;
    signMessage(_message: Uint8Array): Promise<Uint8Array>;
}

type index_MockWallet = MockWallet;
declare const index_MockWallet: typeof MockWallet;
declare namespace index {
  export { index_MockWallet as MockWallet };
}

export { type CodeAdditionsDeletions4_Weeks, type CoinFullInfo, type CoinMarket, type CoinMarketChartResponse, CoingeckoPriceApi, type CoingeckoSupportedTokens, type CoingeckoTokenId, type CommunityData, type DeveloperData, DonutPlugin, type Image, type Links, type Market$1 as Market, type MarketData, type PLATFORMS, type PublicInterestStats, type ReposURL, type Ticker, mockBaseWallet, index as utils };
