@avalanche-sdk/interchain
Version:
Interchain package for handling ICM/ICTT messages
37 lines • 2.15 kB
TypeScript
import { pvmSerial } from "@avalabs/avalanchejs";
import type { PChainOwner as PChainOwnerRaw } from "../types";
/**
* Parses a RegisterL1ValidatorMessage (AddressedCall payload) from a hex string.
*
* @param registerL1ValidatorMessageHex - The hex string representing the RegisterL1ValidatorMessage.
* @returns The parsed RegisterL1ValidatorMessage instance. {@link RegisterL1ValidatorMessage}
*/
export declare function parseRegisterL1ValidatorMessage(registerL1ValidatorMessageHex: string): RegisterL1ValidatorMessage;
/**
* Creates a new RegisterL1ValidatorMessage from values.
*
* @param subnetId - The subnet ID (base58check encoded).
* @param nodeId - The node ID (base58check encoded).
* @param blsPublicKey - The BLS public key in hex format.
* @param expiry - The expiry time as a bigint.
* @param remainingBalanceOwner - The remaining balance owner details.
* @param disableOwner - The disable owner details.
* @param weight - The weight of the validator as a bigint.
* @returns A new RegisterL1ValidatorMessage instance. {@link RegisterL1ValidatorMessage}
*/
export declare function newRegisterL1ValidatorMessage(subnetId: string, nodeId: string, blsPublicKey: string, expiry: bigint, remainingBalanceOwner: PChainOwnerRaw, disableOwner: PChainOwnerRaw, weight: bigint): RegisterL1ValidatorMessage;
/**
* RegisterL1ValidatorMessage class provides utility methods to build
* and parse RegisterL1ValidatorMessage from hex strings or values, and
* access its properties.
*/
export declare class RegisterL1ValidatorMessage extends pvmSerial.warp.AddressedCallPayloads.RegisterL1ValidatorMessage {
static fromHex(registerL1ValidatorMessageHex: string): RegisterL1ValidatorMessage;
static fromValues(subnetId: string, nodeId: string, blsPublicKey: string, expiry: bigint, remainingBalanceOwner: PChainOwnerRaw, disableOwner: PChainOwnerRaw, weight: bigint): RegisterL1ValidatorMessage;
toHex(): string;
/**
* Do not use this method directly.
*/
static fromBytes(_bytes: never, _codec: never): [RegisterL1ValidatorMessage, Uint8Array];
}
//# sourceMappingURL=registerL1ValidatorMessage.d.ts.map