Skip to content

Commit

Permalink
Merge pull request #190 from ar-io/PE-6600-epoch-distributions
Browse files Browse the repository at this point in the history
fix(types): update types for epoch distributions
  • Loading branch information
dtfiedler authored Aug 27, 2024
2 parents 114164c + 5aedf50 commit a33901a
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src/io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,26 @@ export type AoVaultData = {
endTimestamp: Timestamp;
};

export type AoEpochDistributionRewards = {
eligible: Record<
WalletAddress,
{
delegateRewards: Record<WalletAddress, number>;
operatorReward: number;
}
>;
// TODO: we could create a new type for this
distributed?: Record<WalletAddress, number>;
};

export type AoEpochDistributionData = {
rewards: Record<WalletAddress, number>;
distributedTimestamp: Timestamp;
totalDistributedRewards: number;
rewards: AoEpochDistributionRewards;
totalEligibleRewards: number;
totalEligibleObserverReward: number;
totalEligibleGatewayReward: number;
// TODO: we could create a new type for this
distributedTimestamp?: Timestamp; // only set if rewards have been distributed
totalDistributedRewards?: number; // only set if rewards have been distributed
};

export type AoArNSReservedNameData = {
Expand Down

0 comments on commit a33901a

Please sign in to comment.