Deprecated API Calls
This page lists API methods, arguments and responses that are deprecated and will be removed or modified in a future release.

P-Chain API

getCurrentValidators

In v1.0.0, the signature was:
1
platform.getCurrentValidators({subnetID: string}) ->
2
{
3
validators: []{
4
startTime: string,
5
endTime: string,
6
stakeAmount: string, //optional
7
nodeID: string,
8
weight: string, //optional
9
rewardOwner: {
10
locktime: string,
11
threshold: string,
12
addresses: string[]
13
},
14
potentialReward: string,
15
delegationFee: string,
16
uptime: string,
17
connected: boolean
18
},
19
delegators: []{
20
startTime: string,
21
endTime: string,
22
stakeAmount: string, //optional
23
nodeID: string,
24
rewardOwner: {
25
locktime: string,
26
threshold: string,
27
addresses: string[]
28
},
29
potentialReward: string,
30
}
31
}
Copied!
In later versions, the signature was as follows. Note that each validator contains a list of its delegators. Please see the next note for current behavior.
1
platform.getCurrentValidators({subnetID: string}) ->
2
{
3
validators: []{
4
startTime: string,
5
endTime: string,
6
stakeAmount: string, //optional
7
nodeID: string,
8
weight: string, //optional
9
rewardOwner: {
10
locktime: string,
11
threshold: string,
12
addresses: string[]
13
},
14
potentialReward: string,
15
delegationFee: string,
16
uptime: string,
17
connected: boolean,
18
delegators: []{
19
startTime: string,
20
endTime: string,
21
stakeAmount: string, //optional
22
nodeID: string,
23
rewardOwner: {
24
locktime: string,
25
threshold: string,
26
addresses: string[]
27
},
28
potentialReward: string,
29
}
30
},
31
delegators: []{
32
startTime: string,
33
endTime: string,
34
stakeAmount: string, //optional
35
nodeID: string,
36
rewardOwner: {
37
locktime: string,
38
threshold: string,
39
addresses: string[]
40
},
41
potentialReward: string,
42
}
43
}
Copied!
Since v1.0.6, top level delegators field is removed. The signature is now:
1
platform.getCurrentValidators({subnetID: string}) ->
2
{
3
validators: []{
4
startTime: string,
5
endTime: string,
6
stakeAmount: string, //optional
7
nodeID: string,
8
weight: string, //optional
9
rewardOwner: {
10
locktime: string,
11
threshold: string,
12
addresses: string[]
13
},
14
potentialReward: string,
15
delegationFee: string,
16
uptime: string,
17
connected: boolean,
18
delegators: []{
19
startTime: string,
20
endTime: string,
21
stakeAmount: string, //optional
22
nodeID: string,
23
rewardOwner: {
24
locktime: string,
25
threshold: string,
26
addresses: string[]
27
},
28
potentialReward: string,
29
}
30
}
31
}
Copied!

getTxStatus

Before v1.0.4, the signature was:
1
platform.getTxStatus({txID: string} -> status: string
Copied!
v1.0.4 added an argument includeReason. If false or not provided, this method's response was the same as before. If true, this method's response had this new format:
1
{
2
status: string,
3
reason: string //optional
4
}
Copied!
Where reason is the reason the transaction was dropped. reason is only present if status is "Dropped".
Since v1.0.6, the includeReason argument is ignored, and this method's response is always in the new format.
Last modified 10mo ago