Skip to main content

CreateOOBOffer

@hyperledger/identus-sdk v8.0.0


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

Class: CreateOOBOffer

Defined in: packages/lib/sdk/src/plugins/internal/didcomm/tasks/CreateOOBOffer.ts:33

Task class for creating out-of-band (OOB) credential offer invitations.

This class generates a base64-encoded JSON string representing an OOB invitation that includes a credential offer attachment. The invitation can be shared with potential credential holders to initiate the credential issuance flow.

Extends

Constructors

Constructor

new CreateOOBOffer(...args: [CreateOOBOfferArgs]): CreateOOBOffer

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

Parameters

ParameterTypeDescription
...args[CreateOOBOfferArgs]-

Returns

CreateOOBOffer

Inherited from

Task<string, Args>.constructor

Accessors

attachments

Get Signature

get attachments(): AttachmentDescriptor[]

Defined in: packages/lib/sdk/src/plugins/internal/didcomm/tasks/CreateOOBOffer.ts:52

Gets the attachments for the out-of-band invitation.

Returns

AttachmentDescriptor[]

Array containing the credential offer as an attachment descriptor


oobBody

Get Signature

get oobBody(): { accept: string[]; goal: string; goal_code: string; }

Defined in: packages/lib/sdk/src/plugins/internal/didcomm/tasks/CreateOOBOffer.ts:39

Gets the body configuration for the out-of-band invitation.

Returns

{ accept: string[]; goal: string; goal_code: string; }

The OOB invitation body with goal code, goal description, and accepted protocols

NameTypeDefined in
acceptstring[]packages/lib/sdk/src/plugins/internal/didcomm/tasks/CreateOOBOffer.ts:43
goalstringpackages/lib/sdk/src/plugins/internal/didcomm/tasks/CreateOOBOffer.ts:42
goal_codestringpackages/lib/sdk/src/plugins/internal/didcomm/tasks/CreateOOBOffer.ts:41

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<string>

Defined in: packages/lib/sdk/src/plugins/internal/didcomm/tasks/CreateOOBOffer.ts:73

Executes the task to create an out-of-band credential offer invitation.

This method validates the provided offer, generates a unique invitation ID, creates the OOB invitation structure, and returns it as a base64-encoded string.

Parameters

ParameterTypeDescription
_ctxAgentContextThe agent context (not used in current implementation)

Returns

Promise<string>

A Promise that resolves to a base64-encoded OOB invitation string

Throws

When the provided offer is invalid or not an instance of OfferCredential

Overrides

Task.run