import { BuilderIndex, Epoch, ValidatorIndex, gloas } from "@lodestar/types"; import { AttestationData } from "@lodestar/types/phase0"; import { CachedBeaconStateGloas } from "../types.js"; import { RootCache } from "./rootCache.js"; export declare function isBuilderWithdrawalCredential(withdrawalCredentials: Uint8Array): boolean; export declare function getBuilderPaymentQuorumThreshold(state: CachedBeaconStateGloas): number; /** * Check if a validator index represents a builder (has the builder flag set). * Spec: https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.1/specs/gloas/beacon-chain.md#new-is_builder_index */ export declare function isBuilderIndex(validatorIndex: number): boolean; /** * Convert a builder index to a flagged validator index for use in Withdrawal containers. * Spec: https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.1/specs/gloas/beacon-chain.md#new-convert_builder_index_to_validator_index */ export declare function convertBuilderIndexToValidatorIndex(builderIndex: BuilderIndex): ValidatorIndex; /** * Convert a flagged validator index back to a builder index. * Spec: https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.1/specs/gloas/beacon-chain.md#new-convert_validator_index_to_builder_index */ export declare function convertValidatorIndexToBuilderIndex(validatorIndex: ValidatorIndex): BuilderIndex; /** * Check if a builder is active (deposited and not yet withdrawable). * Spec: https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.1/specs/gloas/beacon-chain.md#isactivebuilder */ export declare function isActiveBuilder(builder: gloas.Builder, finalizedEpoch: Epoch): boolean; /** * Get the total pending balance to withdraw for a builder (from withdrawals + payments). * Spec: https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.1/specs/gloas/beacon-chain.md#new-get_pending_balance_to_withdraw_for_builder */ export declare function getPendingBalanceToWithdrawForBuilder(state: CachedBeaconStateGloas, builderIndex: BuilderIndex): number; /** * Check if a builder has sufficient balance to cover a bid amount. * Spec: https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.1/specs/gloas/beacon-chain.md#new-can_builder_cover_bid */ export declare function canBuilderCoverBid(state: CachedBeaconStateGloas, builderIndex: BuilderIndex, bidAmount: number): boolean; /** * Initiate a builder exit by setting their withdrawable epoch. * Spec: https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.1/specs/gloas/beacon-chain.md#new-initiate_builder_exit */ export declare function initiateBuilderExit(state: CachedBeaconStateGloas, builderIndex: BuilderIndex): void; /** * Find the index of a builder by their public key. * Returns null if not found. * * May consider builder pubkey cache if performance becomes an issue. */ export declare function findBuilderIndexByPubkey(state: CachedBeaconStateGloas, pubkey: Uint8Array): BuilderIndex | null; export declare function isAttestationSameSlot(state: CachedBeaconStateGloas, data: AttestationData): boolean; export declare function isAttestationSameSlotRootCache(rootCache: RootCache, data: AttestationData): boolean; export declare function isParentBlockFull(state: CachedBeaconStateGloas): boolean; //# sourceMappingURL=gloas.d.ts.map