Skip to content

04. Issue API

Lukas.J.Han edited this page Dec 15, 2023 · 1 revision

Overview

const encodedSdjwt = await sdjwt.issue(claims, privateKey, disclosureFrame, options);

Parameters

  • claims: the payload of SD JWT [Object]
  • privateKey: private key to sign SD JWT [Uint8Array | KeyLike]
  • disclosureFrame: to define which properties should be selectively diclosable (optional, if not provided, there is no disclosure)
  • options: (optional)
options?: {
  sign_alg?: string; // sign algorithm
  hash_alg?: string; // hash algorithm
  kb?: {
    alg: string; // sign algorithm to key binding JWT 
    payload: kbPayload; // key binding payload
    privateKey: Uint8Array | KeyLike; // private key to sign key binding  JWT
  };
},

Returns

encoded SDJWT string

Default algorithm

  • sign_alg: EdDSA
  • hash_alg: sha-256

Supported algorithm

Sign

Hash

Clone this wiki locally