diff --git a/files/grest/rpc/governance/proposal_votes.sql b/files/grest/rpc/governance/proposal_votes.sql index c7822697..f4ee44ee 100644 --- a/files/grest/rpc/governance/proposal_votes.sql +++ b/files/grest/rpc/governance/proposal_votes.sql @@ -2,6 +2,7 @@ CREATE OR REPLACE FUNCTION grest.proposal_votes(_proposal_tx_hash text, _proposa RETURNS TABLE ( block_time integer, voter_role text, + has_script boolean, voter text, voter_hex text, vote text, @@ -16,6 +17,7 @@ AS $$ distinct on (COALESCE(ENCODE(ch.raw, 'hex'), dh.view, ph.view)) EXTRACT(EPOCH FROM vote_block.time)::integer AS block_time, vp.voter_role, + COALESCE(dh.has_script, COALESCE(ch.has_script), false) AS has_script, COALESCE(ENCODE(ch.raw, 'hex'), dh.view, ph.view) as voter, COALESCE(ENCODE(ch.raw, 'hex'), ENCODE(dh.raw, 'hex'), ENCODE(ph.hash_raw, 'hex')) as voter_hex, vp.vote, diff --git a/specs/results/koiosapi-guild.yaml b/specs/results/koiosapi-guild.yaml index 971c02dc..d9b67981 100644 --- a/specs/results/koiosapi-guild.yaml +++ b/specs/results/koiosapi-guild.yaml @@ -8,7 +8,7 @@ info: license: name: Creative Commons Attribution 4.0 International url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE - version: v1.2.0a + version: v1.2.0b description: | Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples. @@ -5151,7 +5151,7 @@ components: example: f948a9f7a863d8062565809aba3925aa41334e976c11c837fe1a74c0 has_script: type: boolean - description: Flag which shows if this DRep credentials are a script hash + description: Flag which shows if this credential is a script hash example: false registered: type: boolean @@ -5449,6 +5449,8 @@ components: description: The role of the voter enum: ["ConstitutionalCommittee", "DRep", "SPO"] example: DRep + has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" voter: type: string description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format) @@ -5494,7 +5496,7 @@ components: example: 6095e643ea6f1cccb6e463ec34349026b3a48621aac5d512655ab1bf cc_cold_has_script: type: boolean - description: Flag which shows if this committee member cold credential is a script hash + description: Flag which shows if this credential is a script hash example: false cc_hot_hex: type: @@ -5506,7 +5508,7 @@ components: type: - boolean - 'null' - description: Flag which shows if this committee member hot credential is a script hash + description: Flag which shows if this credential is a script hash example: false expiration_epoch: type: number diff --git a/specs/results/koiosapi-mainnet.yaml b/specs/results/koiosapi-mainnet.yaml index 52dc9b8c..6d88a249 100644 --- a/specs/results/koiosapi-mainnet.yaml +++ b/specs/results/koiosapi-mainnet.yaml @@ -8,7 +8,7 @@ info: license: name: Creative Commons Attribution 4.0 International url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE - version: v1.2.0a + version: v1.2.0b description: | Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples. @@ -5151,7 +5151,7 @@ components: example: f948a9f7a863d8062565809aba3925aa41334e976c11c837fe1a74c0 has_script: type: boolean - description: Flag which shows if this DRep credentials are a script hash + description: Flag which shows if this credential is a script hash example: false registered: type: boolean @@ -5449,6 +5449,8 @@ components: description: The role of the voter enum: ["ConstitutionalCommittee", "DRep", "SPO"] example: DRep + has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" voter: type: string description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format) @@ -5494,7 +5496,7 @@ components: example: 6095e643ea6f1cccb6e463ec34349026b3a48621aac5d512655ab1bf cc_cold_has_script: type: boolean - description: Flag which shows if this committee member cold credential is a script hash + description: Flag which shows if this credential is a script hash example: false cc_hot_hex: type: @@ -5506,7 +5508,7 @@ components: type: - boolean - 'null' - description: Flag which shows if this committee member hot credential is a script hash + description: Flag which shows if this credential is a script hash example: false expiration_epoch: type: number diff --git a/specs/results/koiosapi-preprod.yaml b/specs/results/koiosapi-preprod.yaml index ed6454ca..e37920e4 100644 --- a/specs/results/koiosapi-preprod.yaml +++ b/specs/results/koiosapi-preprod.yaml @@ -8,7 +8,7 @@ info: license: name: Creative Commons Attribution 4.0 International url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE - version: v1.2.0a + version: v1.2.0b description: | Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples. @@ -5151,7 +5151,7 @@ components: example: f948a9f7a863d8062565809aba3925aa41334e976c11c837fe1a74c0 has_script: type: boolean - description: Flag which shows if this DRep credentials are a script hash + description: Flag which shows if this credential is a script hash example: false registered: type: boolean @@ -5449,6 +5449,8 @@ components: description: The role of the voter enum: ["ConstitutionalCommittee", "DRep", "SPO"] example: DRep + has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" voter: type: string description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format) @@ -5494,7 +5496,7 @@ components: example: 6095e643ea6f1cccb6e463ec34349026b3a48621aac5d512655ab1bf cc_cold_has_script: type: boolean - description: Flag which shows if this committee member cold credential is a script hash + description: Flag which shows if this credential is a script hash example: false cc_hot_hex: type: @@ -5506,7 +5508,7 @@ components: type: - boolean - 'null' - description: Flag which shows if this committee member hot credential is a script hash + description: Flag which shows if this credential is a script hash example: false expiration_epoch: type: number diff --git a/specs/results/koiosapi-preview.yaml b/specs/results/koiosapi-preview.yaml index 8d3d3bff..0dcad9ac 100644 --- a/specs/results/koiosapi-preview.yaml +++ b/specs/results/koiosapi-preview.yaml @@ -8,7 +8,7 @@ info: license: name: Creative Commons Attribution 4.0 International url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE - version: v1.2.0a + version: v1.2.0b description: | Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples. @@ -5151,7 +5151,7 @@ components: example: f948a9f7a863d8062565809aba3925aa41334e976c11c837fe1a74c0 has_script: type: boolean - description: Flag which shows if this DRep credentials are a script hash + description: Flag which shows if this credential is a script hash example: false registered: type: boolean @@ -5449,6 +5449,8 @@ components: description: The role of the voter enum: ["ConstitutionalCommittee", "DRep", "SPO"] example: DRep + has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" voter: type: string description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format) @@ -5494,7 +5496,7 @@ components: example: 6095e643ea6f1cccb6e463ec34349026b3a48621aac5d512655ab1bf cc_cold_has_script: type: boolean - description: Flag which shows if this committee member cold credential is a script hash + description: Flag which shows if this credential is a script hash example: false cc_hot_hex: type: @@ -5506,7 +5508,7 @@ components: type: - boolean - 'null' - description: Flag which shows if this committee member hot credential is a script hash + description: Flag which shows if this credential is a script hash example: false expiration_epoch: type: number diff --git a/specs/templates/1-api-info.yaml b/specs/templates/1-api-info.yaml index 0620905d..64780cde 100644 --- a/specs/templates/1-api-info.yaml +++ b/specs/templates/1-api-info.yaml @@ -7,7 +7,7 @@ info: license: name: Creative Commons Attribution 4.0 International url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE - version: v1.2.0a + version: v1.2.0b description: | Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples. diff --git a/specs/templates/4-api-schemas.yaml b/specs/templates/4-api-schemas.yaml index df537706..ef23e5de 100644 --- a/specs/templates/4-api-schemas.yaml +++ b/specs/templates/4-api-schemas.yaml @@ -2328,7 +2328,7 @@ schemas: example: f948a9f7a863d8062565809aba3925aa41334e976c11c837fe1a74c0 has_script: type: boolean - description: Flag which shows if this DRep credentials are a script hash + description: Flag which shows if this credential is a script hash example: false registered: type: boolean @@ -2626,6 +2626,8 @@ schemas: description: The role of the voter enum: ["ConstitutionalCommittee", "DRep", "SPO"] example: DRep + has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" voter: type: string description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format) @@ -2671,7 +2673,7 @@ schemas: example: 6095e643ea6f1cccb6e463ec34349026b3a48621aac5d512655ab1bf cc_cold_has_script: type: boolean - description: Flag which shows if this committee member cold credential is a script hash + description: Flag which shows if this credential is a script hash example: false cc_hot_hex: type: @@ -2683,7 +2685,7 @@ schemas: type: - boolean - 'null' - description: Flag which shows if this committee member hot credential is a script hash + description: Flag which shows if this credential is a script hash example: false expiration_epoch: type: number