From 0ad74fe7b5902482716c22ebb9c733836e40f533 Mon Sep 17 00:00:00 2001 From: 1000101 Date: Tue, 5 Dec 2023 00:36:31 +0100 Subject: [PATCH] chore(dreps): update --- openapi.json | 85 +++++++++---------- openapi.yaml | 77 ++++++++--------- src/schemas/governance/drep_content.yaml | 44 +++------- src/schemas/governance/drep_delegators.yaml | 20 +++++ .../governance/drep_details_content.yaml | 30 +++++-- .../governance/drep_distribution_content.yaml | 4 + src/schemas/governance/drep_metadata.yaml | 31 +++++++ src/schemas/governance/drep_updates.yaml | 26 ++++++ src/schemas/pools/pool_delegations.yaml | 20 ----- 9 files changed, 186 insertions(+), 151 deletions(-) create mode 100644 src/schemas/governance/drep_delegators.yaml create mode 100644 src/schemas/governance/drep_metadata.yaml create mode 100644 src/schemas/governance/drep_updates.yaml delete mode 100644 src/schemas/pools/pool_delegations.yaml diff --git a/openapi.json b/openapi.json index 0f443d9a..0010a1ae 100644 --- a/openapi.json +++ b/openapi.json @@ -7590,56 +7590,28 @@ "items": { "type": "object", "properties": { - "id": { - "type": "integer", - "description": "Id" - }, - "hash": { - "type": "string", - "description": "The raw bytes of the DRep." - }, - "address": { + "drep_id": { "type": "string", - "description": "The Bech32 encoding of the DRep hash." - }, - "has_script": { - "type": "boolean", - "description": "Flag which shows if this DRep credentials are a script hash" + "description": "The Bech32 encoded DRep address" }, - "is_registered": { - "type": "boolean", - "description": "Flags which shows if the drep is registered or not" - }, - "voting_power": { + "hex": { "type": "string", - "description": "The total amount of voting power this DRep is delegated." + "description": "The raw bytes of the DRep" } }, "required": [ - "id", - "hash", - "address", - "has_script", - "is_registered", - "voting_power" + "drep_id", + "hex" ] }, "example": [ { - "id": "2", - "hash": "8788591983aa73981fc92d6cddbbe643959f5a784e84b8bee0db15823f575a5b", - "address": "4ef47f6eb681d5d9fa2f7e16336cd629303c635e8da51e425b76088be9c87443", - "has_script": true, - "is_registered": true, - "voting_power": "100000000" + "drep_id": "drep1mvdu8slennngja7w4un6knwezufra70887zuxpprd64jxfveahn", + "hex": "db1bc3c3f99ce68977ceaf27ab4dd917123ef9e73f85c304236eab23" }, { - "id": "3", - "hash": "3788591983aa73981fc92d6cddbbe643959f5a784e84b8bee0db15823f575a5b", - "view": "2ef47f6eb681d5d9fa2f7e16336cd629303c635e8da51e425b76088be9c8744v", - "has_script": false, - "is_registered": false, - "voting_power": "250000000" + "drep_id": "drep1cxayn4fgy27yaucvhamsvqj3v6835mh3tjjx6x8hdnr4", + "hex": "c1ba49d52822bc4ef30cbf77060251668f1a6ef15ca46d18f76cc758" } ] }, @@ -7648,28 +7620,42 @@ "items": { "type": "object", "properties": { + "drep_id": { + "type": "string", + "description": "Bech32 encoded DRep address" + }, + "hex": { + "type": "string", + "description": "The raw bytes of the DRep" + }, "amount": { "type": "string", "description": "The total amount of voting power this DRep is delegated." }, - "epoch": { - "type": "integer", - "description": "The epoch no this distribution is about." + "is_registered": { + "type": "boolean", + "description": "Flags which shows if the drep is registered or not" + }, + "has_script": { + "type": "boolean", + "description": "Flag which shows if this DRep credentials are a script hash" } }, "required": [ + "drep_id", + "hex", "amount", - "epoch" + "is_registered", + "has_script" ] }, "example": [ { + "drep_id": "drep15cfxz9exyn5rx0807zvxfrvslrjqfchrd4d47kv9e0f46uedqtc", + "hex": "a61261172624e8333ceff098648d90f8e404e2e36d5b5f5985cbd35d", "amount": "2000000", - "epoch": 432 - }, - { - "amount": "300000000", - "epoch": 433 + "is_registered": true, + "has_script": true } ] }, @@ -7685,6 +7671,11 @@ "epoch": { "type": "integer", "description": "The epoch no this distribution is about." + }, + "active_until": { + "nullable": true, + "type": "integer", + "description": "The epoch no until this distribution is active." } }, "required": [ diff --git a/openapi.yaml b/openapi.yaml index 5bfb2485..ff03eb3c 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5569,63 +5569,52 @@ components: items: type: object properties: - id: - type: integer - description: Id - hash: - type: string - description: The raw bytes of the DRep. - address: + drep_id: type: string - description: The Bech32 encoding of the DRep hash. - has_script: - type: boolean - description: Flag which shows if this DRep credentials are a script hash - is_registered: - type: boolean - description: Flags which shows if the drep is registered or not - voting_power: + description: The Bech32 encoded DRep address + hex: type: string - description: The total amount of voting power this DRep is delegated. + description: The raw bytes of the DRep required: - - id - - hash - - address - - has_script - - is_registered - - voting_power + - drep_id + - hex example: - - id: '2' - hash: 8788591983aa73981fc92d6cddbbe643959f5a784e84b8bee0db15823f575a5b - address: 4ef47f6eb681d5d9fa2f7e16336cd629303c635e8da51e425b76088be9c87443 - has_script: true - is_registered: true - voting_power: '100000000' - - id: '3' - hash: 3788591983aa73981fc92d6cddbbe643959f5a784e84b8bee0db15823f575a5b - view: 2ef47f6eb681d5d9fa2f7e16336cd629303c635e8da51e425b76088be9c8744v - has_script: false - is_registered: false - voting_power: '250000000' + - drep_id: drep1mvdu8slennngja7w4un6knwezufra70887zuxpprd64jxfveahn + hex: db1bc3c3f99ce68977ceaf27ab4dd917123ef9e73f85c304236eab23 + - drep_id: drep1cxayn4fgy27yaucvhamsvqj3v6835mh3tjjx6x8hdnr4 + hex: c1ba49d52822bc4ef30cbf77060251668f1a6ef15ca46d18f76cc758 drep_details_content: type: array items: type: object properties: + drep_id: + type: string + description: Bech32 encoded DRep address + hex: + type: string + description: The raw bytes of the DRep amount: type: string description: The total amount of voting power this DRep is delegated. - epoch: - type: integer - description: The epoch no this distribution is about. + is_registered: + type: boolean + description: Flags which shows if the drep is registered or not + has_script: + type: boolean + description: Flag which shows if this DRep credentials are a script hash required: + - drep_id + - hex - amount - - epoch + - is_registered + - has_script example: - - amount: '2000000' - epoch: 432 - - amount: '300000000' - epoch: 433 + - drep_id: drep15cfxz9exyn5rx0807zvxfrvslrjqfchrd4d47kv9e0f46uedqtc + hex: a61261172624e8333ceff098648d90f8e404e2e36d5b5f5985cbd35d + amount: '2000000' + is_registered: true + has_script: true drep_distribution_content: type: array items: @@ -5637,6 +5626,10 @@ components: epoch: type: integer description: The epoch no this distribution is about. + active_until: + nullable: true + type: integer + description: The epoch no until this distribution is active. required: - amount - epoch diff --git a/src/schemas/governance/drep_content.yaml b/src/schemas/governance/drep_content.yaml index 5bb7f649..2adba688 100644 --- a/src/schemas/governance/drep_content.yaml +++ b/src/schemas/governance/drep_content.yaml @@ -2,41 +2,17 @@ type: array items: type: object properties: - id: - type: integer - description: Id - hash: + drep_id: type: string - description: The raw bytes of the DRep. - address: + description: The Bech32 encoded DRep address + hex: type: string - description: The Bech32 encoding of the DRep hash. - has_script: - type: boolean - description: Flag which shows if this DRep credentials are a script hash - is_registered: - type: boolean - description: Flags which shows if the drep is registered or not - voting_power: - type: string - description: The total amount of voting power this DRep is delegated. + description: The raw bytes of the DRep required: - - id - - hash - - address - - has_script - - is_registered - - voting_power + - drep_id + - hex example: - - id: "2" - hash: "8788591983aa73981fc92d6cddbbe643959f5a784e84b8bee0db15823f575a5b" - address: "4ef47f6eb681d5d9fa2f7e16336cd629303c635e8da51e425b76088be9c87443" - has_script: true - is_registered: true - voting_power: "100000000" - - id: "3" - hash: "3788591983aa73981fc92d6cddbbe643959f5a784e84b8bee0db15823f575a5b" - view: "2ef47f6eb681d5d9fa2f7e16336cd629303c635e8da51e425b76088be9c8744v" - has_script: false - is_registered: false - voting_power: "250000000" + - drep_id: "drep1mvdu8slennngja7w4un6knwezufra70887zuxpprd64jxfveahn" + hex: "db1bc3c3f99ce68977ceaf27ab4dd917123ef9e73f85c304236eab23" + - drep_id: "drep1cxayn4fgy27yaucvhamsvqj3v6835mh3tjjx6x8hdnr4" + hex: "c1ba49d52822bc4ef30cbf77060251668f1a6ef15ca46d18f76cc758" diff --git a/src/schemas/governance/drep_delegators.yaml b/src/schemas/governance/drep_delegators.yaml new file mode 100644 index 00000000..09959aa4 --- /dev/null +++ b/src/schemas/governance/drep_delegators.yaml @@ -0,0 +1,20 @@ +type: array +items: + type: object + properties: + address: + type: string + description: Bech32 encoded stake addresses + amount: + type: string + description: Currently delegated amount + required: + - address + - amount +example: + - address: "stake1ux4vspfvwuus9uwyp5p3f0ky7a30jq5j80jxse0fr7pa56sgn8kha" + amount: "1137959159981411" + - address: "stake1uylayej7esmarzd4mk4aru37zh9yz0luj3g9fsvgpfaxulq564r5u" + amount: "16958865648" + - address: "stake1u8lr2pnrgf8f7vrs9lt79hc3sxm8s2w4rwvgpncks3axx6q93d4ck" + amount: "18605647" diff --git a/src/schemas/governance/drep_details_content.yaml b/src/schemas/governance/drep_details_content.yaml index 72cf6384..46a9fed7 100644 --- a/src/schemas/governance/drep_details_content.yaml +++ b/src/schemas/governance/drep_details_content.yaml @@ -2,17 +2,31 @@ type: array items: type: object properties: + drep_id: + type: string + description: Bech32 encoded DRep address + hex: + type: string + description: The raw bytes of the DRep amount: type: string description: The total amount of voting power this DRep is delegated. - epoch: - type: integer - description: The epoch no this distribution is about. + is_registered: + type: boolean + description: Flags which shows if the drep is registered or not + has_script: + type: boolean + description: Flag which shows if this DRep credentials are a script hash + required: + - drep_id + - hex - amount - - epoch + - is_registered + - has_script example: - - amount: "2000000" - epoch: 432 - - amount: "300000000" - epoch: 433 + - drep_id: drep15cfxz9exyn5rx0807zvxfrvslrjqfchrd4d47kv9e0f46uedqtc + hex: a61261172624e8333ceff098648d90f8e404e2e36d5b5f5985cbd35d + amount: "2000000" + is_registered: true + has_script: true diff --git a/src/schemas/governance/drep_distribution_content.yaml b/src/schemas/governance/drep_distribution_content.yaml index 72cf6384..33d3fb5b 100644 --- a/src/schemas/governance/drep_distribution_content.yaml +++ b/src/schemas/governance/drep_distribution_content.yaml @@ -8,6 +8,10 @@ items: epoch: type: integer description: The epoch no this distribution is about. + active_until: + nullable: true + type: integer + description: The epoch no until this distribution is active. required: - amount - epoch diff --git a/src/schemas/governance/drep_metadata.yaml b/src/schemas/governance/drep_metadata.yaml new file mode 100644 index 00000000..ae1e036a --- /dev/null +++ b/src/schemas/governance/drep_metadata.yaml @@ -0,0 +1,31 @@ +type: array +items: + type: object + properties: + drep_id: + type: string + description: Bech32 encoded addresses + 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 + 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 \ No newline at end of file diff --git a/src/schemas/governance/drep_updates.yaml b/src/schemas/governance/drep_updates.yaml new file mode 100644 index 00000000..8e2796f4 --- /dev/null +++ b/src/schemas/governance/drep_updates.yaml @@ -0,0 +1,26 @@ +type: array +items: + type: object + properties: + tx_hash: + type: string + description: Transaction ID + cert_index: + type: integer + description: Certificate within the transaction + action: + type: string + enum: [registered, deregistered] + description: Action in the certificate + required: + - tx_hash + - cert_index + - action +example: + - tx_hash: "f4097fbdb87ab7c7ab44b30d4e2b81713a058488975d1ab8b05c381dd946a393" + cert_index: 0 + action: registered + - tx_hash: "dd3243af975be4b5bedce4e5f5b483b2386d5ad207d05e0289c1df0eb261447e" + cert_index: 0 + action: deregistered + diff --git a/src/schemas/pools/pool_delegations.yaml b/src/schemas/pools/pool_delegations.yaml deleted file mode 100644 index 1d4f96b5..00000000 --- a/src/schemas/pools/pool_delegations.yaml +++ /dev/null @@ -1,20 +0,0 @@ -type: array -items: - type: object - properties: - tx_hash: - type: string - description: Transaction ID - cert_index: - type: integer - description: Certificate within the transaction - required: - - tx_hash - - cert_index -example: - - tx_hash: "6804edf9712d2b619edb6ac86861fe93a730693183a262b165fcc1ba1bc99cad" - cert_index: 0 - - tx_hash: "9c190bc1ac88b2ab0c05a82d7de8b71b67a9316377e865748a89d4426c0d3005" - cert_index: 0 - - tx_hash: "e14a75b0eb2625de7055f1f580d70426311b78e0d36dd695a6bdc96c7b3d80e0" - cert_index: 1