On this page
deviceVerify
Verify device
Retrieve cert and signature from the device for a verification challenge. The host must submit them to its verification service; this API does not perform server verification. Reading signature data requires confirmation at the device.
const result = await HardwareSDK.deviceVerify(connectId, params);Params
dataHex- requiredstringNon-empty hex-encoded verification challenge supplied by your verification flow.
Example
// Obtain a fresh challenge from your verification flow.
declare const challengeHex: string;
const result = await HardwareSDK.deviceVerify(connectId, {
dataHex: challengeHex
});
if (!result.success) throw new Error(result.payload.error);
// Submit the result to the verification service and check its verdict.Result
{
success: true,
payload: {
cert: string
signature: string
}
}Error
{
success: false,
payload: {
error: string, // error message
code?: string | number // error code
}
}Last updated on