import { MessageTransmitterClient, SvmSpokeClient } from "@across-protocol/contracts";
import { Mint } from "@solana-program/token";
import { Account, AccountMeta, Address, FetchAccountConfig, Instruction, KeyPairSigner, ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type ReadonlyAccount, type Commitment } from "@solana/kit";
import winston from "winston";
import { DepositWithBlock, FillStatus, FillWithBlock, RelayData, RelayDataWithMessageHash } from "../../interfaces";
import { BigNumber, EvmAddress, Address as SdkAddress, SvmAddress } from "../../utils";
import { type AcrossPlusMessage } from "./";
import { SvmCpiEventsClient } from "./eventsClient";
import { AttestedCCTPMessage, SVMProvider, LatestBlockhash, SolanaTransaction } from "./types";
export declare const SLOT_DURATION_MS = 400;
export declare const SOLANA_TX_SIZE_LIMIT = 1232;
type ProtoFill = Omit<RelayData, "recipient" | "outputToken"> & {
    destinationChainId: number;
    recipient: SvmAddress;
    outputToken: SvmAddress;
};
type CCTPDepositAccounts = {
    tokenMessenger: Address;
    tokenMinter: Address;
    localToken: Address;
    cctpEventAuthority: Address;
    remoteTokenMessenger: Address;
    tokenMessengerMinterSenderAuthority: Address;
    messageTransmitter: Address;
};
export declare function getSlot(provider: SVMProvider, commitment: Commitment, logger?: winston.Logger): Promise<bigint>;
export declare function getTimestampForSlot(provider: SVMProvider, slotNumber: bigint, maxRetries?: number, logger?: winston.Logger): Promise<number | undefined>;
export declare function getFillDeadline(provider: SVMProvider, statePda: Address): Promise<number>;
export declare function getDepositIdAtBlock(_contract: unknown, _blockTag: number): Promise<BigNumber>;
export declare function findDeposit(eventClient: SvmCpiEventsClient, depositId: BigNumber, logger: winston.Logger, slot?: bigint, secondsLookback?: number): Promise<Omit<DepositWithBlock, "originChainId" | "quoteBlockNumber" | "fromLiteChain" | "toLiteChain"> | undefined>;
export declare function relayFillStatus(programId: Address, relayData: RelayDataWithMessageHash, destinationChainId: number, svmEventsClient: SvmCpiEventsClient, logger: winston.Logger, atHeight?: number): Promise<FillStatus>;
export declare function fillStatusArray(programId: Address, relayData: RelayDataWithMessageHash[], destinationChainId: number, svmEventsClient: SvmCpiEventsClient, logger: winston.Logger, atHeight?: number): Promise<(FillStatus | undefined)[]>;
export declare function findFillEvent(relayData: RelayDataWithMessageHash, destinationChainId: number, svmEventsClient: SvmCpiEventsClient, fromSlot: number, toSlot?: number, logger?: winston.Logger): Promise<FillWithBlock | undefined>;
export declare function fillRelayInstruction(spokePool: SvmAddress, relayData: ProtoFill, signer: TransactionSigner<string>, recipientTokenAccount: Address<string>, repaymentAddress: EvmAddress | SvmAddress, repaymentChainId: number): Promise<Instruction>;
export declare function createTokenAccountsInstruction(mint: SvmAddress, relayer: TransactionSigner<string>): SvmSpokeClient.CreateTokenAccountsInstruction;
export declare function getFillRelayTx(spokePoolAddr: SvmAddress, solanaClient: SVMProvider, relayData: Omit<RelayData, "recipient" | "outputToken"> & {
    destinationChainId: number;
    recipient: SvmAddress;
    outputToken: SvmAddress;
}, signer: TransactionSigner, repaymentChainId: number, repaymentAddress: SdkAddress): Promise<SolanaTransaction>;
export declare function getIPFillRelayTx(spokePoolAddr: SvmAddress, solanaClient: SVMProvider, relayData: Omit<RelayData, "recipient" | "outputToken"> & {
    destinationChainId: number;
    recipient: SvmAddress;
    outputToken: SvmAddress;
}, signer: TransactionSigner, repaymentChainId: number, repaymentAddress: SdkAddress): Promise<SolanaTransaction>;
export declare const createFillInstruction: (signer: TransactionSigner, solanaClient: SVMProvider, fillInput: SvmSpokeClient.FillRelayInput, relayData: Pick<SvmSpokeClient.RelayDataArgs, "outputAmount" | "recipient">, tokenDecimals: number, createRecipientAta?: boolean, remainingAccounts?: (WritableAccount | ReadonlyAccount)[]) => Promise<SolanaTransaction>;
export declare function deserializeMessage(_message: string): AcrossPlusMessage;
export declare const createDepositInstruction: (signer: TransactionSigner, solanaClient: SVMProvider, depositInput: SvmSpokeClient.DepositInput, tokenDecimals: number, createVaultAtaIfNeeded?: boolean) => Promise<SolanaTransaction>;
export declare const createRequestSlowFillInstruction: (signer: TransactionSigner, solanaClient: SVMProvider, requestSlowFillInput: SvmSpokeClient.RequestSlowFillInput) => Promise<SolanaTransaction>;
export declare function getSlowFillRequestTx(spokePoolAddr: SvmAddress, solanaClient: SVMProvider, relayData: Omit<RelayData, "recipient" | "outputToken"> & {
    destinationChainId: number;
    recipient: SvmAddress;
    outputToken: SvmAddress;
}, signer: TransactionSigner): Promise<SolanaTransaction>;
export declare const createCloseFillPdaInstruction: (signer: TransactionSigner, solanaClient: SVMProvider, fillStatusPda: Address) => Promise<SolanaTransaction>;
export declare const createReceiveMessageInstruction: (signer: TransactionSigner, solanaClient: SVMProvider, input: MessageTransmitterClient.ReceiveMessageInput, remainingAccounts: AccountMeta<string>[]) => Promise<SolanaTransaction>;
export declare function getAssociatedTokenAddress(owner: SvmAddress, mint: SvmAddress, tokenProgramId?: Address<string>): Promise<Address<string>>;
export declare function getRelayDataHash(relayData: RelayData & {
    messageHash: string;
}, destinationChainId: number): string;
export declare function getIPForFillRelayTxs(spokePool: SvmAddress, relayData: RelayData, repaymentChainId: number, repaymentAddress: SdkAddress, signer: TransactionSigner<string>, provider: SVMProvider): Promise<Array<SolanaTransaction>>;
export declare function getFillRelayViaInstructionParamsInstructions(spokePool: Address<string>, relayData: RelayData, repaymentChainId: number, repaymentAddress: SdkAddress, signer: TransactionSigner<string>, provider: SVMProvider, maxWriteSize?: number): Promise<Instruction[]>;
export declare function getDepositDelegatePda(depositData: {
    depositor: Address<string>;
    recipient: Address<string>;
    inputToken: Address<string>;
    outputToken: Address<string>;
    inputAmount: bigint;
    outputAmount: ReadonlyUint8Array;
    destinationChainId: bigint;
    exclusiveRelayer: Address<string>;
    quoteTimestamp: bigint;
    fillDeadline: bigint;
    exclusivityParameter: bigint;
    message: Uint8Array;
}, programId: Address<string>): Promise<Address<string>>;
export declare function getDepositNowDelegatePda(depositData: {
    depositor: Address<string>;
    recipient: Address<string>;
    inputToken: Address<string>;
    outputToken: Address<string>;
    inputAmount: bigint;
    outputAmount: ReadonlyUint8Array;
    destinationChainId: bigint;
    exclusiveRelayer: Address<string>;
    fillDeadlineOffset: bigint;
    exclusivityPeriod: bigint;
    message: Uint8Array;
}, programId: Address<string>): Promise<Address<string>>;
export declare function getFillRelayDelegatePda(relayHash: Uint8Array, repaymentChainId: bigint, repaymentAddress: Address<string>, programId: Address<string>): Promise<Address<string>>;
export declare const hasCCTPV1MessageBeenProcessed: (solanaClient: SVMProvider, signer: KeyPairSigner, nonce: number, sourceDomain: number, latestBlockhash?: LatestBlockhash) => Promise<boolean>;
export declare function getAccountMetasForTokenlessMessage(solanaClient: SVMProvider, signer: KeyPairSigner, messageBytes: string): Promise<AccountMeta<string>[]>;
export declare function getCCTPDepositAccounts(hubChainId: number, cctpDestinationDomainId: number, tokenMessengerMinterAddress: Address, messageTransmitterAddress: Address): Promise<CCTPDepositAccounts>;
export declare function isSVMFillTooLarge(fillRelayTx: SolanaTransaction): {
    tooLarge: boolean;
    sizeBytes: number;
};
export declare function base64StrToByteSize(base64TxString: string): number;
export declare function calculateFillSizeBytes(fillTx: SolanaTransaction): number;
export declare function getCCTPV1ReceiveMessageTx(solanaClient: SVMProvider, signer: KeyPairSigner, message: AttestedCCTPMessage, hubChainId: number, recipientAta: SvmAddress): Promise<SolanaTransaction>;
export declare function finalizeCCTPV1Messages(solanaClient: SVMProvider, attestedMessages: AttestedCCTPMessage[], signer: KeyPairSigner, recipientAta: SvmAddress, simulate?: boolean, hubChainId?: number): Promise<string[]>;
export declare function getMintInfo(solanaClient: SVMProvider, mint: Address<string>, config?: FetchAccountConfig): Promise<Account<Mint, string>>;
export {};
