@lodestar/beacon-node
Version:
A Typescript implementation of the beacon chain
24 lines • 952 B
TypeScript
import { DATA, QUANTITY } from "../../eth1/provider/utils.js";
import { PayloadAttributesRpc } from "./types.js";
export type PayloadId = string;
export type WithdrawalV1 = {
index: QUANTITY;
validatorIndex: QUANTITY;
address: DATA;
amount: QUANTITY;
};
type FcuAttributes = {
headBlockHash: DATA;
finalizedBlockHash: DATA;
} & Omit<PayloadAttributesRpc, "withdrawals">;
export declare class PayloadIdCache {
private readonly payloadIdByFcuAttributes;
getFullKey({ headBlockHash, finalizedBlockHash, timestamp, prevRandao, suggestedFeeRecipient }: FcuAttributes): string;
getKey({ timestamp }: Pick<FcuAttributes, "timestamp">): string;
hasPayload(fcuAttributes: Pick<FcuAttributes, "timestamp">): boolean;
add(fcuAttributes: FcuAttributes, payloadId: PayloadId): void;
prune(): void;
get(fcuAttributes: FcuAttributes): PayloadId | undefined;
}
export {};
//# sourceMappingURL=payloadIdCache.d.ts.map