Skip to main content

ParseInvitation

@hyperledger/identus-sdk v8.1.3


@hyperledger/identus-sdk / plugins/internal/didcomm / ParseInvitation

Class: ParseInvitation

Defined in: packages/lib/sdk/src/plugins/internal/didcomm/tasks/ParseInvitation.ts:34

Task class for parsing different types of invitations.

This class attempts to parse a given invitation based on its type and handles different encodings including URLs with query parameters, base64-encoded strings, and plain JSON objects. It supports Prism onboarding invitations and out-of-band (OOB) invitations.

Extends​

Constructors​

Constructor​

new ParseInvitation(...args: [ParseInvitationArgs]): ParseInvitation

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

Parameters​

ParameterTypeDescription
...args[ParseInvitationArgs]-

Returns​

ParseInvitation

Inherited from​

Task<InvitationType, Args>.constructor

Methods​

log()​

log(): unknown

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

Returns​

unknown

Inherited from​

Task.log


run()​

run(ctx: AgentContext): Promise<PrismOnboardingInvitation | OutOfBandInvitation>

Defined in: packages/lib/sdk/src/plugins/internal/didcomm/tasks/ParseInvitation.ts:45

Executes the invitation parsing task.

This method decodes the invitation value, determines its type based on the type or piuri field, and delegates to the appropriate specialized parser.

Parameters​

ParameterTypeDescription
ctxAgentContextThe agent context for running sub-tasks

Returns​

Promise<PrismOnboardingInvitation | OutOfBandInvitation>

A Promise that resolves to the parsed invitation of the appropriate type

Throws​

When the invitation type is not supported

Overrides​

Task.run