lisk-framework
Version:
Lisk blockchain application platform
46 lines (45 loc) • 2.76 kB
TypeScript
/// <reference types="node" />
import { ActiveValidators, CCMsg, ChainAccount, CrossChainUpdateTransactionParams, InboxUpdate, OutboxRootWitness, ActiveValidatorsUpdate } from './types';
import { BlockHeader, VerificationResult } from '../../state_machine';
import { Certificate } from '../../engine/consensus/certificate_generation/types';
export declare const validateFormat: (ccm: CCMsg) => void;
export declare const getCCMSize: (ccm: CCMsg) => bigint;
export declare const getEncodedSidechainTerminatedCCMParam: (ccm: CCMsg, receivingChainAccount: ChainAccount) => Buffer;
export declare const handlePromiseErrorWithNull: <T>(promise: Promise<T>) => Promise<T | null>;
export declare const validNameChars = "a-z0-9!@$&_.";
export declare const isValidName: (username: string) => boolean;
export declare const computeValidatorsHash: (initValidators: ActiveValidators[], certificateThreshold: bigint) => Buffer;
export declare const sortValidatorsByBLSKey: (validators: ActiveValidators[]) => ActiveValidators[];
export declare const swapReceivingAndSendingChainIDs: (ccm: CCMsg) => {
receivingChainID: Buffer;
sendingChainID: Buffer;
nonce: bigint;
module: string;
crossChainCommand: string;
fee: bigint;
status: number;
params: Buffer;
};
export declare const isInboxUpdateEmpty: (inboxUpdate: InboxUpdate) => boolean;
export declare const isOutboxRootWitnessEmpty: (outboxRootWitness: OutboxRootWitness) => boolean;
export declare const checkLivenessRequirement: (partnerChainAccount: ChainAccount, txParams: CrossChainUpdateTransactionParams) => VerificationResult;
export declare const checkCertificateTimestamp: (txParams: CrossChainUpdateTransactionParams, certificate: Certificate, header: BlockHeader) => void;
export declare const chainAccountToJSON: (chainAccount: ChainAccount) => {
lastCertificate: import("./types").LastCertificateJSON;
name: string;
status: number;
};
export declare const verifyLivenessConditionForRegisteredChains: (blockTimestamp: number, certificateBytes: Buffer) => void;
export declare const getMainchainID: (chainID: Buffer) => Buffer;
export declare const getTokenIDLSK: (chainID: Buffer) => Buffer;
export declare const getIDFromCCMBytes: (ccmBytes: Buffer) => Buffer;
export declare const getEncodedCCMAndID: (ccm: CCMsg) => {
encodedCCM: Buffer;
ccmID: Buffer;
};
export declare const getDecodedCCMAndID: (ccmBytes: Buffer) => {
decodedCCM: CCMsg;
ccmID: Buffer;
};
export declare const emptyActiveValidatorsUpdate: (value: ActiveValidatorsUpdate) => boolean;
export declare const calculateNewActiveValidators: (activeValidators: ActiveValidators[], blskeysUpdate: Buffer[], bftWeightsUpdate: bigint[], bftWeightsUpdateBitmap: Buffer) => ActiveValidators[];