Skip to main content

NotarizationBuilderLocked

@iota/notarization API documentation


Class: NotarizationBuilderLocked

Builder for a "create Locked-Notarization" transaction.

Remarks

A Locked-Notarization is immutable after creation: its state and updatable metadata are fixed for the lifetime of the object. Use this builder to configure the initial state, immutable description, updatable metadata, and optional deleteLock, then call NotarizationBuilderLocked.finish to obtain a transaction builder.

On execution the transaction transfers the new notarization object to the sender.

Emits a LockedNotarizationCreated event on success.

Methods

toJSON()

toJSON(): Object

  • Return copy of self without private attributes.

Returns

Object


toString()

toString(): string

Return stringified version of self.

Returns

string


finish()

finish(): TransactionBuilder<CreateNotarizationLocked>

Finalizes the configuration and produces the transaction builder.

Returns

TransactionBuilder<CreateNotarizationLocked>

A TransactionBuilder wrapping the CreateNotarizationLocked transaction.

Throws

When the configured state, metadata, or lock combination is invalid for a Locked-Notarization.


locked()

static locked(): NotarizationBuilderLocked

Returns a fresh, unconfigured Locked-Notarization builder.

Returns

NotarizationBuilderLocked

An empty NotarizationBuilderLocked.


withBytesState()

withBytesState(data, metadata?): NotarizationBuilderLocked

Sets the initial state from a binary payload.

Parameters

data

Uint8Array

The bytes to notarize.

metadata?

Optional metadata associated with this initial state.

null | string

Returns

NotarizationBuilderLocked

The same builder, with the initial state configured.


withDeleteLock()

withDeleteLock(lock): NotarizationBuilderLocked

Sets the delete lock for the notarization.

Parameters

lock

TimeLock

The TimeLock controlling when destruction is permitted.

Returns

NotarizationBuilderLocked

The same builder, with the delete lock configured.

Remarks

deleteLock cannot be TimeLockType.UntilDestroyed — submitting such a configuration aborts on-chain.


withImmutableDescription()

withImmutableDescription(description?): NotarizationBuilderLocked

Sets the immutable description.

Parameters

description?

Human-readable description fixed at creation. Pass null or undefined to leave the description unset.

null | string

Returns

NotarizationBuilderLocked

The same builder, with the description configured.


withStringState()

withStringState(data, metadata?): NotarizationBuilderLocked

Sets the initial state from a text payload.

Parameters

data

string

The string to notarize.

metadata?

Optional metadata associated with this initial state.

null | string

Returns

NotarizationBuilderLocked

The same builder, with the initial state configured.


withUpdatableMetadata()

withUpdatableMetadata(metadata?): NotarizationBuilderLocked

Sets the updatable metadata.

Parameters

metadata?

Updatable metadata string. Pass null or undefined to leave it unset.

null | string

Returns

NotarizationBuilderLocked

The same builder, with the updatable metadata configured.

Remarks

On a Locked-Notarization the updatable metadata is fixed at creation just like the state — there is no client method that can change it afterwards.