Skip to main content

ContractMaintenanceAuthority

For the complete documentation index, see llms.txt

@midnight-ntwrk/onchain-runtime v3.0.0


@midnight-ntwrk/onchain-runtime / ContractMaintenanceAuthority

Class: ContractMaintenanceAuthority

이 컨트랙트를 변경할 수 있는 권한을 가진 위원회입니다. 위원회의 공개 키 중 임계값 이상이 서명하면 컨트랙트의 규칙을 변경하거나 새 버전으로 다시 컴파일할 수 있습니다.

임계값이 위원회 구성원 수보다 크면 서명이 불가능합니다.

Constructors

new ContractMaintenanceAuthority()

new ContractMaintenanceAuthority(
committee,
threshold,
counter?): ContractMaintenanceAuthority

구성 요소로부터 새 authority를 생성합니다.

counter를 지정하지 않으면 기본값은 0n입니다. 값은 음수가 아니어야 하며 최대 2^32 - 1이어야 합니다.

배포 시 counter는 반드시 0n이어야 하며, 이후 업데이트 시에는 현재 값보다 정확히 1 큰 값으로 설정해야 합니다.

Parameters

committee

string[]

threshold

number

counter?

bigint

Returns

ContractMaintenanceAuthority

Properties

committee

readonly committee: string[];

위원회 공개 키


counter

readonly counter: bigint;

리플레이 방지 카운터


threshold

readonly threshold: number;

규칙 변경에 필요한 서명 키 수

Methods

serialize()

serialize(): Uint8Array

Returns

Uint8Array


toString()

toString(compact?): string

Parameters

compact?

boolean

Returns

string


deserialize()

static deserialize(raw): ContractState

Parameters

raw

Uint8Array

Returns

ContractState