The EssentialWeb3 interface provides the minimum set of Web3 functionalities required by the SDK. It allows any web3-like provider to be used, as long as it matches the signature of these essential methods and properties. This prevents tight coupling to a specific version of the web3 library.

interface EssentialWeb3 {
    eth: {
        BatchRequest: new () => any;
        Contract: new (abi: any, address?: string) => any;
        estimateGas: (tx: any) => Promise<any>;
        getBalance: (address: string) => Promise<any>;
        sendTransaction: (tx: any) => Promise<any>;
    };
}

Properties

Properties

eth: {
    BatchRequest: new () => any;
    Contract: new (abi: any, address?: string) => any;
    estimateGas: (tx: any) => Promise<any>;
    getBalance: (address: string) => Promise<any>;
    sendTransaction: (tx: any) => Promise<any>;
}