Skip to main content

UpdateState

@iota/notarization API documentation


Class: UpdateState

Represents a transaction for updating the state of a dynamic notarization.

This is only available for dynamic notarization's

Methods

toJSON()

toJSON(): Object

  • Return copy of self without private attributes.

Returns

Object


toString()

toString(): string

Return stringified version of self.

Returns

string


buildProgrammableTransaction()

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

Builds and returns a programmable transaction for updating the state of a notarization.

Returns

The binary BCS serialization of the programmable transaction. This transaction can be submitted to the network to updating the state of a notarization.

Errors

Returns an error if the transaction cannot be built due to invalid parameters or other constraints.

Parameters

client

CoreClientReadOnly

Returns

Promise<Uint8Array<ArrayBufferLike>>


applyWithEvents()

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

Applies transaction effects and events to this state update operation.

This method is called automatically by Transaction::build_programmable_transaction() and Transaction::apply() methods after the transaction has been successfully submitted to process the results from the ledger.

Arguments

  • effects - The transaction block effects to apply.
  • events - The transaction block events to apply.

Parameters

wasm_effects

TransactionEffects

wasm_events

IotaEvent[]

client

CoreClientReadOnly

Returns

Promise<Empty>