Skip to content

Commit

Permalink
Merge pull request #936 from ava-labs/cp-9100
Browse files Browse the repository at this point in the history
update getCurrentValidators and getPendingValidators response
  • Loading branch information
ruijialin-avalabs authored Dec 4, 2024
2 parents fb31092 + 0d337c5 commit f6518ea
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/vms/pvm/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export type GetAssetDescriptionResponse = {
denomination: number;
};

// https://docs.avax.network/api-reference/p-chain/api#platformgetcurrentvalidators
export type GetCurrentValidatorsResponse = {
validators: {
accruedDelegateeReward: string;
Expand All @@ -24,6 +25,15 @@ export type GetCurrentValidatorsResponse = {
threshold: string;
addresses: string[];
};
delegationRewardOwner: {
locktime: string;
threshold: string;
addresses: string[];
};
signer: {
publicKey: string;
proofOfPosession: string;
};
delegatorCount: string;
delegatorWeight: string;
potentialReward: string;
Expand All @@ -36,7 +46,7 @@ export type GetCurrentValidatorsResponse = {
endTime: string;
stakeAmount: string;
nodeID: string;
delegationRewardOwner: {
rewardOwner: {
locktime: string;
threshold: string;
addresses: string[];
Expand All @@ -51,6 +61,7 @@ export type GetPendingValidatorsParams = {
nodeIDs?: string[];
};

// https://docs.avax.network/api-reference/p-chain/api#platformgetpendingvalidators
export type GetPendingValidatorsResponse = {
validators: {
txID: string;
Expand All @@ -61,6 +72,10 @@ export type GetPendingValidatorsResponse = {
delegationFee: string;
connected: boolean;
weight: string;
signer: {
publicKey: string;
proofOfPosession: string;
};
}[];
delegators: {
txID: string;
Expand Down

0 comments on commit f6518ea

Please sign in to comment.