@atala/prism-wallet-sdk / Exports / Domain / Pollux
Interface: Pollux
Domain.Pollux
Pollux handle Credential related tasks
Implemented by
Table of contents
Properties
Methods
- createPresentationDefinitionRequest
- createPresentationProof
- createPresentationSubmission
- processCredentialOffer
- verifyPresentationSubmission
Properties
isCredentialRevoked
• isCredentialRevoked: (credential
: Credential
) => Promise
<boolean
>
Type declaration
▸ (credential
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
credential | Credential |
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
Name | Type |
---|---|
credentialBuffer | Uint8Array |
options? | Object |
options.type | CredentialType |
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
Name | Type |
---|---|
credential | Credential |
fields | string [] |
linkSecret | string |
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
Name | Type |
---|---|
T | extends CredentialType = JWT |
Parameters
Name | Type |
---|---|
type | T |
claims | PresentationClaims <T > |
options | PresentationOptions |
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
Name | Type | Description |
---|---|---|
presentationRequest | PresentationRequest <AnonCreds , PresentationRequestType > | |
credential | AnonCredsCredential | |
options | Anoncreds | object 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
Name | Type |
---|---|
presentationRequest | PresentationRequest <JWT , JWTJson > |
credential | JWTCredential |
options | JWT |
Returns
Promise
<string
>
Defined in
src/domain/buildingBlocks/Pollux.ts:125
▸ createPresentationProof(presentationRequest
, credential
, options
): Promise
<string
>
Parameters
Name | Type |
---|---|
presentationRequest | PresentationRequest <SDJWT , SDJWTJson > |
credential | SDJWTCredential |
options | SDJWT |
Returns
Promise
<string
>
Defined in
src/domain/buildingBlocks/Pollux.ts:126
▸ createPresentationProof(presentationRequest
, credential
, options?
): Promise
<any
>
Parameters
Name | Type |
---|---|
presentationRequest | PresentationRequest <any , unknown > |
credential | Credential |
options? | Record <string , any > |
Returns
Promise
<any
>
Defined in
src/domain/buildingBlocks/Pollux.ts:127
createPresentationSubmission
▸ createPresentationSubmission(presentationDefinition
, credential
, privateKey
): Promise
<JWTPresentationSubmission
>
Parameters
Name | Type |
---|---|
presentationDefinition | PresentationExchangeDefinitionRequest |
credential | Credential |
privateKey | PrivateKey |
Returns
Promise
<JWTPresentationSubmission
>
Defined in
src/domain/buildingBlocks/Pollux.ts:70
▸ createPresentationSubmission(presentationDefinition
, credential
, privateKey
): Promise
<PresentationType
>
Parameters
Name | Type |
---|---|
presentationDefinition | PresentationRequestType |
credential | Credential |
privateKey | LinkSecret |
Returns
Promise
<PresentationType
>
Defined in
src/domain/buildingBlocks/Pollux.ts:75
processCredentialOffer
▸ processCredentialOffer<Types
>(offer
, options
): Promise
<ProcessedCredentialOfferPayloads
[Types
]>
Type parameters
Name | Type |
---|---|
Types | extends CredentialOfferTypes |
Parameters
Name | Type |
---|---|
offer | CredentialOfferPayloads [Types ] |
options | CredentialRequestOptions |
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
Name | Type | Description |
---|---|---|
presentationSubmission | JWTPresentationSubmission | - |
options? | JWT | object 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
Name | Type |
---|---|
presentationSubmission | PresentationType |
options? | Anoncreds |
Returns
Promise
<boolean
>
Defined in
src/domain/buildingBlocks/Pollux.ts:92
▸ verifyPresentationSubmission(presentationSubmission
, options?
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
presentationSubmission | JWTPresentationSubmission |
options? | JWT | Anoncreds |
Returns
Promise
<boolean
>