2.0.0 • Published 2 years ago

@verixyz/selective-disclosure v2.0.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

verixyz selective disclosure plugin

This package provides a verixyz plugin that can create and receive selective disclosure requests.

Classes

SdrMessageHandler

(BETA) A Veramo message handler plugin that can decode an incoming Selective Disclosure Response into the internal Message representation.

SelectiveDisclosure

(BETA) This class adds support for creating Selective Disclosure requests and interpret the responses received. This implementation of the uPort protocol uses W3C Presentation as the response encoding instead of a shareReq.

Interfaces

ICreateProfileCredentialsArgs

(BETA) Profile data

Properties

  • holder: string (BETA) Holder DID
  • name: string (BETA) Optional. Name
  • picture: string (BETA) Optional. Picture URL
  • save: boolean (BETA) Save presentation
  • send: boolean (BETA) Send presentation
  • url: string (BETA) Optional. URL
  • verifier: string (BETA) Optional. Verifier DID

ICreateSelectiveDisclosureRequestArgs

(BETA) Contains the parameters of a Selective Disclosure Request.

Properties

  • data: ISelectiveDisclosureRequest

ICredentialRequestInput

(BETA) Describes a particular credential that is being requested

Properties

  • claimType: string (BETA) The name of the claim property that the credential should express.
  • claimValue: string (BETA) The value of the claim that the credential should express.
  • credentialContext: string (BETA) The credential context. See W3C Credential Context
  • credentialType: string (BETA) The credential type. See W3C Credential Types
  • essential:boolean (BETA) If it is essential. A response that does not include this credential is not sufficient.
  • issuers: Issuer A list of accepted Issuers for this credential.
  • reason: string (BETA) Motive for requiring this credential.

ICredentialsForSdr

(BETA) The credentials that make up a response of a Selective Disclosure

Properties

  • credentials: UniqueVerifiableCredential

IGetVerifiableCredentialsForSdrArgs

(BETA) Encapsulates the params needed to gather credentials to fulfill a Selective disclosure request.

Properties

  • did: string (BETA) The DID of the subject
  • sdr: Omit<ISelectiveDisclosureRequest , 'issuer'> (BETA) The Selective Disclosure Request (issuer is omitted)

IPresentationValidationResult

(BETA) The result of a selective disclosure response validation.

Properties

  • claims: ICredentialsForSdr
  • valid: boolean (BETA)

ISelectiveDisclosure

(BETA) Describes the interface of a Selective Disclosure plugin.

Methods

  • createProfilePresentation(args, context) (BETA)
  • createSelectiveDisclosureRequest(args, context) (BETA)
  • getVerifiableCredentialsForSdr(args, context)
    (BETA)
  • validatePresentationAgainstSdr(args, context) (BETA)

ISelectiveDisclosureRequest

(BETA) Represents the Selective Disclosure request parameters.

Properties

  • claims: ICredentialRequestInput A list of claims that are being requested
  • credentials: string A list of issuer credentials that the target will use to establish trust
  • issuer: string (BETA) The issuer of the request
  • replyUrl: string (BETA) The URL where the response should be sent back
  • subject: string (BETA) The target of the request -tag: string (BETA)

Issuer

(BETA) Used for requesting Credentials using Selective Disclosure. Represents an accepted issuer of a credential.

Properties

  • did: string (BETA) The DID of the issuer of a requested credential.
  • url: string (BETA) A URL where a credential of that type can be obtained.

IValidatePresentationAgainstSdrArgs

(BETA) A tuple used to verify a Selective Disclosure Response. Encapsulates the response(presentation) and the corresponding request (sdr) that made it.

Properties

  • presentation: VerifiablePresentation (BETA)
  • sdr: ISelectiveDisclosureRequest (BETA)

Variables

MessageTypes

(BETA) Identifies a IMessage that represents a Selective Disclosure Request

schema

MessageTypes

(BETA) Identifies a IMessage that represents a Selective Disclosure Request

schema