-
Notifications
You must be signed in to change notification settings - Fork 13
09. Encode & Decode
Lukas.J.Han edited this page Dec 15, 2023
·
1 revision
You can decode SD JWT encoded credential to SDJwt Object.
import sdjwt from '@hopae/sd-jwt';
// decoded variable is SDJwt Object
const decoded = sdjwt.decode(encodedSdjwt);
// You can access inside of SDJwt object
console.log(decoded.jwt, decoded.disclosures);
You can encode SD JWT object instance to encoded credential
import sdjwt from '@hopae/sd-jwt';
// encode SDJwt object to string
const encodedSdjwt = sdjwt.encode(decoded);