verifyCredential

Verify a credential against a CKB address.

Types

function verifyCredential (  pubkey: string,  address: string,  keyType: 'main_key' | 'sub_key' | 'main_session_key' | 'sub_session_key',  alg: number): Promise<boolean>

Example

import { authWithPopup, verifyCredential } from '@joyid/core'const authRes = await authWithPopup(request)if (authRes.error == null) {  const { keyType, address, pubkey, alg } = authRes.data  const result = await verifyCredential(pubkey, address, keyType, alg)  alert(result) // true or false}

Details

Table of Contents