/// <reference types="node" />
import type { Hedgehog } from '@audius/hedgehog';
import type { EIP712TypedData } from 'eth-sig-util';
import EthereumWallet from 'ethereumjs-wallet';
import type Web3Type from 'web3';
import type { HttpProvider, TransactionReceipt } from 'web3-core';
import type { AudiusLibs } from '../../AudiusLibs';
import { ContractMethod, Nullable } from '../../utils';
import { AudiusABIDecoder } from '../ABIDecoder';
import type { DiscoveryProvider } from '../discoveryProvider';
import type { IdentityService } from '../identity';
import type { Web3Config } from './Web3Config';
import { XMLHttpRequest } from './XMLHttpRequest';
export declare type Web3ManagerConfig = {
    web3Config: Web3Config;
    identityService: Nullable<IdentityService>;
    hedgehog: Nullable<Hedgehog>;
    isServer?: boolean;
};
/** singleton class to be instantiated and persisted with every AudiusLibs */
export declare class Web3Manager {
    web3Config: Web3Config;
    isServer: boolean;
    identityService: Nullable<IdentityService>;
    hedgehog: Nullable<Hedgehog>;
    AudiusABIDecoder: typeof AudiusABIDecoder;
    web3: Web3Type | undefined;
    useExternalWeb3: boolean | undefined;
    ownerWallet?: EthereumWallet;
    userSuppliedHandle?: string;
    discoveryProvider: Nullable<DiscoveryProvider>;
    XMLHttpRequest: Nullable<XMLHttpRequest>;
    constructor({ web3Config, identityService, hedgehog, isServer }: Web3ManagerConfig);
    init(): Promise<void>;
    getWeb3(): Web3Type;
    setWeb3(web3: Web3Type): void;
    setDiscoveryProvider(discoveryProvider: DiscoveryProvider): void;
    useDiscoveryRelay(): boolean;
    getWalletAddress(): any;
    setOwnerWallet(ownerWallet: EthereumWallet): void;
    web3IsExternal(): boolean | undefined;
    setUserSuppliedHandle(handle: string): void;
    getOwnerWalletPrivateKey(): Buffer | undefined;
    /**
     * Signs provided string data (should be timestamped).
     * @param data
     */
    sign(data: string | Buffer): Promise<string | undefined>;
    /**
     * Given a data payload and signature, verifies that signature is valid, and returns
     * Ethereum wallet address used to sign data.
     * @param data information that was signed
     * @param signature hex-formatted signature of data generated by web3 personalSign method
     */
    verifySignature(data: string, signature: string): Promise<string>;
    signTypedData(signatureData: EIP712TypedData): Promise<unknown>;
    sendTransaction(contractMethod: ContractMethod, contractRegistryKey?: string | null, contractAddress?: string | null, txRetries?: number, txGasLimit?: number, nethermindContractAddress?: string | null, nethermindContractMethod?: ContractMethod): Promise<TransactionReceipt>;
    parseLogs(response: {
        receipt: TransactionReceipt;
    } | undefined, contractRegistryKey: string): TransactionReceipt;
    provider(url: string, timeout: number): HttpProvider;
    monkeyPatchProvider(httpProvider: HttpProvider): HttpProvider;
}
declare global {
    interface Window {
        audiusLibs: AudiusLibs;
    }
}
