import Eth from "@ledgerhq/hw-app-eth";
import { Logger, LoggerOptions, SignerInterface } from '@evan.network/dbcp';
/**
 * signer internal instance options
 */
export interface SignerLedgerOptions extends LoggerOptions {
    contractLoader: any;
    config: any;
    web3: any;
    chainId?: number;
}
export declare class SignerLedger extends Logger implements SignerInterface {
    chainId: number;
    config: any;
    contractLoader: any;
    eth: Eth;
    hdPath: string;
    web3: any;
    constructor(options: SignerLedgerOptions);
    init(): Promise<void>;
    /**
     * patch '0x' prefix to input if not already added, also casts numbers to hex string
     *
     * @param      input  input to prefix with '0x'
     *
     * @return     patched input
     */
    ensureHashWithPrefix(input: string | number): string;
    /**
     * get gas price (either from config or from api.eth.web3.eth.gasPrice (gas price median of last
     * blocks) or api.config.eth.gasPrice; unset config value or set it to falsy for median gas price
     *
     * @return     hex string with gas price
     */
    getGasPrice(): any;
    /**
     * gets nonce for current user, looks into actions submitted by current user in current block for
     * this as well
     *
     * @param      accountId  Ethereum account ID
     *
     * @return     nonce of given user
     */
    getNonce(accountId: string): any;
    /**
     * Should be called to encode constructor params (taken from
     * https://github.com/ethereum/web3.js/blob/develop/lib/web3/contract.js)
     *
     * @param      abi     The abi
     * @param      params  The parameters
     *
     * @return     encoded params
     */
    encodeConstructorParams(abi: any[], params: any[]): any;
    signAndExecuteSend(options: any, handleTxResult: any): Promise<void>;
    /**
     * create, sing and submit a contract transaction with private key of options.from
     *
     * @param      contract           contract instance from api.eth.loadContract(...)
     * @param      functionName       function name
     * @param      functionArguments  arguments for contract creation, pass empty Array if no
     *                                arguments
     * @param      options            transaction arguments, having at least .from and .gas
     * @param      handleTxResult     callback(error, result)
     *
     * @return     Promise, resolved when done or resolves to event result if event given
     */
    signAndExecuteTransaction(contract: any, functionName: any, functionArguments: any, options: any, handleTxResult: any): void;
    /**
     * creates a contract by contstructing creation transaction and signing it with private key of
     * options.from
     *
     * @param      contractName       contract name
     * @param      functionArguments  arguments for contract creation, pass empty Array if no
     *                                arguments
     * @param      options            transaction arguments, having at least .from and .gas
     *
     * @return     Promise, resolved when done
     */
    createContract(contractName: string, functionArguments: any[], options: any): Promise<any>;
    getAccount(): Promise<string>;
    isDeviceAvailable(): Promise<boolean>;
    signMessage(message: string): Promise<string>;
    private signTransaction(tx, accountId);
}
