ContractMaintenanceAuthority
@midnight-ntwrk/compact-runtime v0.9.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β
string[]
thresholdβ
number
counter?β
bigint
Returnsβ
ContractMaintenanceAuthority
Propertiesβ
committeeβ
readonly committee: string[];
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(networkid): Uint8Array;
Parametersβ
networkidβ
Returnsβ
Uint8Array
toString()β
toString(compact?): string;
Parametersβ
compact?β
boolean
Returnsβ
string
deserialize()β
static deserialize(raw, networkid): ContractState;
Parametersβ
rawβ
Uint8Array