import { ChainId, ChainName, TokenId } from '@wormhole-foundation/wormhole-connect-sdk';
import { InboundQueuedTransfer } from '../../types';
import { Connection, PublicKey, Transaction, TransactionInstruction } from '@solana/web3.js';
import { BN, IdlAccounts, Program } from '@coral-xyz/anchor';
import { SignedVaa } from '@certusone/wormhole-sdk/lib/esm';
import { ExampleNativeTokenTransfers } from './types/1.0.0/example_native_token_transfers';

type Config = IdlAccounts<ExampleNativeTokenTransfers>['config'];
type InboxItem = IdlAccounts<ExampleNativeTokenTransfers>['inboxItem'];
type OutboxRateLimit = IdlAccounts<ExampleNativeTokenTransfers>['outboxRateLimit'];
type InboxRateLimit = IdlAccounts<ExampleNativeTokenTransfers>['inboxRateLimit'];
interface TransferArgs {
    amount: BN;
    recipientChain: {
        id: ChainId;
    };
    recipientAddress: number[];
    shouldQueue: boolean;
}
export declare class NttManagerSolana {
    readonly nttId: string;
    static readonly abiVersionCache: Map<string, Program<ExampleNativeTokenTransfers>>;
    readonly connection: Connection;
    readonly wormholeId: string;
    constructor(nttId: string);
    send(token: TokenId, sender: string, recipient: string, amount: bigint, toChain: ChainName | ChainId, shouldSkipRelayerSend: boolean): Promise<string>;
    receiveMessage(vaa: string, payer: string): Promise<string>;
    getCurrentOutboundCapacity(): Promise<string>;
    getCurrentInboundCapacity(fromChain: ChainName | ChainId): Promise<string>;
    getCurrentCapacity(limit: BN, capacityAtLastTx: BN, lastTxTimestamp: BN): Promise<string>;
    getRateLimitDuration(): Promise<number>;
    getInboundQueuedTransfer(messageDigest: string): Promise<InboundQueuedTransfer | undefined>;
    completeInboundQueuedTransfer(messageDigest: string, recipientAddress: string, payer: string): Promise<string>;
    isTransferCompleted(messageDigest: string): Promise<boolean>;
    fetchRedeemTx(messageDigest: string): Promise<string | undefined>;
    derivePda(seeds: Buffer | Array<Uint8Array | Buffer>): PublicKey;
    configAccountAddress(): PublicKey;
    outboxRateLimitAccountAddress(): PublicKey;
    inboxRateLimitAccountAddress(chain: ChainName | ChainId): PublicKey;
    inboxItemAccountAddress(messageDigest: string): PublicKey;
    sessionAuthorityAddress(sender: PublicKey, args: TransferArgs): PublicKey;
    tokenAuthorityAddress(): PublicKey;
    emitterAccountAddress(): PublicKey;
    wormholeMessageAccountAddress(outboxItem: PublicKey): PublicKey;
    peerAccountAddress(chain: ChainName | ChainId): PublicKey;
    transceiverPeerAccountAddress(chain: ChainName | ChainId): PublicKey;
    transceiverMessageAccountAddress(chain: ChainName | ChainId, id: Buffer): PublicKey;
    registeredTransceiverAddress(transceiver: PublicKey): PublicKey;
    /**
     * Creates a transfer_burn instruction. The `payer` and `fromAuthority`
     * arguments must sign the transaction
     */
    createTransferBurnInstruction(args: {
        payer: PublicKey;
        from: PublicKey;
        fromAuthority: PublicKey;
        amount: BN;
        recipientChain: ChainName;
        recipientAddress: ArrayLike<number>;
        outboxItem: PublicKey;
        shouldQueue: boolean;
        config?: Config;
    }): Promise<TransactionInstruction>;
    /**
     * Creates a transfer_lock instruction. The `payer`, `fromAuthority`, and `outboxItem`
     * arguments must sign the transaction
     */
    createTransferLockInstruction(args: {
        payer: PublicKey;
        from: PublicKey;
        fromAuthority: PublicKey;
        amount: BN;
        recipientChain: ChainName;
        recipientAddress: ArrayLike<number>;
        shouldQueue: boolean;
        outboxItem: PublicKey;
        config: Config;
    }): Promise<TransactionInstruction>;
    /**
     * Creates a release_outbound instruction. The `payer` needs to sign the transaction.
     */
    createReleaseOutboundInstruction(args: {
        payer: PublicKey;
        outboxItem: PublicKey;
        revertOnDelay: boolean;
    }): Promise<TransactionInstruction>;
    createReleaseInboundMintInstruction(args: {
        payer: PublicKey;
        messageDigest: string;
        revertOnDelay: boolean;
        recipient: PublicKey;
        config?: Config;
    }): Promise<TransactionInstruction>;
    createReleaseInboundUnlockInstruction(args: {
        payer: PublicKey;
        messageDigest: string;
        revertOnDelay: boolean;
        recipient: PublicKey;
        config?: Config;
    }): Promise<TransactionInstruction>;
    createReceiveWormholeMessageInstruction(args: {
        payer: PublicKey;
        vaa: SignedVaa;
        config?: Config;
    }): Promise<TransactionInstruction>;
    createRedeemInstruction(args: {
        payer: PublicKey;
        vaa: SignedVaa;
        config?: Config;
    }): Promise<TransactionInstruction>;
    /**
     * Fetches the Config account from the contract.
     *
     * @param config If provided, the config is just returned without making a
     *               network request. This is handy in case multiple config
     *               accessor functions are used, the config can just be queried
     *               once and passed around.
     */
    getConfig(config?: Config): Promise<Config>;
    isPaused(config?: Config): Promise<boolean>;
    mintAccountAddress(config?: Config): Promise<PublicKey>;
    tokenProgram(config?: Config): Promise<PublicKey>;
    getInboxItem(messageDigest: string): Promise<InboxItem>;
    getOutboxRateLimit(): Promise<OutboxRateLimit>;
    getInboxRateLimit(chain: ChainName | ChainId): Promise<InboxRateLimit>;
    getVersion(): Promise<string>;
    /**
     * Returns the address of the custody account. If the config is available
     * (i.e. the program is initialized), the mint is derived from the config.
     * Otherwise, the mint must be provided.
     */
    custodyAccountAddress(configOrMint: Config | PublicKey): Promise<PublicKey>;
    getProgram(): Promise<Program<ExampleNativeTokenTransfers>>;
    simulate(tx: Transaction): Promise<void>;
}
export {};
//# sourceMappingURL=nttManager.d.ts.map