Skip to main content

SelectiveDisclosure class

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Warning: This API is now obsolete.

This plugin is deprecated as it implements a non-standard protocol created for the uPort project. It will be removed in a future release.

This class adds support for creating uPort 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.

This API may change without a BREAKING CHANGE notice.

Signature:

export declare class SelectiveDisclosure implements IAgentPlugin

Implements: IAgentPlugin

Constructors

ConstructorModifiersDescription
(constructor)()(BETA) Constructs a new instance of the SelectiveDisclosure class

Properties

PropertyModifiersTypeDescription
methodsreadonlyISelectiveDisclosure(BETA)
schemareadonly{ components: { schemas: { ICreateProfileCredentialsArgs: { type: string; properties: { holder: { type: string; description: string; }; verifier: { type: string; description: string; }; name: { type: string; description: string; }; picture: { type: string; description: string; }; url: { type: string; description: string; }; save: { type: string; description: string; }; send: { type: string; description: string; }; }; required: string[]; description: string; }; VerifiablePresentation: { type: string; properties: { proof: { $ref: string; }; holder: { type: string; }; verifiableCredential: { type: string; items: { $ref: string; }; }; type: { anyOf: ({ type: string; items: { type: string; }; } | { type: string; items?: undefined; })[]; }; "@context": { $ref: string; }; verifier: { type: string; items: { type: string; }; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; id: { type: string; }; }; required: string[]; description: string; }; ProofType: { type: string; properties: { type: { type: string; }; }; description: string; }; W3CVerifiableCredential: { anyOf: { $ref: string; }[]; description: string; }; VerifiableCredential: { type: string; properties: { proof: { $ref: string; }; issuer: { $ref: string; }; credentialSubject: { $ref: string; }; type: { anyOf: ({ type: string; items: { type: string; }; } | { type: string; items?: undefined; })[]; }; "@context": { $ref: string; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; credentialStatus: { $ref: string; }; id: { type: string; }; }; required: string[]; description: string; }; IssuerType: { anyOf: ({ type: string; properties: { id: { type: string; }; }; required: string[]; } | { type: string; properties?: undefined; required?: undefined; })[]; description: string; }; CredentialSubject: { type: string; properties: { id: { type: string; }; }; description: string; }; ContextType: { anyOf: ({ type: string; items?: undefined; } | { type: string; items: { anyOf: { type: string; }[]; }; })[]; description: string; }; CredentialStatusReference: { type: string; properties: { id: { type: string; }; type: { type: string; }; }; required: string[]; description: string; }; CompactJWT: { type: string; description: string; }; ICreateSelectiveDisclosureRequestArgs: { type: string; properties: { data: { $ref: string; }; }; required: string[]; description: string; }; ISelectiveDisclosureRequest: { type: string; properties: { issuer: { type: string; description: string; }; subject: { type: string; description: string; }; replyUrl: { type: string; description: string; }; tag: { type: string; }; claims: { type: string; items: { $ref: string; }; description: string; }; credentials: { type: string; items: { type: string; }; description: string; }; }; required: string[]; description: string; }; ICredentialRequestInput: { type: string; properties: { reason: { type: string; description: string; }; essential: { type: string; description: string; }; credentialType: { type: string; description: string; }; credentialContext: { type: string; description: string; }; claimType: { type: string; description: string; }; claimValue: { type: string; description: string; }; issuers: { type: string; items: { $ref: string; }; description: string; }; }; required: string[]; description: string; }; Issuer: { type: string; properties: { did: { type: string; description: string; }; url: { type: string; description: string; }; }; required: string[]; description: string; }; IGetVerifiableCredentialsForSdrArgs: { type: string; properties: { sdr: { type: string; properties: { subject: { type: string; description: string; }; replyUrl: { type: string; description: string; }; tag: { type: string; }; claims: { type: string; items: { $ref: string; }; description: string; }; credentials: { type: string; items: { type: string; }; description: string; }; }; required: string[]; description: string; }; did: { type: string; description: string; }; }; required: string[]; description: string; }; ICredentialsForSdr: { type: string; properties: { reason: { type: string; description: string; }; essential: { type: string; description: string; }; credentialType: { type: string; description: string; }; credentialContext: { type: string; description: string; }; claimType: { type: string; description: string; }; claimValue: { type: string; description: string; }; issuers: { type: string; items: { $ref: string; }; description: string; }; credentials: { type: string; items: { $ref: string; }; }; }; required: string[]; description: string; }; UniqueVerifiableCredential: { type: string; properties: { hash: { type: string; }; verifiableCredential: { $ref: string; }; }; required: string[]; description: string; }; IValidatePresentationAgainstSdrArgs: { type: string; properties: { presentation: { $ref: string; }; sdr: { $ref: string; }; }; required: string[]; description: string; }; IPresentationValidationResult: { type: string; properties: { valid: { type: string; }; claims: { type: string; items: { $ref: string; }; }; }; required: string[]; description: string; }; }; methods: { createProfilePresentation: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; createSelectiveDisclosureRequest: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; getVerifiableCredentialsForSdr: { description: string; arguments: { $ref: string; }; returnType: { type: string; items: { $ref: string; }; }; }; validatePresentationAgainstSdr: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; }; }; }(BETA)

Methods

MethodModifiersDescription
createProfilePresentation(args, context)

(BETA) Creates profile credentials

This API may change without a BREAKING CHANGE notice.

createSelectiveDisclosureRequest(args, context)(BETA) Creates a Selective disclosure request, encoded as a JWT.
getVerifiableCredentialsForSdr(args, context)(BETA) Gathers the required credentials necessary to fulfill a Selective Disclosure Request. It uses a IDataStoreORM plugin implementation to query the local database for the required credentials.
validatePresentationAgainstSdr(args, context)(BETA) Validates a uPort Selective Disclosure response encoded as a Presentation