Skip to content
Library for reading/writing credentials
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Library for reading/writing credentials


verify(identity, options, callback)

Verifies digital signature on identity object and any credentials it contains. The call takes the following arguments:

  • identity (required object) - the idenity to check
  • the identity object is defined here:
  • options (object)
  • checkTimestamp (boolean) - check signature timestamp (default: true) on the main Identity credential.
  • maxTimestampDelta (int) - signature must be created within a window of this many seconds (default: 15 minutes).
  • documentLoader(url, callback(err, remoteDoc)) (function) - the document loader.
  • callback(err, result) (function) - the callback receives the following object:
  verified: <true/false>,
  identity: <framed identity>,
  domain: <domain the signature was signed for>,
  publicKey: <public key object for the creator of the signature>,
  publicKeyOwner: <identity object for the creator of the signature>,
  // a map of verified objects for each credential (ID => verified)
  credentials: {}

send(options, callback)

Sends credentials to a URL using http-signatures for authentication. The call takes the following arguments:

  • options (required object)
  • url (required string) - the url to send the credential to
  • credential (required object) - the credential that is sent to the url
  • the credential object is defined here:
  • privateKeyPem (required string)
  • publickKeyId (required string)
You can’t perform that action at this time.