DVS
Constructor Parameters
options
Objectoptions.userId
string ID of the currently logged in useroptions.server
string Server addressoptions.clientId
string Client ID for the registered platform applicationoptions.redirectURI
string Redirect URI for the registered platform applicationoptions.pinPolicy
string Whether to use the same PIN as for authenticationoptions.documentTpl
string Template for displaying the document to be signed. Has access to the properties of the object returned by parseDocumentoptions.parseDocument
function Prepare document data for the document templateoptions.defaultPinMessage
string Default message for the PIN input
init
Initialize and set up communication for signing
Parameters
callback
function () Called after initialization
sign
Sign a document
Parameters
documentData
ObjectdocumentData.doc
stringdocumentData.hash
stringdocumentData.timestamp
string
successCb
function (Signature) Called after successful signature creationerrorCb
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 identityerrorCb
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 identityerrorCb
function (Error) Called if an error occurs
deleteIdentity
Delete the current signing identity
Parameters
successCb
function (Object) Called after successful deletion of the identityerrorCb
function (Error) Called if an error occurs
Signature
Type: Object
Properties
Hash
string Hash of the signed documentMpinId
string M-Pin ID used to generate the signatureU
string The random commitment generated by the userV
string The proof of the signaturePublicKey
string User’s public key used in the key-escrowless scheme