Module: lib/protocol/retrieve

Module for Whiteflag message retrieval from datastores and blockchains

Source:
Tutorials:

Methods

(inner) getAuthMessages(originatorAddress, blockchain, callback)

Retrieves authentication messages for a specific blockchain address from database or blockchain

Parameters:
Name Type Description
originatorAddress string

the originator address of the authentication message

blockchain string

the blockchain on which the transaction is stored

callback function

function called upon completion

Source:
To Do:
  • Remove semantic refs and superseded messages from sequence

(inner) getMessage(transactionHash, blockchain, callback)

Retrieves a message from database or blockchain

Parameters:
Name Type Description
transactionHash string

the hash of the transaction to look up

blockchain string

the blockchain on which the transaction is stored

callback function

function passed to retrieve function to be called upon completion

Source:

(inner) getQuery(wfQuery, callback)

Retrieves a message from database or blockchain

Parameters:
Name Type Description
wfQuery Object

the query to be performed

callback function

function passed to retrieve function to be called upon completion

Source:

(inner) getReferences(transactionHash, blockchain, callback)

Retrieves referencing messages from database or blockchain

Parameters:
Name Type Description
transactionHash string

the transaction hash of the referenced message

blockchain string

the blockchain on which the transaction is stored

callback function

function passed to retrieve function to be called upon completion

Source:

(inner) getSequence(transactionHash, blockchain, callback)

Retrieves and evaluates message sequence starting with the message identified by the transaction hash

Parameters:
Name Type Description
transactionHash string

the hash of the transaction to look up

blockchain string

the blockchain on which the transaction is stored

callback function

function called upon completion

Source:
To Do:
  • Clean up retrieved sequence