Skip to main content

SDJWT

@hyperledger/identus-sdk v8.1.3


@hyperledger/identus-sdk / overview / SDJWT

Class: SDJWT

Defined in: packages/lib/sdk/src/pollux/utils/jwt/SDJWT.ts:32

Extends​

  • Runner

Constructors​

Constructor​

new SDJWT(): SDJWT

Returns​

SDJWT

Inherited from​

Task.Runner.constructor

Methods​

clone()​

clone(): SDJWT

Defined in: packages/lib/sdk/src/pollux/utils/jwt/SDJWT.ts:33

Returns​

SDJWT

Overrides​

Task.Runner.clone


createPresentationFor()​

createPresentationFor<T>(options: { jws: string; kb?: KBOptions; presentationFrame?: PFrame<T>; privateKey: PrivateKey; }): Promise<string>

Defined in: packages/lib/sdk/src/pollux/utils/jwt/SDJWT.ts:125

Type Parameters​

Type Parameter
T extends SdJwtVcPayload

Parameters​

ParameterType
options{ jws: string; kb?: KBOptions; presentationFrame?: PFrame<T>; privateKey: PrivateKey; }
options.jwsstring
options.kb?KBOptions
options.presentationFrame?PFrame<T>
options.privateKeyPrivateKey

Returns​

Promise<string>


decode()​

decode(jws: string): DecodedSDJwt

Defined in: packages/lib/sdk/src/pollux/utils/jwt/SDJWT.ts:37

Parameters​

ParameterType
jwsstring

Returns​

DecodedSDJwt


getPKConfig()​

getPKConfig(publicKey: PublicKey): SDJWTVCConfig

Defined in: packages/lib/sdk/src/pollux/utils/jwt/SDJWT.ts:150

Parameters​

ParameterType
publicKeyPublicKey

Returns​

SDJWTVCConfig


getSKConfig()​

getSKConfig(privateKey: PrivateKey): SDJWTVCConfig

Defined in: packages/lib/sdk/src/pollux/utils/jwt/SDJWT.ts:184

Parameters​

ParameterType
privateKeyPrivateKey

Returns​

SDJWTVCConfig


reveal()​

reveal(disclosedPayload: Record<string, unknown>, disclosures: Disclosure<unknown>[]): Promise<unknown>

Defined in: packages/lib/sdk/src/pollux/utils/jwt/SDJWT.ts:139

Parameters​

ParameterType
disclosedPayloadRecord<string, unknown>
disclosuresDisclosure<unknown>[]

Returns​

Promise<unknown>


sign()​

sign<E>(options: { disclosureFrame: DisclosureFrame<E>; issuerDID: DID; kid?: string; payload: E; privateKey?: PrivateKey; purpose?: "ISSUING_KEY" | "AUTHENTICATION_KEY"; }): Promise<string>

Defined in: packages/lib/sdk/src/pollux/utils/jwt/SDJWT.ts:41

Type Parameters​

Type Parameter
E extends SdJwtVcPayload

Parameters​

ParameterType
options{ disclosureFrame: DisclosureFrame<E>; issuerDID: DID; kid?: string; payload: E; privateKey?: PrivateKey; purpose?: "ISSUING_KEY" | "AUTHENTICATION_KEY"; }
options.disclosureFrameDisclosureFrame<E>
options.issuerDIDDID
options.kid?string
options.payloadE
options.privateKey?PrivateKey
options.purpose?"ISSUING_KEY" | "AUTHENTICATION_KEY"

Returns​

Promise<string>


verify()​

verify(options: { issuerDID: DID; jws: string; requiredClaimKeys?: string[]; requiredKeyBindings?: boolean; }): Promise<boolean>

Defined in: packages/lib/sdk/src/pollux/utils/jwt/SDJWT.ts:59

Parameters​

ParameterType
options{ issuerDID: DID; jws: string; requiredClaimKeys?: string[]; requiredKeyBindings?: boolean; }
options.issuerDIDDID
options.jwsstring
options.requiredClaimKeys?string[]
options.requiredKeyBindings?boolean

Returns​

Promise<boolean>


withContext()​

withContext(ctx: ContextProxy): Runner

Defined in: packages/lib/sdk/src/utils/tasks.ts:108

Parameters​

ParameterType
ctxContextProxy

Returns​

Runner

Inherited from​

Task.Runner.withContext