API Reference
Last updated
Last updated
Name
Type
Description
url_of_get_challenge
string
URL of server API to get challenge, see details below
url_of_submit_response
string
URL of server API to submit response, see details below
show_vc_list
string
'true'|'false'. Show a list of VC in the dialog if exists
test
string
'true' | 'false'. Add a button to mock the successful scan result (test only)
action
string
'0' | '1'. "0" = authentication; "1" = authentication and authorization. More details here.
Content Type
Format
Example
application/json
{"ver":"1.0","type":"ClientHello","action":0}
Content Type
Format
Example
application/json
{"ver":"1.0","type":"ServerHello","nonce":"8125419d-0ba4-11ec-a4f0-441ca8e37c61","server":{"name":"testServcer","icon":"http://somepic.jpg","url":"https://ont.io","did":"did:ont:sampletest"},"chain":["ONT"],"alg":["ES256"],"VCFilters":[{"type":"EmailCredential","trust_roots":["did:ont:testdid"],"required":true}]}
Content Type
Format
Example
application/json
{"ver":"1.0","type":"ClientResponse","nonce":"221b111a-0ba5-11ec-a4f0-441ca8e37c61","did":"did:ont:AR9NDnK3iMSZodbENnt7eX5TJ2s27fnHra","proof":{"type":"Ed25519","verificationMethod":"did:ont:AR9NDnK3iMSZodbENnt7eX5TJ2s27fnHra#key-1","created":1630556445,"value":"01c3841e922884df9288dde3c1fecbb575482c834560781454c44192b54140d3a7413d116fe81b76e3e74f88e2eb1351c120854d47189241545f66d7702cab8523"},"VPs":[]}
Name
Type
Description
success
CustomEvent
Callback submitted successfully, with response tourl_of_submit_response
in e.detail
error
CustomEvent
Error callback.
cancel
CustomEvent
Callback cancelled by user.