import { BrandedString, Signer } from '../types';
import { HexString } from './hex';
import { Bytes } from './bytes';
export declare type OverlayAddress = BrandedString<'OverlayAddress'>;
export declare type EthAddress = Bytes<20>;
export declare type HexEthAddress = HexString<40>;
export declare function makeEthAddress(address: EthAddress | Uint8Array | string | unknown): EthAddress;
export declare function makeHexEthAddress(address: EthAddress | Uint8Array | string | unknown): HexEthAddress;
/**
 * Check if is valid ethereum address
 *
 * Pretty much typed version from web3js
 * https://github.com/ChainSafe/web3.js/blob/1.x/packages/web3-utils/src/utils.js
 *
 * @param address  Ethereum address as hex string
 *
 * @return True if is valid eth address
 */
export declare function isHexEthAddress(address: string | HexString | HexEthAddress): address is HexEthAddress;
/**
 * Convert big-endian hex or number to little-endian.
 * Note: Before conversion it is automatically padded to even length hexstring
 *
 * @param bigEndian Big-endian hex string or number to convert
 * @param pad       Length to which the string should be padded before conversion (defaul: 2)
 *
 * @return little-endian encoded hexstring
 */
export declare function toLittleEndian(bigEndian: number | string | HexString, pad?: number): HexString | never;
/**
 * Convert little-endian hex or number to big-endian
 * Note: Before conversion it is automatically padded to even length hexstring
 *
 * @param littleEndian Little-endian hex string or number to convert
 * @param pad          Length to which the string should be padded before conversion (defaul: 2)
 *
 * @return big-endian encoded hexstring
 */
export declare function fromLittleEndian(littleEndian: number | string | HexString, pad?: number): HexString | never;
/**
 * Get swarm overlay address from public ethereum address and swarm network id
 *
 * @param ethAddress  Public ethereum address
 * @param networkId   Swarm network id
 *
 * @return Swarm overlay address
 */
export declare function ethToSwarmAddress(ethAddress: string | HexString | HexEthAddress, networkId?: number): OverlayAddress;
interface RequestArguments {
    method: string;
    jsonrpc?: string;
    params?: unknown[] | Record<string, unknown>;
}
export interface JsonRPC {
    request?(args: RequestArguments): Promise<unknown>;
    sendAsync?(args: RequestArguments): Promise<unknown>;
}
/**
 * Function that takes Ethereum EIP-1193 compatible provider and create an Signer instance that
 * uses `personal_sign` method to sign requested data.
 *
 * @param provider Injected web3 provider like window.ethereum or other compatible with EIP-1193
 * @param ethAddress Optional address of the account which the data should be signed with. If not specified `eth_requestAccounts` request is used to get the account address.
 */
export declare function makeEthereumWalletSigner(provider: JsonRPC, ethAddress?: string | HexString | HexEthAddress): Promise<Signer>;
export {};
