Add accessors for allocations and claims maps

This commit is contained in:
Geoff Stuart
2022-10-07 16:41:59 -04:00
parent 6e99a6b9f7
commit e2d5d12e7f
27 changed files with 634 additions and 2 deletions
+87
View File
@@ -170,6 +170,9 @@
* [StateGetActor](#StateGetActor)
* [StateGetAllocation](#StateGetAllocation)
* [StateGetAllocationForPendingDeal](#StateGetAllocationForPendingDeal)
* [StateGetAllocations](#StateGetAllocations)
* [StateGetClaim](#StateGetClaim)
* [StateGetClaims](#StateGetClaims)
* [StateGetNetworkParams](#StateGetNetworkParams)
* [StateGetRandomnessFromBeacon](#StateGetRandomnessFromBeacon)
* [StateGetRandomnessFromTickets](#StateGetRandomnessFromTickets)
@@ -5317,6 +5320,90 @@ Response:
}
```
### StateGetAllocations
StateGetAllocations returns the all the allocations for a given client.
Perms: read
Inputs:
```json
[
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `{}`
### StateGetClaim
StateGetClaim returns the claim for a given address and claim ID.
Perms: read
Inputs:
```json
[
"f01234",
0,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"Provider": 1000,
"Client": 1000,
"Data": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Size": 1032,
"TermMin": 10101,
"TermMax": 10101,
"TermStart": 10101,
"Sector": 9
}
```
### StateGetClaims
StateGetClaims returns the all the claims for a given provider.
Perms: read
Inputs:
```json
[
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `{}`
### StateGetNetworkParams
StateGetNetworkParams return current network params
@@ -180,7 +180,10 @@
* [StateGetActor](#StateGetActor)
* [StateGetAllocation](#StateGetAllocation)
* [StateGetAllocationForPendingDeal](#StateGetAllocationForPendingDeal)
* [StateGetAllocations](#StateGetAllocations)
* [StateGetBeaconEntry](#StateGetBeaconEntry)
* [StateGetClaim](#StateGetClaim)
* [StateGetClaims](#StateGetClaims)
* [StateGetNetworkParams](#StateGetNetworkParams)
* [StateGetRandomnessFromBeacon](#StateGetRandomnessFromBeacon)
* [StateGetRandomnessFromTickets](#StateGetRandomnessFromTickets)
@@ -5800,6 +5803,29 @@ Response:
}
```
### StateGetAllocations
StateGetAllocations returns the all the allocations for a given client.
Perms: read
Inputs:
```json
[
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `{}`
### StateGetBeaconEntry
StateGetBeaconEntry returns the beacon entry for the given filecoin epoch. If
the entry has not yet been produced, the call will block until the entry
@@ -5823,6 +5849,67 @@ Response:
}
```
### StateGetClaim
StateGetClaim returns the claim for a given address and claim ID.
Perms: read
Inputs:
```json
[
"f01234",
0,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"Provider": 1000,
"Client": 1000,
"Data": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Size": 1032,
"TermMin": 10101,
"TermMax": 10101,
"TermStart": 10101,
"Sector": 9
}
```
### StateGetClaims
StateGetClaims returns the all the claims for a given provider.
Perms: read
Inputs:
```json
[
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `{}`
### StateGetNetworkParams
StateGetNetworkParams return current network params