Class

Web3Connection

Web3Connection(options)

Constructor

# new Web3Connection(options)

Web3Connection Object

Parameters:
Name Type Description
options Web3Connection~Options

View Source Web3Connection.js, line 33

Methods

# async getAddress() → {Promise.<string>}

Get Address connected via login()

View Source Web3Connection.js, line 144

Address in Use

Promise.<string>

# async getETHBalance() → {Promise.<string>}

Get ETH Balance of Address connected via login()

View Source Web3Connection.js, line 156

ETH Balance

Promise.<string>

# async getETHNetwork() → {Promise.<string>}

Get ETH Network

View Source Web3Connection.js, line 130

Network Name (Ex : Kovan)

Promise.<string>

# async getWeb3() → {Web3}

Get Web3 to access functions as https://ethereum.stackexchange.com/questions/66454/how-to-get-events-emitted-by-a-transaction-with-web3-js

View Source Web3Connection.js, line 166

Web3

Web3

# async login() → {Promise.<boolean>}

Login with Metamask/Web3 Wallet - substitutes start()

View Source Web3Connection.js, line 104

Promise.<boolean>

# start()

Connect to Web3 injected in the constructor

View Source Web3Connection.js, line 69

Please Use an Ethereum Enabled Browser like Metamask or Coinbase Wallet

Error

Type Definitions

Object

# Optional

Properties:
Name Type Description
web3Connection string

Web3 Connection String (Ex : https://data-seed-prebsc-1-s1.binance.org:8545)

privateKey string

Private key (0x....) used for server side use

View Source Web3Connection.js, line 20

Object

# Options

Properties:
Name Type Attributes Default Description
test boolean <optional>
false

Automated Tests

localtest boolean <optional>
false

Ganache Local Blockchain

opt Web3Connection~Optional <optional>

Optional Chain Connection Object (Default ETH)

View Source Web3Connection.js, line 26