Skip to main content

@atala/prism-wallet-sdk / Exports / Domain / Pollux

Interface: Pollux

Domain.Pollux

Pollux handle Credential related tasks

Implemented by

Table of contents

Properties

Methods

Properties

isCredentialRevoked

isCredentialRevoked: (credential: Credential) => Promise<boolean>

Type declaration

▸ (credential): Promise<boolean>

Parameters
NameType
credentialCredential
Returns

Promise<boolean>

Defined in

src/domain/buildingBlocks/Pollux.ts:56


parseCredential

parseCredential: (credentialBuffer: Uint8Array, options?: { [name: string]: any; type: CredentialType }) => Promise<Credential>

Type declaration

▸ (credentialBuffer, options?): Promise<Credential>

Parameters
NameType
credentialBufferUint8Array
options?Object
options.typeCredentialType
Returns

Promise<Credential>

Defined in

src/domain/buildingBlocks/Pollux.ts:58


revealCredentialFields

revealCredentialFields: (credential: Credential, fields: string[], linkSecret: string) => Promise<{ [name: string]: any; }>

Type declaration

▸ (credential, fields, linkSecret): Promise<{ [name: string]: any; }>

Parameters
NameType
credentialCredential
fieldsstring[]
linkSecretstring
Returns

Promise<{ [name: string]: any; }>

Defined in

src/domain/buildingBlocks/Pollux.ts:52

Methods

createPresentationDefinitionRequest

createPresentationDefinitionRequest<T>(type, claims, options): Promise<PresentationDefinitionRequest<T>>

Creates a PresentationDefinitionRequest object for oob Verifications

Type parameters

NameType
Textends CredentialType = JWT

Parameters

NameType
typeT
claimsPresentationClaims<T>
optionsPresentationOptions

Returns

Promise<PresentationDefinitionRequest<T>>

Defined in

src/domain/buildingBlocks/Pollux.ts:107


createPresentationProof

createPresentationProof(presentationRequest, credential, options): Promise<string>

Process a PresentationRequest with Credential to create a Presentation.

Parameters

NameTypeDescription
presentationRequestPresentationRequest<AnonCreds, PresentationRequestType>
credentialAnonCredsCredential
optionsAnoncredsobject containing necessary metadata

Returns

Promise<string>

dependent on the CredentialType

Throws

Defined in

src/domain/buildingBlocks/Pollux.ts:124

createPresentationProof(presentationRequest, credential, options): Promise<string>

Parameters

NameType
presentationRequestPresentationRequest<JWT, JWTJson>
credentialJWTCredential
optionsJWT

Returns

Promise<string>

Defined in

src/domain/buildingBlocks/Pollux.ts:125

createPresentationProof(presentationRequest, credential, options): Promise<string>

Parameters

NameType
presentationRequestPresentationRequest<SDJWT, SDJWTJson>
credentialSDJWTCredential
optionsSDJWT

Returns

Promise<string>

Defined in

src/domain/buildingBlocks/Pollux.ts:126

createPresentationProof(presentationRequest, credential, options?): Promise<any>

Parameters

NameType
presentationRequestPresentationRequest<any, unknown>
credentialCredential
options?Record<string, any>

Returns

Promise<any>

Defined in

src/domain/buildingBlocks/Pollux.ts:127


createPresentationSubmission

createPresentationSubmission(presentationDefinition, credential, privateKey): Promise<JWTPresentationSubmission>

Parameters

NameType
presentationDefinitionPresentationExchangeDefinitionRequest
credentialCredential
privateKeyPrivateKey

Returns

Promise<JWTPresentationSubmission>

Defined in

src/domain/buildingBlocks/Pollux.ts:70

createPresentationSubmission(presentationDefinition, credential, privateKey): Promise<PresentationType>

Parameters

NameType
presentationDefinitionPresentationRequestType
credentialCredential
privateKeyLinkSecret

Returns

Promise<PresentationType>

Defined in

src/domain/buildingBlocks/Pollux.ts:75


processCredentialOffer

processCredentialOffer<Types>(offer, options): Promise<ProcessedCredentialOfferPayloads[Types]>

Type parameters

NameType
Typesextends CredentialOfferTypes

Parameters

NameType
offerCredentialOfferPayloads[Types]
optionsCredentialRequestOptions

Returns

Promise<ProcessedCredentialOfferPayloads[Types]>

Defined in

src/domain/buildingBlocks/Pollux.ts:63


verifyPresentationSubmission

verifyPresentationSubmission(presentationSubmission, options?): Promise<boolean>

Process a PresentationSubmission, resolve the issuer did and verify the credential and the holder signature

Parameters

NameTypeDescription
presentationSubmissionJWTPresentationSubmission-
options?JWTobject containing necessary metadata

Returns

Promise<boolean>

true if the submission is valid or false if it is not

Defined in

src/domain/buildingBlocks/Pollux.ts:88

verifyPresentationSubmission(presentationSubmission, options?): Promise<boolean>

Parameters

NameType
presentationSubmissionPresentationType
options?Anoncreds

Returns

Promise<boolean>

Defined in

src/domain/buildingBlocks/Pollux.ts:92

verifyPresentationSubmission(presentationSubmission, options?): Promise<boolean>

Parameters

NameType
presentationSubmissionJWTPresentationSubmission
options?JWT | Anoncreds

Returns

Promise<boolean>

Defined in

src/domain/buildingBlocks/Pollux.ts:96