Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.

Latest commit

 

History

History
49 lines (26 loc) · 1.27 KB

File metadata and controls

49 lines (26 loc) · 1.27 KB

@ceramic-sdk/events v0.2.1Docs


Ceramic SDK / @ceramic-sdk/events / createSignedInitEvent

Function: createSignedInitEvent()

createSignedInitEvent<T>(did, data, header, options?): Promise<SignedEvent>

Creates a signed initialization event using the provided DID, data, and header.

Type Parameters

T

Parameters

did: DID

The DID instance used to sign the initialization event.

data: T

The initialization data to be included in the event.

header: PartialInitEventHeader

The header for the initialization event, with optional controllers.

options?: CreateJWSOptions

(Optional) Additional options for creating the JWS.

Returns

Promise<SignedEvent>

A promise that resolves to a SignedEvent representing the initialization event.

Throws

Will throw an error if the DID is not authenticated.

Remarks

  • If controllers are not provided in the header, they will be automatically set based on the DID's parent (if available) or the DID itself.
  • The payload is encoded as an InitEventPayload before signing.