/// <reference types="node" />
/// <reference types="node" />
import { Buffer } from 'buffer';
import { Idl, IdlTypeDef } from '@coral-xyz/anchor/dist/cjs/idl';
import { AccountsCoder, BorshEventCoder, BorshInstructionCoder, Coder } from '@coral-xyz/anchor/dist/cjs/coder';
import { BorshTypesCoder } from '@coral-xyz/anchor/dist/cjs/coder/borsh/types';
export declare class CustomBorshCoder<A extends string = string, T extends string = string> implements Coder {
    readonly idl: Idl;
    /**
     * Instruction coder.
     */
    readonly instruction: BorshInstructionCoder;
    /**
     * Account coder.
     */
    readonly accounts: CustomBorshAccountsCoder<A>;
    /**
     * Coder for events.
     */
    readonly events: BorshEventCoder;
    /**
     * Coder for user-defined types.
     */
    readonly types: BorshTypesCoder<T>;
    constructor(idl: Idl);
}
/**
 * Custom accounts coder that wraps BorshAccountsCoder to fix encode buffer sizing.
 */
export declare class CustomBorshAccountsCoder<A extends string = string> implements AccountsCoder {
    private baseCoder;
    private idl;
    constructor(idl: Idl);
    encode<T = any>(accountName: A, account: T): Promise<Buffer>;
    decode<T = any>(accountName: A, data: Buffer): T;
    decodeAny<T = any>(data: Buffer): T;
    decodeUnchecked<T = any>(accountName: A, ix: Buffer): T;
    memcmp(accountName: A, appendData?: Buffer): any;
    size(idlAccount: IdlTypeDef): number;
    /**
     * Calculates and returns a unique 8 byte discriminator prepended to all anchor accounts.
     *
     * @param name The name of the account to calculate the discriminator.
     */
    static accountDiscriminator(name: string): Buffer;
}
//# sourceMappingURL=customCoder.d.ts.map