Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Web3KeyWriteProvider Abstract

Hierarchy

Index

Constructors

Properties

_currentAccount: null | string = null
_currentChain: number = 0
accounts: string[] = []
provider: provider = null
walletMeta: undefined | IWalletMeta
web3: null | default = null

Accessors

  • get currentAccount(): string
  • set currentAccount(addr: null | string): void
  • get currentChain(): number
  • set currentChain(chainId: number): void

Methods

  • addTokenToWallet(__namedParameters: ITokenInfo): Promise<boolean>
  • connect(): Promise<void>
  • createContract(abi: any, address: string): Contract
  • disconnect(): void
  • executeBatchCalls<T>(calls: TWeb3Call<T>[]): Promise<T[]>
  • getBlockNumber(): Promise<number>
  • getContractMethodFee(methodEstimateGas: number): Promise<BigNumber>
  • getErc20Balance(contract: Contract, address: string): Promise<BigNumber>
  • getFormattedBalance(balance: Value, decimals: Value): BigNumber
  • getSafeGasPriceWei(): Promise<BigNumber>
  • getTokenBalance(contract: Contract, address: string): Promise<BigNumber>
  • getUnlockedAccounts(web3: default): Promise<string[]>
  • getWalletMeta(): IWalletMeta
  • getWeb3(): default
  • inject(): Promise<void>
  • isConnected(): boolean
  • sendTransactionAsync(from: string, to: string, sendOptions: { data?: string; estimate?: boolean; extendedGasLimit?: number; gasLimit?: string; nonce?: number; value?: string }): Promise<IWeb3SendResult>
  • Parameters

    • from: string
    • to: string
    • sendOptions: { data?: string; estimate?: boolean; extendedGasLimit?: number; gasLimit?: string; nonce?: number; value?: string }
      • Optional data?: string
      • Optional estimate?: boolean
      • Optional extendedGasLimit?: number
      • Optional gasLimit?: string
      • Optional nonce?: number
      • Optional value?: string

    Returns Promise<IWeb3SendResult>

  • setWalletMeta(): void
  • switchNetwork(chainId: number): Promise<any>
  • watchAsset(config: { address: string; decimals?: number; image?: string; symbol: string; type: "ERC20" }): Promise<void>
  • isInjected(): boolean

Generated using TypeDoc