@lodestar/types
Version:
Typescript types required for lodestar
77 lines • 3.8 kB
TypeScript
import { BooleanType, ByteVectorType, UintBigintType, UintNumberType } from "@chainsafe/ssz";
import { ExecutionAddressType } from "../utils/executionAddress.js";
export declare const Boolean: BooleanType;
export declare const Byte: UintNumberType;
export declare const Bytes4: ByteVectorType;
export declare const Bytes8: ByteVectorType;
export declare const Bytes20: ByteVectorType;
export declare const Bytes32: ByteVectorType;
export declare const Bytes48: ByteVectorType;
export declare const Bytes96: ByteVectorType;
export declare const Uint8: UintNumberType;
export declare const Uint16: UintNumberType;
export declare const Uint32: UintNumberType;
/**
* A JS `number` is an IEEE-754 double which has 53 bits integer precision. This implies that it can store
* a value up to 2^53-1 without losing any precision (`Number.MAX_SAFE_INTEGER` represents that exact limit).
* So it can't store a 64 bit integer with precision in the higher bits.
*
* However, JS `bigint` arithmetics is ~100x slower than `number`.
* Therefor, this type uses `number` for 64 bits values, for use in well-analyzed cases where
* the value is known to never cross the `Number.MAX_SAFE_INTEGER` limit.
*
* Caution and reasoned analysis are always required before using this type as the consequence of misuse is a consensus split.
*/
export declare const UintNum64: UintNumberType;
export declare const UintNumInf64: UintNumberType;
export declare const UintBn64: UintBigintType;
export declare const UintBn128: UintBigintType;
export declare const UintBn256: UintBigintType;
/**
* Use JS Number for performance, values must be limited to 2**52-1.
* Slot is a time unit, so in all usages it's bounded by the clock, ensuring < 2**53-1
*/
export declare const Slot: UintNumberType;
/**
* Use JS Number for performance, values must be limited to 2**52-1.
* Epoch is a time unit, so in all usages it's bounded by the clock, ensuring < 2**53-1
*/
export declare const Epoch: UintNumberType;
/** Same as @see Epoch + some validator properties must represent 2**52-1 also, which we map to `Infinity` */
export declare const EpochInf: UintNumberType;
/**
* Use JS Number for performance, values must be limited to 2**52-1.
* SyncPeriod is a time unit, so in all usages it's bounded by the clock, ensuring < 2**53-1
*/
export declare const SyncPeriod: UintNumberType;
/**
* Use JS Number for performance, values must be limited to 2**52-1.
* CommitteeIndex is bounded by the max possible number of committees which is bounded by `VALIDATOR_REGISTRY_LIMIT`
*/
export declare const CommitteeIndex: UintNumberType;
/** @see CommitteeIndex */
export declare const SubcommitteeIndex: UintNumberType;
export declare const BuilderIndex: UintNumberType;
/**
* Use JS Number for performance, values must be limited to 2**52-1.
* ValidatorIndex is bounded by `VALIDATOR_REGISTRY_LIMIT`
*/
export declare const ValidatorIndex: UintNumberType;
export declare const WithdrawalIndex: UintNumberType;
export declare const DepositIndex: UintBigintType;
export declare const Gwei: UintBigintType;
export declare const Wei: UintBigintType;
export declare const Root: ByteVectorType;
export declare const BlobIndex: UintNumberType;
export declare const Version: ByteVectorType;
export declare const DomainType: ByteVectorType;
export declare const ForkDigest: ByteVectorType;
export declare const BLSPubkey: ByteVectorType;
export declare const BLSSignature: ByteVectorType;
export declare const Domain: ByteVectorType;
export declare const ParticipationFlags: UintNumberType;
export declare const ExecutionAddress: ExecutionAddressType;
export declare const ColumnIndex: UintNumberType;
export declare const CustodyIndex: UintNumberType;
export declare const RowIndex: UintNumberType;
//# sourceMappingURL=sszTypes.d.ts.map