Module: lib/blockchains

Module with the blockchain abstraction layer to connect with multiple blockchains

Source:
Tutorials:

Methods

(inner) checkMessageConfirmation(message)

Checks the message conformation against current block height

Parameters:
Name Type Description
message Object

the message data on the confirmation queue

Source:

(inner) getMessage(wfQuery, callback)

Performs a simple query to find a message by transaction hash

Parameters:
Name Type Description
wfQuery Object

the property of the transaction to look up

callback function

function to be called upon completion

Source:

(inner) removeMessageConfirmation(message)

Removes the message from the confirmation queue

Parameters:
Name Type Description
message Object

the message data on the confirmation queue

Source:

(inner) reportNotActive(callback, blockchainName)

Calls callback with generic blockchain not active error message

Parameters:
Name Type Description
callback func

Callback function to be called

blockchainName string

the name of the inactive blockchain

Source:

(inner) sendMessage(wfMessage, callback)

Sends an encoded message to the blockchain defined in the metaheader

Parameters:
Name Type Description
wfMessage wfMessage

the Whiteflag message to be sent on the blockchain

callback function

function to be called upon completion

Source:

Type Definitions

binaryAddress

Requests a blockchain address in binary encoded form

Type:
  • Buffer
Source:

blockchains

Initialises configured blockchains

Type:
  • Array
Source:

blockNumber

Transfers value from one blockchain address to an other address

Type:
  • string
Source:

originatorKeys

Requests the address and correctly encoded pubic key for an originator

Type:
  • Object
Source:

result(blockchain, privateKey, callback)

Creates blockchain account

Parameters:
Name Type Description
blockchain string

the blockchain for which account needs to be created

privateKey string

hexadecimal encoded private key

callback blockchainCreateAccountCb

function to be called upon completion

Source:

result(account, address, blockchain, callback)

Updates blockchain account

Parameters:
Name Type Description
account Object

the blockchain account to be updated

address string

the address of the account to be updated

blockchain string

the blockchain for which the account needs to be updated

callback blockchainCreateAccountCb

function to be called upon completion

Source:

result(address, blockchain, callback)

Deletes blockchain account

Parameters:
Name Type Description
address string

the blockchain account address

blockchain string

the blockchain for which the account needs to be deleted

callback blockchainDeleteAccountCb

function to be called upon completion

Source:

wfSignature

Requests a Whiteflag signature for a specific blockchain address

Type:
  • Object
Source: