diff --git a/files/grest/rpc/account/account_info.sql b/files/grest/rpc/account/account_info.sql index 4f4cfcb1..a21bd2a7 100644 --- a/files/grest/rpc/account/account_info.sql +++ b/files/grest/rpc/account/account_info.sql @@ -75,7 +75,7 @@ BEGIN LEFT JOIN ( SELECT dv.addr_id, - dh.view AS delegated_drep + grest.cip129_hex_to_drep_id(dh.raw, dh.has_script) AS delegated_drep FROM delegation_vote AS dv INNER JOIN drep_hash AS dh ON dh.id = dv.drep_hash_id WHERE dv.addr_id = ANY(sa_id_list) diff --git a/files/grest/rpc/account/account_info_cached.sql b/files/grest/rpc/account/account_info_cached.sql index 5d3ac0fc..4a75be43 100644 --- a/files/grest/rpc/account/account_info_cached.sql +++ b/files/grest/rpc/account/account_info_cached.sql @@ -3,11 +3,13 @@ RETURNS TABLE ( stake_address varchar, status text, delegated_pool varchar, + delegated_drep varchar, total_balance text, utxo text, rewards text, withdrawals text, rewards_available text, + deposit text, reserves text, treasury text ) @@ -38,6 +40,7 @@ BEGIN sdc.rewards::text, sdc.withdrawals::text, sdc.rewards_available::text, + COALESCE(status_t.deposit,0)::text AS deposit, COALESCE(reserves_t.reserves, 0)::text AS reserves, COALESCE(treasury_t.treasury, 0)::text AS treasury FROM grest.stake_distribution_cache AS sdc @@ -55,10 +58,34 @@ BEGIN WHERE stake_deregistration.addr_id = stake_registration.addr_id AND stake_deregistration.tx_id > stake_registration.tx_id ) - ) AS registered + ) AS registered, + ( + SELECT sr.deposit FROM stake_registration AS sr + WHERE sr.addr_id = sa.id + AND NOT EXISTS ( + SELECT TRUE + FROM stake_deregistration AS sd + WHERE + sd.addr_id = sr.addr_id + AND sd.tx_id > sr.tx_id + ) + ) AS deposit FROM public.stake_address AS sas WHERE sas.id = ANY(sa_id_list) ) AS status_t ON sdc.stake_address = status_t.view + LEFT JOIN ( + SELECT + dv.addr_id, + grest.cip129_hex_to_drep_id(dh.raw, dh.has_script) AS delegated_drep + FROM delegation_vote AS dv + INNER JOIN drep_hash AS dh ON dh.id = dv.drep_hash_id + WHERE dv.addr_id = ANY(sa_id_list) + AND NOT EXISTS ( + SELECT TRUE + FROM delegation_vote AS dv1 + WHERE dv1.addr_id = dv.addr_id + AND dv1.id > dv.id) + ) AS vote_t ON vote_t.addr_id = status_t.id LEFT JOIN ( SELECT r.addr_id, diff --git a/specs/results/koiosapi-guild.yaml b/specs/results/koiosapi-guild.yaml index d9b67981..8566d5df 100644 --- a/specs/results/koiosapi-guild.yaml +++ b/specs/results/koiosapi-guild.yaml @@ -1478,7 +1478,7 @@ paths: tags: - Governance parameters: - - $ref: "#/components/parameters/_committee_hash" + - $ref: "#/components/parameters/_cc_hot_id" responses: "200": description: Success!! @@ -1520,7 +1520,7 @@ paths: tags: - Governance parameters: - - $ref: "#/components/parameters/_credential" + - $ref: "#/components/parameters/_voter_id" responses: "200": description: Success!! @@ -1543,8 +1543,7 @@ paths: tags: - Governance parameters: - - $ref: "#/components/parameters/_proposal_tx_hash" - - $ref: "#/components/parameters/_proposal_index" + - $ref: "#/components/parameters/_proposal_id" responses: "200": description: Success!! @@ -2089,10 +2088,10 @@ components: in: query required: false allowEmptyValue: true - _credential: + _voter_id: deprecated: false - name: _credential - description: Voter (Drep, SPO, Committee Member) in Hex format + name: _voter_id + description: Voter ID (Drep, SPO, Committee Member) in Bech32 format (CIP-5 | CIP-129) schema: type: string example: "drep1s9qaseg7qyum807fcv0hdky9gv0c89tn98t4urjn5ewz57dml0r" @@ -2119,13 +2118,13 @@ components: in: query required: false allowEmptyValue: true - _committee_hash: + _cc_hot_id: deprecated: false - name: _committee_hash - description: Committee hash in hexadecimal format (hex) + name: _cc_hot_id + description: Committee member hot key ID in Bech32 format (CIP-5 | CIP-129) schema: type: string - example: "65d497b875c56ab213586a4006d4f6658970573ea8e2398893857472" + example: "cc_hot1qgqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvcdjk7" in: query required: false allowEmptyValue: true @@ -2199,26 +2198,16 @@ components: in: query required: true allowEmptyValue: false - _proposal_tx_hash: + _proposal_id: deprecated: false - name: _proposal_tx_hash - description: Transaction Hash of government proposal in hexadecimal format (hex) - example: "e61f151fcef9e99dff5c705f8d5de18891f8d1d92d69fef5ff608d2c29a7c133" + name: _proposal_id + description: Government proposal ID in CIP-129 Bech32 format + example: "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf" schema: type: string in: query required: true allowEmptyValue: false - _proposal_index: - deprecated: false - name: _proposal_index - description: Index of governance proposal in transaction - schema: - type: number - example: 0 - in: query - required: true - allowEmptyValue: false requestBodies: block_hashes: content: @@ -4171,8 +4160,8 @@ components: type: - 'null' - string - description: Account's current delegation status to DRep ID in Bech32 format - example: drep1gj49xmfcg6ev89ur2yad9c5p7z0pgfxggyakz9pua06vqh5vnp0 + description: Account's current delegation status to DRep ID in CIP-129 Bech32 format + example: drep1yfhyq6tztjksqqpd5lglc3zr2tn8vylgjh9xzz7n2p4l4lgk3qam3 delegated_pool: anyOf: - type: 'null' @@ -5143,12 +5132,12 @@ components: properties: drep_id: type: string - description: DRep ID in bech32 format - example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + description: DRep ID in CIP-129 bech32 format + example: drep1yfhyq6tztjksqqpd5lglc3zr2tn8vylgjh9xzz7n2p4l4lgk3qam3 hex: type: string description: DRep ID in hex format - example: f948a9f7a863d8062565809aba3925aa41334e976c11c837fe1a74c0 + example: 6e4069625cad00002da7d1fc444352e67613e895ca610bd3506bfafd has_script: type: boolean description: Flag which shows if this credential is a script hash @@ -5243,6 +5232,8 @@ components: $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: $ref: "#/components/schemas/drep_info/items/properties/hex" + has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" url: $ref: "#/components/schemas/drep_info/items/properties/url" hash: @@ -5289,6 +5280,8 @@ components: $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: $ref: "#/components/schemas/drep_info/items/properties/hex" + has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" update_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" cert_index: @@ -5315,6 +5308,8 @@ components: type: array items: properties: + proposal_id: + $ref: "#/components/schemas/proposal_list/items/properties/proposal_id" proposal_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" proposal_index: @@ -5349,6 +5344,10 @@ components: properties: block_time: $ref: "#/components/schemas/blocks/items/properties/block_time" + proposal_id: + type: string + description: Proposal Action ID in accordance with CIP-129 format + example: 'gov_action17m93skslaxyd45gpr6ernkdzs852h564wsterr8l6lheu7hu7kvsqecyqdh' proposal_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" proposal_index: @@ -5449,16 +5448,16 @@ 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: + voter_id: type: string - description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format) - example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + description: Voter's DRep ID (CIP-129 bech32 format), pool ID (bech32 format) or committee hot ID (CIP-129 bech32 format) + example: drep1yfhyq6tztjksqqpd5lglc3zr2tn8vylgjh9xzz7n2p4l4lgk3qam3 voter_hex: type: string description: Voter's DRep ID , pool ID or committee hash in hex format - example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + example: 6e4069625cad00002da7d1fc444352e67613e895ca610bd3506bfafd + voter_has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" vote: $ref: "#/components/schemas/drep_votes/items/properties/vote" meta_url: @@ -5469,6 +5468,8 @@ components: description: Current governance committee type: object properties: + proposal_id: + $ref: "#/components/schemas/proposal_list/items/properties/proposal_id" proposal_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" proposal_index: diff --git a/specs/results/koiosapi-mainnet.yaml b/specs/results/koiosapi-mainnet.yaml index 6d88a249..d3b40ea5 100644 --- a/specs/results/koiosapi-mainnet.yaml +++ b/specs/results/koiosapi-mainnet.yaml @@ -1478,7 +1478,7 @@ paths: tags: - Governance parameters: - - $ref: "#/components/parameters/_committee_hash" + - $ref: "#/components/parameters/_cc_hot_id" responses: "200": description: Success!! @@ -1520,7 +1520,7 @@ paths: tags: - Governance parameters: - - $ref: "#/components/parameters/_credential" + - $ref: "#/components/parameters/_voter_id" responses: "200": description: Success!! @@ -1543,8 +1543,7 @@ paths: tags: - Governance parameters: - - $ref: "#/components/parameters/_proposal_tx_hash" - - $ref: "#/components/parameters/_proposal_index" + - $ref: "#/components/parameters/_proposal_id" responses: "200": description: Success!! @@ -2089,10 +2088,10 @@ components: in: query required: false allowEmptyValue: true - _credential: + _voter_id: deprecated: false - name: _credential - description: Voter (Drep, SPO, Committee Member) in Hex format + name: _voter_id + description: Voter ID (Drep, SPO, Committee Member) in Bech32 format (CIP-5 | CIP-129) schema: type: string example: "drep17l6sywnwqu9aedd6aumev42w39ln5zfl9nw7j4ak6u8swyrwvz3" @@ -2119,13 +2118,13 @@ components: in: query required: false allowEmptyValue: true - _committee_hash: + _cc_hot_id: deprecated: false - name: _committee_hash - description: Committee hash in hexadecimal format (hex) + name: _cc_hot_id + description: Committee member hot key ID in Bech32 format (CIP-5 | CIP-129) schema: type: string - example: "49fa008218cd619afe6aa8a1a93303f242440722b314f36bda2c2e23" + example: "cc_hot1qgqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvcdjk7" in: query required: false allowEmptyValue: true @@ -2199,26 +2198,16 @@ components: in: query required: true allowEmptyValue: false - _proposal_tx_hash: + _proposal_id: deprecated: false - name: _proposal_tx_hash - description: Transaction Hash of government proposal in hexadecimal format (hex) - example: "e61f151fcef9e99dff5c705f8d5de18891f8d1d92d69fef5ff608d2c29a7c133" + name: _proposal_id + description: Government proposal ID in CIP-129 Bech32 format + example: "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf" schema: type: string in: query required: true allowEmptyValue: false - _proposal_index: - deprecated: false - name: _proposal_index - description: Index of governance proposal in transaction - schema: - type: number - example: 0 - in: query - required: true - allowEmptyValue: false requestBodies: block_hashes: content: @@ -4171,8 +4160,8 @@ components: type: - 'null' - string - description: Account's current delegation status to DRep ID in Bech32 format - example: drep1gj49xmfcg6ev89ur2yad9c5p7z0pgfxggyakz9pua06vqh5vnp0 + description: Account's current delegation status to DRep ID in CIP-129 Bech32 format + example: drep1yfhyq6tztjksqqpd5lglc3zr2tn8vylgjh9xzz7n2p4l4lgk3qam3 delegated_pool: anyOf: - type: 'null' @@ -5143,12 +5132,12 @@ components: properties: drep_id: type: string - description: DRep ID in bech32 format - example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + description: DRep ID in CIP-129 bech32 format + example: drep1yfhyq6tztjksqqpd5lglc3zr2tn8vylgjh9xzz7n2p4l4lgk3qam3 hex: type: string description: DRep ID in hex format - example: f948a9f7a863d8062565809aba3925aa41334e976c11c837fe1a74c0 + example: 6e4069625cad00002da7d1fc444352e67613e895ca610bd3506bfafd has_script: type: boolean description: Flag which shows if this credential is a script hash @@ -5243,6 +5232,8 @@ components: $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: $ref: "#/components/schemas/drep_info/items/properties/hex" + has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" url: $ref: "#/components/schemas/drep_info/items/properties/url" hash: @@ -5289,6 +5280,8 @@ components: $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: $ref: "#/components/schemas/drep_info/items/properties/hex" + has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" update_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" cert_index: @@ -5315,6 +5308,8 @@ components: type: array items: properties: + proposal_id: + $ref: "#/components/schemas/proposal_list/items/properties/proposal_id" proposal_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" proposal_index: @@ -5349,6 +5344,10 @@ components: properties: block_time: $ref: "#/components/schemas/blocks/items/properties/block_time" + proposal_id: + type: string + description: Proposal Action ID in accordance with CIP-129 format + example: 'gov_action17m93skslaxyd45gpr6ernkdzs852h564wsterr8l6lheu7hu7kvsqecyqdh' proposal_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" proposal_index: @@ -5449,16 +5448,16 @@ 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: + voter_id: type: string - description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format) - example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + description: Voter's DRep ID (CIP-129 bech32 format), pool ID (bech32 format) or committee hot ID (CIP-129 bech32 format) + example: drep1yfhyq6tztjksqqpd5lglc3zr2tn8vylgjh9xzz7n2p4l4lgk3qam3 voter_hex: type: string description: Voter's DRep ID , pool ID or committee hash in hex format - example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + example: 6e4069625cad00002da7d1fc444352e67613e895ca610bd3506bfafd + voter_has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" vote: $ref: "#/components/schemas/drep_votes/items/properties/vote" meta_url: @@ -5469,6 +5468,8 @@ components: description: Current governance committee type: object properties: + proposal_id: + $ref: "#/components/schemas/proposal_list/items/properties/proposal_id" proposal_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" proposal_index: diff --git a/specs/results/koiosapi-preprod.yaml b/specs/results/koiosapi-preprod.yaml index e37920e4..2f523011 100644 --- a/specs/results/koiosapi-preprod.yaml +++ b/specs/results/koiosapi-preprod.yaml @@ -1478,7 +1478,7 @@ paths: tags: - Governance parameters: - - $ref: "#/components/parameters/_committee_hash" + - $ref: "#/components/parameters/_cc_hot_id" responses: "200": description: Success!! @@ -1520,7 +1520,7 @@ paths: tags: - Governance parameters: - - $ref: "#/components/parameters/_credential" + - $ref: "#/components/parameters/_voter_id" responses: "200": description: Success!! @@ -1543,8 +1543,7 @@ paths: tags: - Governance parameters: - - $ref: "#/components/parameters/_proposal_tx_hash" - - $ref: "#/components/parameters/_proposal_index" + - $ref: "#/components/parameters/_proposal_id" responses: "200": description: Success!! @@ -2089,10 +2088,10 @@ components: in: query required: false allowEmptyValue: true - _credential: + _voter_id: deprecated: false - name: _credential - description: Voter (Drep, SPO, Committee Member) in Hex format + name: _voter_id + description: Voter ID (Drep, SPO, Committee Member) in Bech32 format (CIP-5 | CIP-129) schema: type: string example: "drep1kxtwaqtayj6vklc57u93xayjvkwgvefh8drscqp5a5y6jz7m6rd" @@ -2119,13 +2118,13 @@ components: in: query required: false allowEmptyValue: true - _committee_hash: + _cc_hot_id: deprecated: false - name: _committee_hash - description: Committee hash in hexadecimal format (hex) + name: _cc_hot_id + description: Committee member hot key ID in Bech32 format (CIP-5 | CIP-129) schema: type: string - example: "f8f56120e1ec00feb088ece39ef14f07339afeb37b4e949ff12b89ff" + example: "cc_hot1qgqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvcdjk7" in: query required: false allowEmptyValue: true @@ -2199,26 +2198,16 @@ components: in: query required: true allowEmptyValue: false - _proposal_tx_hash: + _proposal_id: deprecated: false - name: _proposal_tx_hash - description: Transaction Hash of government proposal in hexadecimal format (hex) - example: "e61f151fcef9e99dff5c705f8d5de18891f8d1d92d69fef5ff608d2c29a7c133" + name: _proposal_id + description: Government proposal ID in CIP-129 Bech32 format + example: "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf" schema: type: string in: query required: true allowEmptyValue: false - _proposal_index: - deprecated: false - name: _proposal_index - description: Index of governance proposal in transaction - schema: - type: number - example: 0 - in: query - required: true - allowEmptyValue: false requestBodies: block_hashes: content: @@ -4171,8 +4160,8 @@ components: type: - 'null' - string - description: Account's current delegation status to DRep ID in Bech32 format - example: drep1gj49xmfcg6ev89ur2yad9c5p7z0pgfxggyakz9pua06vqh5vnp0 + description: Account's current delegation status to DRep ID in CIP-129 Bech32 format + example: drep1yfhyq6tztjksqqpd5lglc3zr2tn8vylgjh9xzz7n2p4l4lgk3qam3 delegated_pool: anyOf: - type: 'null' @@ -5143,12 +5132,12 @@ components: properties: drep_id: type: string - description: DRep ID in bech32 format - example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + description: DRep ID in CIP-129 bech32 format + example: drep1yfhyq6tztjksqqpd5lglc3zr2tn8vylgjh9xzz7n2p4l4lgk3qam3 hex: type: string description: DRep ID in hex format - example: f948a9f7a863d8062565809aba3925aa41334e976c11c837fe1a74c0 + example: 6e4069625cad00002da7d1fc444352e67613e895ca610bd3506bfafd has_script: type: boolean description: Flag which shows if this credential is a script hash @@ -5243,6 +5232,8 @@ components: $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: $ref: "#/components/schemas/drep_info/items/properties/hex" + has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" url: $ref: "#/components/schemas/drep_info/items/properties/url" hash: @@ -5289,6 +5280,8 @@ components: $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: $ref: "#/components/schemas/drep_info/items/properties/hex" + has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" update_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" cert_index: @@ -5315,6 +5308,8 @@ components: type: array items: properties: + proposal_id: + $ref: "#/components/schemas/proposal_list/items/properties/proposal_id" proposal_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" proposal_index: @@ -5349,6 +5344,10 @@ components: properties: block_time: $ref: "#/components/schemas/blocks/items/properties/block_time" + proposal_id: + type: string + description: Proposal Action ID in accordance with CIP-129 format + example: 'gov_action17m93skslaxyd45gpr6ernkdzs852h564wsterr8l6lheu7hu7kvsqecyqdh' proposal_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" proposal_index: @@ -5449,16 +5448,16 @@ 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: + voter_id: type: string - description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format) - example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + description: Voter's DRep ID (CIP-129 bech32 format), pool ID (bech32 format) or committee hot ID (CIP-129 bech32 format) + example: drep1yfhyq6tztjksqqpd5lglc3zr2tn8vylgjh9xzz7n2p4l4lgk3qam3 voter_hex: type: string description: Voter's DRep ID , pool ID or committee hash in hex format - example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + example: 6e4069625cad00002da7d1fc444352e67613e895ca610bd3506bfafd + voter_has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" vote: $ref: "#/components/schemas/drep_votes/items/properties/vote" meta_url: @@ -5469,6 +5468,8 @@ components: description: Current governance committee type: object properties: + proposal_id: + $ref: "#/components/schemas/proposal_list/items/properties/proposal_id" proposal_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" proposal_index: diff --git a/specs/results/koiosapi-preview.yaml b/specs/results/koiosapi-preview.yaml index 0dcad9ac..0263b7b1 100644 --- a/specs/results/koiosapi-preview.yaml +++ b/specs/results/koiosapi-preview.yaml @@ -1478,7 +1478,7 @@ paths: tags: - Governance parameters: - - $ref: "#/components/parameters/_committee_hash" + - $ref: "#/components/parameters/_cc_hot_id" responses: "200": description: Success!! @@ -1520,7 +1520,7 @@ paths: tags: - Governance parameters: - - $ref: "#/components/parameters/_credential" + - $ref: "#/components/parameters/_voter_id" responses: "200": description: Success!! @@ -1543,8 +1543,7 @@ paths: tags: - Governance parameters: - - $ref: "#/components/parameters/_proposal_tx_hash" - - $ref: "#/components/parameters/_proposal_index" + - $ref: "#/components/parameters/_proposal_id" responses: "200": description: Success!! @@ -2089,10 +2088,10 @@ components: in: query required: false allowEmptyValue: true - _credential: + _voter_id: deprecated: false - name: _credential - description: Voter (Drep, SPO, Committee Member) in Hex format + name: _voter_id + description: Voter ID (Drep, SPO, Committee Member) in Bech32 format (CIP-5 | CIP-129) schema: type: string example: "drep13a87lnegq9a90dq4z7n864h0fsxuqsvp5ywn29ud65l5cwxlhts" @@ -2119,13 +2118,13 @@ components: in: query required: false allowEmptyValue: true - _committee_hash: + _cc_hot_id: deprecated: false - name: _committee_hash - description: Committee hash in hexadecimal format (hex) + name: _cc_hot_id + description: Committee member hot key ID in Bech32 format (CIP-5 | CIP-129) schema: type: string - example: "7ceede7d6a89e006408e6b7c6acb3dd094b3f6817e43b4a36d01535b" + example: "cc_hot1qgqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvcdjk7" in: query required: false allowEmptyValue: true @@ -2199,26 +2198,16 @@ components: in: query required: true allowEmptyValue: false - _proposal_tx_hash: + _proposal_id: deprecated: false - name: _proposal_tx_hash - description: Transaction Hash of government proposal in hexadecimal format (hex) - example: "e61f151fcef9e99dff5c705f8d5de18891f8d1d92d69fef5ff608d2c29a7c133" + name: _proposal_id + description: Government proposal ID in CIP-129 Bech32 format + example: "gov_action17m93skslaxyd45gpr6ernkdzs852h564wsterr8l6lheu7hu7kvsqecyqdh" schema: type: string in: query required: true allowEmptyValue: false - _proposal_index: - deprecated: false - name: _proposal_index - description: Index of governance proposal in transaction - schema: - type: number - example: 0 - in: query - required: true - allowEmptyValue: false requestBodies: block_hashes: content: @@ -4171,8 +4160,8 @@ components: type: - 'null' - string - description: Account's current delegation status to DRep ID in Bech32 format - example: drep1gj49xmfcg6ev89ur2yad9c5p7z0pgfxggyakz9pua06vqh5vnp0 + description: Account's current delegation status to DRep ID in CIP-129 Bech32 format + example: drep1yfhyq6tztjksqqpd5lglc3zr2tn8vylgjh9xzz7n2p4l4lgk3qam3 delegated_pool: anyOf: - type: 'null' @@ -5143,12 +5132,12 @@ components: properties: drep_id: type: string - description: DRep ID in bech32 format - example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + description: DRep ID in CIP-129 bech32 format + example: drep1yfhyq6tztjksqqpd5lglc3zr2tn8vylgjh9xzz7n2p4l4lgk3qam3 hex: type: string description: DRep ID in hex format - example: f948a9f7a863d8062565809aba3925aa41334e976c11c837fe1a74c0 + example: 6e4069625cad00002da7d1fc444352e67613e895ca610bd3506bfafd has_script: type: boolean description: Flag which shows if this credential is a script hash @@ -5243,6 +5232,8 @@ components: $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: $ref: "#/components/schemas/drep_info/items/properties/hex" + has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" url: $ref: "#/components/schemas/drep_info/items/properties/url" hash: @@ -5289,6 +5280,8 @@ components: $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: $ref: "#/components/schemas/drep_info/items/properties/hex" + has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" update_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" cert_index: @@ -5315,6 +5308,8 @@ components: type: array items: properties: + proposal_id: + $ref: "#/components/schemas/proposal_list/items/properties/proposal_id" proposal_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" proposal_index: @@ -5349,6 +5344,10 @@ components: properties: block_time: $ref: "#/components/schemas/blocks/items/properties/block_time" + proposal_id: + type: string + description: Proposal Action ID in accordance with CIP-129 format + example: 'gov_action17m93skslaxyd45gpr6ernkdzs852h564wsterr8l6lheu7hu7kvsqecyqdh' proposal_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" proposal_index: @@ -5449,16 +5448,16 @@ 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: + voter_id: type: string - description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format) - example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + description: Voter's DRep ID (CIP-129 bech32 format), pool ID (bech32 format) or committee hot ID (CIP-129 bech32 format) + example: drep1yfhyq6tztjksqqpd5lglc3zr2tn8vylgjh9xzz7n2p4l4lgk3qam3 voter_hex: type: string description: Voter's DRep ID , pool ID or committee hash in hex format - example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + example: 6e4069625cad00002da7d1fc444352e67613e895ca610bd3506bfafd + voter_has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" vote: $ref: "#/components/schemas/drep_votes/items/properties/vote" meta_url: @@ -5469,6 +5468,8 @@ components: description: Current governance committee type: object properties: + proposal_id: + $ref: "#/components/schemas/proposal_list/items/properties/proposal_id" proposal_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" proposal_index: diff --git a/specs/templates/2-api-params.yaml b/specs/templates/2-api-params.yaml index d26b348e..15141c99 100644 --- a/specs/templates/2-api-params.yaml +++ b/specs/templates/2-api-params.yaml @@ -79,10 +79,10 @@ parameters: in: query required: false allowEmptyValue: true - _credential: + _voter_id: deprecated: false - name: _credential - description: Voter (Drep, SPO, Committee Member) in Hex format + name: _voter_id + description: Voter ID (Drep, SPO, Committee Member) in Bech32 format (CIP-5 | CIP-129) schema: type: string example: "##_drep_id_param##" @@ -109,13 +109,13 @@ parameters: in: query required: false allowEmptyValue: true - _committee_hash: + _cc_hot_id: deprecated: false - name: _committee_hash - description: Committee hash in hexadecimal format (hex) + name: _cc_hot_id + description: Committee member hot key ID in Bech32 format (CIP-5 | CIP-129) schema: type: string - example: "##_committee_hash_param##" + example: "##_cc_hot_id_param##" in: query required: false allowEmptyValue: true @@ -189,23 +189,13 @@ parameters: in: query required: true allowEmptyValue: false - _proposal_tx_hash: + _proposal_id: deprecated: false - name: _proposal_tx_hash - description: Transaction Hash of government proposal in hexadecimal format (hex) - example: "##_proposal_tx_hash_param##" + name: _proposal_id + description: Government proposal ID in CIP-129 Bech32 format + example: "##_proposal_id_param##" schema: type: string in: query required: true allowEmptyValue: false - _proposal_index: - deprecated: false - name: _proposal_index - description: Index of governance proposal in transaction - schema: - type: number - example: 0 - in: query - required: true - allowEmptyValue: false diff --git a/specs/templates/4-api-schemas.yaml b/specs/templates/4-api-schemas.yaml index ef23e5de..099bbfa1 100644 --- a/specs/templates/4-api-schemas.yaml +++ b/specs/templates/4-api-schemas.yaml @@ -1348,8 +1348,8 @@ schemas: type: - 'null' - string - description: Account's current delegation status to DRep ID in Bech32 format - example: drep1gj49xmfcg6ev89ur2yad9c5p7z0pgfxggyakz9pua06vqh5vnp0 + description: Account's current delegation status to DRep ID in CIP-129 Bech32 format + example: drep1yfhyq6tztjksqqpd5lglc3zr2tn8vylgjh9xzz7n2p4l4lgk3qam3 delegated_pool: anyOf: - type: 'null' @@ -2320,12 +2320,12 @@ schemas: properties: drep_id: type: string - description: DRep ID in bech32 format - example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + description: DRep ID in CIP-129 bech32 format + example: drep1yfhyq6tztjksqqpd5lglc3zr2tn8vylgjh9xzz7n2p4l4lgk3qam3 hex: type: string description: DRep ID in hex format - example: f948a9f7a863d8062565809aba3925aa41334e976c11c837fe1a74c0 + example: 6e4069625cad00002da7d1fc444352e67613e895ca610bd3506bfafd has_script: type: boolean description: Flag which shows if this credential is a script hash @@ -2420,6 +2420,8 @@ schemas: $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: $ref: "#/components/schemas/drep_info/items/properties/hex" + has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" url: $ref: "#/components/schemas/drep_info/items/properties/url" hash: @@ -2466,6 +2468,8 @@ schemas: $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: $ref: "#/components/schemas/drep_info/items/properties/hex" + has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" update_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" cert_index: @@ -2492,6 +2496,8 @@ schemas: type: array items: properties: + proposal_id: + $ref: "#/components/schemas/proposal_list/items/properties/proposal_id" proposal_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" proposal_index: @@ -2526,6 +2532,10 @@ schemas: properties: block_time: $ref: "#/components/schemas/blocks/items/properties/block_time" + proposal_id: + type: string + description: Proposal Action ID in accordance with CIP-129 format + example: 'gov_action17m93skslaxyd45gpr6ernkdzs852h564wsterr8l6lheu7hu7kvsqecyqdh' proposal_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" proposal_index: @@ -2626,16 +2636,16 @@ 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: + voter_id: type: string - description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format) - example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + description: Voter's DRep ID (CIP-129 bech32 format), pool ID (bech32 format) or committee hot ID (CIP-129 bech32 format) + example: drep1yfhyq6tztjksqqpd5lglc3zr2tn8vylgjh9xzz7n2p4l4lgk3qam3 voter_hex: type: string description: Voter's DRep ID , pool ID or committee hash in hex format - example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + example: 6e4069625cad00002da7d1fc444352e67613e895ca610bd3506bfafd + voter_has_script: + $ref: "#/components/schemas/drep_info/items/properties/has_script" vote: $ref: "#/components/schemas/drep_votes/items/properties/vote" meta_url: @@ -2646,6 +2656,8 @@ schemas: description: Current governance committee type: object properties: + proposal_id: + $ref: "#/components/schemas/proposal_list/items/properties/proposal_id" proposal_tx_hash: $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" proposal_index: diff --git a/specs/templates/api-main.yaml b/specs/templates/api-main.yaml index c42901a1..7524bf53 100644 --- a/specs/templates/api-main.yaml +++ b/specs/templates/api-main.yaml @@ -1333,7 +1333,7 @@ paths: tags: - Governance parameters: - - $ref: "#/components/parameters/_committee_hash" + - $ref: "#/components/parameters/_cc_hot_id" responses: "200": description: Success!! @@ -1375,7 +1375,7 @@ paths: tags: - Governance parameters: - - $ref: "#/components/parameters/_credential" + - $ref: "#/components/parameters/_voter_id" responses: "200": description: Success!! @@ -1398,8 +1398,7 @@ paths: tags: - Governance parameters: - - $ref: "#/components/parameters/_proposal_tx_hash" - - $ref: "#/components/parameters/_proposal_index" + - $ref: "#/components/parameters/_proposal_id" responses: "200": description: Success!! diff --git a/specs/templates/example-map.json b/specs/templates/example-map.json index fd9a16de..7d218131 100644 --- a/specs/templates/example-map.json +++ b/specs/templates/example-map.json @@ -78,17 +78,17 @@ "pv": "drep13a87lnegq9a90dq4z7n864h0fsxuqsvp5ywn29ud65l5cwxlhts", "pp": "drep1kxtwaqtayj6vklc57u93xayjvkwgvefh8drscqp5a5y6jz7m6rd" }, - "_committee_hash": { - "m": "49fa008218cd619afe6aa8a1a93303f242440722b314f36bda2c2e23", - "g": "65d497b875c56ab213586a4006d4f6658970573ea8e2398893857472", - "pv": "7ceede7d6a89e006408e6b7c6acb3dd094b3f6817e43b4a36d01535b", - "pp": "f8f56120e1ec00feb088ece39ef14f07339afeb37b4e949ff12b89ff" - }, - "_proposal_tx_hash": { - "m": "e61f151fcef9e99dff5c705f8d5de18891f8d1d92d69fef5ff608d2c29a7c133", - "g": "e61f151fcef9e99dff5c705f8d5de18891f8d1d92d69fef5ff608d2c29a7c133", - "pv": "e61f151fcef9e99dff5c705f8d5de18891f8d1d92d69fef5ff608d2c29a7c133", - "pp": "e61f151fcef9e99dff5c705f8d5de18891f8d1d92d69fef5ff608d2c29a7c133" + "_cc_hot_id": { + "m": "cc_hot1qgqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvcdjk7", + "g": "cc_hot1qgqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvcdjk7", + "pv": "cc_hot1qgqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvcdjk7", + "pp": "cc_hot1qgqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvcdjk7" + }, + "_proposal_id": { + "m": "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf", + "g": "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf", + "pv": "gov_action17m93skslaxyd45gpr6ernkdzs852h564wsterr8l6lheu7hu7kvsqecyqdh", + "pp": "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf" }, "_pool_bech32": { "m": "pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc",