Skip to main content

MaintenanceUpdate

@midnight-ntwrk/ledger v3.0.2 β€’ Readme | API


@midnight-ntwrk/ledger v3.0.2 / MaintenanceUpdate

Class: MaintenanceUpdate

A contract maintenance update, updating associated operations, or changing the maintenance authority.

Constructors​

new MaintenanceUpdate(address, updates, counter)​

new MaintenanceUpdate(
address,
updates,
counter): MaintenanceUpdate

Parameters​

β€’ address: string

β€’ updates: SingleUpdate[]

β€’ counter: bigint

Returns​

MaintenanceUpdate

Properties​

address​

readonly address: string;

The address this deployment will attempt to create


counter​

readonly counter: bigint;

The counter this update is valid against


dataToSign​

readonly dataToSign: Uint8Array;

The raw data any valid signature must be over to approve this update.


signatures​

readonly signatures: [bigint, string][];

The signatures on this update


updates​

readonly updates: SingleUpdate[];

The updates to carry out

Methods​

addSignature()​

addSignature(idx, signature): MaintenanceUpdate

Adds a new signature to this update

Parameters​

β€’ idx: bigint

β€’ signature: string

Returns​

MaintenanceUpdate


toString()​

toString(compact?): string

Parameters​

β€’ compact?: boolean

Returns​

string