MIRACL Trust DVS Web Plugin

# DVS

# Parameters

  • options Object

    • options.userId string ID of the currently logged in user
    • options.server string Server address
    • options.clientId string Client ID for the registered platform application
    • options.redirectURI string Redirect URI for the registered platform application
    • options.pinPolicy string Whether to use the same PIN as for authentication
    • options.documentTpl string Template for displaying the document to be signed. Has access to the properties of the object returned by parseDocument
    • options.parseDocument function Prepare document data for the document template
    • options.defaultPinMessage string Default message for the PIN input
    • options.showCloseButton boolean Will display a close button in the top right corner of the modal overlay if set to true
    • options.showCancelButton boolean Will display a cancel button in the PIN pad if set to true

# init

Initialize and set up communication for signing

# Parameters

  • successCb function () Called after successful initialization
  • errorCb function (Error) Called if an error occurs

# sign

Sign a document

# Parameters

  • documentData Object

  • successCb function (Signature) Called after successful signature creation

  • errorCb function (Error) Called if an error occurs

# hasIdentity

Check if there is an identity for the user ID

# Parameters

  • successCb function (Object) Called if there already is an identity
  • errorCb function (Error) Called if there isn’t a created identity

# createIdentity

Create a signing identity

# Parameters

  • successCb function (Object) Called after successful creation of the identity
  • errorCb function (Error) Called if an error occurs

# deleteIdentity

Delete the current signing identity

# Parameters

  • successCb function (Object) Called after successful deletion of the identity
  • errorCb function (Error) Called if an error occurs

# Signature

Type: Object

# Properties

  • Hash string Hash of the signed document
  • MpinId string M-Pin ID used to generate the signature
  • U string The random commitment generated by the user
  • V string The proof of the signature
  • PublicKey string User’s public key used in the key-escrowless scheme