API Reference
Last updated
Last updated
CreatesAuthRequest
to get the authentication challenge message.
Creates a message for the user to sign with the wallet.
Convert the message to a JSON string before signing.
Gets the challenge in the form of a QR code with AuthChallenge
.
Promise<QrResult>
, including the following properties:
queryQRResult
Fetches the result of a user scanning the QR code.
The query loops until a result or an error is returned. To stop the query, call cancelQueryQRResult
.
Stops querying the result of a QR code scan.
None
void
Parameter
Type
Description
action
enum
IdAuth: = 0 IdAuthAndVcAuth: = 1
Parameter
Type
Description
AuthChallenge
AuthChallenge
See details here.
account
string
DID of the signer (user).
Property
Type
Description
id
string
QR code ID.
text
string
Text for generating the QR code.
Property
Type
Description
Required
id
string
QR code ID.
Yes
duration
number
Time interval between two queries, in milliseconds. Default: 1000
No
Member
Value
VersionNotSupport
ERR_WRONG_VERSION
TypeNotSupport
ERR_TYPE_NOT_SUPPORTED
ActionNotSupport
ERR_ACTION_NOT_SUPPORTED
UserCanceled
USER_CANCELED
UnknownError
ERR_UNDEFINED