Skip to content

Commit

Permalink
chore(dreps): update
Browse files Browse the repository at this point in the history
  • Loading branch information
1000101 committed Dec 10, 2023
1 parent a38a3ce commit 363a02e
Show file tree
Hide file tree
Showing 9 changed files with 833 additions and 91 deletions.
320 changes: 299 additions & 21 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -967,11 +967,23 @@
"tags": [
"Cardano » Governance"
],
"summary": "xxx",
"description": "xxx",
"summary": "Specific DRep",
"description": "DRep information.",
"parameters": [
{
"in": "path",
"name": "drep_id",
"required": true,
"schema": {
"type": "string"
},
"description": "Bech32 or hexadecimal DRep ID.",
"example": "drep15cfxz9exyn5rx0807zvxfrvslrjqfchrd4d47kv9e0f46uedqtc"
}
],
"responses": {
"200": {
"description": "xxx",
"description": "Return the DRep information content",
"content": {
"application/json": {
"schema": {
Expand All @@ -998,20 +1010,204 @@
}
}
},
"/governance/dreps/{hash}/distribution": {
"/governance/dreps/{hash}/delegators": {
"get": {
"tags": [
"Cardano » Governance"
],
"summary": "DRep pool delegators",
"description": "List of Drep delegators.",
"parameters": [
{
"in": "path",
"name": "drep_id",
"required": true,
"schema": {
"type": "string"
},
"description": "Bech32 or hexadecimal drep ID.",
"example": "drep1mvdu8slennngja7w4un6knwezufra70887zuxpprd64jxfveahn"
},
{
"in": "query",
"name": "count",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 100
},
"description": "The number of results displayed on one page."
},
{
"in": "query",
"name": "page",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 21474836,
"default": 1
},
"description": "The page number for listing the results."
},
{
"in": "query",
"name": "order",
"required": false,
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
],
"default": "asc"
},
"description": "The ordering of items from the point of view of the blockchain,\nnot the page listing itself. By default, we return oldest first, newest last.\n"
}
],
"responses": {
"200": {
"description": "Return the DRep delegations",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/drep_delegators"
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"403": {
"$ref": "#/components/responses/403"
},
"418": {
"$ref": "#/components/responses/418"
},
"429": {
"$ref": "#/components/responses/429"
},
"500": {
"$ref": "#/components/responses/500"
}
}
}
},
"/governance/dreps/{hash}/metadata": {
"get": {
"tags": [
"Cardano » Governance"
],
"summary": "DRep metadata",
"description": "DRep information.",
"parameters": [
{
"in": "path",
"name": "drep_id",
"required": true,
"schema": {
"type": "string"
},
"description": "Bech32 or hexadecimal DRep ID.",
"example": "drep15cfxz9exyn5rx0807zvxfrvslrjqfchrd4d47kv9e0f46uedqtc"
}
],
"responses": {
"200": {
"description": "Return the DRep metadata content.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/drep_metadata"
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"403": {
"$ref": "#/components/responses/403"
},
"418": {
"$ref": "#/components/responses/418"
},
"429": {
"$ref": "#/components/responses/429"
},
"500": {
"$ref": "#/components/responses/500"
}
}
}
},
"/governance/dreps/{hash}/updates": {
"get": {
"tags": [
"Cardano » Governance"
],
"summary": "xxx",
"description": "xxx",
"summary": "DRep updates",
"description": "List of certificate updates to the DRep.",
"parameters": [
{
"in": "path",
"name": "drep_id",
"required": true,
"schema": {
"type": "string"
},
"description": "Bech32 or hexadecimal DRep ID.",
"example": "drep15cfxz9exyn5rx0807zvxfrvslrjqfchrd4d47kv9e0f46uedqtc"
},
{
"in": "query",
"name": "count",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 100
},
"description": "The number of results displayed on one page."
},
{
"in": "query",
"name": "page",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 21474836,
"default": 1
},
"description": "The page number for listing the results."
},
{
"in": "query",
"name": "order",
"required": false,
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
],
"default": "asc"
},
"description": "The ordering of items from the point of view of the blockchain,\nnot the page listing itself. By default, we return oldest first, newest last.\n"
}
],
"responses": {
"200": {
"description": "xxx",
"description": "Return the Drep updates history",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/drep_distribution_content"
"$ref": "#/components/schemas/drep_updates"
}
}
}
Expand Down Expand Up @@ -7659,38 +7855,120 @@
}
]
},
"drep_distribution_content": {
"drep_delegators": {
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "Bech32 encoded stake addresses"
},
"amount": {
"type": "string",
"description": "The total amount of voting power this DRep is delegated."
"description": "Currently delegated amount"
}
},
"required": [
"address",
"amount"
]
},
"example": [
{
"address": "stake1ux4vspfvwuus9uwyp5p3f0ky7a30jq5j80jxse0fr7pa56sgn8kha",
"amount": "1137959159981411"
},
{
"address": "stake1uylayej7esmarzd4mk4aru37zh9yz0luj3g9fsvgpfaxulq564r5u",
"amount": "16958865648"
},
{
"address": "stake1u8lr2pnrgf8f7vrs9lt79hc3sxm8s2w4rwvgpncks3axx6q93d4ck",
"amount": "18605647"
}
]
},
"drep_metadata": {
"type": "array",
"items": {
"type": "object",
"properties": {
"drep_id": {
"type": "string",
"description": "Bech32 encoded addresses"
},
"epoch": {
"type": "integer",
"description": "The epoch no this distribution is about."
"hex": {
"type": "string",
"description": "The raw bytes of the DRep"
},
"url": {
"type": "string",
"nullable": true,
"example": "https://stakenuts.com/drep.json",
"description": "URL to the drep metadata"
},
"active_until": {
"hash": {
"type": "string",
"nullable": true,
"example": "69c0c68cb57f4a5b4a87bad896fc274678e7aea98e200fa14a1cb40c0cab1d8c\"",
"description": "Hash of the metadata file"
}
},
"required": [
"drep_id",
"hex",
"url",
"hash"
]
},
"example": [
{
"drep_id": "drep15cfxz9exyn5rx0807zvxfrvslrjqfchrd4d47kv9e0f46uedqtc",
"hex": "a61261172624e8333ceff098648d90f8e404e2e36d5b5f5985cbd35d",
"url": "https://stakenuts.com/drep.json",
"hash": "69c0c68cb57f4a5b4a87bad896fc274678e7aea98e200fa14a1cb40c0cab1d8c"
}
]
},
"drep_updates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"tx_hash": {
"type": "string",
"description": "Transaction ID"
},
"cert_index": {
"type": "integer",
"description": "The epoch no until this distribution is active."
"description": "Certificate within the transaction"
},
"action": {
"type": "string",
"enum": [
"registered",
"deregistered"
],
"description": "Action in the certificate"
}
},
"required": [
"amount",
"epoch"
"tx_hash",
"cert_index",
"action"
]
},
"example": [
{
"amount": "2000000",
"epoch": 432
"tx_hash": "f4097fbdb87ab7c7ab44b30d4e2b81713a058488975d1ab8b05c381dd946a393",
"cert_index": 0,
"action": "registered"
},
{
"amount": "300000000",
"epoch": 433
"tx_hash": "dd3243af975be4b5bedce4e5f5b483b2386d5ad207d05e0289c1df0eb261447e",
"cert_index": 0,
"action": "deregistered"
}
]
},
Expand Down
Loading

0 comments on commit 363a02e

Please sign in to comment.