Module: lib/blockchains/ethereum/accounts

Module for managing Ethereum accounts for Whiteflag

Source:

Methods

(inner) createAccount(privateKeyopt) → {Promise}

Creates a new Ethereum blockchain account

Parameters:
Name Type Attributes Description
privateKey string <optional>

hexadecimal string with private key (without 0x prefix)

Source:
Returns:

resolves to newly created account

Type
Promise

(inner) deleteAccount(address) → {Promise}

Deletes Ethereum blockchain account

Parameters:
Name Type Description
address string

the address of the account to be deleted

Source:
Returns:

resolves to updated account

Type
Promise

(inner) getAccount(address) → {Promise}

Gets Ethereum account from the blockchain state by address

Parameters:
Name Type Description
address string

the account address

Source:
Returns:

resolves to the requested account

Type
Promise

(inner) initAccounts(ethConfig, ethState, ethApi) → {Promise}

Initialises Ethereum accounts management

Parameters:
Name Type Description
ethConfig Object

the Ethereum blockchain configuration

ethState Object

the Ethereum blockchain state

ethApi Object

the Ethereum Web3 API instance

Source:
Returns:

resolves if succesfully initialised

Type
Promise

(inner) updateAccount(account) → {Promise}

Updates Ethereum blockchain account attributes

Parameters:
Name Type Description
account wfAccount

the account information including address to be updated

Source:
Returns:

resolves to updated account

Type
Promise