evm-blockchain-tools
Version:
This is a collection of resuseable tools to support development for EVM-powered blockchains
28 lines (27 loc) • 1.21 kB
TypeScript
/// <reference types="node" />
import { ethers, Signer, Wallet } from "ethers";
import Web3 from "web3";
import { BscGatewayConfig, IWeb3Gateway } from "../common/interfaces";
import { APP_NETWORK, NETWORK_IDS } from "../common/constants";
export declare class BscGateway implements IWeb3Gateway {
protected config: BscGatewayConfig;
protected web3: Web3;
protected keepAliveInterval: NodeJS.Timeout;
protected logger: import("pino").Logger<never>;
provider: ethers.providers.JsonRpcProvider;
wallet: Wallet;
network: APP_NETWORK;
protected get networkName(): APP_NETWORK.BINANCE | APP_NETWORK.BINANCE_TESTNET;
protected get chainId(): NETWORK_IDS.BINANCE | NETWORK_IDS.BINANCE_TESTNET;
constructor(config: BscGatewayConfig);
protected checkConnection(): Promise<void>;
connect(): void;
get signer(): Promise<Signer>;
getGasPrice(): Promise<string>;
isValidTxFormat(txHash: string): boolean;
getBlock(blockNumber: number): Promise<any>;
recoverSigner(message: string, signedMessage: string): Promise<string>;
getCurrentBlock(): Promise<number>;
getSignerAddress(): Promise<string>;
getTransactionByID(txID: string): Promise<any>;
}