Global

Members

(constant) deriveAuthenticationPrivateKey

Derives and returns the private key from a pepper and a nonce. The generated private key is used to authenticate in applications. ```js const pepper = derivePepperFromSeed( seed, nonce ); const privateKey = deriveAuthenticationPrivateKey( pepper, applicationId ); ```
Source:

(constant) derivePepperFromSeed

Derives and returns a pepper from a seed and a nonce.
Source:

(constant) deriveUserPrivateKey

Derives and returns the private key from a pepper and a nonce. ```js const pepper = derivePepperFromSeed( seed, nonce ); const privateKey = deriveUserPrivateKey( pepper, applicationId ); ```
Source:

(constant) getMicroBlock

Returns information on the micro-block associated with the provided hash.
Source:

(constant) getMicroChain

Returns information about the micro-chain specified by the provided id.
Source:

(constant) getPublicKey

Derives and returns the public key from the public key.
Source:

(constant) getSection

Returns a section from a block.
Source:

(constant) getWordListFromSeed

Retrieves and returns a world list from a seed.
Source:

(constant) processRecord

Processes a provided flow to extract a record.
Source:

(constant) sign

Returns the signature of the data, signed by the provided private signature key.
Source:

Methods

deriveAesKeyFromPassword(password) → {Promise.<Uint8Array>}

Derives and returns a 256-bits AES key from the provided password.
Parameters:
Name Type Description
password string The password from which the password is derived.
Source:
Returns:
The AES key.
Type
Promise.<Uint8Array>
Example
const password = "myPassword";
const key = await deriveAesKeyFromPassword( password );

generateWordList(nbWords) → {Array.<string>}

Generates and returns a list of words.
Parameters:
Name Type Description
nbWords number The number of words to generate.
Source:
Returns:
A list containing the generated words, with a size of nbWords.
Type
Array.<string>

getSeedFromWordList(words) → {Uint8Array}

Derives and returns a seed from a list of words.
Parameters:
Name Type Description
words Array.<string> The words from which the seed is derived.
Source:
Returns:
The seed.
Type
Uint8Array

loadPublicDataFromMicroBlock(applicationId, flowId, nonce) → {Promise.<{valid: boolean, msg: any, appDef: object}>}

Returns a promise returning a public data the micro block at position `nonce` in the micro-chain having flowId identifier based in the application and associated with the applicationId.
Parameters:
Name Type Description
applicationId The id of the application containing the designated micro-block.
flowId The id of the flow containing the designated micro-block.
nonce The position of the designated micro-block (should start at 1).
Source:
Returns:
Type
Promise.<{valid: boolean, msg: any, appDef: object}>