doc - api v0, fix account delegation
@@ -37,14 +37,25 @@ paths:
application/json:
schema:
type: object
- required:
- - value
- - counter
properties:
delegation:
- description: Hex-encoded stake pool ID this account is delegating to
+ description: Delegation information
+ type: object
+ properties:
+ pools:
+ description: List of pools the account has delegated to
+ type: array
+ items:
+ description: The first item is always stake pool ID and the second is always the delegation ratio
+ type: array
+ items:
+ oneOf:
+ - description: Hex-encoded stake pool ID
type: string
pattern: '[0-9a-fA-F]+'
+ - description: Delegation ratio
+ type: integer
+ minimum: 0
value:
description: Current balance of this account
type: integer
@@ -65,15 +76,24 @@ paths:
description: the total amount of rewards received for the associated epoch
type: integer
minimum: 0
+ required:
+ - value
+ - counter
examples:
application/json:
value: |
{
"counter": 1,
- "delegation": "c780f14f9782770014d8bcd514b1bc664653d15f73a7158254730c6e1aa9f356",
+ "delegation": {
+ "pools": [
+ [
+ "c780f14f9782770014d8bcd514b1bc664653d15f73a7158254730c6e1aa9f356",
+ 1
+ ]
+ ]
+ },
"value": 990,
- "last_rewards":
- {
+ "last_rewards": {
"epoch": 42,
"reward": 2028
}
@@ -409,10 +429,12 @@ paths:
description: Timestamp of when leadership was started
type: string
format: date-time
+ nullable: true
finished_at_time:
description: Timestamp of when leadership was finished
type: string
format: date-time
+ nullable: true
enclave_leader_id:
description: ID of leadership event that produced this log entry
type: integer
@@ -878,7 +900,6 @@ paths:
required:
- fixed
- ratio
- - max
properties:
fixed:
description: What get subtracted as fixed value
