Skip to main content

NotarizationBuilderDynamic

@iota/notarization API documentation


Class: NotarizationBuilderDynamic

Builder for a "create Dynamic-Notarization" transaction.

Remarks​

A Dynamic-Notarization can be updated after creation: state and updatable metadata can be replaced via NotarizationClient.updateState and NotarizationClient.updateMetadata, and ownership can be transferred via NotarizationClient.transferNotarization when the configured transferLock permits it.

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

Emits a DynamicNotarizationCreated event on success.

Methods​

dynamic()​

static dynamic(): NotarizationBuilderDynamic

Returns a fresh, unconfigured Dynamic-Notarization builder.

Returns​

NotarizationBuilderDynamic

An empty NotarizationBuilderDynamic.


finish()​

finish(): TransactionBuilder<CreateNotarizationDynamic>

Finalizes the configuration and produces the transaction builder.

Returns​

TransactionBuilder<CreateNotarizationDynamic>

A TransactionBuilder wrapping the CreateNotarizationDynamic transaction.

Throws​

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


withBytesState()​

withBytesState(data, metadata?): NotarizationBuilderDynamic

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​

NotarizationBuilderDynamic

The same builder, with the initial state configured.


withImmutableDescription()​

withImmutableDescription(description?): NotarizationBuilderDynamic

Sets the immutable description.

Parameters​

description?​

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

null | string

Returns​

NotarizationBuilderDynamic

The same builder, with the description configured.


withStringState()​

withStringState(data, metadata?): NotarizationBuilderDynamic

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​

NotarizationBuilderDynamic

The same builder, with the initial state configured.


withTransferLock()​

withTransferLock(lock): NotarizationBuilderDynamic

Sets the transfer lock for the notarization.

Parameters​

lock​

TimeLock

The TimeLock controlling when ownership can be transferred.

Returns​

NotarizationBuilderDynamic

The same builder, with the transfer lock configured.

Remarks​

While the transfer lock is active, NotarizationClient.transferNotarization aborts on-chain. When the lock is TimeLockType.None, the resulting notarization carries no LockMetadata and is freely transferable.


withUpdatableMetadata()​

withUpdatableMetadata(metadata?): NotarizationBuilderDynamic

Sets the initial updatable metadata.

Parameters​

metadata?​

Updatable metadata string. Pass null or undefined to leave it unset; it can still be updated later via NotarizationClient.updateMetadata.

null | string

Returns​

NotarizationBuilderDynamic

The same builder, with the updatable metadata configured.