meterify.module.options
A module provides several options for configuring the transaction confirmation workflow or for defining default values. This document describes the available option properties on a module.
Example:
defaultBlock
The default block is used for all methods which have a block parameter. You can override it by passing the block parameter if a block is required.
The defaultBlock
property can return the following values:
Value | Type | Description |
a number |
| A block number |
|
| The genesis block |
|
| The latest block (current head of the blockchain) |
|
| The currently mined block (including pending transactions) |
Default is latest
defaultAccount
This default address is used as the default "from"
property, if no "from"
property is specified.
Returns:
Type | Description |
| Any Ethereum address. You need to have the private key for that address in your node or keystore. (Default is |
defaultGasPrice
The default gas price which will be used for a request.
Returns:
Type | Description |
| The current value of the defaultGasPrice property. |
defaultGas
The default gas which will be used for a request.
Returns:
Type | Description |
| The current value of the defaultGas property. |
transactionBlockTimeout
The transactionBlockTimeout
will be used over a socket-based connection. This option does define the amount of new blocks it should wait until the first confirmation happens. This means the PromiEvent rejects with a timeout error when the timeout got exceeded.
Returns:
Type | Description |
| The current value of transactionBlockTimeout |
transactionConfirmationBlocks
This defines the number of blocks it requires until a transaction will be handled as confirmed.
Returns:
Type | Description |
| The current value of transactionConfirmationBlocks |
transactionPollingTimeout
The transactionPollingTimeout
will be used over a HTTP connection. This option does define the amount of polls (each second) it should wait until the first confirmation happens.
Returns:
Type | Description |
| The current value of transactionPollingTimeout |
transactionSigner
The TransactionSigner
property does provide us the possibility to customize the signing process of the Eth
module and the related sub-modules.
The interface of a TransactionSigner
:
Returns:
Type | Description |
| A JavaScript class of type TransactionSigner. |
setProvider
Will change the provider for its module.
Example:
Note: When called on the umbrella package web3
it will also set the provider for all sub modules web3.eth
, web3.shh
, etc.
Parameters:
Type | Description |
|
|
|
|
Returns:
Boolean
providers
Example:
Contains the current available providers.
Object
with the following providers:
Property | Name | Description |
|
| The HTTP provider is deprecated, as it will not work for subscriptions. |
|
| The Websocket provider is the standard for usage in legacy browsers. |
|
| The IPC provider is used node dapps when running a local node. Gives the most secure connection. |
givenProvider
Example:
When using web3.js in an Ethereum compatible browser, it will set with the current native provider by that browser. Will return the given provider by the (browser) environment, otherwise null
.
Returns:
Type | Description |
| The given provider set or |
currentProvider
Will return the current provider.
Example:
Returns:
Type | Description |
| The current provider set. |
BatchRequest
Example:
Class to create and execute batch requests.
Parameters:
none
Returns:
Type | Description |
| Contains the following methods: |
Method | Description |
| To add a request object to the batch call. |
| Will execute the batch request. |
Last updated