Skip to main content

DestroyNotarization

@iota/notarization API documentation


Class: DestroyNotarization

Transaction that destroys a notarization and releases its object ID.

Remarks​

The notarization must currently be destroy-allowed (see NotarizationClientReadOnly.isDestroyAllowed); otherwise the on-chain transaction aborts. All package-local TimeLocks of the attached LockMetadata are destroyed in the process.

Emits a NotarizationDestroyed event on success.

Constructors​

Constructor​

new DestroyNotarization(object_id): DestroyNotarization

Constructs the transaction.

Parameters​

object_id​

string

Returns​

DestroyNotarization

Throws​

When the ID is malformed.

Methods​

toJSON()​

toJSON(): Object

  • Return copy of self without private attributes.

Returns​

Object


toString()​

toString(): string

Return stringified version of self.

Returns​

string


applyWithEvents()​

applyWithEvents(wasm_effects, wasm_events, client): Promise<Empty>

Reads the on-chain effects and events of the submitted transaction.

Parameters​

wasm_effects​

TransactionEffects

wasm_events​

IotaEvent[]

client​

CoreClientReadOnly

A read-only client connected to the target network.

Returns​

Promise<Empty>

Remarks​

Invoked automatically by the TransactionBuilder machinery after the transaction has been submitted; calling it directly is normally not necessary.

Throws​

When the effects/events are inconsistent with this transaction.


buildProgrammableTransaction()​

buildProgrammableTransaction(client): Promise<Uint8Array<ArrayBufferLike>>

Builds the programmable transaction bytes.

Parameters​

client​

CoreClientReadOnly

A read-only client connected to the target network.

Returns​

Promise<Uint8Array<ArrayBufferLike>>

The BCS-serialized programmable transaction, ready to be signed and submitted.

Throws​

When the transaction cannot be built.