UNPKG

@exromany/lido-csm-sdk

Version:

[![GitHub license](https://img.shields.io/github/license/lidofinance/lido-csm-sdk?color=limegreen)](https://github.com/lidofinance/lido-csm-sdk/blob/main/LICENSE.txt) [![Version npm](https://img.shields.io/npm/v/@lidofinance/lido-csm-sdk?label=version)](h

185 lines 7.96 kB
import { z } from 'zod'; export type RewardsReport = z.infer<typeof RewardsReportSchema>; export type RewardsReportV1 = z.infer<typeof RewardsReportV1Schema>; export type RewardsReportV2 = z.infer<typeof RewardsReportV2Schema>; declare const RewardsReportV1Schema: z.ZodObject<{ blockstamp: z.ZodObject<{ block_hash: z.ZodString; block_number: z.ZodCoercedBigInt<unknown>; block_timestamp: z.ZodNumber; ref_epoch: z.ZodCoercedBigInt<unknown>; ref_slot: z.ZodCoercedBigInt<unknown>; slot_number: z.ZodCoercedBigInt<unknown>; state_root: z.ZodString; }, z.core.$strip>; distributable: z.ZodCoercedBigInt<unknown>; frame: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>; threshold: z.ZodNumber; operators: z.ZodRecord<z.ZodTemplateLiteral<`${bigint}`>, z.ZodObject<{ distributed: z.ZodCoercedBigInt<unknown>; validators: z.ZodRecord<z.ZodTemplateLiteral<`${bigint}`>, z.ZodObject<{ perf: z.ZodObject<{ assigned: z.ZodNumber; included: z.ZodNumber; }, z.core.$strip>; slashed: z.ZodBoolean; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>; declare const RewardsReportV2Schema: z.ZodObject<{ blockstamp: z.ZodObject<{ block_hash: z.ZodString; block_number: z.ZodCoercedBigInt<unknown>; block_timestamp: z.ZodNumber; ref_epoch: z.ZodCoercedBigInt<unknown>; ref_slot: z.ZodCoercedBigInt<unknown>; slot_number: z.ZodCoercedBigInt<unknown>; state_root: z.ZodString; }, z.core.$strip>; distributable: z.ZodCoercedBigInt<unknown>; distributed_rewards: z.ZodCoercedBigInt<unknown>; rebate_to_protocol: z.ZodCoercedBigInt<unknown>; frame: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>; operators: z.ZodRecord<z.ZodTemplateLiteral<`${bigint}`>, z.ZodObject<{ distributed_rewards: z.ZodCoercedBigInt<unknown>; performance_coefficients: z.ZodObject<{ attestations_weight: z.ZodNumber; blocks_weight: z.ZodNumber; sync_weight: z.ZodNumber; }, z.core.$strip>; validators: z.ZodRecord<z.ZodTemplateLiteral<`${bigint}`>, z.ZodObject<{ attestation_duty: z.ZodObject<{ assigned: z.ZodNumber; included: z.ZodNumber; }, z.core.$strip>; distributed_rewards: z.ZodCoercedBigInt<unknown>; performance: z.ZodNumber; proposal_duty: z.ZodObject<{ assigned: z.ZodNumber; included: z.ZodNumber; }, z.core.$strip>; rewards_share: z.ZodNumber; slashed: z.ZodBoolean; strikes: z.ZodNumber; sync_duty: z.ZodObject<{ assigned: z.ZodNumber; included: z.ZodNumber; }, z.core.$strip>; threshold: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>; declare const RewardsReportSchema: z.ZodUnion<readonly [z.ZodObject<{ blockstamp: z.ZodObject<{ block_hash: z.ZodString; block_number: z.ZodCoercedBigInt<unknown>; block_timestamp: z.ZodNumber; ref_epoch: z.ZodCoercedBigInt<unknown>; ref_slot: z.ZodCoercedBigInt<unknown>; slot_number: z.ZodCoercedBigInt<unknown>; state_root: z.ZodString; }, z.core.$strip>; distributable: z.ZodCoercedBigInt<unknown>; frame: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>; threshold: z.ZodNumber; operators: z.ZodRecord<z.ZodTemplateLiteral<`${bigint}`>, z.ZodObject<{ distributed: z.ZodCoercedBigInt<unknown>; validators: z.ZodRecord<z.ZodTemplateLiteral<`${bigint}`>, z.ZodObject<{ perf: z.ZodObject<{ assigned: z.ZodNumber; included: z.ZodNumber; }, z.core.$strip>; slashed: z.ZodBoolean; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ blockstamp: z.ZodObject<{ block_hash: z.ZodString; block_number: z.ZodCoercedBigInt<unknown>; block_timestamp: z.ZodNumber; ref_epoch: z.ZodCoercedBigInt<unknown>; ref_slot: z.ZodCoercedBigInt<unknown>; slot_number: z.ZodCoercedBigInt<unknown>; state_root: z.ZodString; }, z.core.$strip>; distributable: z.ZodCoercedBigInt<unknown>; distributed_rewards: z.ZodCoercedBigInt<unknown>; rebate_to_protocol: z.ZodCoercedBigInt<unknown>; frame: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>; operators: z.ZodRecord<z.ZodTemplateLiteral<`${bigint}`>, z.ZodObject<{ distributed_rewards: z.ZodCoercedBigInt<unknown>; performance_coefficients: z.ZodObject<{ attestations_weight: z.ZodNumber; blocks_weight: z.ZodNumber; sync_weight: z.ZodNumber; }, z.core.$strip>; validators: z.ZodRecord<z.ZodTemplateLiteral<`${bigint}`>, z.ZodObject<{ attestation_duty: z.ZodObject<{ assigned: z.ZodNumber; included: z.ZodNumber; }, z.core.$strip>; distributed_rewards: z.ZodCoercedBigInt<unknown>; performance: z.ZodNumber; proposal_duty: z.ZodObject<{ assigned: z.ZodNumber; included: z.ZodNumber; }, z.core.$strip>; rewards_share: z.ZodNumber; slashed: z.ZodBoolean; strikes: z.ZodNumber; sync_duty: z.ZodObject<{ assigned: z.ZodNumber; included: z.ZodNumber; }, z.core.$strip>; threshold: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodArray<z.ZodObject<{ blockstamp: z.ZodObject<{ block_hash: z.ZodString; block_number: z.ZodCoercedBigInt<unknown>; block_timestamp: z.ZodNumber; ref_epoch: z.ZodCoercedBigInt<unknown>; ref_slot: z.ZodCoercedBigInt<unknown>; slot_number: z.ZodCoercedBigInt<unknown>; state_root: z.ZodString; }, z.core.$strip>; distributable: z.ZodCoercedBigInt<unknown>; distributed_rewards: z.ZodCoercedBigInt<unknown>; rebate_to_protocol: z.ZodCoercedBigInt<unknown>; frame: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>; operators: z.ZodRecord<z.ZodTemplateLiteral<`${bigint}`>, z.ZodObject<{ distributed_rewards: z.ZodCoercedBigInt<unknown>; performance_coefficients: z.ZodObject<{ attestations_weight: z.ZodNumber; blocks_weight: z.ZodNumber; sync_weight: z.ZodNumber; }, z.core.$strip>; validators: z.ZodRecord<z.ZodTemplateLiteral<`${bigint}`>, z.ZodObject<{ attestation_duty: z.ZodObject<{ assigned: z.ZodNumber; included: z.ZodNumber; }, z.core.$strip>; distributed_rewards: z.ZodCoercedBigInt<unknown>; performance: z.ZodNumber; proposal_duty: z.ZodObject<{ assigned: z.ZodNumber; included: z.ZodNumber; }, z.core.$strip>; rewards_share: z.ZodNumber; slashed: z.ZodBoolean; strikes: z.ZodNumber; sync_duty: z.ZodObject<{ assigned: z.ZodNumber; included: z.ZodNumber; }, z.core.$strip>; threshold: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>>]>; export declare const parseReport: (data: string) => RewardsReport; export declare const isRewardsReportV1: (report: RewardsReport) => report is RewardsReportV1; export declare const isRewardsReportV2: (report: RewardsReport) => report is RewardsReportV2; export declare const isRewardsReportV2Array: (report: RewardsReport) => report is RewardsReportV2[]; export {}; //# sourceMappingURL=parse-report.d.ts.map