Utils

Utility functions.

utils.createChallenge()

Generates a CSPRNG-compliant challenge for use in account ownership proofs

Returns:Buffer The challenge
utils.verifyAccountProof(accountProof)

Verifies an account signature against the provided public key and challenge

Returns:Boolean Whether the signature is valid
Arguments
Name Type Required Description
accountProof object Yes The account ownership proof structure
utils.verifyAccountProof(accountProof)

Verifies an account signature against the provided public key and challenge

Returns:Boolean Whether the signature is valid
Arguments
Name Type Required Description
accountProof object Yes The account ownership proof structure