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

Latest commit

 

History

History
31 lines (16 loc) · 1.01 KB

File metadata and controls

31 lines (16 loc) · 1.01 KB

@ceramic-sdk/model-client v0.2.1Docs


Ceramic SDK / @ceramic-sdk/model-client / createInitEvent

Function: createInitEvent()

createInitEvent(did, data): Promise<SignedEvent>

Creates a signed initialization event for a model using the provided DID and model definition.

Parameters

did: DID

The Decentralized Identifier (DID) to sign the initialization event.

data: MapIn<RequiredProps<object>, $TypeOf> & MapIn<OptionalProps<object>, $TypeOf> | MapIn<RequiredProps<object>, $TypeOf> & MapIn<OptionalProps<object>, $TypeOf>

The model definition to be signed.

Returns

Promise<SignedEvent>

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

Throws

Will throw an error if the model content is invalid or the DID is not authenticated.