From 46e0837e570dd65e25545146eab2731af26c68e5 Mon Sep 17 00:00:00 2001 From: rdlrt <3169068+rdlrt@users.noreply.github.com> Date: Tue, 30 Jul 2024 18:56:15 +1000 Subject: [PATCH] proposal_list fields type and description are in conflict with openAPI specs, other specs updates --- files/grest/rpc/governance/proposal_list.sql | 8 +- specs/results/koiosapi-guild.yaml | 205 ++++++++++++++++++- specs/results/koiosapi-mainnet.yaml | 205 ++++++++++++++++++- specs/results/koiosapi-preprod.yaml | 205 ++++++++++++++++++- specs/results/koiosapi-preview.yaml | 205 ++++++++++++++++++- specs/templates/2-api-params.yaml | 40 ++++ specs/templates/4-api-schemas.yaml | 162 ++++++++++++++- specs/templates/api-main.yaml | 3 + specs/templates/example-map.json | 18 ++ 9 files changed, 1002 insertions(+), 49 deletions(-) diff --git a/files/grest/rpc/governance/proposal_list.sql b/files/grest/rpc/governance/proposal_list.sql index dcf60bf5..6c8556bc 100644 --- a/files/grest/rpc/governance/proposal_list.sql +++ b/files/grest/rpc/governance/proposal_list.sql @@ -3,8 +3,8 @@ RETURNS TABLE ( tx_hash text, cert_index integer, block_time integer, - type text, - description jsonb, + proposal_type text, + proposal_description jsonb, deposit text, return_address text, ratified_epoch integer, @@ -25,8 +25,8 @@ AS $$ ENCODE(tx.hash, 'hex')::text AS tx_hash, gap.index AS cert_index, EXTRACT(EPOCH FROM b.time)::integer AS block_time, - gap.type, - gap.description, + gap.type AS proposal_type, + gap.description AS proposal_description, gap.deposit::text AS deposit, sa.view AS return_address, gap.ratified_epoch AS ratified_epoch, diff --git a/specs/results/koiosapi-guild.yaml b/specs/results/koiosapi-guild.yaml index eaad80c8..d76a14d5 100644 --- a/specs/results/koiosapi-guild.yaml +++ b/specs/results/koiosapi-guild.yaml @@ -1951,6 +1951,16 @@ components: in: query required: true allowEmptyValue: false + _tx_hash: + deprecated: false + name: _tx_hash + description: Transaction Hash in hexadecimal format (hex) + example: "bf04578d452dd3acb7c70fbac32dc972cb69f932f804171cfb4268f5af0228e7" + schema: + type: string + in: query + required: true + allowEmptyValue: false _asset_policy: deprecated: false name: _asset_policy @@ -1991,6 +2001,36 @@ components: in: query required: false allowEmptyValue: true + _drep_id: + deprecated: false + name: _drep_id + description: DRep ID in bech32 format + schema: + type: string + example: "##_drep_id_param" + in: query + required: true + allowEmptyValue: false + _drep_id_optional: + deprecated: false + name: _drep_id + description: DRep ID in bech32 format + schema: + type: string + example: "##_drep_id_param" + in: query + required: false + allowEmptyValue: true + _committee_hash: + deprecated: false + name: _committee_hash + description: Committee hash in hexadecimal format (hex) + schema: + type: string + example: "##_committee_hash_param" + in: query + required: false + allowEmptyValue: true _extended: deprecated: false name: _extended @@ -4951,22 +4991,22 @@ components: items: properties: drep_id: - $ref: "#/components/schemas/drep_info/drep_id" + $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: - $ref: "#/components/schemas/drep_info/hex" + $ref: "#/components/schemas/drep_info/items/properties/hex" has_script: - $ref: "#/components/schemas/drep_info/has_script" + $ref: "#/components/schemas/drep_info/items/properties/has_script" registered: - $ref: "#/components/schemas/drep_info/registered" + $ref: "#/components/schemas/drep_info/items/properties/registered" drep_metadata: description: List metadata for requested delegated representatives (DReps) type: array items: properties: drep_id: - $ref: "#/components/schemas/drep_info/drep_id" + $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: - $ref: "#/components/schemas/drep_info/drep_metadata" + $ref: "#/components/schemas/drep_info/items/properties/hex" url: type: string description: A URL to a JSON payload of metadata @@ -4981,19 +5021,163 @@ components: example: {"body": {"title": "...", "...": "...", "references": [{"uri": "...", "@type": "Other", "label": "Hardfork to PV10"}]}, "authors": [{"name": "...", "witness": {"publicKey": "...", "signature": "...", "witnessAlgorithm": "ed25519"}}], "@context": {"body": {"@id": "CIP108:body", "@context": {"title": "CIP108:title", "abstract": "CIP108:abstract", "rationale": "CIP108:rationale", "motivation": "CIP108:motivation", "references": {"@id": "CIP108:references", "@context": {"uri": "CIP100:reference-uri", "Other": "CIP100:OtherReference", "label": "CIP100:reference-label", "referenceHash": {"@id": "CIP108:referenceHash", "@context": {"hashDigest": "CIP108:hashDigest", "hashAlgorithm": "CIP100:hashAlgorithm"}}, "GovernanceMetadata": "CIP100:GovernanceMetadataReference"}, "@container": "@set"}}}, "CIP100": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#", "CIP108": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0108/README.md#", "authors": {"@id": "CIP100:authors", "@context": {"name": "http://xmlns.com/foaf/0.1/name", "witness": {"@id": "CIP100:witness", "@context": {"publicKey": "CIP100:publicKey", "signature": "CIP100:signature", "witnessAlgorithm": "CIP100:witnessAlgorithm"}}}, "@container": "@set"}, "@language": "en-us", "hashAlgorithm": "CIP100:hashAlgorithm"}, "hashAlgorithm": "blake2b-256"} bytes: - type: text + type: string description: The raw bytes of the payload example: 7b0a20202240636f6e74657874223a207b0a2020202022406c616e6775616765223a2022656e2d7573222c0a2020202022434950313030223a202268747470733a2f2f6769746875622e636f6d2f63617264616e6f2d666f756e646174696f6e2f434950732f626c6f622f6d61737465722f4349502d303130302f524541444d452e6d6423222c0a2020202022434950313038223a202268747470733a2f2f6769746875622e636f6d2f63617264616e6f2d666f756e646174696f6e2f434950732f626c6f622f6d61737465722f4349502d303130382f524541444d452e6d6423222c0a202020202268617368416c676f726974686d223a20224349503130303a68617368416c676f726974686d222c0a2020202022626f6479223a207b0a20202020202022406964223a20224349503130383a626f6479222c0a2020202020202240636f6e74657874223a207b0a2020202020202020227265666572656e636573223a207b0a2020202020202020202022406964223a20224349503130383a7265666572656e636573222c0a202020202020202020202240636f6e7461696e6572223a202240736574222c0a202020202020202020202240636f6e74657874223a207b0a20202020202020202020202022476f7665726e616e63654d65746164617461223a20224349503130303a476f7665726e616e63654d657461646174615265666572656e6365222c0a202020202020202020202020224f74686572223a20224349503130303a4f746865725265666572656e6365222c0a202020202020202020202020226c6162656c223a20224349503130303a7265666572656e63652d6c6162656c222c0a20202020202020202020202022757269223a20224349503130303a7265666572656e63652d757269222c0a202020202020202020202020227265666572656e636548617368223a207b0a202020202020202020202020202022406964223a20224349503130383a7265666572656e636548617368222c0a20202020202020202020202020202240636f6e74657874223a207b0a202020202020202020202020202020202268617368446967657374223a20224349503130383a68617368446967657374222c0a202020202020202020202020202020202268617368416c676f726974686d223a20224349503130303a68617368416c676f726974686d220a20202020202020202020202020207d0a2020202020202020202020207d0a202020202020202020207d0a20202020202020207d2c0a2020202020202020227469746c65223a20224349503130383a7469746c65222c0a2020202020202020226162737472616374223a20224349503130383a6162737472616374222c0a2020202020202020226d6f7469766174696f6e223a20224349503130383a6d6f7469766174696f6e222c0a202020202020202022726174696f6e616c65223a20224349503130383a726174696f6e616c65220a2020202020207d0a202020207d2c0a2020202022617574686f7273223a207b0a20202020202022406964223a20224349503130303a617574686f7273222c0a2020202020202240636f6e7461696e6572223a202240736574222c0a2020202020202240636f6e74657874223a207b0a2020202020202020226e616d65223a2022687474703a2f2f786d6c6e732e636f6d2f666f61662f302e312f6e616d65222c0a2020202020202020227769746e657373223a207b0a2020202020202020202022406964223a20224349503130303a7769746e657373222c0a202020202020202020202240636f6e74657874223a207b0a202020202020202020202020227769746e657373416c676f726974686d223a20224349503130303a7769746e657373416c676f726974686d222c0a202020202020202020202020227075626c69634b6579223a20224349503130303a7075626c69634b6579222c0a202020202020202020202020227369676e6174757265223a20224349503130303a7369676e6174757265220a202020202020202020207d0a20202020202020207d0a2020202020207d0a202020207d0a20207d2c0a20202268617368416c676f726974686d223a2022626c616b6532622d323536222c0a202022626f6479223a207b0a20202020227469746c65223a202248617264666f726b20746f2050726f746f636f6c2076657273696f6e203130222c0a20202020226162737472616374223a20224c6574277320686176652073616e63686f4e657420696e2066756c6c20676f7665726e616e636520617320736f6f6e20617320706f737369626c65222c0a20202020226d6f7469766174696f6e223a2022505639206973206e6f742061732066756e2061732050563130222c0a2020202022726174696f6e616c65223a20224c65742773206b6565702074657374696e67207374756666222c0a20202020227265666572656e636573223a205b0a2020202020207b0a2020202020202020224074797065223a20224f74686572222c0a2020202020202020226c6162656c223a202248617264666f726b20746f2050563130222c0a202020202020202022757269223a2022220a2020202020207d0a202020205d0a20207d2c0a202022617574686f7273223a205b0a202020207b0a202020202020226e616d65223a20224361726c6f73222c0a202020202020227769746e657373223a207b0a2020202020202020227769746e657373416c676f726974686d223a202265643235353139222c0a2020202020202020227075626c69634b6579223a202237656130396133346165626231336339383431633731333937623163616266656335646466393530343035323933646565343936636163326634333734383061222c0a2020202020202020227369676e6174757265223a20226134373639383562346363306434353766323437373937363131373939613666366138306663386362376563396463623561383232333838386430363138653330646531363566336438363963346130643931303764386135623631326164376335653432343431393037663562393137393666306437313837643634613031220a2020202020207d0a202020207d0a20205d0a7d warning: - type: text + type: string description: A warning that occured while validating the metadata + language: + type: string + description: The language described in the context of the metadata as per CIP-100 + example: en-us comment: - type: text + type: string description: Comment attached to the metadata is_valid: type: boolean description: Indicate whether data is invalid example: true + drep_updates: + description: List of updates for requested (or all) delegated representatives (DReps) + type: array + items: + properties: + drep_id: + $ref: "#/components/schemas/drep_info/items/properties/drep_id" + hex: + $ref: "#/components/schemas/drep_info/items/properties/hex" + tx_hash: + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" + cert_index: + type: string + description: The index of this certificate within the the transaction. + example: 1 + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + action: + type: string + description: Effective action for this DRep Update certificate + enum: ["updated","registered","deregistered"] + example: registered + deposit: + $ref: "#/components/schemas/drep_info/items/properties/deposit" + meta_url: + $ref: "#/components/schemas/drep_metadata/items/properties/url" + meta_hash: + $ref: "#/components/schemas/drep_metadata/items/properties/hash" + meta_json: + $ref: "#/components/schemas/drep_metadata/items/properties/json" + drep_votes: + description: List of all votes casted by requested delegated representative (DRep) + type: array + items: + properties: + tx_hash: + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" + cert_index: + $ref: "#/components/schemas/drep_updates/items/properties/cert_index" + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + vote: + type: string + enum: ["Yes","No","Abstain"] + description: Actual Vote casted + example: "Yes" + committee_votes: + description: List of all votes casted by requested delegated representative (DRep) + type: array + items: + $ref: "#/components/schemas/drep_votes/items" + proposal_list: + description: List of all votes cast on specified governance action + type: array + items: + properties: + tx_hash: + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" + cert_index: + $ref: "#/components/schemas/drep_updates/items/properties/cert_index" + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + proposal_type: + type: string + enum: ["ParameterChange", "HardForkInitiation", "TreasuryWithdrawals", "NoConfidence", "NewCommittee", "NewConstitution", "InfoAction"] + description: Proposal Action Type + example: ParameterChange + proposal_description: + type: string + description: Description for Proposal Action + example: '{"tag": "InfoAction"}' + deposit: + $ref: "#/components/schemas/drep_info/items/properties/deposit" + return_address: + type: string + description: The StakeAddress index of the reward address to receive the deposit when it is repaid. + example: stake1uy6yzwsxxc28lfms0qmpxvyz9a7y770rtcqx9y96m42cttqwvp4m5 + ratified_epoch: + type: + - number + - null + description: If not null, then this proposal has been ratified at the specfied epoch. + example: 670 + enacted_epoch: + type: + - number + - null + description: If not null, then this proposal has been enacted at the specfied epoch. + example: 675 + dropped_epoch: + type: + - number + - null + description: If not null, then this proposal has been dropped (expired/enacted) at the specfied epoch. + example: 680 + expired_epoch: + type: + - number + - null + description: If not null, then this proposal has been expired at the specfied epoch. + example: 680 + expiration: + type: + - number + - null + description: Shows the epoch at which this governance action is expected to expire. + meta_url: + $ref: "#/components/schemas/drep_metadata/items/properties/url" + meta_hash: + $ref: "#/components/schemas/drep_metadata/items/properties/hash" + meta_json: + $ref: "#/components/schemas/drep_metadata/items/properties/json" + comment: + $ref: "#/components/schemas/drep_metadata/items/properties/comment" + language: + $ref: "#/components/schemas/drep_metadata/items/properties/language" + is_valid: + $ref: "#/components/schemas/drep_metadata/items/properties/is_valid" + proposal_votes: + type: array + description: List of all votes cast on specified governance action + items: + properties: + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + voter_role: + type: string + description: The role of the voter + enum: ["ConstitutionalCommittee", "DRep", "SPO"] + example: DRep + voter: + type: string + description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format) + example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + voter_hex: + type: string + description: Voter's DRep ID , pool ID or committee hash in hex format + example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + vote: + $ref: "#/components/schemas/drep_votes/items/properties/vote" script_info: type: array @@ -5166,6 +5350,9 @@ tags: - name: Asset description: Query Asset related informations x-tag-expanded: false + - name: Governance + description: Query information about governance for network + x-tag-expanded: false - name: Pool description: Query information about specific pools x-tag-expanded: false diff --git a/specs/results/koiosapi-mainnet.yaml b/specs/results/koiosapi-mainnet.yaml index 46a6b80a..d665ccf1 100644 --- a/specs/results/koiosapi-mainnet.yaml +++ b/specs/results/koiosapi-mainnet.yaml @@ -1951,6 +1951,16 @@ components: in: query required: true allowEmptyValue: false + _tx_hash: + deprecated: false + name: _tx_hash + description: Transaction Hash in hexadecimal format (hex) + example: "f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e" + schema: + type: string + in: query + required: true + allowEmptyValue: false _asset_policy: deprecated: false name: _asset_policy @@ -1991,6 +2001,36 @@ components: in: query required: false allowEmptyValue: true + _drep_id: + deprecated: false + name: _drep_id + description: DRep ID in bech32 format + schema: + type: string + example: "##_drep_id_param" + in: query + required: true + allowEmptyValue: false + _drep_id_optional: + deprecated: false + name: _drep_id + description: DRep ID in bech32 format + schema: + type: string + example: "##_drep_id_param" + in: query + required: false + allowEmptyValue: true + _committee_hash: + deprecated: false + name: _committee_hash + description: Committee hash in hexadecimal format (hex) + schema: + type: string + example: "##_committee_hash_param" + in: query + required: false + allowEmptyValue: true _extended: deprecated: false name: _extended @@ -4951,22 +4991,22 @@ components: items: properties: drep_id: - $ref: "#/components/schemas/drep_info/drep_id" + $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: - $ref: "#/components/schemas/drep_info/hex" + $ref: "#/components/schemas/drep_info/items/properties/hex" has_script: - $ref: "#/components/schemas/drep_info/has_script" + $ref: "#/components/schemas/drep_info/items/properties/has_script" registered: - $ref: "#/components/schemas/drep_info/registered" + $ref: "#/components/schemas/drep_info/items/properties/registered" drep_metadata: description: List metadata for requested delegated representatives (DReps) type: array items: properties: drep_id: - $ref: "#/components/schemas/drep_info/drep_id" + $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: - $ref: "#/components/schemas/drep_info/drep_metadata" + $ref: "#/components/schemas/drep_info/items/properties/hex" url: type: string description: A URL to a JSON payload of metadata @@ -4981,19 +5021,163 @@ components: example: {"body": {"title": "...", "...": "...", "references": [{"uri": "...", "@type": "Other", "label": "Hardfork to PV10"}]}, "authors": [{"name": "...", "witness": {"publicKey": "...", "signature": "...", "witnessAlgorithm": "ed25519"}}], "@context": {"body": {"@id": "CIP108:body", "@context": {"title": "CIP108:title", "abstract": "CIP108:abstract", "rationale": "CIP108:rationale", "motivation": "CIP108:motivation", "references": {"@id": "CIP108:references", "@context": {"uri": "CIP100:reference-uri", "Other": "CIP100:OtherReference", "label": "CIP100:reference-label", "referenceHash": {"@id": "CIP108:referenceHash", "@context": {"hashDigest": "CIP108:hashDigest", "hashAlgorithm": "CIP100:hashAlgorithm"}}, "GovernanceMetadata": "CIP100:GovernanceMetadataReference"}, "@container": "@set"}}}, "CIP100": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#", "CIP108": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0108/README.md#", "authors": {"@id": "CIP100:authors", "@context": {"name": "http://xmlns.com/foaf/0.1/name", "witness": {"@id": "CIP100:witness", "@context": {"publicKey": "CIP100:publicKey", "signature": "CIP100:signature", "witnessAlgorithm": "CIP100:witnessAlgorithm"}}}, "@container": "@set"}, "@language": "en-us", "hashAlgorithm": "CIP100:hashAlgorithm"}, "hashAlgorithm": "blake2b-256"} bytes: - type: text + type: string description: The raw bytes of the payload example: 7b0a20202240636f6e74657874223a207b0a2020202022406c616e6775616765223a2022656e2d7573222c0a2020202022434950313030223a202268747470733a2f2f6769746875622e636f6d2f63617264616e6f2d666f756e646174696f6e2f434950732f626c6f622f6d61737465722f4349502d303130302f524541444d452e6d6423222c0a2020202022434950313038223a202268747470733a2f2f6769746875622e636f6d2f63617264616e6f2d666f756e646174696f6e2f434950732f626c6f622f6d61737465722f4349502d303130382f524541444d452e6d6423222c0a202020202268617368416c676f726974686d223a20224349503130303a68617368416c676f726974686d222c0a2020202022626f6479223a207b0a20202020202022406964223a20224349503130383a626f6479222c0a2020202020202240636f6e74657874223a207b0a2020202020202020227265666572656e636573223a207b0a2020202020202020202022406964223a20224349503130383a7265666572656e636573222c0a202020202020202020202240636f6e7461696e6572223a202240736574222c0a202020202020202020202240636f6e74657874223a207b0a20202020202020202020202022476f7665726e616e63654d65746164617461223a20224349503130303a476f7665726e616e63654d657461646174615265666572656e6365222c0a202020202020202020202020224f74686572223a20224349503130303a4f746865725265666572656e6365222c0a202020202020202020202020226c6162656c223a20224349503130303a7265666572656e63652d6c6162656c222c0a20202020202020202020202022757269223a20224349503130303a7265666572656e63652d757269222c0a202020202020202020202020227265666572656e636548617368223a207b0a202020202020202020202020202022406964223a20224349503130383a7265666572656e636548617368222c0a20202020202020202020202020202240636f6e74657874223a207b0a202020202020202020202020202020202268617368446967657374223a20224349503130383a68617368446967657374222c0a202020202020202020202020202020202268617368416c676f726974686d223a20224349503130303a68617368416c676f726974686d220a20202020202020202020202020207d0a2020202020202020202020207d0a202020202020202020207d0a20202020202020207d2c0a2020202020202020227469746c65223a20224349503130383a7469746c65222c0a2020202020202020226162737472616374223a20224349503130383a6162737472616374222c0a2020202020202020226d6f7469766174696f6e223a20224349503130383a6d6f7469766174696f6e222c0a202020202020202022726174696f6e616c65223a20224349503130383a726174696f6e616c65220a2020202020207d0a202020207d2c0a2020202022617574686f7273223a207b0a20202020202022406964223a20224349503130303a617574686f7273222c0a2020202020202240636f6e7461696e6572223a202240736574222c0a2020202020202240636f6e74657874223a207b0a2020202020202020226e616d65223a2022687474703a2f2f786d6c6e732e636f6d2f666f61662f302e312f6e616d65222c0a2020202020202020227769746e657373223a207b0a2020202020202020202022406964223a20224349503130303a7769746e657373222c0a202020202020202020202240636f6e74657874223a207b0a202020202020202020202020227769746e657373416c676f726974686d223a20224349503130303a7769746e657373416c676f726974686d222c0a202020202020202020202020227075626c69634b6579223a20224349503130303a7075626c69634b6579222c0a202020202020202020202020227369676e6174757265223a20224349503130303a7369676e6174757265220a202020202020202020207d0a20202020202020207d0a2020202020207d0a202020207d0a20207d2c0a20202268617368416c676f726974686d223a2022626c616b6532622d323536222c0a202022626f6479223a207b0a20202020227469746c65223a202248617264666f726b20746f2050726f746f636f6c2076657273696f6e203130222c0a20202020226162737472616374223a20224c6574277320686176652073616e63686f4e657420696e2066756c6c20676f7665726e616e636520617320736f6f6e20617320706f737369626c65222c0a20202020226d6f7469766174696f6e223a2022505639206973206e6f742061732066756e2061732050563130222c0a2020202022726174696f6e616c65223a20224c65742773206b6565702074657374696e67207374756666222c0a20202020227265666572656e636573223a205b0a2020202020207b0a2020202020202020224074797065223a20224f74686572222c0a2020202020202020226c6162656c223a202248617264666f726b20746f2050563130222c0a202020202020202022757269223a2022220a2020202020207d0a202020205d0a20207d2c0a202022617574686f7273223a205b0a202020207b0a202020202020226e616d65223a20224361726c6f73222c0a202020202020227769746e657373223a207b0a2020202020202020227769746e657373416c676f726974686d223a202265643235353139222c0a2020202020202020227075626c69634b6579223a202237656130396133346165626231336339383431633731333937623163616266656335646466393530343035323933646565343936636163326634333734383061222c0a2020202020202020227369676e6174757265223a20226134373639383562346363306434353766323437373937363131373939613666366138306663386362376563396463623561383232333838386430363138653330646531363566336438363963346130643931303764386135623631326164376335653432343431393037663562393137393666306437313837643634613031220a2020202020207d0a202020207d0a20205d0a7d warning: - type: text + type: string description: A warning that occured while validating the metadata + language: + type: string + description: The language described in the context of the metadata as per CIP-100 + example: en-us comment: - type: text + type: string description: Comment attached to the metadata is_valid: type: boolean description: Indicate whether data is invalid example: true + drep_updates: + description: List of updates for requested (or all) delegated representatives (DReps) + type: array + items: + properties: + drep_id: + $ref: "#/components/schemas/drep_info/items/properties/drep_id" + hex: + $ref: "#/components/schemas/drep_info/items/properties/hex" + tx_hash: + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" + cert_index: + type: string + description: The index of this certificate within the the transaction. + example: 1 + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + action: + type: string + description: Effective action for this DRep Update certificate + enum: ["updated","registered","deregistered"] + example: registered + deposit: + $ref: "#/components/schemas/drep_info/items/properties/deposit" + meta_url: + $ref: "#/components/schemas/drep_metadata/items/properties/url" + meta_hash: + $ref: "#/components/schemas/drep_metadata/items/properties/hash" + meta_json: + $ref: "#/components/schemas/drep_metadata/items/properties/json" + drep_votes: + description: List of all votes casted by requested delegated representative (DRep) + type: array + items: + properties: + tx_hash: + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" + cert_index: + $ref: "#/components/schemas/drep_updates/items/properties/cert_index" + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + vote: + type: string + enum: ["Yes","No","Abstain"] + description: Actual Vote casted + example: "Yes" + committee_votes: + description: List of all votes casted by requested delegated representative (DRep) + type: array + items: + $ref: "#/components/schemas/drep_votes/items" + proposal_list: + description: List of all votes cast on specified governance action + type: array + items: + properties: + tx_hash: + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" + cert_index: + $ref: "#/components/schemas/drep_updates/items/properties/cert_index" + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + proposal_type: + type: string + enum: ["ParameterChange", "HardForkInitiation", "TreasuryWithdrawals", "NoConfidence", "NewCommittee", "NewConstitution", "InfoAction"] + description: Proposal Action Type + example: ParameterChange + proposal_description: + type: string + description: Description for Proposal Action + example: '{"tag": "InfoAction"}' + deposit: + $ref: "#/components/schemas/drep_info/items/properties/deposit" + return_address: + type: string + description: The StakeAddress index of the reward address to receive the deposit when it is repaid. + example: stake1uy6yzwsxxc28lfms0qmpxvyz9a7y770rtcqx9y96m42cttqwvp4m5 + ratified_epoch: + type: + - number + - null + description: If not null, then this proposal has been ratified at the specfied epoch. + example: 670 + enacted_epoch: + type: + - number + - null + description: If not null, then this proposal has been enacted at the specfied epoch. + example: 675 + dropped_epoch: + type: + - number + - null + description: If not null, then this proposal has been dropped (expired/enacted) at the specfied epoch. + example: 680 + expired_epoch: + type: + - number + - null + description: If not null, then this proposal has been expired at the specfied epoch. + example: 680 + expiration: + type: + - number + - null + description: Shows the epoch at which this governance action is expected to expire. + meta_url: + $ref: "#/components/schemas/drep_metadata/items/properties/url" + meta_hash: + $ref: "#/components/schemas/drep_metadata/items/properties/hash" + meta_json: + $ref: "#/components/schemas/drep_metadata/items/properties/json" + comment: + $ref: "#/components/schemas/drep_metadata/items/properties/comment" + language: + $ref: "#/components/schemas/drep_metadata/items/properties/language" + is_valid: + $ref: "#/components/schemas/drep_metadata/items/properties/is_valid" + proposal_votes: + type: array + description: List of all votes cast on specified governance action + items: + properties: + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + voter_role: + type: string + description: The role of the voter + enum: ["ConstitutionalCommittee", "DRep", "SPO"] + example: DRep + voter: + type: string + description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format) + example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + voter_hex: + type: string + description: Voter's DRep ID , pool ID or committee hash in hex format + example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + vote: + $ref: "#/components/schemas/drep_votes/items/properties/vote" script_info: type: array @@ -5166,6 +5350,9 @@ tags: - name: Asset description: Query Asset related informations x-tag-expanded: false + - name: Governance + description: Query information about governance for network + x-tag-expanded: false - name: Pool description: Query information about specific pools x-tag-expanded: false diff --git a/specs/results/koiosapi-preprod.yaml b/specs/results/koiosapi-preprod.yaml index d8cfe1cf..9e4fb453 100644 --- a/specs/results/koiosapi-preprod.yaml +++ b/specs/results/koiosapi-preprod.yaml @@ -1951,6 +1951,16 @@ components: in: query required: true allowEmptyValue: false + _tx_hash: + deprecated: false + name: _tx_hash + description: Transaction Hash in hexadecimal format (hex) + example: "d10133964da9e443b303917fd0b7644ae3d01c133deff85b4f59416c2d00f530" + schema: + type: string + in: query + required: true + allowEmptyValue: false _asset_policy: deprecated: false name: _asset_policy @@ -1991,6 +2001,36 @@ components: in: query required: false allowEmptyValue: true + _drep_id: + deprecated: false + name: _drep_id + description: DRep ID in bech32 format + schema: + type: string + example: "##_drep_id_param" + in: query + required: true + allowEmptyValue: false + _drep_id_optional: + deprecated: false + name: _drep_id + description: DRep ID in bech32 format + schema: + type: string + example: "##_drep_id_param" + in: query + required: false + allowEmptyValue: true + _committee_hash: + deprecated: false + name: _committee_hash + description: Committee hash in hexadecimal format (hex) + schema: + type: string + example: "##_committee_hash_param" + in: query + required: false + allowEmptyValue: true _extended: deprecated: false name: _extended @@ -4951,22 +4991,22 @@ components: items: properties: drep_id: - $ref: "#/components/schemas/drep_info/drep_id" + $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: - $ref: "#/components/schemas/drep_info/hex" + $ref: "#/components/schemas/drep_info/items/properties/hex" has_script: - $ref: "#/components/schemas/drep_info/has_script" + $ref: "#/components/schemas/drep_info/items/properties/has_script" registered: - $ref: "#/components/schemas/drep_info/registered" + $ref: "#/components/schemas/drep_info/items/properties/registered" drep_metadata: description: List metadata for requested delegated representatives (DReps) type: array items: properties: drep_id: - $ref: "#/components/schemas/drep_info/drep_id" + $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: - $ref: "#/components/schemas/drep_info/drep_metadata" + $ref: "#/components/schemas/drep_info/items/properties/hex" url: type: string description: A URL to a JSON payload of metadata @@ -4981,19 +5021,163 @@ components: example: {"body": {"title": "...", "...": "...", "references": [{"uri": "...", "@type": "Other", "label": "Hardfork to PV10"}]}, "authors": [{"name": "...", "witness": {"publicKey": "...", "signature": "...", "witnessAlgorithm": "ed25519"}}], "@context": {"body": {"@id": "CIP108:body", "@context": {"title": "CIP108:title", "abstract": "CIP108:abstract", "rationale": "CIP108:rationale", "motivation": "CIP108:motivation", "references": {"@id": "CIP108:references", "@context": {"uri": "CIP100:reference-uri", "Other": "CIP100:OtherReference", "label": "CIP100:reference-label", "referenceHash": {"@id": "CIP108:referenceHash", "@context": {"hashDigest": "CIP108:hashDigest", "hashAlgorithm": "CIP100:hashAlgorithm"}}, "GovernanceMetadata": "CIP100:GovernanceMetadataReference"}, "@container": "@set"}}}, "CIP100": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#", "CIP108": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0108/README.md#", "authors": {"@id": "CIP100:authors", "@context": {"name": "http://xmlns.com/foaf/0.1/name", "witness": {"@id": "CIP100:witness", "@context": {"publicKey": "CIP100:publicKey", "signature": "CIP100:signature", "witnessAlgorithm": "CIP100:witnessAlgorithm"}}}, "@container": "@set"}, "@language": "en-us", "hashAlgorithm": "CIP100:hashAlgorithm"}, "hashAlgorithm": "blake2b-256"} bytes: - type: text + type: string description: The raw bytes of the payload example: 7b0a20202240636f6e74657874223a207b0a2020202022406c616e6775616765223a2022656e2d7573222c0a2020202022434950313030223a202268747470733a2f2f6769746875622e636f6d2f63617264616e6f2d666f756e646174696f6e2f434950732f626c6f622f6d61737465722f4349502d303130302f524541444d452e6d6423222c0a2020202022434950313038223a202268747470733a2f2f6769746875622e636f6d2f63617264616e6f2d666f756e646174696f6e2f434950732f626c6f622f6d61737465722f4349502d303130382f524541444d452e6d6423222c0a202020202268617368416c676f726974686d223a20224349503130303a68617368416c676f726974686d222c0a2020202022626f6479223a207b0a20202020202022406964223a20224349503130383a626f6479222c0a2020202020202240636f6e74657874223a207b0a2020202020202020227265666572656e636573223a207b0a2020202020202020202022406964223a20224349503130383a7265666572656e636573222c0a202020202020202020202240636f6e7461696e6572223a202240736574222c0a202020202020202020202240636f6e74657874223a207b0a20202020202020202020202022476f7665726e616e63654d65746164617461223a20224349503130303a476f7665726e616e63654d657461646174615265666572656e6365222c0a202020202020202020202020224f74686572223a20224349503130303a4f746865725265666572656e6365222c0a202020202020202020202020226c6162656c223a20224349503130303a7265666572656e63652d6c6162656c222c0a20202020202020202020202022757269223a20224349503130303a7265666572656e63652d757269222c0a202020202020202020202020227265666572656e636548617368223a207b0a202020202020202020202020202022406964223a20224349503130383a7265666572656e636548617368222c0a20202020202020202020202020202240636f6e74657874223a207b0a202020202020202020202020202020202268617368446967657374223a20224349503130383a68617368446967657374222c0a202020202020202020202020202020202268617368416c676f726974686d223a20224349503130303a68617368416c676f726974686d220a20202020202020202020202020207d0a2020202020202020202020207d0a202020202020202020207d0a20202020202020207d2c0a2020202020202020227469746c65223a20224349503130383a7469746c65222c0a2020202020202020226162737472616374223a20224349503130383a6162737472616374222c0a2020202020202020226d6f7469766174696f6e223a20224349503130383a6d6f7469766174696f6e222c0a202020202020202022726174696f6e616c65223a20224349503130383a726174696f6e616c65220a2020202020207d0a202020207d2c0a2020202022617574686f7273223a207b0a20202020202022406964223a20224349503130303a617574686f7273222c0a2020202020202240636f6e7461696e6572223a202240736574222c0a2020202020202240636f6e74657874223a207b0a2020202020202020226e616d65223a2022687474703a2f2f786d6c6e732e636f6d2f666f61662f302e312f6e616d65222c0a2020202020202020227769746e657373223a207b0a2020202020202020202022406964223a20224349503130303a7769746e657373222c0a202020202020202020202240636f6e74657874223a207b0a202020202020202020202020227769746e657373416c676f726974686d223a20224349503130303a7769746e657373416c676f726974686d222c0a202020202020202020202020227075626c69634b6579223a20224349503130303a7075626c69634b6579222c0a202020202020202020202020227369676e6174757265223a20224349503130303a7369676e6174757265220a202020202020202020207d0a20202020202020207d0a2020202020207d0a202020207d0a20207d2c0a20202268617368416c676f726974686d223a2022626c616b6532622d323536222c0a202022626f6479223a207b0a20202020227469746c65223a202248617264666f726b20746f2050726f746f636f6c2076657273696f6e203130222c0a20202020226162737472616374223a20224c6574277320686176652073616e63686f4e657420696e2066756c6c20676f7665726e616e636520617320736f6f6e20617320706f737369626c65222c0a20202020226d6f7469766174696f6e223a2022505639206973206e6f742061732066756e2061732050563130222c0a2020202022726174696f6e616c65223a20224c65742773206b6565702074657374696e67207374756666222c0a20202020227265666572656e636573223a205b0a2020202020207b0a2020202020202020224074797065223a20224f74686572222c0a2020202020202020226c6162656c223a202248617264666f726b20746f2050563130222c0a202020202020202022757269223a2022220a2020202020207d0a202020205d0a20207d2c0a202022617574686f7273223a205b0a202020207b0a202020202020226e616d65223a20224361726c6f73222c0a202020202020227769746e657373223a207b0a2020202020202020227769746e657373416c676f726974686d223a202265643235353139222c0a2020202020202020227075626c69634b6579223a202237656130396133346165626231336339383431633731333937623163616266656335646466393530343035323933646565343936636163326634333734383061222c0a2020202020202020227369676e6174757265223a20226134373639383562346363306434353766323437373937363131373939613666366138306663386362376563396463623561383232333838386430363138653330646531363566336438363963346130643931303764386135623631326164376335653432343431393037663562393137393666306437313837643634613031220a2020202020207d0a202020207d0a20205d0a7d warning: - type: text + type: string description: A warning that occured while validating the metadata + language: + type: string + description: The language described in the context of the metadata as per CIP-100 + example: en-us comment: - type: text + type: string description: Comment attached to the metadata is_valid: type: boolean description: Indicate whether data is invalid example: true + drep_updates: + description: List of updates for requested (or all) delegated representatives (DReps) + type: array + items: + properties: + drep_id: + $ref: "#/components/schemas/drep_info/items/properties/drep_id" + hex: + $ref: "#/components/schemas/drep_info/items/properties/hex" + tx_hash: + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" + cert_index: + type: string + description: The index of this certificate within the the transaction. + example: 1 + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + action: + type: string + description: Effective action for this DRep Update certificate + enum: ["updated","registered","deregistered"] + example: registered + deposit: + $ref: "#/components/schemas/drep_info/items/properties/deposit" + meta_url: + $ref: "#/components/schemas/drep_metadata/items/properties/url" + meta_hash: + $ref: "#/components/schemas/drep_metadata/items/properties/hash" + meta_json: + $ref: "#/components/schemas/drep_metadata/items/properties/json" + drep_votes: + description: List of all votes casted by requested delegated representative (DRep) + type: array + items: + properties: + tx_hash: + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" + cert_index: + $ref: "#/components/schemas/drep_updates/items/properties/cert_index" + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + vote: + type: string + enum: ["Yes","No","Abstain"] + description: Actual Vote casted + example: "Yes" + committee_votes: + description: List of all votes casted by requested delegated representative (DRep) + type: array + items: + $ref: "#/components/schemas/drep_votes/items" + proposal_list: + description: List of all votes cast on specified governance action + type: array + items: + properties: + tx_hash: + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" + cert_index: + $ref: "#/components/schemas/drep_updates/items/properties/cert_index" + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + proposal_type: + type: string + enum: ["ParameterChange", "HardForkInitiation", "TreasuryWithdrawals", "NoConfidence", "NewCommittee", "NewConstitution", "InfoAction"] + description: Proposal Action Type + example: ParameterChange + proposal_description: + type: string + description: Description for Proposal Action + example: '{"tag": "InfoAction"}' + deposit: + $ref: "#/components/schemas/drep_info/items/properties/deposit" + return_address: + type: string + description: The StakeAddress index of the reward address to receive the deposit when it is repaid. + example: stake1uy6yzwsxxc28lfms0qmpxvyz9a7y770rtcqx9y96m42cttqwvp4m5 + ratified_epoch: + type: + - number + - null + description: If not null, then this proposal has been ratified at the specfied epoch. + example: 670 + enacted_epoch: + type: + - number + - null + description: If not null, then this proposal has been enacted at the specfied epoch. + example: 675 + dropped_epoch: + type: + - number + - null + description: If not null, then this proposal has been dropped (expired/enacted) at the specfied epoch. + example: 680 + expired_epoch: + type: + - number + - null + description: If not null, then this proposal has been expired at the specfied epoch. + example: 680 + expiration: + type: + - number + - null + description: Shows the epoch at which this governance action is expected to expire. + meta_url: + $ref: "#/components/schemas/drep_metadata/items/properties/url" + meta_hash: + $ref: "#/components/schemas/drep_metadata/items/properties/hash" + meta_json: + $ref: "#/components/schemas/drep_metadata/items/properties/json" + comment: + $ref: "#/components/schemas/drep_metadata/items/properties/comment" + language: + $ref: "#/components/schemas/drep_metadata/items/properties/language" + is_valid: + $ref: "#/components/schemas/drep_metadata/items/properties/is_valid" + proposal_votes: + type: array + description: List of all votes cast on specified governance action + items: + properties: + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + voter_role: + type: string + description: The role of the voter + enum: ["ConstitutionalCommittee", "DRep", "SPO"] + example: DRep + voter: + type: string + description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format) + example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + voter_hex: + type: string + description: Voter's DRep ID , pool ID or committee hash in hex format + example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + vote: + $ref: "#/components/schemas/drep_votes/items/properties/vote" script_info: type: array @@ -5166,6 +5350,9 @@ tags: - name: Asset description: Query Asset related informations x-tag-expanded: false + - name: Governance + description: Query information about governance for network + x-tag-expanded: false - name: Pool description: Query information about specific pools x-tag-expanded: false diff --git a/specs/results/koiosapi-preview.yaml b/specs/results/koiosapi-preview.yaml index 06e1a041..8b9a96b8 100644 --- a/specs/results/koiosapi-preview.yaml +++ b/specs/results/koiosapi-preview.yaml @@ -1951,6 +1951,16 @@ components: in: query required: true allowEmptyValue: false + _tx_hash: + deprecated: false + name: _tx_hash + description: Transaction Hash in hexadecimal format (hex) + example: "f1592b29b79ae85d753913dd25644c60925a4a0683979faa33832fead4b4bd9c" + schema: + type: string + in: query + required: true + allowEmptyValue: false _asset_policy: deprecated: false name: _asset_policy @@ -1991,6 +2001,36 @@ components: in: query required: false allowEmptyValue: true + _drep_id: + deprecated: false + name: _drep_id + description: DRep ID in bech32 format + schema: + type: string + example: "##_drep_id_param" + in: query + required: true + allowEmptyValue: false + _drep_id_optional: + deprecated: false + name: _drep_id + description: DRep ID in bech32 format + schema: + type: string + example: "##_drep_id_param" + in: query + required: false + allowEmptyValue: true + _committee_hash: + deprecated: false + name: _committee_hash + description: Committee hash in hexadecimal format (hex) + schema: + type: string + example: "##_committee_hash_param" + in: query + required: false + allowEmptyValue: true _extended: deprecated: false name: _extended @@ -4951,22 +4991,22 @@ components: items: properties: drep_id: - $ref: "#/components/schemas/drep_info/drep_id" + $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: - $ref: "#/components/schemas/drep_info/hex" + $ref: "#/components/schemas/drep_info/items/properties/hex" has_script: - $ref: "#/components/schemas/drep_info/has_script" + $ref: "#/components/schemas/drep_info/items/properties/has_script" registered: - $ref: "#/components/schemas/drep_info/registered" + $ref: "#/components/schemas/drep_info/items/properties/registered" drep_metadata: description: List metadata for requested delegated representatives (DReps) type: array items: properties: drep_id: - $ref: "#/components/schemas/drep_info/drep_id" + $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: - $ref: "#/components/schemas/drep_info/drep_metadata" + $ref: "#/components/schemas/drep_info/items/properties/hex" url: type: string description: A URL to a JSON payload of metadata @@ -4981,19 +5021,163 @@ components: example: {"body": {"title": "...", "...": "...", "references": [{"uri": "...", "@type": "Other", "label": "Hardfork to PV10"}]}, "authors": [{"name": "...", "witness": {"publicKey": "...", "signature": "...", "witnessAlgorithm": "ed25519"}}], "@context": {"body": {"@id": "CIP108:body", "@context": {"title": "CIP108:title", "abstract": "CIP108:abstract", "rationale": "CIP108:rationale", "motivation": "CIP108:motivation", "references": {"@id": "CIP108:references", "@context": {"uri": "CIP100:reference-uri", "Other": "CIP100:OtherReference", "label": "CIP100:reference-label", "referenceHash": {"@id": "CIP108:referenceHash", "@context": {"hashDigest": "CIP108:hashDigest", "hashAlgorithm": "CIP100:hashAlgorithm"}}, "GovernanceMetadata": "CIP100:GovernanceMetadataReference"}, "@container": "@set"}}}, "CIP100": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#", "CIP108": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0108/README.md#", "authors": {"@id": "CIP100:authors", "@context": {"name": "http://xmlns.com/foaf/0.1/name", "witness": {"@id": "CIP100:witness", "@context": {"publicKey": "CIP100:publicKey", "signature": "CIP100:signature", "witnessAlgorithm": "CIP100:witnessAlgorithm"}}}, "@container": "@set"}, "@language": "en-us", "hashAlgorithm": "CIP100:hashAlgorithm"}, "hashAlgorithm": "blake2b-256"} bytes: - type: text + type: string description: The raw bytes of the payload example: 7b0a20202240636f6e74657874223a207b0a2020202022406c616e6775616765223a2022656e2d7573222c0a2020202022434950313030223a202268747470733a2f2f6769746875622e636f6d2f63617264616e6f2d666f756e646174696f6e2f434950732f626c6f622f6d61737465722f4349502d303130302f524541444d452e6d6423222c0a2020202022434950313038223a202268747470733a2f2f6769746875622e636f6d2f63617264616e6f2d666f756e646174696f6e2f434950732f626c6f622f6d61737465722f4349502d303130382f524541444d452e6d6423222c0a202020202268617368416c676f726974686d223a20224349503130303a68617368416c676f726974686d222c0a2020202022626f6479223a207b0a20202020202022406964223a20224349503130383a626f6479222c0a2020202020202240636f6e74657874223a207b0a2020202020202020227265666572656e636573223a207b0a2020202020202020202022406964223a20224349503130383a7265666572656e636573222c0a202020202020202020202240636f6e7461696e6572223a202240736574222c0a202020202020202020202240636f6e74657874223a207b0a20202020202020202020202022476f7665726e616e63654d65746164617461223a20224349503130303a476f7665726e616e63654d657461646174615265666572656e6365222c0a202020202020202020202020224f74686572223a20224349503130303a4f746865725265666572656e6365222c0a202020202020202020202020226c6162656c223a20224349503130303a7265666572656e63652d6c6162656c222c0a20202020202020202020202022757269223a20224349503130303a7265666572656e63652d757269222c0a202020202020202020202020227265666572656e636548617368223a207b0a202020202020202020202020202022406964223a20224349503130383a7265666572656e636548617368222c0a20202020202020202020202020202240636f6e74657874223a207b0a202020202020202020202020202020202268617368446967657374223a20224349503130383a68617368446967657374222c0a202020202020202020202020202020202268617368416c676f726974686d223a20224349503130303a68617368416c676f726974686d220a20202020202020202020202020207d0a2020202020202020202020207d0a202020202020202020207d0a20202020202020207d2c0a2020202020202020227469746c65223a20224349503130383a7469746c65222c0a2020202020202020226162737472616374223a20224349503130383a6162737472616374222c0a2020202020202020226d6f7469766174696f6e223a20224349503130383a6d6f7469766174696f6e222c0a202020202020202022726174696f6e616c65223a20224349503130383a726174696f6e616c65220a2020202020207d0a202020207d2c0a2020202022617574686f7273223a207b0a20202020202022406964223a20224349503130303a617574686f7273222c0a2020202020202240636f6e7461696e6572223a202240736574222c0a2020202020202240636f6e74657874223a207b0a2020202020202020226e616d65223a2022687474703a2f2f786d6c6e732e636f6d2f666f61662f302e312f6e616d65222c0a2020202020202020227769746e657373223a207b0a2020202020202020202022406964223a20224349503130303a7769746e657373222c0a202020202020202020202240636f6e74657874223a207b0a202020202020202020202020227769746e657373416c676f726974686d223a20224349503130303a7769746e657373416c676f726974686d222c0a202020202020202020202020227075626c69634b6579223a20224349503130303a7075626c69634b6579222c0a202020202020202020202020227369676e6174757265223a20224349503130303a7369676e6174757265220a202020202020202020207d0a20202020202020207d0a2020202020207d0a202020207d0a20207d2c0a20202268617368416c676f726974686d223a2022626c616b6532622d323536222c0a202022626f6479223a207b0a20202020227469746c65223a202248617264666f726b20746f2050726f746f636f6c2076657273696f6e203130222c0a20202020226162737472616374223a20224c6574277320686176652073616e63686f4e657420696e2066756c6c20676f7665726e616e636520617320736f6f6e20617320706f737369626c65222c0a20202020226d6f7469766174696f6e223a2022505639206973206e6f742061732066756e2061732050563130222c0a2020202022726174696f6e616c65223a20224c65742773206b6565702074657374696e67207374756666222c0a20202020227265666572656e636573223a205b0a2020202020207b0a2020202020202020224074797065223a20224f74686572222c0a2020202020202020226c6162656c223a202248617264666f726b20746f2050563130222c0a202020202020202022757269223a2022220a2020202020207d0a202020205d0a20207d2c0a202022617574686f7273223a205b0a202020207b0a202020202020226e616d65223a20224361726c6f73222c0a202020202020227769746e657373223a207b0a2020202020202020227769746e657373416c676f726974686d223a202265643235353139222c0a2020202020202020227075626c69634b6579223a202237656130396133346165626231336339383431633731333937623163616266656335646466393530343035323933646565343936636163326634333734383061222c0a2020202020202020227369676e6174757265223a20226134373639383562346363306434353766323437373937363131373939613666366138306663386362376563396463623561383232333838386430363138653330646531363566336438363963346130643931303764386135623631326164376335653432343431393037663562393137393666306437313837643634613031220a2020202020207d0a202020207d0a20205d0a7d warning: - type: text + type: string description: A warning that occured while validating the metadata + language: + type: string + description: The language described in the context of the metadata as per CIP-100 + example: en-us comment: - type: text + type: string description: Comment attached to the metadata is_valid: type: boolean description: Indicate whether data is invalid example: true + drep_updates: + description: List of updates for requested (or all) delegated representatives (DReps) + type: array + items: + properties: + drep_id: + $ref: "#/components/schemas/drep_info/items/properties/drep_id" + hex: + $ref: "#/components/schemas/drep_info/items/properties/hex" + tx_hash: + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" + cert_index: + type: string + description: The index of this certificate within the the transaction. + example: 1 + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + action: + type: string + description: Effective action for this DRep Update certificate + enum: ["updated","registered","deregistered"] + example: registered + deposit: + $ref: "#/components/schemas/drep_info/items/properties/deposit" + meta_url: + $ref: "#/components/schemas/drep_metadata/items/properties/url" + meta_hash: + $ref: "#/components/schemas/drep_metadata/items/properties/hash" + meta_json: + $ref: "#/components/schemas/drep_metadata/items/properties/json" + drep_votes: + description: List of all votes casted by requested delegated representative (DRep) + type: array + items: + properties: + tx_hash: + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" + cert_index: + $ref: "#/components/schemas/drep_updates/items/properties/cert_index" + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + vote: + type: string + enum: ["Yes","No","Abstain"] + description: Actual Vote casted + example: "Yes" + committee_votes: + description: List of all votes casted by requested delegated representative (DRep) + type: array + items: + $ref: "#/components/schemas/drep_votes/items" + proposal_list: + description: List of all votes cast on specified governance action + type: array + items: + properties: + tx_hash: + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" + cert_index: + $ref: "#/components/schemas/drep_updates/items/properties/cert_index" + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + proposal_type: + type: string + enum: ["ParameterChange", "HardForkInitiation", "TreasuryWithdrawals", "NoConfidence", "NewCommittee", "NewConstitution", "InfoAction"] + description: Proposal Action Type + example: ParameterChange + proposal_description: + type: string + description: Description for Proposal Action + example: '{"tag": "InfoAction"}' + deposit: + $ref: "#/components/schemas/drep_info/items/properties/deposit" + return_address: + type: string + description: The StakeAddress index of the reward address to receive the deposit when it is repaid. + example: stake1uy6yzwsxxc28lfms0qmpxvyz9a7y770rtcqx9y96m42cttqwvp4m5 + ratified_epoch: + type: + - number + - null + description: If not null, then this proposal has been ratified at the specfied epoch. + example: 670 + enacted_epoch: + type: + - number + - null + description: If not null, then this proposal has been enacted at the specfied epoch. + example: 675 + dropped_epoch: + type: + - number + - null + description: If not null, then this proposal has been dropped (expired/enacted) at the specfied epoch. + example: 680 + expired_epoch: + type: + - number + - null + description: If not null, then this proposal has been expired at the specfied epoch. + example: 680 + expiration: + type: + - number + - null + description: Shows the epoch at which this governance action is expected to expire. + meta_url: + $ref: "#/components/schemas/drep_metadata/items/properties/url" + meta_hash: + $ref: "#/components/schemas/drep_metadata/items/properties/hash" + meta_json: + $ref: "#/components/schemas/drep_metadata/items/properties/json" + comment: + $ref: "#/components/schemas/drep_metadata/items/properties/comment" + language: + $ref: "#/components/schemas/drep_metadata/items/properties/language" + is_valid: + $ref: "#/components/schemas/drep_metadata/items/properties/is_valid" + proposal_votes: + type: array + description: List of all votes cast on specified governance action + items: + properties: + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + voter_role: + type: string + description: The role of the voter + enum: ["ConstitutionalCommittee", "DRep", "SPO"] + example: DRep + voter: + type: string + description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format) + example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + voter_hex: + type: string + description: Voter's DRep ID , pool ID or committee hash in hex format + example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + vote: + $ref: "#/components/schemas/drep_votes/items/properties/vote" script_info: type: array @@ -5166,6 +5350,9 @@ tags: - name: Asset description: Query Asset related informations x-tag-expanded: false + - name: Governance + description: Query information about governance for network + x-tag-expanded: false - name: Pool description: Query information about specific pools x-tag-expanded: false diff --git a/specs/templates/2-api-params.yaml b/specs/templates/2-api-params.yaml index 7fb1ec23..d0794b0c 100644 --- a/specs/templates/2-api-params.yaml +++ b/specs/templates/2-api-params.yaml @@ -29,6 +29,16 @@ parameters: in: query required: true allowEmptyValue: false + _tx_hash: + deprecated: false + name: _tx_hash + description: Transaction Hash in hexadecimal format (hex) + example: "##_tx_hash_param##" + schema: + type: string + in: query + required: true + allowEmptyValue: false _asset_policy: deprecated: false name: _asset_policy @@ -69,6 +79,36 @@ parameters: in: query required: false allowEmptyValue: true + _drep_id: + deprecated: false + name: _drep_id + description: DRep ID in bech32 format + schema: + type: string + example: "##_drep_id_param" + in: query + required: true + allowEmptyValue: false + _drep_id_optional: + deprecated: false + name: _drep_id + description: DRep ID in bech32 format + schema: + type: string + example: "##_drep_id_param" + in: query + required: false + allowEmptyValue: true + _committee_hash: + deprecated: false + name: _committee_hash + description: Committee hash in hexadecimal format (hex) + schema: + type: string + example: "##_committee_hash_param" + in: query + required: false + allowEmptyValue: true _extended: deprecated: false name: _extended diff --git a/specs/templates/4-api-schemas.yaml b/specs/templates/4-api-schemas.yaml index f281479a..db34ff62 100644 --- a/specs/templates/4-api-schemas.yaml +++ b/specs/templates/4-api-schemas.yaml @@ -2290,22 +2290,22 @@ schemas: items: properties: drep_id: - $ref: "#/components/schemas/drep_info/drep_id" + $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: - $ref: "#/components/schemas/drep_info/hex" + $ref: "#/components/schemas/drep_info/items/properties/hex" has_script: - $ref: "#/components/schemas/drep_info/has_script" + $ref: "#/components/schemas/drep_info/items/properties/has_script" registered: - $ref: "#/components/schemas/drep_info/registered" + $ref: "#/components/schemas/drep_info/items/properties/registered" drep_metadata: description: List metadata for requested delegated representatives (DReps) type: array items: properties: drep_id: - $ref: "#/components/schemas/drep_info/drep_id" + $ref: "#/components/schemas/drep_info/items/properties/drep_id" hex: - $ref: "#/components/schemas/drep_info/drep_metadata" + $ref: "#/components/schemas/drep_info/items/properties/hex" url: type: string description: A URL to a JSON payload of metadata @@ -2320,19 +2320,163 @@ schemas: example: {"body": {"title": "...", "...": "...", "references": [{"uri": "...", "@type": "Other", "label": "Hardfork to PV10"}]}, "authors": [{"name": "...", "witness": {"publicKey": "...", "signature": "...", "witnessAlgorithm": "ed25519"}}], "@context": {"body": {"@id": "CIP108:body", "@context": {"title": "CIP108:title", "abstract": "CIP108:abstract", "rationale": "CIP108:rationale", "motivation": "CIP108:motivation", "references": {"@id": "CIP108:references", "@context": {"uri": "CIP100:reference-uri", "Other": "CIP100:OtherReference", "label": "CIP100:reference-label", "referenceHash": {"@id": "CIP108:referenceHash", "@context": {"hashDigest": "CIP108:hashDigest", "hashAlgorithm": "CIP100:hashAlgorithm"}}, "GovernanceMetadata": "CIP100:GovernanceMetadataReference"}, "@container": "@set"}}}, "CIP100": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#", "CIP108": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0108/README.md#", "authors": {"@id": "CIP100:authors", "@context": {"name": "http://xmlns.com/foaf/0.1/name", "witness": {"@id": "CIP100:witness", "@context": {"publicKey": "CIP100:publicKey", "signature": "CIP100:signature", "witnessAlgorithm": "CIP100:witnessAlgorithm"}}}, "@container": "@set"}, "@language": "en-us", "hashAlgorithm": "CIP100:hashAlgorithm"}, "hashAlgorithm": "blake2b-256"} bytes: - type: text + type: string description: The raw bytes of the payload example: 7b0a20202240636f6e74657874223a207b0a2020202022406c616e6775616765223a2022656e2d7573222c0a2020202022434950313030223a202268747470733a2f2f6769746875622e636f6d2f63617264616e6f2d666f756e646174696f6e2f434950732f626c6f622f6d61737465722f4349502d303130302f524541444d452e6d6423222c0a2020202022434950313038223a202268747470733a2f2f6769746875622e636f6d2f63617264616e6f2d666f756e646174696f6e2f434950732f626c6f622f6d61737465722f4349502d303130382f524541444d452e6d6423222c0a202020202268617368416c676f726974686d223a20224349503130303a68617368416c676f726974686d222c0a2020202022626f6479223a207b0a20202020202022406964223a20224349503130383a626f6479222c0a2020202020202240636f6e74657874223a207b0a2020202020202020227265666572656e636573223a207b0a2020202020202020202022406964223a20224349503130383a7265666572656e636573222c0a202020202020202020202240636f6e7461696e6572223a202240736574222c0a202020202020202020202240636f6e74657874223a207b0a20202020202020202020202022476f7665726e616e63654d65746164617461223a20224349503130303a476f7665726e616e63654d657461646174615265666572656e6365222c0a202020202020202020202020224f74686572223a20224349503130303a4f746865725265666572656e6365222c0a202020202020202020202020226c6162656c223a20224349503130303a7265666572656e63652d6c6162656c222c0a20202020202020202020202022757269223a20224349503130303a7265666572656e63652d757269222c0a202020202020202020202020227265666572656e636548617368223a207b0a202020202020202020202020202022406964223a20224349503130383a7265666572656e636548617368222c0a20202020202020202020202020202240636f6e74657874223a207b0a202020202020202020202020202020202268617368446967657374223a20224349503130383a68617368446967657374222c0a202020202020202020202020202020202268617368416c676f726974686d223a20224349503130303a68617368416c676f726974686d220a20202020202020202020202020207d0a2020202020202020202020207d0a202020202020202020207d0a20202020202020207d2c0a2020202020202020227469746c65223a20224349503130383a7469746c65222c0a2020202020202020226162737472616374223a20224349503130383a6162737472616374222c0a2020202020202020226d6f7469766174696f6e223a20224349503130383a6d6f7469766174696f6e222c0a202020202020202022726174696f6e616c65223a20224349503130383a726174696f6e616c65220a2020202020207d0a202020207d2c0a2020202022617574686f7273223a207b0a20202020202022406964223a20224349503130303a617574686f7273222c0a2020202020202240636f6e7461696e6572223a202240736574222c0a2020202020202240636f6e74657874223a207b0a2020202020202020226e616d65223a2022687474703a2f2f786d6c6e732e636f6d2f666f61662f302e312f6e616d65222c0a2020202020202020227769746e657373223a207b0a2020202020202020202022406964223a20224349503130303a7769746e657373222c0a202020202020202020202240636f6e74657874223a207b0a202020202020202020202020227769746e657373416c676f726974686d223a20224349503130303a7769746e657373416c676f726974686d222c0a202020202020202020202020227075626c69634b6579223a20224349503130303a7075626c69634b6579222c0a202020202020202020202020227369676e6174757265223a20224349503130303a7369676e6174757265220a202020202020202020207d0a20202020202020207d0a2020202020207d0a202020207d0a20207d2c0a20202268617368416c676f726974686d223a2022626c616b6532622d323536222c0a202022626f6479223a207b0a20202020227469746c65223a202248617264666f726b20746f2050726f746f636f6c2076657273696f6e203130222c0a20202020226162737472616374223a20224c6574277320686176652073616e63686f4e657420696e2066756c6c20676f7665726e616e636520617320736f6f6e20617320706f737369626c65222c0a20202020226d6f7469766174696f6e223a2022505639206973206e6f742061732066756e2061732050563130222c0a2020202022726174696f6e616c65223a20224c65742773206b6565702074657374696e67207374756666222c0a20202020227265666572656e636573223a205b0a2020202020207b0a2020202020202020224074797065223a20224f74686572222c0a2020202020202020226c6162656c223a202248617264666f726b20746f2050563130222c0a202020202020202022757269223a2022220a2020202020207d0a202020205d0a20207d2c0a202022617574686f7273223a205b0a202020207b0a202020202020226e616d65223a20224361726c6f73222c0a202020202020227769746e657373223a207b0a2020202020202020227769746e657373416c676f726974686d223a202265643235353139222c0a2020202020202020227075626c69634b6579223a202237656130396133346165626231336339383431633731333937623163616266656335646466393530343035323933646565343936636163326634333734383061222c0a2020202020202020227369676e6174757265223a20226134373639383562346363306434353766323437373937363131373939613666366138306663386362376563396463623561383232333838386430363138653330646531363566336438363963346130643931303764386135623631326164376335653432343431393037663562393137393666306437313837643634613031220a2020202020207d0a202020207d0a20205d0a7d warning: - type: text + type: string description: A warning that occured while validating the metadata + language: + type: string + description: The language described in the context of the metadata as per CIP-100 + example: en-us comment: - type: text + type: string description: Comment attached to the metadata is_valid: type: boolean description: Indicate whether data is invalid example: true + drep_updates: + description: List of updates for requested (or all) delegated representatives (DReps) + type: array + items: + properties: + drep_id: + $ref: "#/components/schemas/drep_info/items/properties/drep_id" + hex: + $ref: "#/components/schemas/drep_info/items/properties/hex" + tx_hash: + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" + cert_index: + type: string + description: The index of this certificate within the the transaction. + example: 1 + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + action: + type: string + description: Effective action for this DRep Update certificate + enum: ["updated","registered","deregistered"] + example: registered + deposit: + $ref: "#/components/schemas/drep_info/items/properties/deposit" + meta_url: + $ref: "#/components/schemas/drep_metadata/items/properties/url" + meta_hash: + $ref: "#/components/schemas/drep_metadata/items/properties/hash" + meta_json: + $ref: "#/components/schemas/drep_metadata/items/properties/json" + drep_votes: + description: List of all votes casted by requested delegated representative (DRep) + type: array + items: + properties: + tx_hash: + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" + cert_index: + $ref: "#/components/schemas/drep_updates/items/properties/cert_index" + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + vote: + type: string + enum: ["Yes","No","Abstain"] + description: Actual Vote casted + example: "Yes" + committee_votes: + description: List of all votes casted by requested delegated representative (DRep) + type: array + items: + $ref: "#/components/schemas/drep_votes/items" + proposal_list: + description: List of all votes cast on specified governance action + type: array + items: + properties: + tx_hash: + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" + cert_index: + $ref: "#/components/schemas/drep_updates/items/properties/cert_index" + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + proposal_type: + type: string + enum: ["ParameterChange", "HardForkInitiation", "TreasuryWithdrawals", "NoConfidence", "NewCommittee", "NewConstitution", "InfoAction"] + description: Proposal Action Type + example: ParameterChange + proposal_description: + type: string + description: Description for Proposal Action + example: '{"tag": "InfoAction"}' + deposit: + $ref: "#/components/schemas/drep_info/items/properties/deposit" + return_address: + type: string + description: The StakeAddress index of the reward address to receive the deposit when it is repaid. + example: stake1uy6yzwsxxc28lfms0qmpxvyz9a7y770rtcqx9y96m42cttqwvp4m5 + ratified_epoch: + type: + - number + - null + description: If not null, then this proposal has been ratified at the specfied epoch. + example: 670 + enacted_epoch: + type: + - number + - null + description: If not null, then this proposal has been enacted at the specfied epoch. + example: 675 + dropped_epoch: + type: + - number + - null + description: If not null, then this proposal has been dropped (expired/enacted) at the specfied epoch. + example: 680 + expired_epoch: + type: + - number + - null + description: If not null, then this proposal has been expired at the specfied epoch. + example: 680 + expiration: + type: + - number + - null + description: Shows the epoch at which this governance action is expected to expire. + meta_url: + $ref: "#/components/schemas/drep_metadata/items/properties/url" + meta_hash: + $ref: "#/components/schemas/drep_metadata/items/properties/hash" + meta_json: + $ref: "#/components/schemas/drep_metadata/items/properties/json" + comment: + $ref: "#/components/schemas/drep_metadata/items/properties/comment" + language: + $ref: "#/components/schemas/drep_metadata/items/properties/language" + is_valid: + $ref: "#/components/schemas/drep_metadata/items/properties/is_valid" + proposal_votes: + type: array + description: List of all votes cast on specified governance action + items: + properties: + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" + voter_role: + type: string + description: The role of the voter + enum: ["ConstitutionalCommittee", "DRep", "SPO"] + example: DRep + voter: + type: string + description: Voter's DRep ID (bech32 format), pool ID (bech32 format) or committee hash (hex format) + example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + voter_hex: + type: string + description: Voter's DRep ID , pool ID or committee hash in hex format + example: drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck + vote: + $ref: "#/components/schemas/drep_votes/items/properties/vote" script_info: type: array diff --git a/specs/templates/api-main.yaml b/specs/templates/api-main.yaml index b8f151ee..ab485130 100644 --- a/specs/templates/api-main.yaml +++ b/specs/templates/api-main.yaml @@ -1814,6 +1814,9 @@ tags: - name: Asset description: Query Asset related informations x-tag-expanded: false + - name: Governance + description: Query information about governance for network + x-tag-expanded: false - name: Pool description: Query information about specific pools x-tag-expanded: false diff --git a/specs/templates/example-map.json b/specs/templates/example-map.json index b8f71642..3b84246a 100644 --- a/specs/templates/example-map.json +++ b/specs/templates/example-map.json @@ -42,6 +42,12 @@ "pv": "stake_test1uzs5rxys8qy5jnr9g0mkj860ms5n92nrykmrgyumpf2ytmsejj4m6", "pp": "stake_test1urkzeud48zxwnjc54emzmmc3gkg2r6d6tm2sd799jxjnqxqlfzmvk" }, + "_tx_hash": { + "m": "f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e", + "g": "bf04578d452dd3acb7c70fbac32dc972cb69f932f804171cfb4268f5af0228e7", + "pv": "f1592b29b79ae85d753913dd25644c60925a4a0683979faa33832fead4b4bd9c", + "pp": "d10133964da9e443b303917fd0b7644ae3d01c133deff85b4f59416c2d00f530" + }, "_asset_policy": { "m": "750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501", "g": "313534a537bc476c86ff7c57ec511bd7f24a9d15654091b24e9c606e", @@ -66,6 +72,18 @@ "pv": "4d43", "pp": "74657374" }, + "_drep_id": { + "m": "drep17l6sywnwqu9aedd6aumev42w39ln5zfl9nw7j4ak6u8swyrwvz3", + "g": "drep1s9qaseg7qyum807fcv0hdky9gv0c89tn98t4urjn5ewz57dml0r", + "pv": "drep1l9y2naagv0vqvft9szdt5wf94fqnxn5hdsgusdl7rf6vq4djqck", + "pp": "drep1kxtwaqtayj6vklc57u93xayjvkwgvefh8drscqp5a5y6jz7m6rd" + }, + "_committee_hash": { + "m": "49fa008218cd619afe6aa8a1a93303f242440722b314f36bda2c2e23", + "g": "65d497b875c56ab213586a4006d4f6658970573ea8e2398893857472", + "pv": "7ceede7d6a89e006408e6b7c6acb3dd094b3f6817e43b4a36d01535b", + "pp": "f8f56120e1ec00feb088ece39ef14f07339afeb37b4e949ff12b89ff" + }, "_pool_bech32": { "m": "pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc", "g": "pool1xc9eywck4e20tydz4yvh5vfe0ep8whawvwz8wqkc9k046a2ypp4",