ContractMaintenanceAuthority
For the complete documentation index, see llms.txt
@midnight-ntwrk/compact-runtime v0.19.0
@midnight-ntwrk/compact-runtime / ContractMaintenanceAuthority
Class: ContractMaintenanceAuthority
A committee permitted to make changes to this contract. If a threshold of the public keys in this committee sign off, they can change the rules of this contract, or recompile it for a new version.
If the threshold is greater than the number of committee members, it is impossible for them to sign anything.
Constructors
Constructor
new ContractMaintenanceAuthority(
committee,
threshold,
counter?): ContractMaintenanceAuthority;
Constructs a new authority from its components
If not supplied, counter will default to 0n. Values should be
non-negative, and at most 2^32 - 1.
At deployment, counter must be 0n, and any subsequent update should
set counter to exactly one greater than the current value.
Parameters
committee
threshold
number
counter?
bigint
Returns
ContractMaintenanceAuthority
Properties
committee
readonly committee: SignatureVerifyingKey[];
The committee public keys
counter
readonly counter: bigint;
The replay protection counter
threshold
readonly threshold: number;
How many keys must sign rule changes
Methods
serialize()
serialize(): Uint8Array;
Returns
Uint8Array
toString()
toString(compact?): string;
Parameters
compact?
boolean
Returns
string
deserialize()
static deserialize(raw): ContractMaintenanceAuthority;
Parameters
raw
Uint8Array
Returns
ContractMaintenanceAuthority