diff --git a/CIP-0139/Query_Layer_API_Comparison.md b/CIP-0139/Query_Layer_API_Comparison.md new file mode 100644 index 0000000000..5f6635fe65 --- /dev/null +++ b/CIP-0139/Query_Layer_API_Comparison.md @@ -0,0 +1,139 @@ +# WIP Query Layer API Comparison (1) + +| | Blockfrost | Maestro | Koios | +|---------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|------------------------------------------------------| +| Accounts | | | | +| List of all stake addresses | | | https://api.koios.rest/#get-/account_list | +| Account info | https://blockfrost.dev/api/specific-account-address | https://docs.gomaestro.org/Cardano/Indexer-API/Accounts/account-info | https://api.koios.rest/#post-/account_info | +| Account reward history | https://blockfrost.dev/api/account-reward-history | https://docs.gomaestro.org/Cardano/Indexer-API/Accounts/account-rewards | https://api.koios.rest/#post-/account_rewards | +| Account history | https://blockfrost.dev/api/account-history | https://docs.gomaestro.org/Cardano/Indexer-API/Accounts/account-history | https://api.koios.rest/#post-/account_history | +| Account delegation history | https://blockfrost.dev/api/account-delegation-history | https://docs.gomaestro.org/Cardano/Indexer-API/Accounts/account-delegations | https://api.koios.rest/#post-/account_updates | +| Account registration history | https://blockfrost.dev/api/account-registration-history | https://docs.gomaestro.org/Cardano/Indexer-API/Accounts/account-updates | https://api.koios.rest/#post-/account_updates | +| Account withdrawal history | https://blockfrost.dev/api/account-withdrawal-history | https://docs.gomaestro.org/Cardano/Indexer-API/Accounts/account-updates | https://api.koios.rest/#post-/account_updates | +| Account MIR history | https://blockfrost.dev/api/account-mir-history | | https://api.koios.rest/#post-/account_rewards | +| Account associated addresses | https://blockfrost.dev/api/account-associated-addresses | https://docs.gomaestro.org/Cardano/Indexer-API/Accounts/account-addresses | https://api.koios.rest/#post-/account_addresses | +| Assets associated with the account addresses | https://blockfrost.dev/api/assets-associated-with-the-account-addresses | https://docs.gomaestro.org/Cardano/Indexer-API/Accounts/account-assets | https://api.koios.rest/#post-/account_assets | +| Summed details of account addresses | https://blockfrost.dev/api/detailed-information-about-account-associated-addresses | | | +| Account utxos | | | https://api.koios.rest/#post-/account_utxos | +| Addresses | | | | +| Address details/balance | https://blockfrost.dev/api/specific-address | https://docs.gomaestro.org/Cardano/Indexer-API/Addresses/balance-by-payment-cred | https://api.koios.rest/#post-/address_info | +| Extended information of an address / assets | https://blockfrost.dev/api/extended-information-of-a-specific-address | | https://api.koios.rest/#post-/address_assets | +| Address details / tx count | https://blockfrost.dev/api/address-details | https://docs.gomaestro.org/Cardano/Indexer-API/Addresses/tx-count-by-address | | +| Address UTXOs | https://blockfrost.dev/api/address-utx-os | https://docs.gomaestro.org/Cardano/Indexer-API/Addresses/utxos-by-address | https://api.koios.rest/#post-/address_utxos | +| Address UTXOs of a given asset | https://blockfrost.dev/api/address-utx-os-of-a-given-asset | | | +| UTxO references at an address | | https://docs.gomaestro.org/Cardano/Indexer-API/Addresses/utxo-refs-at-address | | +| UTxOs by multiple addresses | | https://docs.gomaestro.org/Cardano/Indexer-API/Addresses/utxos-by-addresses | | +| UTxOs by payment credential(s) | | https://docs.gomaestro.org/Cardano/Indexer-API/Addresses/utxos-by-payment-cred | | +| Address transactions | https://blockfrost.dev/api/address-transactions | https://docs.gomaestro.org/Cardano/Indexer-API/Addresses/txs-by-address | https://api.koios.rest/#post-/address_txs | +| Payment credential(s) transactions | | https://docs.gomaestro.org/Cardano/Indexer-API/Addresses/txs-by-payment-cred | | +| Decode address | | https://docs.gomaestro.org/Cardano/Indexer-API/Addresses/decode-address | | +| Assets | | | | +| List of all assets | https://blockfrost.dev/api/assets | | https://api.koios.rest/#get-/asset_list | +| List of assets registered via token registry | | | https://api.koios.rest/#get-/asset_token_registry | +| Asset info | https://blockfrost.dev/api/specific-asset | https://docs.gomaestro.org/Cardano/Indexer-API/Assets/asset-info | https://api.koios.rest/#post-/asset_info | +| Asset mint/burn history | https://blockfrost.dev/api/asset-history | https://docs.gomaestro.org/Cardano/Indexer-API/Assets/asset-mints | https://api.koios.rest/#get-/asset_history | +| Asset transactions | https://blockfrost.dev/api/asset-transactions | https://docs.gomaestro.org/Cardano/Indexer-API/Assets/asset-txs | https://api.koios.rest/#get-/asset_txs | +| Asset addresses | https://blockfrost.dev/api/asset-addresses | https://docs.gomaestro.org/Cardano/Indexer-API/Assets/asset-addresses | https://api.koios.rest/#get-/asset_addresses | +| Asset summary | | | https://api.koios.rest/#get-/asset_summary | +| NFT address | | | https://api.koios.rest/#get-/asset_nft_address | +| Asset accounts | | https://docs.gomaestro.org/Cardano/Indexer-API/Assets/asset-accounts | | +| Asset UTxOs | | https://docs.gomaestro.org/Cardano/Indexer-API/Assets/asset-utxos | https://api.koios.rest/#post-/asset_utxos | +| Assets of a specific policy | https://blockfrost.dev/api/assets-of-a-specific-policy | https://docs.gomaestro.org/Cardano/Indexer-API/Asset%20Policy/policy-assets | https://api.koios.rest/#get-/policy_asset_list | +| Policy assets information | | https://docs.gomaestro.org/Cardano/Indexer-API/Asset%20Policy/policy-info | https://api.koios.rest/#get-/policy_asset_info | +| Policy accounts | | https://docs.gomaestro.org/Cardano/Indexer-API/Asset%20Policy/policy-accounts | | +| Policy addresses | | https://docs.gomaestro.org/Cardano/Indexer-API/Asset%20Policy/policy-addresses | https://api.koios.rest/#get-/policy_asset_addresses | +| Policy mint/burn history | | https://docs.gomaestro.org/Cardano/Indexer-API/Asset%20Policy/policy-mints | https://api.koios.rest/#get-/policy_asset_mints | +| Policy tx history | | https://docs.gomaestro.org/Cardano/Indexer-API/Asset%20Policy/policy-txs | | +| Policy UTxOs | | https://docs.gomaestro.org/Cardano/Indexer-API/Asset%20Policy/policy-utxos | | +| Blocks | | | | +| List of all blocks | | | https://api.koios.rest/#get-/blocks | +| Latest block info | https://blockfrost.dev/api/latest-block | https://docs.gomaestro.org/Cardano/Indexer-API/Blocks/latest-block | | +| Latest block transactions | https://blockfrost.dev/api/latest-block-transactions | | | +| Block info | https://blockfrost.dev/api/specific-block | https://docs.gomaestro.org/Cardano/Indexer-API/Blocks/block-info | https://api.koios.rest/#post-/block_info | +| Listing of next blocks | https://blockfrost.dev/api/listing-of-next-blocks | | | +| Listing of previous blocks | https://blockfrost.dev/api/listing-of-previous-blocks | | | +| Specific block in a slot | https://blockfrost.dev/api/specific-block-in-a-slot | | | +| Specific block in a slot in an epoch | https://blockfrost.dev/api/specific-block-in-a-slot-in-an-epoch | | | +| Block transactions | https://blockfrost.dev/api/block-transactions | | https://api.koios.rest/#post-/block_txs | +| Addresses affected in a specific block | https://blockfrost.dev/api/addresses-affected-in-a-specific-block | | | +| Epochs | | | | +| Latest epoch | https://blockfrost.dev/api/latest-epoch | https://docs.gomaestro.org/Cardano/Indexer-API/Epochs/current-epoch | | +| Latest epoch protocol parameters | https://blockfrost.dev/api/latest-epoch-protocol-parameters | | | +| Specific epoch | https://blockfrost.dev/api/specific-epoch | https://docs.gomaestro.org/Cardano/Indexer-API/Epochs/epoch-info | https://api.koios.rest/#get-/epoch_info | +| Listing of next epochs | https://blockfrost.dev/api/listing-of-next-epochs | | | +| Listing of previous epochs | https://blockfrost.dev/api/listing-of-previous-epochs | | | +| Stake distribution | https://blockfrost.dev/api/stake-distribution | | | +| Stake distribution by pool | https://blockfrost.dev/api/stake-distribution-by-pool | | | +| Block distribution | https://blockfrost.dev/api/block-distribution | | | +| Block distribution by pool | https://blockfrost.dev/api/block-distribution-by-pool | | | +| Block protocols | | | https://api.koios.rest/#get-/epoch_block_protocols | +| Protocol parameters by epoch | https://blockfrost.dev/api/protocol-parameters | | https://api.koios.rest/#get-/epoch_params | +| Current protocol parameters | | https://docs.gomaestro.org/Cardano/Indexer-API/General/protocol-parameters | https://api.koios.rest/#get-/cli_protocol_params | +| General | | | | +| Blockchain genesis | https://blockfrost.dev/api/blockchain-genesis | | https://api.koios.rest/#get-/genesis | +| Blockchain system start | | https://docs.gomaestro.org/Cardano/Indexer-API/General/system-start | | +| Chain tip | | https://docs.gomaestro.org/Cardano/Indexer-API/General/chain-tip | | +| Mempool | | | | +| Mempool transactions | https://blockfrost.dev/api/mempool | | | +| Specific transaction in the mempool | https://blockfrost.dev/api/specific-transaction-in-the-mempool | | | +| Mempool by address | https://blockfrost.dev/api/mempool-by-address | | | +| Metadata | | | | +| Transaction metadata labels | https://blockfrost.dev/api/transaction-metadata-labels | | | +| Transaction metadata content in JSON | https://blockfrost.dev/api/transaction-metadata-content-in-json | | | +| Transaction metadata content in CBOR | https://blockfrost.dev/api/transaction-metadata-content-in-cbor | | | +| Network | | | | +| Network information | https://blockfrost.dev/api/network-information | | https://api.koios.rest/#get-/tip | +| Query summary of blockchain eras | https://blockfrost.dev/api/query-summary-of-blockchain-eras | https://docs.gomaestro.org/Cardano/Indexer-API/General/era-summaries | | +| Historical tokenomic stats | | | https://api.koios.rest/#get-/totals | +| Param update proposals | | | https://api.koios.rest/#get-/param_updates | +| Reserve withdrawals | | | https://api.koios.rest/#get-/reserve_withdrawals | +| Treasury withdrawals | | | https://api.koios.rest/#get-/treasury_withdrawals | +| Pools | | | | +| List of stake pools | https://blockfrost.dev/api/list-of-stake-pools | https://docs.gomaestro.org/Cardano/Indexer-API/Pools/list-pools | https://api.koios.rest/#get-/pool_list | +| List of stake pools with additional information | https://blockfrost.dev/api/list-of-stake-pools-with-additional-information | | | +| List of retired stake pools | https://blockfrost.dev/api/list-of-retired-stake-pools | | | +| List of retiring stake pools | https://blockfrost.dev/api/list-of-retiring-stake-pools | | | +| List of stake pool retirements | | | https://api.koios.rest/#get-/pool_retirements | +| Stake pool info | https://blockfrost.dev/api/specific-stake-pool | https://docs.gomaestro.org/Cardano/Indexer-API/Pools/pool-info | https://api.koios.rest/#post-/pool_info | +| Stake pool history | https://blockfrost.dev/api/stake-pool-history | https://docs.gomaestro.org/Cardano/Indexer-API/Pools/pool-history | https://api.koios.rest/#get-/pool_history | +| Stake pool metadata | https://blockfrost.dev/api/stake-pool-metadata | https://docs.gomaestro.org/Cardano/Indexer-API/Pools/pool-metadata | https://api.koios.rest/#post-/pool_metadata | +| Stake pool relays | https://blockfrost.dev/api/stake-pool-relays | https://docs.gomaestro.org/Cardano/Indexer-API/Pools/pool-relays | https://api.koios.rest/#get-/pool_relays | +| Stake pool delegators | https://blockfrost.dev/api/stake-pool-delegators | https://docs.gomaestro.org/Cardano/Indexer-API/Pools/pool-delegators | https://api.koios.rest/#get-/pool_delegators | +| Stake pool delegator history | | https://docs.gomaestro.org/Cardano/Indexer-API/Pools/pool-historical-delegators | https://api.koios.rest/#get-/pool_delegators_history | +| Stake pool blocks | https://blockfrost.dev/api/stake-pool-blocks | https://docs.gomaestro.org/Cardano/Indexer-API/Pools/pool-blocks | https://api.koios.rest/#get-/pool_blocks | +| Stake pool updates | https://blockfrost.dev/api/stake-pool-updates | https://docs.gomaestro.org/Cardano/Indexer-API/Pools/pool-updates | https://api.koios.rest/#get-/pool_updates | +| Stake pool stake snapshot | | | https://api.koios.rest/#get-/pool_stake_snapshot | +| Stake pool registrations | | | https://api.koios.rest/#get-/pool_registrations | +| Scripts | | | | +| List of scripts | https://blockfrost.dev/api/scripts | | https://api.koios.rest/#get-/native_script_list | +| Script info | https://blockfrost.dev/api/specific-script | https://docs.gomaestro.org/Cardano/Indexer-API/Scripts/script-by-hash | https://api.koios.rest/#post-/script_info | +| Script JSON | https://blockfrost.dev/api/script-json | | | +| Script CBOR | https://blockfrost.dev/api/script-cbor | | | +| Redeemers of a specific script | https://blockfrost.dev/api/redeemers-of-a-specific-script | | https://api.koios.rest/#get-/script_redeemers | +| Script UTxOs | | | https://api.koios.rest/#get-/script_utxos | +| Datums | | | | +| Datum value | https://blockfrost.dev/api/datum-value | https://docs.gomaestro.org/Cardano/Indexer-API/Datum/datum-by-hash | | +| Datum CBOR value | https://blockfrost.dev/api/datum-cbor-value | | https://api.koios.rest/#post-/datum_info | +| Transactions | | | | +| Transaction info | https://blockfrost.dev/api/specific-transaction | https://docs.gomaestro.org/Cardano/Indexer-API/Transactions/tx-info | https://api.koios.rest/#post-/tx_info | +| Transaction UTXOs | https://blockfrost.dev/api/transaction-utx-os | | https://api.koios.rest/#post-/utxo_info | +| Transaction output by output ref | | https://docs.gomaestro.org/Cardano/Indexer-API/Transactions/txo-by-txo-ref | | +| Transaction outputs by output refs | | https://docs.gomaestro.org/Cardano/Indexer-API/Transactions/txos-by-txo-refs | | +| Transaction address by output ref | | https://docs.gomaestro.org/Cardano/Indexer-API/Transactions/address-by-txo | | +| Transaction stake addresses certificates | https://blockfrost.dev/api/transaction-stake-addresses-certificates | | | +| Transaction delegation certificates | https://blockfrost.dev/api/transaction-delegation-certificates | | | +| Transaction withdrawal | https://blockfrost.dev/api/transaction-withdrawal | | | +| Transaction MIRs | https://blockfrost.dev/api/transaction-mi-rs | | | +| Transaction stake pool registration and update certificates | https://blockfrost.dev/api/transaction-stake-pool-registration-and-update-certificates | | | +| Transaction stake pool retirement certificates | https://blockfrost.dev/api/transaction-stake-pool-retirement-certificates | | | +| Transaction CBOR | | https://docs.gomaestro.org/Cardano/Indexer-API/Transactions/tx-cbor-by-tx-hash | | +| Transaction metadata | https://blockfrost.dev/api/transaction-metadata | | https://api.koios.rest/#post-/tx_metadata | +| Transaction metadata labels | | | https://api.koios.rest/#get-/tx_metalabels | +| Transaction metadata in CBOR | https://blockfrost.dev/api/transaction-metadata-in-cbor | | | +| Transaction redeemers | https://blockfrost.dev/api/transaction-redeemers | | | +| Submit a transaction | https://blockfrost.dev/api/submit-a-transaction | https://docs.gomaestro.org/Cardano/Indexer-API/Transactions/iog-tx-submit | https://api.koios.rest/#post-/submittx | +| Transaction confirmations | | | https://api.koios.rest/#post-/tx_status | +| Utilities | | | | +| Derive an address | https://blockfrost.dev/api/derive-an-address | | | +| Submit a transaction for execution units evaluation | https://blockfrost.dev/api/submit-a-transaction-for-execution-units-evaluation | https://docs.gomaestro.org/Cardano/Indexer-API/Transactions/evaluate-redeemers | | +| Submit a transaction for execution units evaluation (additional UTXO set) | https://blockfrost.dev/api/submit-a-transaction-for-execution-units-evaluation-additional-utxo-set | | | diff --git a/CIP-0139/README.md b/CIP-0139/README.md new file mode 100644 index 0000000000..40c46e97c9 --- /dev/null +++ b/CIP-0139/README.md @@ -0,0 +1,141 @@ +--- +CIP: 139 +Title: Universal Query Layer +Category: Tools +Status: Proposed +Authors: + - Vladimir Kalnitsky + - Giovanni Garufi +Implementors: [] +Discussions: + - https://discord.gg/MU8vHAgmGy +Created: 2024-05-14 +License: CC-BY-4.0 +Version: 0.0.0 +--- + +## Abstract + +A transport-agnostic query layer specification for use in dApps and wallets. + +## Motivation: why is this CIP necessary? + +See [CPS-12](https://github.com/cardano-foundation/CIPs/pull/625) for motivation. + +## Specification + +The goal of this proposal is to define a standard, JSON-based, transport-agnostic query layer for wallets to implement which covers enough functionalities to be useful to a wide set of dApps. + +We will start by discussing existing query layer designs for dApps, so we can properly define the use case for this CIP. +Next, we will define the query layer API. +We attempt to define the API in a transport-agnostic way: the request and return types for each endpoint are as defined in CIP-0116, with a few notable exception where the corresponding CDDL type lacked some useful information (more on this can be found in the `Query Layer API` section). Finally, we end this section with some notes on rollbacks and pagination. + +#### Existing Query Layer designs + +There are two approaches to Cardano dApp development: + +1. **Using customized chain followers**. A chain follower is a program that interacts with cardano-node and processes all incoming transactions, as well as rollbacks, to maintain consistent dApp-specific state. Example: [Carp](https://dcspark.github.io/carp/docs/intro/). + +2. **Using general-purpose query layers**. General-purpose query layers allow to query blockchain data using a wide set of APIs that are not built with a particular dApp domain in mind. dApp state has to be constructed based on data returned from the queries. Examples: Blockfrost, Maestro. + +The first approach allows for lower runtime resource consumption, but a general-purpose query layer has an advantage of being more easily reusable between dApps. + +In this proposal, we are focusing on general-purpose querying only. + +### Query Layer API + +This section contains descriptions for methods & their parameter lists. + +The scope of this section is loosely based on a [comparison table for existing Cardano query layers](./Query_Layer_API_Comparison.md). +The goal is to make it so that the API could be implemented via simple adapters that transform requests and responses to the appropriate formats. + +The payload formats used below are either references to [CIP-0116 - Standard JSON encoding for Domain Types](https://cips.cardano.org/cip/CIP-0116), which specifies cardano domain types via a JSON schema, or references to the [Query Layer JSON schema](./query-layer.json) which we defined in this CIP to define some types that are not present in the CDDL spec. + +[View the list of endpoints here](./endpoints.md) + +### Transports + +The API can be implemented across several transports. The goal is to allow several different clients, possibly written in different languages, to interact with wallets. +For this reason we provide an [Openapi schema](./open-api.json), a [JSON-RPC](./json-rpc.json) schema, and an interface for an [injected Javascript](./ts-api.md) object in Typescript. +We generate these interfaces from a high level specification of the endpoints [source](https://github.com/mlabs-haskell/query-layer-impl), ensuring that the information is consistent and easily updatable for different choices of transport layer. + +### Pagination + +In CIP-30, pagination is not reliable: because there is no guarantee that the set of UTxOs does not change between calls. On the other hand, there are good reasons to want to paginate responses, especially when designing an universal query layer. There are, generally, no bounds on the number of results that will be returned by many of the queries we want the API to cover (e.g. there is no way to control how many UTxOs might ever be at a given script address). +Even if we remove pagination from this API, we still have the issue that the underlying provider being used to fetch the data, could be using pagination itself. While this is somewhat of an "implementation detail", it can still lead to issues for end-users interacting with this API. +In this CIP, we have decided to remove pagination from the API. While very useful to have, it introduces potential issues about consistency of the results that affect both dApp developers and end users. +We hope to revisit this topic in a future CIP, to come up with a solution that does not force us to pick between consistency and efficiency. + +### Handling of rollbacks + +Transaction rollbacks are essential to blockchains: local node's view of the chain may be different from other nodes'. During conflict resolution, the node may issue a rollback event, that should be handled by dApps. + +Customized chain followers, at least in principle, allow for "live" rollback handling: that is, a user-facing dApp can subscribe to a local view of a part of the UTxO set. + +General purpose query layers can also handle rollbacks just fine, but they don't propagate rollback events to dApps, because they do not possess any dApp-specific info to determine if a dApp *needs* to handle a particular rollback. dApps that work with general-purpose query layers follow pull-based architecture, rather than event subscription-based, which means they just request data as needed, instead of reacting to blockchain events. + +In the context of this API, rollbacks should be acknowledged as a source of potential inconsistency between data pieces returned by different queries. + +#### Error handling + +Errors should be divided in two categories: + +- domain errors +- transport errors (404, 500, etc) + +Here we will only specify the domain errors. Users should also handle transport specific errors that can occur when interacting with the API. + +##### Error Types + +###### APIError + +``` +APIErrorCode { + InvalidRequest: -1, + InternalError: -2, + Refused: -3, + AccountChange: -4, +} +APIError { + code: APIErrorCode, + info: string +} +``` + +- InvalidRequest - Inputs do not conform to this spec or are otherwise invalid. +- InternalError - An error occurred during execution of this API call. +- Refused - The request was refused due to lack of access - e.g. wallet disconnects. +- AccountChange - The account has changed. The dApp should call wallet.enable() to reestablish connection to the new account. The wallet should not ask for confirmation as the user was the one who initiated the account change in the first place. + +Note that the error codes and their meaning are copied from [CIP-30](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0030#apierror). The reason is that this API will most likely live "alongside" the CIP-30 API, so unifying the error types reduces burden on the users. + +### Versioning + +The API has an endpoint that must return the current version of the API implemented. While the CIP is in preparation, the version shall be set to 0.0.0. The moment this CIP is merged the version should be set to 1.0.0, and all implementations should return that as the current version. Any changes to the API should come in form of PRs to this CIP. Every change must update the version in accordance to SemVer. + +## Rationale: how does this CIP achieve its goals? + +This CIP originates from the work layed out in the wallet working group, and specifically to address [CPS-012](https://github.com/cardano-foundation/CIPs/blob/master/CPS-0012/README.md) + +This CPS initiative originated in the discussion about [Extensive Wallet Standard CIP](https://github.com/cardano-foundation/CIPs/pull/620) on the CIP Discord server ([invite](https://discord.gg/P59aNVN8zu)) +in the [`#general`](https://discord.com/channels/971785110770831360/992011119872970762/1176567729017327737) channel, continuing in a dedicated [`#query-layer-standard`](https://discord.com/channels/971785110770831360/1178763938389823598) channel. + +This CIP attempts to solve the issues raised and discussed in these previous discussions and CPSs. At every step we have tried to get feedback for this CIP from the community, this includes: dApp and wallet developers, query layer providers, end users, etc. + +We have attempted to define a minimal API to cover many use cases, but we expect this to evolve over time: either to fill in some gap we missed, or simply to keep up with the continuing evolution of Cardano itself. We encourage future authors to follow the versioning scheme defined above. + +## Path to Active + +### Acceptance Criteria + +- [ ] There are at least two protocol adapter for any of the existing query layers that implements this spec, that can be run. +- [ ] There are at least two offchain library that implements a provider interface for this CIP, effectively making it usable with the protocol adapter in production. + +### Implementation Plan + +- [ ] Build at least one protocol adapter for any of the existing query layers that implements this spec +- [ ] Build at least one offchain library integration + +## Copyright + +This CIP is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode). diff --git a/CIP-0139/endpoints.md b/CIP-0139/endpoints.md new file mode 100644 index 0000000000..e09185fc02 --- /dev/null +++ b/CIP-0139/endpoints.md @@ -0,0 +1,1598 @@ +# Endpoints + +This document contains a list of endpoints for a universal query layer. Each section is named after a resource that can be obtained from the query layer, and each subsection defines different ways to obtain that resource. + + +## Contents + +1. [Utxos](#utxos) +1. [Block](#block) +1. [Transaction](#transaction) +1. [Datum](#datum) +1. [Plutus Script](#plutus-script) +1. [Native Script](#native-script) +1. [Metadata](#metadata) +1. [Protocol Parameters](#protocol-parameters) +1. [Votes](#votes) +1. [Drep](#drep) +1. [Committee](#committee) +1. [Pool](#pool) +1. [Proposal](#proposal) +1. [Era](#era) + +## Utxos + +### Asset + +Get all UTxOs that contain some of the specified asset + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_utxos_asset) + +#### Request + + +
+Show Example: + +``` +{ + "asset_name": "504154415445", + "minting_policy_hash": "fa055f570e99cfd65e86a5e4488220f5a2cfd8f2be90d98f54d3eafa" +} +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "utxos": [ + { + "input": { + "transaction_id": "eca40340fa6e65d964915ba4bc8bd811a0493d263ffe95875291114cbb2d0686", + "index": 4201022945 + }, + "output": { + "address": "stake1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5egfu2p0u", + "amount": { + "coin": "0" + } + } + }, + { + "input": { + "transaction_id": "eca40340fa6e65d964915ba4bc8bd811a0493d263ffe95875291114cbb2d0686", + "index": 1609920239 + }, + "output": { + "address": "37btjrVyb4KDXBNC4haBVPCrro8AQPHwvCMp3RFhhSVWwfFmZ6wwzSK6JK1hY6wHNmtrpTf1kdbva8TCneM2YsiXT7mrzT21EacHnPpz5YyUdj64na", + "amount": { + "coin": "0" + } + } + } + ] +} +``` +
+ +### Transaction Hash + +Get all UTxOs produced by the transaction + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_utxos_transaction_hash) + +#### Request + + +
+Show Example: + +``` +"fbc1da46d62a431e69855ad48a6b49b0e2aaafc6fd3dc4a066c6851b7bd31a91" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "utxos": [ + { + "input": { + "transaction_id": "7420a723bf4ee4417ec1aa2262ff60921270681e7a9d537132cbcc82917e8006", + "index": 940381344 + }, + "output": { + "address": "37btjrVyb4KDXBNC4haBVPCrro8AQPHwvCMp3RFhhSVWwfFmZ6wwzSK6JK1hY6wHNmtrpTf1kdbva8TCneM2YsiXT7mrzT21EacHnPpz5YyUdj64na", + "amount": { + "coin": "0" + } + } + } + ] +} +``` +
+ +### Address + +Get all UTxOs present at the address + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_utxos_address) + +#### Request + + +
+Show Example: + +``` +"stake1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5egfu2p0u" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "utxos": [ + { + "input": { + "transaction_id": "7420a723bf4ee4417ec1aa2262ff60921270681e7a9d537132cbcc82917e8006", + "index": 1477617979 + }, + "output": { + "address": "37btjrVyb4KDXBNC4haBVPCrro8AQPHwvCMp3RFhhSVWwfFmZ6wwzSK6JK1hY6wHNmtrpTf1kdbva8TCneM2YsiXT7mrzT21EacHnPpz5YyUdj64na", + "amount": { + "coin": "175253" + } + } + }, + { + "input": { + "transaction_id": "7420a723bf4ee4417ec1aa2262ff60921270681e7a9d537132cbcc82917e8006", + "index": 4056981757 + }, + "output": { + "address": "addr1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5eg0yu80w", + "amount": { + "coin": "0" + } + } + } + ] +} +``` +
+ +### Payment Credential + +Get all UTxOs present at the addresses which use the payment credential + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_utxos_payment_credential) + +#### Request + + +
+Show Example: + +``` +{ + "tag": "pubkey_hash", + "value": "cbc69eb73a694e55425ed0c15f6674a33e8f2f7236b52cba5fd30129" +} +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "utxos": [ + { + "input": { + "transaction_id": "c6726192662abeab149098095eabe004ecbec47f5e564748ab0d394affca47d9", + "index": 2697252292 + }, + "output": { + "address": "addr1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5eg0yu80w", + "amount": { + "coin": "0" + } + } + }, + { + "input": { + "transaction_id": "7420a723bf4ee4417ec1aa2262ff60921270681e7a9d537132cbcc82917e8006", + "index": 3633155075 + }, + "output": { + "address": "37btjrVyb4KDXBNC4haBVPCrro8AQPHwvCMp3RFhhSVWwfFmZ6wwzSK6JK1hY6wHNmtrpTf1kdbva8TCneM2YsiXT7mrzT21EacHnPpz5YyUdj64na", + "amount": { + "coin": "7" + } + } + } + ] +} +``` +
+ +### Stake Credential + +Get all UTxOs present at the addresses which use the stake credential + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_utxos_stake_credential) + +#### Request + + +
+Show Example: + +``` +"stake1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5egfu2p0u" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "utxos": [ + { + "input": { + "transaction_id": "fbc1da46d62a431e69855ad48a6b49b0e2aaafc6fd3dc4a066c6851b7bd31a91", + "index": 2129548537 + }, + "output": { + "address": "37btjrVyb4KDXBNC4haBVPCrro8AQPHwvCMp3RFhhSVWwfFmZ6wwzSK6JK1hY6wHNmtrpTf1kdbva8TCneM2YsiXT7mrzT21EacHnPpz5YyUdj64na", + "amount": { + "coin": "81751092945" + } + } + } + ] +} +``` +
+ +## Block + +### Number + +Get the block with the supplied block number + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_block_number) + +#### Request + + +
+Show Example: + +``` +"0" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "auxiliary_data_set": {}, + "header": { + "body_signature": "136c77da7cc6f02fc1af792625a5b75d8f2d83a71b27635ba228ff7c4bf13e8e9e0318e1aea7cced706c828404377d0991de77a75325c0651b5a45099dd72032c7647d8a1b76e96b8fd823198d199f3663caf27847384974b3f0a2eaaa2ad85e443bcc028ce4be9465858260e9dd1f437991aef8e43aaceab1c051ede06630ec4210f2150abc8a1ac01408061ac8867a5930f0051ade40a2d79eaa06aab715e9a9ea7af88b69a677c3314d91d15ee434bdd51e8c46aa97b1bf185cc60c48ef63324ffa914fbb1abd55d46c68cba8cd8077da8f88a6cdebc84f937bfa375505dcb95d243844b7fd08e0bc34bc083a2ad090c6b6cfd6beaec2064fc15d57540f80d93f378319dafda2668ea330d59d0ae7efd1b5f015a37eed6bcd21cd794675ebe52e31709f15e69b2ca3903acf1006c746a0b32ae7f5f469884c70a8b01d744c086474d3bbc8b86e19e1d0cff76509a143bb1bd16c6ca6a0d6020c746629485f222d649c99db064f8c9b66c199f12cc46a693437895242a01915b4f958f6ac4587706f62762e6e45f20394ad6cf93f04e0de89b5525099ed6e40d3b46ac25e1a4ddb714b34d0d27978ca16aa43d32f190029b17ef50856ba8288fb3059398204", + "header_body": { + "block_number": 795642744, + "slot": "0", + "issuer_vkey": "165767b4ab5815811983109a23250978bde372be3a36cd0bf4e6d936b2d23d08", + "vrf_vkey": "f517f9db8eb29964be142f29fd85d86b320175067198b0e9f867bbba511c42ee", + "vrf_result": { + "output": "9f1be1c3", + "proof": "f370" + }, + "block_body_size": 3194471960, + "block_body_hash": "3ee393fd2a52c0a909af1814ee5764f02ed3b85d9d3247badea629da066ad244", + "operational_cert": { + "hot_vkey": "8272bd2deeafc2d91b2b16796b50960457c20aa5fadedcaa9e1bce26d9d965fb", + "kes_period": 518134050, + "sequence_number": 1254271129, + "sigma": "0e003769525373e7214d716fb4a02d1a0da0fdcbaa8fdd03295d577747e8854cc37dde5784f0d0d0172b67efb9e284e250bdb0b847dd70b72d6e161b0eae9409" + }, + "protocol_version": { + "major": 3571437749, + "minor": 1179319841 + } + } + }, + "invalid_transactions": [ + 1049628808 + ], + "transaction_bodies": [ + { + "inputs": [ + { + "transaction_id": "c6726192662abeab149098095eabe004ecbec47f5e564748ab0d394affca47d9", + "index": 3734755317 + } + ], + "outputs": [ + { + "address": "addr1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5eg0yu80w", + "amount": { + "coin": "0" + } + }, + { + "address": "37btjrVyb4KDXBNC4haBVPCrro8AQPHwvCMp3RFhhSVWwfFmZ6wwzSK6JK1hY6wHNmtrpTf1kdbva8TCneM2YsiXT7mrzT21EacHnPpz5YyUdj64na", + "amount": { + "coin": "0" + } + } + ], + "fee": "54969" + }, + { + "inputs": [ + { + "transaction_id": "7420a723bf4ee4417ec1aa2262ff60921270681e7a9d537132cbcc82917e8006", + "index": 3792213977 + } + ], + "outputs": [ + { + "address": "stake1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5egfu2p0u", + "amount": { + "coin": "0" + } + }, + { + "address": "addr1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5eg0yu80w", + "amount": { + "coin": "208074" + } + } + ], + "fee": "0" + } + ], + "transaction_witness_sets": [] +} +``` +
+ +### Hash + +Get the block with the supplied block hash + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_block_hash) + +#### Request + + +
+Show Example: + +``` +"e9096ec2733dfb25be098b8ab96ff8f598f9dc9b57b7ecf43b6f215073306755" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "auxiliary_data_set": {}, + "header": { + "body_signature": "618b6723c85ac208a076aaed1403cb2e1defe348df9c0a29b2320096dcb99c8e7b1caaeacb48b6c649f7c3b5ff472368a3cc358144977e04630659c92a1f013a83b2290f7ed85e414220eea362cd8c6b257cf91db67e4c6925f1a3dfda5b436a06c5ea8fc7f31d1d350c15b058cd8ece85ca5ce04d093b0072908905f4549fdaaeebb5b70fbb933ef4c58c8dcc1fbfe410b8e0dc590a146f040a392962f99c5c0022f7b3185ac21cd663abe019c7e356340348853e65c96064f014c2a02243431abf30516068a4ac8fde6d13c5e7f24d39f2bf2ad384590cd655f2487448db4b000039aa046b90d61e0bb05c1a92a8982d87774b92d21dde8d4df2349e853561fef6e8d82e5894836bc6912d13df16823ffc36aa2bab392e7dabc37931f879c750cb1fae261821c26f3350dd687efce8411aeedbdd9e94777c27ffe9579778cf444f82597995c7a96cd7913166d1e1786eb976958328969af10c814e0a0eb5fbddef29482057dfa9366599acdc4977f3938e62cfed90cadf5ca0813f84c2580a6a2be36944e415d81582dc15c4858c319fcadeb1705abf753f781242cebdb83ae69e313cfd66a241bd5f0d447c77672ca878a1fbbc2f66e1e1c0edf9c7283582", + "header_body": { + "block_number": 3044719066, + "slot": "63441", + "issuer_vkey": "47d9426dba32ee6800bd6042ecb31162c26a5f9d4548d6b898be3696663cb1e9", + "vrf_vkey": "2659846f2ec75dab36fb08b59e4b15a61cc7fbad655f4d8cd6dc5871335321e3", + "vrf_result": { + "output": "8f7b6d7a61b9", + "proof": "605199ad5a52f09e63" + }, + "block_body_size": 3287206835, + "block_body_hash": "fea424dee30c903d27100067c73b54517467886bedfcf6b2752025a74c86b28d", + "operational_cert": { + "hot_vkey": "4ba98524fc74be4c9801a279602cbdd25c1b8c864da36e46110653d46cfc773b", + "kes_period": 2895629300, + "sequence_number": 3801291659, + "sigma": "c0d9a3eccedbc707724c5e2e6052e8f6cb7c35c7f9bb283535d10f45f37ba188737583bec3bf3e8c97c5f016ea89bd2e907a948ec0a2394bf2411fb2494d613f" + }, + "protocol_version": { + "major": 2583355968, + "minor": 1095517331 + } + } + }, + "invalid_transactions": [ + 3906487169 + ], + "transaction_bodies": [ + { + "inputs": [ + { + "transaction_id": "eca40340fa6e65d964915ba4bc8bd811a0493d263ffe95875291114cbb2d0686", + "index": 1586486251 + }, + { + "transaction_id": "7420a723bf4ee4417ec1aa2262ff60921270681e7a9d537132cbcc82917e8006", + "index": 3307196019 + } + ], + "outputs": [ + { + "address": "addr1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5eg0yu80w", + "amount": { + "coin": "6" + } + } + ], + "fee": "356709740" + }, + { + "inputs": [ + { + "transaction_id": "7420a723bf4ee4417ec1aa2262ff60921270681e7a9d537132cbcc82917e8006", + "index": 1277654959 + } + ], + "outputs": [ + { + "address": "stake1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5egfu2p0u", + "amount": { + "coin": "0" + } + }, + { + "address": "37btjrVyb4KDXBNC4haBVPCrro8AQPHwvCMp3RFhhSVWwfFmZ6wwzSK6JK1hY6wHNmtrpTf1kdbva8TCneM2YsiXT7mrzT21EacHnPpz5YyUdj64na", + "amount": { + "coin": "0" + } + } + ], + "fee": "207293551" + } + ], + "transaction_witness_sets": [] +} +``` +
+ +## Transaction + +### Hash + +Get the transaction with the supplied transaction hash + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_transaction_hash) + +#### Request + + +
+Show Example: + +``` +"eca40340fa6e65d964915ba4bc8bd811a0493d263ffe95875291114cbb2d0686" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "body": { + "inputs": [ + { + "transaction_id": "fbc1da46d62a431e69855ad48a6b49b0e2aaafc6fd3dc4a066c6851b7bd31a91", + "index": 2711013252 + }, + { + "transaction_id": "c6726192662abeab149098095eabe004ecbec47f5e564748ab0d394affca47d9", + "index": 1026523974 + } + ], + "outputs": [ + { + "address": "37btjrVyb4KDXBNC4haBVPCrro8AQPHwvCMp3RFhhSVWwfFmZ6wwzSK6JK1hY6wHNmtrpTf1kdbva8TCneM2YsiXT7mrzT21EacHnPpz5YyUdj64na", + "amount": { + "coin": "82519" + } + } + ], + "fee": "0" + }, + "is_valid": true, + "witness_set": {} +} +``` +
+ +### Block Number + +Get all transactions contained in the block with the supplied block number [] + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_transaction_block_number) + +#### Request + + +
+Show Example: + +``` +"0" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "transactions": [ + { + "body": { + "inputs": [ + { + "transaction_id": "eca40340fa6e65d964915ba4bc8bd811a0493d263ffe95875291114cbb2d0686", + "index": 1290535197 + }, + { + "transaction_id": "7420a723bf4ee4417ec1aa2262ff60921270681e7a9d537132cbcc82917e8006", + "index": 1270916115 + } + ], + "outputs": [ + { + "address": "37btjrVyb4KDXBNC4haBVPCrro8AQPHwvCMp3RFhhSVWwfFmZ6wwzSK6JK1hY6wHNmtrpTf1kdbva8TCneM2YsiXT7mrzT21EacHnPpz5YyUdj64na", + "amount": { + "coin": "6" + } + }, + { + "address": "stake1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5egfu2p0u", + "amount": { + "coin": "0" + } + } + ], + "fee": "8721093" + }, + "is_valid": false, + "witness_set": {} + }, + { + "body": { + "inputs": [ + { + "transaction_id": "c6726192662abeab149098095eabe004ecbec47f5e564748ab0d394affca47d9", + "index": 2137591745 + }, + { + "transaction_id": "7420a723bf4ee4417ec1aa2262ff60921270681e7a9d537132cbcc82917e8006", + "index": 3073661304 + } + ], + "outputs": [ + { + "address": "addr1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5eg0yu80w", + "amount": { + "coin": "0" + } + }, + { + "address": "addr1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5eg0yu80w", + "amount": { + "coin": "76294560" + } + } + ], + "fee": "0" + }, + "is_valid": true, + "witness_set": {} + } + ] +} +``` +
+ +### Block Hash + +Get all transactions contained in the block with the supplied block hash + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_transaction_block_hash) + +#### Request + + +
+Show Example: + +``` +"3f18df12b07c2f4c2393c43d24189d9d40e005cf66060e1473948d061c6b03ee" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "transactions": [ + { + "body": { + "inputs": [ + { + "transaction_id": "7420a723bf4ee4417ec1aa2262ff60921270681e7a9d537132cbcc82917e8006", + "index": 2411299684 + } + ], + "outputs": [ + { + "address": "37btjrVyb4KDXBNC4haBVPCrro8AQPHwvCMp3RFhhSVWwfFmZ6wwzSK6JK1hY6wHNmtrpTf1kdbva8TCneM2YsiXT7mrzT21EacHnPpz5YyUdj64na", + "amount": { + "coin": "0" + } + }, + { + "address": "stake1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5egfu2p0u", + "amount": { + "coin": "0" + } + } + ], + "fee": "0" + }, + "is_valid": true, + "witness_set": {} + } + ] +} +``` +
+ +## Datum + +### Hash + +Get the datum that hashes to the supplied data hash + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_datum_hash) + +#### Request + + +
+Show Example: + +``` +"58c9a67f503ff9d29c332ccda2d4eaf77a9288d43b01d967a0b61726c81cfe80" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "tag": "list", + "contents": [ + { + "tag": "map", + "contents": [] + }, + { + "tag": "list", + "contents": [ + { + "tag": "list", + "contents": [ + { + "tag": "map", + "contents": [] + }, + { + "tag": "list", + "contents": [ + { + "tag": "constr", + "alternative": "0", + "data": [] + } + ] + } + ] + }, + { + "tag": "map", + "contents": [] + } + ] + } + ] +} +``` +
+ +## Plutus Script + +### Hash + +Get the plutus script that hashes to the supplied script hash + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_plutus_script_hash) + +#### Request + + +
+Show Example: + +``` +"7ab2cf4ea16b2d5b8a71fd6c220e11fdb5f3484f043ca7d65fb385b3" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "language": "plutus_v3", + "bytes": "10" +} +``` +
+ +## Native Script + +### Hash + +Get the native script that hashes to the supplied script hash + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_native_script_hash) + +#### Request + + +
+Show Example: + +``` +"f02a5b9b9c750f691ed46f591b8170c3fd26f9d184ec8dd35bdba3c7" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "tag": "pubkey", + "pubkey": "ca42e84ecfc9efd10bc10d42e22b22d2289c161cbdde6376415b5871" +} +``` +
+ +## Metadata + +### Transaction Hash + +Get the metadata present on the transaction with the supplied transaction hash + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_metadata_transaction_hash) + +#### Request + + +
+Show Example: + +``` +"7420a723bf4ee4417ec1aa2262ff60921270681e7a9d537132cbcc82917e8006" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "tag": "map", + "contents": [ + { + "key": { + "tag": "list", + "contents": [ + { + "tag": "string", + "value": "1{10-64}" + }, + { + "tag": "int", + "value": "985574311" + } + ] + }, + "value": { + "tag": "list", + "contents": [ + { + "tag": "map", + "contents": [ + { + "key": { + "tag": "bytes", + "value": "21af83472287ded28aae95a6eb10" + }, + "value": { + "tag": "string", + "value": "I{10-64}" + } + } + ] + } + ] + } + } + ] +} +``` +
+ +## Protocol Parameters + +### Latest + +Get the latest protocol parameters + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_protocol_parameters_latest) + +#### Response + + +
+Show Example: + +``` +{ + "ada_per_utxo_byte": "8214865595", + "collateral_percentage": 3252825201, + "cost_models": {}, + "d": { + "numerator": "0", + "denominator": "3991" + }, + "execution_costs": { + "mem_price": { + "numerator": "0", + "denominator": "0" + }, + "step_price": { + "numerator": "0", + "denominator": "33538740" + } + }, + "expansion_rate": { + "numerator": "0", + "denominator": "0" + }, + "key_deposit": "805976", + "max_block_body_size": 4067656587, + "max_block_ex_units": { + "mem": "0", + "steps": "70847615" + }, + "max_block_header_size": 1371478347, + "max_collateral_inputs": 5466590, + "max_epoch": 1884857497, + "max_tx_ex_units": { + "mem": "742373", + "steps": "6022896" + }, + "max_tx_size": 2695796622, + "max_value_size": 4174634245, + "min_pool_cost": "18062", + "minfee_a": "0", + "minfee_b": "5357594652", + "n_opt": "378123732", + "pool_deposit": "46", + "pool_pledge_influence": { + "numerator": "0", + "denominator": "0" + }, + "protocol_version": { + "major": 3754287127, + "minor": 1343856109 + }, + "treasury_growth_rate": { + "numerator": "221491", + "denominator": "0" + }, + "pool_voting_thresholds": [ + { + "numerator": "67527890493", + "denominator": "0" + }, + { + "numerator": "0", + "denominator": "71472732409" + } + ], + "drep_voting_thresholds": [ + { + "numerator": "63", + "denominator": "0" + }, + { + "numerator": "0", + "denominator": "0" + } + ], + "committee_min_size": "0", + "committee_max_term_length": 1479674763, + "gov_action_lifetime": 74433822, + "gov_action_deposit": "24159164462", + "drep_deposit": "4", + "drep_activity": 3383589293, + "min_fee_ref_script_cost_per_byte": { + "numerator": "0", + "denominator": "2" + } +} +``` +
+ +### Epoch + +Get the protocol parameters at the supplied epoch number + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_protocol_parameters_epoch) + +#### Request + + +
+Show Example: + +``` +3733274909 +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "ada_per_utxo_byte": "0", + "collateral_percentage": 1617421275, + "cost_models": {}, + "d": { + "numerator": "0", + "denominator": "0" + }, + "execution_costs": { + "mem_price": { + "numerator": "0", + "denominator": "33570" + }, + "step_price": { + "numerator": "56901", + "denominator": "7" + } + }, + "expansion_rate": { + "numerator": "0", + "denominator": "8811326272" + }, + "key_deposit": "81689650", + "max_block_body_size": 3533825275, + "max_block_ex_units": { + "mem": "9789470", + "steps": "0" + }, + "max_block_header_size": 3659142665, + "max_collateral_inputs": 4240535489, + "max_epoch": 1042276500, + "max_tx_ex_units": { + "mem": "0", + "steps": "959332" + }, + "max_tx_size": 2519810430, + "max_value_size": 295500448, + "min_pool_cost": "0", + "minfee_a": "0", + "minfee_b": "848900193", + "n_opt": "0", + "pool_deposit": "880", + "pool_pledge_influence": { + "numerator": "0", + "denominator": "67" + }, + "protocol_version": { + "major": 2763174108, + "minor": 968052096 + }, + "treasury_growth_rate": { + "numerator": "4607565", + "denominator": "0" + }, + "pool_voting_thresholds": [ + { + "numerator": "5210139", + "denominator": "7" + }, + { + "numerator": "618128115", + "denominator": "6733225" + } + ], + "drep_voting_thresholds": [ + { + "numerator": "0", + "denominator": "0" + }, + { + "numerator": "0", + "denominator": "7348778" + } + ], + "committee_min_size": "0", + "committee_max_term_length": 3523439575, + "gov_action_lifetime": 3541801449, + "gov_action_deposit": "0", + "drep_deposit": "24", + "drep_activity": 1127315307, + "min_fee_ref_script_cost_per_byte": { + "numerator": "871793417", + "denominator": "351068" + } +} +``` +
+ +## Votes + +### Cc Id + +Votes cast by the supplied cc credential + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_votes_cc_id) + +#### Request + + +
+Show Example: + +``` +"cc_hot1qgqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvcdjk7" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "votes": [ + { + "proposal_id": "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf", + "vote_tx_hash": "c6726192662abeab149098095eabe004ecbec47f5e564748ab0d394affca47d9", + "vote": "abstain" + } + ] +} +``` +
+ +### Spo Id + +Votes cast by the supplied stake pool operator + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_votes_spo_id) + +#### Request + + +
+Show Example: + +``` +"pool12a39rkzfylvn9wfe8j6y8ucq6g2l4mw4azj70y0gd8ejczznyj2" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "votes": [ + { + "proposal_id": "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf", + "vote_tx_hash": "7420a723bf4ee4417ec1aa2262ff60921270681e7a9d537132cbcc82917e8006", + "vote": "abstain" + }, + { + "proposal_id": "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf", + "vote_tx_hash": "7420a723bf4ee4417ec1aa2262ff60921270681e7a9d537132cbcc82917e8006", + "vote": "yes" + } + ] +} +``` +
+ +### Drep Id + +Votes cast by the supplied DRep + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_votes_drep_id) + +#### Request + + +
+Show Example: + +``` +"drep1ygqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq7vlc9n" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "votes": [ + { + "proposal_id": "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf", + "vote_tx_hash": "c6726192662abeab149098095eabe004ecbec47f5e564748ab0d394affca47d9", + "vote": "no" + }, + { + "proposal_id": "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf", + "vote_tx_hash": "fbc1da46d62a431e69855ad48a6b49b0e2aaafc6fd3dc4a066c6851b7bd31a91", + "vote": "abstain" + } + ] +} +``` +
+ +### Proposal Id + +Votes cast on the supplied proposal + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_votes_proposal_id) + +#### Request + + +
+Show Example: + +``` +"gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "votes": [ + { + "proposal_id": "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf", + "vote_tx_hash": "fbc1da46d62a431e69855ad48a6b49b0e2aaafc6fd3dc4a066c6851b7bd31a91", + "vote": "abstain" + } + ] +} +``` +
+ +## Drep + +### All + +Get all the known DReps + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_drep_all) + +#### Response + + +
+Show Example: + +``` +{ + "dreps": [ + { + "drep_id": "drep1ygqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq7vlc9n", + "amount": "73330", + "active": true + } + ] +} +``` +
+ +### Id + +Get a specific DRep by id + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_drep_id) + +#### Request + + +
+Show Example: + +``` +"drep1ygqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq7vlc9n" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "drep_id": "drep1ygqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq7vlc9n", + "amount": "7149", + "active": true +} +``` +
+ +### Stake Credential + +Get the DRep that the stake credential has delegated to + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_drep_stake_credential) + +#### Request + + +
+Show Example: + +``` +"stake1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5egfu2p0u" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "drep_id": "drep1ygqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq7vlc9n", + "amount": "3566817384", + "active": false +} +``` +
+ +## Committee + +### All + +Get all known committee members + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_committee_all) + +#### Response + + +
+Show Example: + +``` +{ + "cc_members": [ + { + "cc_cold_key": "cc_cold1zvqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6kflvs", + "cc_hot_key": "cc_hot1qgqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvcdjk7", + "status": "not_authorised" + }, + { + "cc_cold_key": "cc_cold1zvqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6kflvs", + "cc_hot_key": "cc_hot1qgqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvcdjk7", + "status": "resigned" + } + ] +} +``` +
+ +### Id + +Get a specific Committee member by id + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_committee_id) + +#### Request + + +
+Show Example: + +``` +"cc_hot1qgqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvcdjk7" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "cc_cold_key": "cc_cold1zvqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6kflvs", + "cc_hot_key": "cc_hot1qgqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvcdjk7", + "status": "authorised" +} +``` +
+ +## Pool + +### All + +Get all known stake pools + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_pool_all) + +#### Response + + +
+Show Example: + +``` +{ + "pools": [ + { + "pool_id": "pool12a39rkzfylvn9wfe8j6y8ucq6g2l4mw4azj70y0gd8ejczznyj2", + "status": "active", + "active_stake": "65155183259", + "live_stake": "81525215" + } + ] +} +``` +
+ +### Id + +Get a specific stake pool by id + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_pool_id) + +#### Request + + +
+Show Example: + +``` +"pool12a39rkzfylvn9wfe8j6y8ucq6g2l4mw4azj70y0gd8ejczznyj2" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "pool_id": "pool12a39rkzfylvn9wfe8j6y8ucq6g2l4mw4azj70y0gd8ejczznyj2", + "status": "active", + "active_stake": "0", + "live_stake": "1" +} +``` +
+ +## Proposal + +### All + +Get all known proposals + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_proposal_all) + +#### Response + + +
+Show Example: + +``` +{ + "proposals": [ + { + "proposal_id": "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf" + } + ] +} +``` +
+ +### Id + +Get a specific proposal by id + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_proposal_id) + +#### Request + + +
+Show Example: + +``` +"gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf" +``` +
+ +#### Response + + +
+Show Example: + +``` +{ + "proposal_id": "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf" +} +``` +
+ +## Era + +### Summary + +Get the start and end of each era along with parameters that can vary between hard forks + +[Link to OpenApi endpoint](https://mlabs-haskell.github.io/query-layer-impl/index.html#/default/get_era_summary) + +#### Response + + +
+Show Example: + +``` +{ + "summary": [ + { + "start": { + "time": "3921276999", + "slot": "0", + "epoch": 2336213278 + }, + "end": { + "time": "41781628", + "slot": "0", + "epoch": 2978580216 + }, + "parameters": { + "epoch_length": 720472590, + "slot_length": 1582308913, + "safe_zone": 2230198492 + } + }, + { + "start": { + "time": "0", + "slot": "745258045", + "epoch": 4094381277 + }, + "end": { + "time": "810001507", + "slot": "1831", + "epoch": 2068430763 + }, + "parameters": { + "epoch_length": 116725424, + "slot_length": 3750916013, + "safe_zone": 1825569387 + } + } + ] +} +``` +
diff --git a/CIP-0139/json-rpc.json b/CIP-0139/json-rpc.json new file mode 100644 index 0000000000..4274a1b4b8 --- /dev/null +++ b/CIP-0139/json-rpc.json @@ -0,0 +1,503 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "cardano-query-layer.json", + "title": "Cardano Query Layer types", + "definitions": { + "utxos/asset:request": { + "title": "utxos by asset", + "type": "object", + "properties": { + "asset_name": { + "$ref": "cardano-conway.json#/definitions/AssetName" + }, + "minting_policy_hash": { + "$ref": "cardano-conway.json#/definitions/ScriptHash" + } + } + }, + "utxos/asset:response": { + "title": "utxos by asset", + "type": "object", + "properties": { + "utxos": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/TransactionUnspentOutput" + }, + { + "$ref": "cardano-babbage.json#/definitions/TransactionUnspentOutput" + } + ] + } + } + } + }, + "utxos/transaction_hash:request": { + "title": "utxos by transaction_hash", + "type": "object", + "$ref": "cardano-conway.json#/definitions/TransactionHash" + }, + "utxos/transaction_hash:response": { + "title": "utxos by transaction_hash", + "type": "object", + "properties": { + "utxos": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/TransactionUnspentOutput" + }, + { + "$ref": "cardano-babbage.json#/definitions/TransactionUnspentOutput" + } + ] + } + } + } + }, + "utxos/address:request": { + "title": "utxos by address", + "type": "object", + "$ref": "cardano-babbage.json#/definitions/Address" + }, + "utxos/address:response": { + "title": "utxos by address", + "type": "object", + "properties": { + "utxos": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/TransactionUnspentOutput" + }, + { + "$ref": "cardano-babbage.json#/definitions/TransactionUnspentOutput" + } + ] + } + } + } + }, + "utxos/payment_credential:request": { + "title": "utxos by payment_credential", + "type": "object", + "$ref": "cardano-conway.json#/definitions/Credential" + }, + "utxos/payment_credential:response": { + "title": "utxos by payment_credential", + "type": "object", + "properties": { + "utxos": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/TransactionUnspentOutput" + }, + { + "$ref": "cardano-babbage.json#/definitions/TransactionUnspentOutput" + } + ] + } + } + } + }, + "utxos/stake_credential:request": { + "title": "utxos by stake_credential", + "type": "object", + "$ref": "cardano-conway.json#/definitions/RewardAddress" + }, + "utxos/stake_credential:response": { + "title": "utxos by stake_credential", + "type": "object", + "properties": { + "utxos": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/TransactionUnspentOutput" + }, + { + "$ref": "cardano-babbage.json#/definitions/TransactionUnspentOutput" + } + ] + } + } + } + }, + "block/number:request": { + "title": "block by number", + "type": "object", + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "block/number:response": { + "title": "block by number", + "type": "object", + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/Block" + }, + { + "$ref": "cardano-babbage.json#/definitions/Block" + } + ] + }, + "block/hash:request": { + "title": "block by hash", + "type": "object", + "$ref": "cardano-conway.json#/definitions/BlockHash" + }, + "block/hash:response": { + "title": "block by hash", + "type": "object", + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/Block" + }, + { + "$ref": "cardano-babbage.json#/definitions/Block" + } + ] + }, + "transaction/hash:request": { + "title": "transaction by hash", + "type": "object", + "$ref": "cardano-conway.json#/definitions/TransactionHash" + }, + "transaction/hash:response": { + "title": "transaction by hash", + "type": "object", + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/Transaction" + }, + { + "$ref": "cardano-babbage.json#/definitions/Transaction" + } + ] + }, + "transaction/block_number:request": { + "title": "transaction by block_number", + "type": "object", + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "transaction/block_number:response": { + "title": "transaction by block_number", + "type": "object", + "properties": { + "transactions": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/Transaction" + }, + { + "$ref": "cardano-babbage.json#/definitions/Transaction" + } + ] + } + } + } + }, + "transaction/block_hash:request": { + "title": "transaction by block_hash", + "type": "object", + "$ref": "cardano-conway.json#/definitions/BlockHash" + }, + "transaction/block_hash:response": { + "title": "transaction by block_hash", + "type": "object", + "properties": { + "transactions": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/Transaction" + }, + { + "$ref": "cardano-babbage.json#/definitions/Transaction" + } + ] + } + } + } + }, + "datum/hash:request": { + "title": "datum by hash", + "type": "object", + "$ref": "cardano-conway.json#/definitions/DataHash" + }, + "datum/hash:response": { + "title": "datum by hash", + "type": "object", + "$ref": "cardano-conway.json#/definitions/PlutusData" + }, + "plutus_script/hash:request": { + "title": "plutus_script by hash", + "type": "object", + "$ref": "cardano-conway.json#/definitions/ScriptHash" + }, + "plutus_script/hash:response": { + "title": "plutus_script by hash", + "type": "object", + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/PlutusScript" + }, + { + "$ref": "cardano-babbage.json#/definitions/PlutusScript" + } + ] + }, + "native_script/hash:request": { + "title": "native_script by hash", + "type": "object", + "$ref": "cardano-conway.json#/definitions/ScriptHash" + }, + "native_script/hash:response": { + "title": "native_script by hash", + "type": "object", + "$ref": "cardano-conway.json#/definitions/NativeScript" + }, + "metadata/transaction_hash:request": { + "title": "metadata by transaction_hash", + "type": "object", + "$ref": "cardano-conway.json#/definitions/TransactionHash" + }, + "metadata/transaction_hash:response": { + "title": "metadata by transaction_hash", + "type": "object", + "$ref": "cardano-conway.json#/definitions/TransactionMetadatum" + }, + "protocol_parameters/latest:request": { + "title": "protocol_parameters (latest)", + "type": "object", + "properties": {} + }, + "protocol_parameters/latest:response": { + "title": "protocol_parameters (latest)", + "type": "object", + "$ref": "query-layer.json#/definitions/ProtocolParams" + }, + "protocol_parameters/epoch:request": { + "title": "protocol_parameters by epoch", + "type": "object", + "$ref": "cardano-conway.json#/definitions/UInt32" + }, + "protocol_parameters/epoch:response": { + "title": "protocol_parameters by epoch", + "type": "object", + "$ref": "query-layer.json#/definitions/ProtocolParams" + }, + "votes/cc_id:request": { + "title": "votes by cc_id", + "type": "object", + "$ref": "query-layer.json#/definitions/CCHotId" + }, + "votes/cc_id:response": { + "title": "votes by cc_id", + "type": "object", + "properties": { + "votes": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/VoteInfo" + } + } + } + }, + "votes/spo_id:request": { + "title": "votes by spo_id", + "type": "object", + "$ref": "cardano-conway.json#/definitions/PoolPubKeyHash" + }, + "votes/spo_id:response": { + "title": "votes by spo_id", + "type": "object", + "properties": { + "votes": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/VoteInfo" + } + } + } + }, + "votes/drep_id:request": { + "title": "votes by drep_id", + "type": "object", + "$ref": "query-layer.json#/definitions/DRepId" + }, + "votes/drep_id:response": { + "title": "votes by drep_id", + "type": "object", + "properties": { + "votes": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/VoteInfo" + } + } + } + }, + "votes/proposal_id:request": { + "title": "votes by proposal_id", + "type": "object", + "$ref": "query-layer.json#/definitions/ProposalId" + }, + "votes/proposal_id:response": { + "title": "votes by proposal_id", + "type": "object", + "properties": { + "votes": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/VoteInfo" + } + } + } + }, + "drep/all:request": { + "title": "drep (all)", + "type": "object", + "properties": {} + }, + "drep/all:response": { + "title": "drep (all)", + "type": "object", + "properties": { + "dreps": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/DRepInfo" + } + } + } + }, + "drep/id:request": { + "title": "drep by id", + "type": "object", + "$ref": "query-layer.json#/definitions/DRepId" + }, + "drep/id:response": { + "title": "drep by id", + "type": "object", + "$ref": "query-layer.json#/definitions/DRepInfo" + }, + "drep/stake_credential:request": { + "title": "drep by stake_credential", + "type": "object", + "$ref": "cardano-conway.json#/definitions/RewardAddress" + }, + "drep/stake_credential:response": { + "title": "drep by stake_credential", + "type": "object", + "$ref": "query-layer.json#/definitions/DRepInfo" + }, + "committee/all:request": { + "title": "committee (all)", + "type": "object", + "properties": {} + }, + "committee/all:response": { + "title": "committee (all)", + "type": "object", + "properties": { + "cc_members": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/CCMember" + } + } + } + }, + "committee/id:request": { + "title": "committee by id", + "type": "object", + "$ref": "query-layer.json#/definitions/CCHotId" + }, + "committee/id:response": { + "title": "committee by id", + "type": "object", + "$ref": "query-layer.json#/definitions/CCMember" + }, + "pool/all:request": { + "title": "pool (all)", + "type": "object", + "properties": {} + }, + "pool/all:response": { + "title": "pool (all)", + "type": "object", + "properties": { + "pools": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/Pool" + } + } + } + }, + "pool/id:request": { + "title": "pool by id", + "type": "object", + "$ref": "cardano-conway.json#/definitions/PoolPubKeyHash" + }, + "pool/id:response": { + "title": "pool by id", + "type": "object", + "$ref": "query-layer.json#/definitions/Pool" + }, + "proposal/all:request": { + "title": "proposal (all)", + "type": "object", + "properties": {} + }, + "proposal/all:response": { + "title": "proposal (all)", + "type": "object", + "properties": { + "proposals": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/Proposal" + } + } + } + }, + "proposal/id:request": { + "title": "proposal by id", + "type": "object", + "$ref": "query-layer.json#/definitions/ProposalId" + }, + "proposal/id:response": { + "title": "proposal by id", + "type": "object", + "$ref": "query-layer.json#/definitions/Proposal" + }, + "era/summary:request": { + "title": "era summary", + "type": "object", + "properties": {} + }, + "era/summary:response": { + "title": "era summary", + "type": "object", + "properties": { + "summary": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/EraSummary" + } + } + } + } + } +} diff --git a/CIP-0139/open-api.json b/CIP-0139/open-api.json new file mode 100644 index 0000000000..0ed0a962c7 --- /dev/null +++ b/CIP-0139/open-api.json @@ -0,0 +1,6523 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Cardano Query Layer Specification", + "version": "1.0.0" + }, + "paths": { + "/utxos/asset": { + "get": { + "summary": "utxos by asset", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "utxos by asset", + "type": "object", + "properties": { + "utxos": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/TransactionUnspentOutput" + }, + { + "$ref": "cardano-babbage.json#/definitions/TransactionUnspentOutput" + } + ] + } + } + } + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "asset_name", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/AssetName" + } + }, + { + "name": "minting_policy_hash", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/ScriptHash" + } + } + ] + } + }, + "/utxos/transaction_hash": { + "get": { + "summary": "utxos by transaction_hash", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "utxos by transaction_hash", + "type": "object", + "properties": { + "utxos": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/TransactionUnspentOutput" + }, + { + "$ref": "cardano-babbage.json#/definitions/TransactionUnspentOutput" + } + ] + } + } + } + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "transaction_hash", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/TransactionHash" + } + } + ] + } + }, + "/utxos/address": { + "get": { + "summary": "utxos by address", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "utxos by address", + "type": "object", + "properties": { + "utxos": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/TransactionUnspentOutput" + }, + { + "$ref": "cardano-babbage.json#/definitions/TransactionUnspentOutput" + } + ] + } + } + } + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "address", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-babbage.json#/definitions/Address" + } + } + ] + } + }, + "/utxos/payment_credential": { + "get": { + "summary": "utxos by payment_credential", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "utxos by payment_credential", + "type": "object", + "properties": { + "utxos": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/TransactionUnspentOutput" + }, + { + "$ref": "cardano-babbage.json#/definitions/TransactionUnspentOutput" + } + ] + } + } + } + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "credential", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/Credential" + } + } + ] + } + }, + "/utxos/stake_credential": { + "get": { + "summary": "utxos by stake_credential", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "utxos by stake_credential", + "type": "object", + "properties": { + "utxos": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/TransactionUnspentOutput" + }, + { + "$ref": "cardano-babbage.json#/definitions/TransactionUnspentOutput" + } + ] + } + } + } + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "reward_address", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/RewardAddress" + } + } + ] + } + }, + "/block/number": { + "get": { + "summary": "block by number", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "block by number", + "type": "object", + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/Block" + }, + { + "$ref": "cardano-babbage.json#/definitions/Block" + } + ] + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "u_int64", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/UInt64" + } + } + ] + } + }, + "/block/hash": { + "get": { + "summary": "block by hash", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "block by hash", + "type": "object", + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/Block" + }, + { + "$ref": "cardano-babbage.json#/definitions/Block" + } + ] + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "block_hash", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/BlockHash" + } + } + ] + } + }, + "/transaction/hash": { + "get": { + "summary": "transaction by hash", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "transaction by hash", + "type": "object", + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/Transaction" + }, + { + "$ref": "cardano-babbage.json#/definitions/Transaction" + } + ] + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "transaction_hash", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/TransactionHash" + } + } + ] + } + }, + "/transaction/block_number": { + "get": { + "summary": "transaction by block_number", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "transaction by block_number", + "type": "object", + "properties": { + "transactions": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/Transaction" + }, + { + "$ref": "cardano-babbage.json#/definitions/Transaction" + } + ] + } + } + } + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "u_int64", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/UInt64" + } + } + ] + } + }, + "/transaction/block_hash": { + "get": { + "summary": "transaction by block_hash", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "transaction by block_hash", + "type": "object", + "properties": { + "transactions": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/Transaction" + }, + { + "$ref": "cardano-babbage.json#/definitions/Transaction" + } + ] + } + } + } + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "block_hash", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/BlockHash" + } + } + ] + } + }, + "/datum/hash": { + "get": { + "summary": "datum by hash", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "datum by hash", + "type": "object", + "$ref": "cardano-conway.json#/definitions/PlutusData" + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "data_hash", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/DataHash" + } + } + ] + } + }, + "/plutus_script/hash": { + "get": { + "summary": "plutus_script by hash", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "plutus_script by hash", + "type": "object", + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/PlutusScript" + }, + { + "$ref": "cardano-babbage.json#/definitions/PlutusScript" + } + ] + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "script_hash", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/ScriptHash" + } + } + ] + } + }, + "/native_script/hash": { + "get": { + "summary": "native_script by hash", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "native_script by hash", + "type": "object", + "$ref": "cardano-conway.json#/definitions/NativeScript" + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "script_hash", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/ScriptHash" + } + } + ] + } + }, + "/metadata/transaction_hash": { + "get": { + "summary": "metadata by transaction_hash", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "metadata by transaction_hash", + "type": "object", + "$ref": "cardano-conway.json#/definitions/TransactionMetadatum" + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "transaction_hash", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/TransactionHash" + } + } + ] + } + }, + "/protocol_parameters/latest": { + "get": { + "summary": "protocol_parameters (latest)", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "protocol_parameters (latest)", + "type": "object", + "$ref": "query-layer.json#/definitions/ProtocolParams" + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [] + } + }, + "/protocol_parameters/epoch": { + "get": { + "summary": "protocol_parameters by epoch", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "protocol_parameters by epoch", + "type": "object", + "$ref": "query-layer.json#/definitions/ProtocolParams" + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "u_int32", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/UInt32" + } + } + ] + } + }, + "/votes/cc_id": { + "get": { + "summary": "votes by cc_id", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "votes by cc_id", + "type": "object", + "properties": { + "votes": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/VoteInfo" + } + } + } + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "cc_hot_id", + "in": "query", + "required": true, + "schema": { + "$ref": "query-layer.json#/definitions/CCHotId" + } + } + ] + } + }, + "/votes/spo_id": { + "get": { + "summary": "votes by spo_id", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "votes by spo_id", + "type": "object", + "properties": { + "votes": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/VoteInfo" + } + } + } + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "pool_pub_key_hash", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/PoolPubKeyHash" + } + } + ] + } + }, + "/votes/drep_id": { + "get": { + "summary": "votes by drep_id", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "votes by drep_id", + "type": "object", + "properties": { + "votes": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/VoteInfo" + } + } + } + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "d_rep_id", + "in": "query", + "required": true, + "schema": { + "$ref": "query-layer.json#/definitions/DRepId" + } + } + ] + } + }, + "/votes/proposal_id": { + "get": { + "summary": "votes by proposal_id", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "votes by proposal_id", + "type": "object", + "properties": { + "votes": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/VoteInfo" + } + } + } + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "proposal_id", + "in": "query", + "required": true, + "schema": { + "$ref": "query-layer.json#/definitions/ProposalId" + } + } + ] + } + }, + "/drep/all": { + "get": { + "summary": "drep (all)", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "drep (all)", + "type": "object", + "properties": { + "dreps": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/DRepInfo" + } + } + } + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [] + } + }, + "/drep/id": { + "get": { + "summary": "drep by id", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "drep by id", + "type": "object", + "$ref": "query-layer.json#/definitions/DRepInfo" + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "d_rep_id", + "in": "query", + "required": true, + "schema": { + "$ref": "query-layer.json#/definitions/DRepId" + } + } + ] + } + }, + "/drep/stake_credential": { + "get": { + "summary": "drep by stake_credential", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "drep by stake_credential", + "type": "object", + "$ref": "query-layer.json#/definitions/DRepInfo" + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "reward_address", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/RewardAddress" + } + } + ] + } + }, + "/committee/all": { + "get": { + "summary": "committee (all)", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "committee (all)", + "type": "object", + "properties": { + "cc_members": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/CCMember" + } + } + } + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [] + } + }, + "/committee/id": { + "get": { + "summary": "committee by id", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "committee by id", + "type": "object", + "$ref": "query-layer.json#/definitions/CCMember" + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "cc_hot_id", + "in": "query", + "required": true, + "schema": { + "$ref": "query-layer.json#/definitions/CCHotId" + } + } + ] + } + }, + "/pool/all": { + "get": { + "summary": "pool (all)", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "pool (all)", + "type": "object", + "properties": { + "pools": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/Pool" + } + } + } + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [] + } + }, + "/pool/id": { + "get": { + "summary": "pool by id", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "pool by id", + "type": "object", + "$ref": "query-layer.json#/definitions/Pool" + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "pool_pub_key_hash", + "in": "query", + "required": true, + "schema": { + "$ref": "cardano-conway.json#/definitions/PoolPubKeyHash" + } + } + ] + } + }, + "/proposal/all": { + "get": { + "summary": "proposal (all)", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "proposal (all)", + "type": "object", + "properties": { + "proposals": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/Proposal" + } + } + } + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [] + } + }, + "/proposal/id": { + "get": { + "summary": "proposal by id", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "proposal by id", + "type": "object", + "$ref": "query-layer.json#/definitions/Proposal" + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [ + { + "name": "proposal_id", + "in": "query", + "required": true, + "schema": { + "$ref": "query-layer.json#/definitions/ProposalId" + } + } + ] + } + }, + "/era/summary": { + "get": { + "summary": "era summary", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "title": "era summary", + "type": "object", + "properties": { + "summary": { + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/EraSummary" + } + } + } + } + } + } + }, + "404": { + "description": "Item not found" + } + }, + "parameters": [] + } + } + }, + "components": { + "schemas": { + "cardano-conway.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "cardano-conway.json", + "title": "Cardano Conway Era Domain Types", + "definitions": { + "BigInt": { + "title": "BigInt", + "type": "string", + "description": "A long integer domain type", + "pattern": "^(0|-?[1-9][0-9]*)$", + "examples": [ + "0", + "-123", + "123" + ] + }, + "ByteString": { + "title": "ByteString", + "description": "Arbitrary-length byte array", + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f])*$" + }, + "UInt64": { + "title": "UInt64", + "description": "64-bit unsigned integer", + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "format": "uint64" + }, + "UInt16": { + "title": "UInt16", + "description": "16-bit unsigned integer", + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "format": "uint16" + }, + "PosInt64": { + "title": "PosInt64", + "description": "64-bit unsigned integer, zero-excluded. 1-18446744073709551615", + "type": "string", + "pattern": "^([1-9][0-9]*)$", + "format": "posint64" + }, + "Int128": { + "title": "Int128", + "description": "128-bit signed integer", + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "format": "int128" + }, + "NonZeroInt64": { + "title": "NonZeroInt64", + "description": "64-bit signed integer, zero excluded. Ranges: -9223372036854775808..-1 and 1..9223372036854775807", + "type": "string", + "pattern": "^-?([1-9][0-9]*)$" + }, + "UInt32": { + "title": "UInt32", + "description": "32-bit unsigned integer", + "type": "integer", + "minimum": 0, + "maximum": 4294967295 + }, + "RewardAddress": { + "title": "RewardAddress", + "type": "string", + "format": "bech32", + "pattern": "^(stake1|stake_test1)[02-9ac-hj-np-z]*$", + "examples": [ + "stake1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5egfu2p0u" + ] + }, + "ByronAddress": { + "title": "ByronAddress", + "type": "string", + "format": "base58", + "pattern": "^[1-9A-HJ-NP-Za-km-z]+$", + "examples": [ + "37btjrVyb4KDXBNC4haBVPCrro8AQPHwvCMp3RFhhSVWwfFmZ6wwzSK6JK1hY6wHNmtrpTf1kdbva8TCneM2YsiXT7mrzT21EacHnPpz5YyUdj64na" + ] + }, + "EnterpriseAddress": { + "title": "EnterpriseAddress", + "type": "string", + "format": "bech32", + "pattern": "^(addr1|addr_test1)[02-9ac-hj-np-z]*$", + "examples": [ + "addr1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5eg0yu80w" + ] + }, + "BaseAddress": { + "title": "BaseAddress", + "type": "string", + "format": "bech32", + "pattern": "^(addr1|addr_test1)[02-9ac-hj-np-z]*$", + "examples": [ + "addr1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5eg0yu80w" + ] + }, + "Address": { + "title": "Address", + "anyOf": [ + { + "$ref": "cardano-conway.json#/definitions/RewardAddress" + }, + { + "$ref": "cardano-conway.json#/definitions/BaseAddress" + }, + { + "$ref": "cardano-conway.json#/definitions/EnterpriseAddress" + }, + { + "$ref": "cardano-conway.json#/definitions/ByronAddress" + } + ] + }, + "Ed25519KeyHash": { + "title": "Ed25519KeyHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{56}$" + }, + "ScriptHash": { + "title": "ScriptHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{56}$" + }, + "AssetName": { + "title": "AssetName", + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f]){0,32}$", + "examples": [ + "504154415445", + "1e349c9bdea19fd6c147626a5260bc44b71635f398b67c59881df209", + "7eae28af2208be856f7a119668ae52a49b73725e326dc16579dcc373" + ] + }, + "ScriptDataHash": { + "title": "ScriptDataHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{64}$" + }, + "TransactionMetadata": { + "title": "TransactionMetadata", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "value": { + "$ref": "cardano-conway.json#/definitions/TransactionMetadatum" + } + }, + "required": [ + "key", + "value" + ], + "unevaluatedProperties": false + } + }, + "AuxiliaryDataHash": { + "title": "AuxiliaryDataHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{64}$" + }, + "AuxiliaryData": { + "unevaluatedProperties": false, + "properties": { + "metadata": { + "$ref": "cardano-conway.json#/definitions/TransactionMetadata" + }, + "native_scripts": { + "items": { + "$ref": "cardano-conway.json#/definitions/NativeScript" + }, + "type": "array" + }, + "plutus_scripts": { + "items": { + "$ref": "cardano-conway.json#/definitions/PlutusScript" + }, + "type": "array" + } + }, + "required": [], + "title": "AuxiliaryData", + "type": "object" + }, + "Vote": { + "title": "Vote", + "type": "string", + "enum": [ + "yes", + "no", + "abstain" + ] + }, + "Voter": { + "type": "object", + "title": "Voter", + "oneOf": [ + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "cc_credential" + ] + }, + "credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + } + }, + "required": [ + "tag", + "credential" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "drep_credential" + ] + }, + "credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + } + }, + "required": [ + "tag", + "credential" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "spo_keyhash" + ] + }, + "pubkey_hash": { + "$ref": "cardano-conway.json#/definitions/Ed25519KeyHash" + } + }, + "required": [ + "tag", + "credential" + ], + "unevaluatedProperties": false + } + ] + }, + "VotingProcedure": { + "title": "VotingProcedure", + "type": "object", + "properties": { + "vote": { + "$ref": "cardano-conway.json#/definitions/Vote" + }, + "anchor": { + "$ref": "cardano-conway.json#/definitions/Anchor" + } + }, + "required": [ + "vote" + ], + "unevaluatedProperties": false + }, + "VotingProcedures": { + "title": "VotingProcedures", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "$ref": "cardano-conway.json#/definitions/Voter" + }, + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "$ref": "cardano-conway.json#/definitions/GovActionId" + }, + "value": { + "$ref": "cardano-conway.json#/definitions/VotingProcedure" + } + }, + "required": [ + "key", + "value" + ], + "unevaluatedProperties": false + } + } + }, + "required": [ + "key", + "value" + ], + "unevaluatedProperties": false + } + }, + "ProposalProcedure": { + "title": "ProposalProcedure", + "type": "object", + "properties": { + "deposit": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "reward_account": { + "$ref": "cardano-conway.json#/definitions/RewardAddress" + }, + "gov_action": { + "$ref": "cardano-conway.json#/definitions/GovAction" + }, + "anchor": { + "$ref": "cardano-conway.json#/definitions/Anchor" + } + }, + "required": [ + "deposit", + "reward_account", + "gov_action", + "anchor" + ], + "unevaluatedProperties": false + }, + "ProposalProcedures": { + "title": "ProposalProcedures", + "type": "array", + "minLength": 1, + "items": { + "$ref": "cardano-conway.json#/definitions/ProposalProcedure" + } + }, + "TransactionBody": { + "title": "TransactionBody", + "type": "object", + "properties": { + "auxiliary_data_hash": { + "$ref": "cardano-conway.json#/definitions/AuxiliaryDataHash" + }, + "inputs": { + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/TransactionInput" + } + }, + "outputs": { + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/TransactionOutput" + } + }, + "fee": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "certs": { + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/Certificate" + } + }, + "collateral": { + "title": "Collateral Inputs", + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/TransactionInput" + } + }, + "collateral_return": { + "allOf": [ + { + "$ref": "cardano-conway.json#/definitions/TransactionOutput" + }, + { + "title": "Collateral Return", + "description": "Collateral return, introduced in CIP-40" + } + ] + }, + "mint": { + "$ref": "cardano-conway.json#/definitions/Mint" + }, + "network_id": { + "$ref": "cardano-conway.json#/definitions/NetworkId" + }, + "reference_inputs": { + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/TransactionInput" + } + }, + "required_signers": { + "title": "Required signers", + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/Ed25519KeyHash" + } + }, + "script_data_hash": { + "$ref": "cardano-conway.json#/definitions/ScriptDataHash" + }, + "total_collateral": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "ttl": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "update": { + "$ref": "cardano-conway.json#/definitions/Update" + }, + "validity_start_interval": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "withdrawals": { + "type": "array", + "minLength": 1, + "items": { + "type": "object", + "properties": { + "key": { + "$ref": "cardano-conway.json#/definitions/RewardAddress" + }, + "value": { + "$ref": "cardano-conway.json#/definitions/UInt64" + } + }, + "unevaluatedProperties": false + } + }, + "voting_procedures": { + "$ref": "cardano-conway.json#/definitions/VotingProcedures" + }, + "proposal_procedures": { + "$ref": "cardano-conway.json#/definitions/ProposalProcedures" + }, + "donation": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "current_treasury_value": { + "$ref": "cardano-conway.json#/definitions/UInt64" + } + }, + "required": [ + "inputs", + "outputs", + "fee" + ], + "unevaluatedProperties": false + }, + "Credential": { + "title": "Credential", + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "pubkey_hash" + ] + }, + "value": { + "$ref": "cardano-conway.json#/definitions/Ed25519KeyHash" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "script_hash" + ] + }, + "value": { + "$ref": "cardano-conway.json#/definitions/ScriptHash" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + } + ] + }, + "MultiAsset": { + "title": "MultiAsset", + "description": "A mapping from policy IDs (script hashes) to mappings from asset names to amounts", + "type": "object", + "patternProperties": { + "^[0-9a-f]{56}$": { + "type": "object", + "patternProperties": { + "^([0-9a-f][0-9a-f]){0,32}$": { + "$ref": "cardano-conway.json#/definitions/PosInt64" + } + }, + "unevaluatedProperties": false + } + }, + "unevaluatedProperties": false + }, + "Value": { + "title": "Value", + "type": "object", + "properties": { + "coin": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "assets": { + "$ref": "cardano-conway.json#/definitions/MultiAsset" + } + }, + "required": [ + "coin" + ], + "unevaluatedProperties": false + }, + "TransactionHash": { + "title": "TransactionHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{64}$", + "maxLength": 64, + "minLength": 64, + "examples": [ + "eca40340fa6e65d964915ba4bc8bd811a0493d263ffe95875291114cbb2d0686", + "7420a723bf4ee4417ec1aa2262ff60921270681e7a9d537132cbcc82917e8006", + "fbc1da46d62a431e69855ad48a6b49b0e2aaafc6fd3dc4a066c6851b7bd31a91", + "c6726192662abeab149098095eabe004ecbec47f5e564748ab0d394affca47d9" + ] + }, + "TransactionInput": { + "title": "TransactionInput", + "type": "object", + "properties": { + "transaction_id": { + "$ref": "cardano-conway.json#/definitions/TransactionHash" + }, + "index": { + "$ref": "cardano-conway.json#/definitions/UInt32" + } + }, + "required": [ + "transaction_id", + "index" + ], + "unevaluatedProperties": false + }, + "PlutusScript": { + "title": "PlutusScript", + "type": "object", + "properties": { + "language": { + "$ref": "cardano-conway.json#/definitions/Language" + }, + "bytes": { + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f])+$" + } + }, + "required": [ + "language", + "bytes" + ], + "unevaluatedProperties": false + }, + "NativeScript": { + "title": "NativeScript", + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "title": "ScriptPubkey", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "pubkey" + ] + }, + "pubkey": { + "$ref": "cardano-conway.json#/definitions/Ed25519KeyHash" + } + }, + "unevaluatedProperties": false, + "required": [ + "tag", + "pubkey" + ] + }, + { + "title": "ScriptAll", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "all" + ] + }, + "scripts": { + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/NativeScript" + } + } + }, + "unevaluatedProperties": false, + "required": [ + "tag", + "scripts" + ] + }, + { + "title": "ScriptAny", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "any" + ] + }, + "scripts": { + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/NativeScript" + } + } + }, + "unevaluatedProperties": false, + "required": [ + "tag", + "scripts" + ] + }, + { + "title": "ScriptNOfK", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "n_of_k" + ] + }, + "scripts": { + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/NativeScript" + } + }, + "n": { + "$ref": "cardano-conway.json#/definitions/UInt32" + } + }, + "unevaluatedProperties": false, + "required": [ + "tag", + "scripts", + "n" + ] + }, + { + "title": "TimelockStart", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "timelock_start" + ] + }, + "slot": { + "$ref": "cardano-conway.json#/definitions/UInt64" + } + }, + "unevaluatedProperties": false, + "required": [ + "tag", + "slot" + ] + }, + { + "title": "TimelockExpiry", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "timelock_expiry" + ] + }, + "slot": { + "$ref": "cardano-conway.json#/definitions/UInt64" + } + }, + "unevaluatedProperties": false, + "required": [ + "tag", + "slot" + ] + } + ] + }, + "ScriptRef": { + "title": "ScriptRef", + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "title": "PlutusScript", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "plutus_script" + ] + }, + "value": { + "$ref": "cardano-conway.json#/definitions/PlutusScript" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + }, + { + "title": "NativeScript", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "native_script" + ] + }, + "value": { + "$ref": "cardano-conway.json#/definitions/NativeScript" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + } + ] + }, + "DataHash": { + "title": "DataHash", + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f]){32}$" + }, + "TransactionOutput": { + "title": "TransactionOutput", + "type": "object", + "properties": { + "address": { + "$ref": "cardano-conway.json#/definitions/Address" + }, + "amount": { + "$ref": "cardano-conway.json#/definitions/Value" + }, + "plutus_data": { + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "datum" + ] + }, + "value": { + "$ref": "cardano-conway.json#/definitions/PlutusData" + } + } + }, + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "datum_hash" + ] + }, + "value": { + "$ref": "cardano-conway.json#/definitions/DataHash" + } + } + } + ], + "unevaluatedProperties": false + }, + "script_ref": { + "$ref": "cardano-conway.json#/definitions/ScriptRef" + } + }, + "required": [ + "address", + "amount" + ] + }, + "TransactionUnspentOutput": { + "title": "TransactionUnspentOutput", + "type": "object", + "properties": { + "input": { + "$ref": "cardano-conway.json#/definitions/TransactionInput" + }, + "output": { + "$ref": "cardano-conway.json#/definitions/TransactionOutput" + } + }, + "required": [ + "input", + "output" + ], + "unevaluatedProperties": false + }, + "TransactionMetadatum": { + "title": "TransactionMetadatum", + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "map" + ] + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "$ref": "cardano-conway.json#/definitions/TransactionMetadatum" + }, + "value": { + "$ref": "cardano-conway.json#/definitions/TransactionMetadatum" + } + }, + "required": [ + "key", + "value" + ], + "unevaluatedProperties": false + } + } + }, + "required": [ + "tag", + "contents" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "list" + ] + }, + "contents": { + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/TransactionMetadatum" + } + } + }, + "required": [ + "tag", + "contents" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "int" + ] + }, + "value": { + "$ref": "cardano-conway.json#/definitions/Int128" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "bytes" + ] + }, + "value": { + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f]){0,64}$" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + }, + { + "title": "Metadata String", + "description": "UTF-8 string. Maximum size is 64 bytes, but there is no way to express byte length limit in a json-schema (maxLength limits the number of characters)", + "type": "object", + "properties": { + "tag": { + "enum": [ + "string" + ] + }, + "value": { + "type": "string", + "maxLength": 64, + "format": "string64" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + } + ] + }, + "PlutusV1CostModel": { + "title": "PlutusV1CostModel", + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/Int128" + }, + "maxItems": 166, + "minItems": 166 + }, + "PlutusV2CostModel": { + "title": "PlutusV2CostModel", + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/Int128" + }, + "maxItems": 175, + "minItems": 175 + }, + "PlutusV3CostModel": { + "title": "PlutusV3CostModel", + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/Int128" + }, + "maxItems": 251, + "minItems": 251 + }, + "CostModels": { + "title": "CostModels", + "type": "object", + "properties": { + "plutus_v1": { + "$ref": "cardano-conway.json#/definitions/PlutusV1CostModel" + }, + "plutus_v2": { + "$ref": "cardano-conway.json#/definitions/PlutusV2CostModel" + }, + "plutus_v3": { + "$ref": "cardano-conway.json#/definitions/PlutusV3CostModel" + } + }, + "required": [], + "unevaluatedProperties": false + }, + "ExUnitPrices": { + "title": "ExUnitPrices", + "type": "object", + "properties": { + "mem_price": { + "$ref": "cardano-conway.json#/definitions/UnitInterval" + }, + "step_price": { + "$ref": "cardano-conway.json#/definitions/UnitInterval" + } + }, + "unevaluatedProperties": false, + "required": [ + "mem_price", + "step_price" + ] + }, + "ExUnits": { + "title": "ExUnits", + "type": "object", + "properties": { + "mem": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "steps": { + "$ref": "cardano-conway.json#/definitions/UInt64" + } + }, + "required": [ + "mem", + "steps" + ], + "unevaluatedProperties": false + }, + "ProtocolVersion": { + "title": "ProtocolVersion", + "type": "object", + "properties": { + "major": { + "$ref": "cardano-conway.json#/definitions/UInt32" + }, + "minor": { + "$ref": "cardano-conway.json#/definitions/UInt32" + } + }, + "required": [ + "major", + "minor" + ], + "unevaluatedProperties": false + }, + "NonnegativeInterval": { + "title": "NonnegativeInterval", + "type": "object", + "properties": { + "numerator": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "denominator": { + "$ref": "cardano-conway.json#/definitions/PosInt64" + } + }, + "required": [ + "numerator", + "denominator" + ], + "unevaluatedProperties": false + }, + "PoolVotingThresholds": { + "title": "PoolVotingThresholds", + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/UnitInterval" + }, + "minItems": 5, + "maxItems": 5 + }, + "DRepVotingThresholds": { + "title": "DRepVotingThresholds", + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/UnitInterval" + }, + "minItems": 10, + "maxItems": 10 + }, + "ProtocolParamUpdate": { + "title": "ProtocolParamUpdate", + "type": "object", + "properties": { + "ada_per_utxo_byte": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "collateral_percentage": { + "$ref": "cardano-conway.json#/definitions/UInt32" + }, + "cost_models": { + "$ref": "cardano-conway.json#/definitions/CostModels" + }, + "d": { + "$ref": "cardano-conway.json#/definitions/UnitInterval" + }, + "execution_costs": { + "$ref": "cardano-conway.json#/definitions/ExUnitPrices" + }, + "expansion_rate": { + "$ref": "cardano-conway.json#/definitions/UnitInterval" + }, + "key_deposit": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "max_block_body_size": { + "$ref": "cardano-conway.json#/definitions/UInt32" + }, + "max_block_ex_units": { + "$ref": "cardano-conway.json#/definitions/ExUnits" + }, + "max_block_header_size": { + "$ref": "cardano-conway.json#/definitions/UInt32" + }, + "max_collateral_inputs": { + "$ref": "cardano-conway.json#/definitions/UInt32" + }, + "max_epoch": { + "$ref": "cardano-conway.json#/definitions/UInt32" + }, + "max_tx_ex_units": { + "$ref": "cardano-conway.json#/definitions/ExUnits" + }, + "max_tx_size": { + "$ref": "cardano-conway.json#/definitions/UInt32" + }, + "max_value_size": { + "$ref": "cardano-conway.json#/definitions/UInt32" + }, + "min_pool_cost": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "minfee_a": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "minfee_b": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "n_opt": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "pool_deposit": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "pool_pledge_influence": { + "$ref": "cardano-conway.json#/definitions/UnitInterval" + }, + "protocol_version": { + "$ref": "cardano-conway.json#/definitions/ProtocolVersion" + }, + "treasury_growth_rate": { + "$ref": "cardano-conway.json#/definitions/UnitInterval" + }, + "pool_voting_thresholds": { + "$ref": "cardano-conway.json#/definitions/PoolVotingThresholds" + }, + "drep_voting_thresholds": { + "$ref": "cardano-conway.json#/definitions/DRepVotingThresholds" + }, + "committee_min_size": { + "$ref": "cardano-conway.json#/definitions/UInt16" + }, + "committee_max_term_length": { + "$ref": "cardano-conway.json#/definitions/UInt32" + }, + "gov_action_lifetime": { + "$ref": "cardano-conway.json#/definitions/UInt32" + }, + "gov_action_deposit": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "drep_deposit": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "drep_activity": { + "$ref": "cardano-conway.json#/definitions/UInt32" + }, + "min_fee_ref_script_cost_per_byte": { + "$ref": "cardano-conway.json#/definitions/NonnegativeInterval" + } + }, + "unevaluatedProperties": false, + "required": [] + }, + "Update": { + "title": "Update", + "type": "object", + "properties": { + "epoch": { + "$ref": "cardano-conway.json#/definitions/UInt32" + }, + "proposed_protocol_parameter_updates": { + "type": "object", + "title": "ProposedProtocolParameterUpdates", + "description": "A mapping from GenesisHash to ProtocolParamUpdate", + "patternProperties": { + "^[0-9a-f]{56}$": { + "title": "ProtocolParamUpdate for a given GenesisHash", + "$ref": "cardano-conway.json#/definitions/ProtocolParamUpdate" + } + }, + "unevaluatedProperties": false + } + }, + "required": [ + "epoch", + "proposed_protocol_parameter_updates" + ], + "unevaluatedProperties": false + }, + "NetworkId": { + "title": "NetworkId", + "type": "string", + "enum": [ + "testnet", + "mainnet" + ] + }, + "PlutusData": { + "title": "PlutusData", + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "title": "PlutusDataList", + "type": "object", + "properties": { + "tag": { + "enum": [ + "list" + ] + }, + "contents": { + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/PlutusData" + } + } + }, + "required": [ + "tag", + "contents" + ], + "unevaluatedProperties": false + }, + { + "title": "PlutusDataConstr", + "type": "object", + "properties": { + "tag": { + "enum": [ + "constr" + ] + }, + "alternative": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "data": { + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/PlutusData" + } + } + }, + "required": [ + "tag", + "alternative", + "data" + ], + "unevaluatedProperties": false + }, + { + "title": "PlutusDataMap", + "type": "object", + "properties": { + "tag": { + "enum": [ + "map" + ] + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "$ref": "cardano-conway.json#/definitions/PlutusData" + }, + "value": { + "$ref": "cardano-conway.json#/definitions/PlutusData" + } + }, + "unevaluatedProperties": false + } + } + }, + "required": [ + "tag", + "contents" + ], + "unevaluatedProperties": false + }, + { + "title": "PlutusDataInteger", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "integer" + ] + }, + "value": { + "$ref": "cardano-conway.json#/definitions/BigInt" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + }, + { + "title": "PlutusDataBytes", + "type": "object", + "properties": { + "tag": { + "enum": [ + "bytes" + ] + }, + "value": { + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f])*$" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + } + ] + }, + "UnitInterval": { + "title": "UnitInterval", + "type": "object", + "properties": { + "numerator": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "denominator": { + "$ref": "cardano-conway.json#/definitions/UInt64" + } + }, + "required": [ + "numerator", + "denominator" + ], + "unevaluatedProperties": false + }, + "Ipv4": { + "title": "Ipv4", + "description": "IPv4 Address", + "type": "string", + "pattern": "^((25[0-5]|(2[0-4]|1\\d|[1-9]|)\\d)\\.){3}(25[0-5]|(2[0-4]|1\\d|[1-9]|)\\d)$" + }, + "Ipv6": { + "title": "Ipv6", + "description": "IPv6 address", + "type": "string", + "format": "ipv6" + }, + "DNSName": { + "title": "DNSName", + "type": "string", + "maxLength": 64, + "format": "string64" + }, + "Relay": { + "title": "Relay", + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "type": "object", + "title": "SingleHostAddr", + "properties": { + "tag": { + "enum": [ + "single_host_addr" + ] + }, + "port": { + "type": "integer", + "maximum": 65535 + }, + "ipv4": { + "$ref": "cardano-conway.json#/definitions/Ipv4" + }, + "ipv6": { + "$ref": "cardano-conway.json#/definitions/Ipv6" + } + }, + "required": [ + "tag" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "SingleHostName", + "properties": { + "tag": { + "enum": [ + "single_host_name" + ] + }, + "port": { + "type": "integer", + "minimum": 1, + "maximum": 65535 + }, + "dns_name": { + "$ref": "cardano-conway.json#/definitions/DNSName" + } + }, + "unevaluatedProperties": false, + "required": [ + "tag", + "dns_name" + ] + }, + { + "type": "object", + "title": "MultiHostName", + "properties": { + "tag": { + "enum": [ + "multi_host_name" + ] + }, + "dns_name": { + "$ref": "cardano-conway.json#/definitions/DNSName" + } + }, + "unevaluatedProperties": false, + "required": [ + "tag", + "dns_name" + ] + } + ] + }, + "VRFKeyHash": { + "title": "VRFKeyHash", + "type": "string", + "description": "blake2b_256 digest of a VRF verification key, encoded as bech32", + "pattern": "^vrf_vkh[02-9ac-hj-np-z]*", + "format": "bech32", + "examples": [ + "vrf_vkh3ak4chlh2xj9tw3jjwxdgs7v2uq6ev86l03vw" + ] + }, + "URL": { + "title": "URL", + "description": "UTF-8 URL string. Maximum size is 128 bytes, but there is no way to express byte length limit in a json-schema (maxLength limits the number of characters)", + "type": "string", + "maxLength": 128, + "format": "string128" + }, + "PoolMetadataHash": { + "title": "PoolMetadataHash", + "description": "Pool Metadata Hash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{64}$" + }, + "PoolMetadata": { + "title": "PoolMetadata", + "type": "object", + "properties": { + "url": { + "$ref": "cardano-conway.json#/definitions/URL" + }, + "hash": { + "$ref": "cardano-conway.json#/definitions/PoolMetadataHash" + } + }, + "unevaluatedProperties": false, + "required": [ + "url", + "hash" + ] + }, + "PoolPubKeyHash": { + "title": "PoolPubKeyHash", + "type": "string", + "format": "bech32", + "pattern": "^(pool1)[02-9ac-hj-np-z]*$", + "examples": [ + "pool12a39rkzfylvn9wfe8j6y8ucq6g2l4mw4azj70y0gd8ejczznyj2" + ] + }, + "PoolParams": { + "title": "PoolParams", + "type": "object", + "properties": { + "operator": { + "$ref": "cardano-conway.json#/definitions/PoolPubKeyHash" + }, + "vrf_keyhash": { + "$ref": "cardano-conway.json#/definitions/VRFKeyHash" + }, + "pledge": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "cost": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "margin": { + "$ref": "cardano-conway.json#/definitions/UnitInterval" + }, + "reward_account": { + "$ref": "cardano-conway.json#/definitions/RewardAddress" + }, + "pool_owners": { + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/Ed25519KeyHash" + } + }, + "relays": { + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/Relay" + } + }, + "pool_metadata": { + "$ref": "cardano-conway.json#/definitions/PoolMetadata" + } + }, + "required": [ + "cost", + "margin", + "operator", + "pledge", + "pool_owners", + "relays", + "reward_account", + "vrf_keyhash" + ], + "unevaluatedProperties": false + }, + "GenesisHash": { + "title": "GenesisHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{56}$" + }, + "GenesisDelegateHash": { + "title": "GenesisDelegateHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{56}$" + }, + "Anchor": { + "title": "Anchor", + "type": "object", + "properties": { + "url": { + "$ref": "cardano-conway.json#/definitions/URL" + }, + "data_hash": { + "$ref": "cardano-conway.json#/definitions/DataHash" + } + }, + "required": [ + "url", + "data_hash" + ], + "unevaluatedProperties": false + }, + "DRep": { + "title": "DRep", + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "key_hash" + ] + }, + "key_hash": { + "$ref": "cardano-conway.json#/definitions/Ed25519KeyHash" + } + }, + "required": [ + "tag", + "key_hash" + ] + }, + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "script_hash" + ] + }, + "script_hash": { + "$ref": "cardano-conway.json#/definitions/ScriptHash" + } + }, + "required": [ + "tag", + "script_hash" + ] + }, + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "always_abstain" + ] + } + }, + "required": [ + "tag" + ] + }, + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "always_no_confidence" + ] + } + }, + "required": [ + "tag" + ] + } + ] + }, + "Certificate": { + "title": "Certificate", + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "type": "object", + "title": "Stake Registration Certificate", + "properties": { + "tag": { + "enum": [ + "stake_registration" + ] + }, + "credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + } + }, + "required": [ + "tag", + "credential" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Stake Deregistration Certificate", + "properties": { + "tag": { + "enum": [ + "stake_deregistration" + ] + }, + "credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + } + }, + "required": [ + "tag", + "credential" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Stake Delegation Certificate", + "properties": { + "tag": { + "enum": [ + "stake_delegation" + ] + }, + "credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + }, + "pool_keyhash": { + "$ref": "cardano-conway.json#/definitions/PoolPubKeyHash" + } + }, + "required": [ + "tag", + "credential", + "pool_keyhash" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Pool Registration Certificate", + "properties": { + "tag": { + "enum": [ + "pool_registration" + ] + }, + "pool_params": { + "$ref": "cardano-conway.json#/definitions/PoolParams" + } + }, + "required": [ + "tag", + "pool_params" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Pool Retirement Certificate", + "properties": { + "tag": { + "type": "string", + "enum": [ + "pool_retirement" + ] + }, + "pool_keyhash": { + "$ref": "cardano-conway.json#/definitions/PoolPubKeyHash" + }, + "epoch": { + "$ref": "cardano-conway.json#/definitions/UInt32" + } + }, + "required": [ + "tag", + "pool_keyhash", + "epoch" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Registration certificate", + "properties": { + "tag": { + "type": "string", + "enum": [ + "registration" + ] + }, + "credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + }, + "coin": { + "$ref": "cardano-conway.json#/definitions/UInt64" + } + }, + "required": [ + "tag", + "credential", + "coin" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Unregistration certificate", + "properties": { + "tag": { + "type": "string", + "enum": [ + "unregistration" + ] + }, + "credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + }, + "coin": { + "$ref": "cardano-conway.json#/definitions/UInt64" + } + }, + "required": [ + "tag", + "credential", + "coin" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Vote delegation certificate", + "properties": { + "tag": { + "type": "string", + "enum": [ + "vote_delegation" + ] + }, + "credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + }, + "drep": { + "$ref": "cardano-conway.json#/definitions/DRep" + } + }, + "required": [ + "tag", + "credential", + "drep" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Stake vote delegation certificate", + "properties": { + "tag": { + "type": "string", + "enum": [ + "stake_vote_delegation" + ] + }, + "credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + }, + "pool_keyhash": { + "$ref": "cardano-conway.json#/definitions/PoolPubKeyHash" + }, + "drep": { + "$ref": "cardano-conway.json#/definitions/DRep" + } + }, + "required": [ + "tag", + "credential", + "pool_keyhash", + "drep" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "stake_registration_delegation" + ] + }, + "credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + }, + "pool_keyhash": { + "$ref": "cardano-conway.json#/definitions/PoolPubKeyHash" + }, + "coin": { + "$ref": "cardano-conway.json#/definitions/UInt64" + } + }, + "required": [ + "tag", + "credential", + "pool_keyhash", + "coin" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "vote_registration_delegation" + ] + }, + "credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + }, + "pool_keyhash": { + "$ref": "cardano-conway.json#/definitions/PoolPubKeyHash" + }, + "drep": { + "$ref": "cardano-conway.json#/definitions/DRep" + }, + "coin": { + "$ref": "cardano-conway.json#/definitions/UInt64" + } + }, + "required": [ + "tag", + "credential", + "pool_keyhash", + "drep", + "coin" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Stake registration delegation certificate", + "properties": { + "tag": { + "type": "string", + "enum": [ + "stake_vote_registration_delegation" + ] + }, + "credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + }, + "pool_keyhash": { + "$ref": "cardano-conway.json#/definitions/PoolPubKeyHash" + }, + "drep": { + "$ref": "cardano-conway.json#/definitions/DRep" + } + }, + "required": [ + "tag", + "credential", + "pool_keyhash", + "drep" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Vote registration delegation certificate", + "properties": { + "tag": { + "type": "string", + "enum": [ + "vote_registration_delegation" + ] + }, + "credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + }, + "drep": { + "$ref": "cardano-conway.json#/definitions/DRep" + }, + "coin": { + "$ref": "cardano-conway.json#/definitions/UInt64" + } + }, + "required": [ + "tag", + "credential", + "drep", + "coin" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Stake vote registration delegation certificate", + "properties": { + "tag": { + "type": "string", + "enum": [ + "stake_vote_registration_delegation" + ] + }, + "credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + }, + "pool_keyhash": { + "$ref": "cardano-conway.json#/definitions/PoolPubKeyHash" + }, + "drep": { + "$ref": "cardano-conway.json#/definitions/DRep" + }, + "coin": { + "$ref": "cardano-conway.json#/definitions/UInt64" + } + }, + "required": [ + "tag", + "credential", + "pool_keyhash", + "drep", + "coin" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Constitutional committee hot certificate", + "properties": { + "tag": { + "type": "string", + "enum": [ + "auth_committee_hot" + ] + }, + "committee_cold_credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + }, + "committee_hot_credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + } + }, + "required": [ + "tag", + "committee_cold_credential", + "committee_hot_credential" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Resign committee cold certificate", + "properties": { + "tag": { + "type": "string", + "enum": [ + "resign_committee_cold" + ] + }, + "committee_cold_credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + }, + "anchor": { + "$ref": "cardano-conway.json#/definitions/Anchor" + } + }, + "required": [ + "committee_cold_credential", + "tag" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Register DRep certificate", + "properties": { + "tag": { + "type": "string", + "enum": [ + "register_drep" + ] + }, + "drep_credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + }, + "coin": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "anchor": { + "$ref": "cardano-conway.json#/definitions/Anchor" + } + }, + "required": [ + "tag", + "drep_credential", + "coin" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Unregister DRep certificate", + "properties": { + "tag": { + "type": "string", + "enum": [ + "unregister_drep" + ] + }, + "drep_credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + }, + "coin": { + "$ref": "cardano-conway.json#/definitions/UInt64" + } + }, + "required": [ + "tag", + "drep_credential", + "coin" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Update DRep certificate", + "properties": { + "tag": { + "type": "string", + "enum": [ + "update_drep" + ] + }, + "drep_credential": { + "$ref": "cardano-conway.json#/definitions/Credential" + }, + "anchor": { + "$ref": "cardano-conway.json#/definitions/Anchor" + } + }, + "required": [ + "tag", + "drep_credential" + ], + "unevaluatedProperties": false + } + ] + }, + "Constitution": { + "title": "Constitution", + "type": "object", + "properties": { + "anchor": { + "$ref": "cardano-conway.json#/definitions/Anchor" + }, + "script_hash": { + "$ref": "cardano-conway.json#/definitions/ScriptHash" + } + }, + "required": [ + "anchor" + ] + }, + "GovActionId": { + "title": "GovActionId", + "type": "object", + "properties": { + "transaction_id": { + "$ref": "cardano-conway.json#/definitions/TransactionHash" + }, + "gov_action_index": { + "$ref": "cardano-conway.json#/definitions/UInt16" + } + }, + "required": [ + "transaction_id", + "gov_action_index" + ], + "unevaluatedProperties": false + }, + "GovAction": { + "title": "GovAction", + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "type": "object", + "title": "Parameter Change Action", + "properties": { + "tag": { + "type": "string", + "enum": [ + "parameter_change_action" + ] + }, + "gov_action_id": { + "$ref": "cardano-conway.json#/definitions/GovActionId" + }, + "protocol_param_update": { + "$ref": "cardano-conway.json#/definitions/ProtocolParamUpdate" + }, + "policy_hash": { + "$ref": "cardano-conway.json#/definitions/ScriptHash" + } + }, + "required": [ + "tag", + "protocol_param_update" + ] + }, + { + "type": "object", + "title": "Hard fork initiation action", + "properties": { + "tag": { + "type": "string", + "enum": [ + "hard_fork_initiation_action" + ] + }, + "gov_action_id": { + "$ref": "cardano-conway.json#/definitions/GovActionId" + }, + "protocol_version": { + "$ref": "cardano-conway.json#/definitions/ProtocolVersion" + } + }, + "required": [ + "tag", + "protocol_version" + ] + }, + { + "type": "object", + "title": "Trasury withdrawals action", + "properties": { + "tag": { + "type": "string", + "enum": [ + "treasury_withdrawals_action" + ] + }, + "rewards": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "$ref": "cardano-conway.json#/definitions/RewardAddress" + }, + "value": { + "$ref": "cardano-conway.json#/definitions/UInt64" + } + }, + "unevaluatedProperties": false + } + }, + "policy_hash": { + "$ref": "cardano-conway.json#/definitions/ScriptHash" + } + }, + "required": [ + "tag" + ] + }, + { + "type": "object", + "title": "No confidence governance action", + "properties": { + "tag": { + "type": "string", + "enum": [ + "no_confidence" + ] + }, + "gov_action_id": { + "$ref": "cardano-conway.json#/definitions/GovActionId" + } + }, + "required": [ + "tag" + ] + }, + { + "type": "object", + "title": "Update committee", + "properties": { + "tag": { + "type": "string", + "enum": [ + "update_committee" + ] + }, + "gov_action_id": { + "$ref": "cardano-conway.json#/definitions/GovActionId" + }, + "members_to_remove": { + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/Credential" + } + }, + "committee": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "$ref": "cardano-conway.json#/definitions/Credential" + }, + "value": { + "$ref": "cardano-conway.json#/definitions/UInt64" + } + }, + "unevaluatedProperties": false + } + }, + "signature_threshold": { + "$ref": "cardano-conway.json#/definitions/UnitInterval" + } + }, + "required": [ + "tag", + "signature_threshold", + "committee" + ] + }, + { + "type": "object", + "title": "New constitution", + "properties": { + "tag": { + "type": "string", + "enum": [ + "new_constitution" + ] + }, + "gov_action_id": { + "$ref": "cardano-conway.json#/definitions/GovActionId" + }, + "constitution": { + "$ref": "cardano-conway.json#/definitions/Constitution" + } + }, + "required": [ + "tag", + "constitution" + ] + }, + { + "type": "object", + "title": "Info action", + "properties": { + "tag": { + "type": "string", + "enum": [ + "info_action" + ] + } + }, + "required": [ + "tag" + ] + } + ] + }, + "Language": { + "title": "Language", + "type": "string", + "enum": [ + "plutus_v1", + "plutus_v2", + "plutus_v3" + ] + }, + "Mint": { + "title": "Mint", + "description": "Minting or burning of assets. A mapping from policy IDs (script hashes) to mappings from asset names to amounts (that can be negative). Allows for duplicate script hash keys.", + "type": "array", + "items": { + "type": "object", + "properties": { + "script_hash": { + "$ref": "cardano-conway.json#/definitions/ScriptHash" + }, + "assets": { + "type": "array", + "items": { + "title": "Assets", + "type": "object", + "properties": { + "asset_name": { + "$ref": "cardano-conway.json#/definitions/AssetName" + }, + "amount": { + "$ref": "cardano-conway.json#/definitions/NonZeroInt64" + } + }, + "required": [ + "asset_name", + "amount" + ], + "unevaluatedProperties": false + } + } + }, + "required": [ + "script_hash", + "assets" + ], + "unevaluatedProperties": false + } + }, + "Ed25519Signature": { + "title": "Ed25519Signature", + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f]){64}$" + }, + "Ed25519PublicKey": { + "title": "Ed25519PublicKey", + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f]){32}$" + }, + "BootstrapWitness": { + "title": "BootstrapWitness", + "type": "object", + "properties": { + "attributes": { + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f])*$" + }, + "chain_code": { + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f]){32}$" + }, + "signature": { + "$ref": "cardano-conway.json#/definitions/Ed25519Signature" + }, + "vkey": { + "$ref": "cardano-conway.json#/definitions/Ed25519PublicKey" + } + }, + "required": [ + "attributes", + "chain_code", + "signature", + "vkey" + ], + "unevaluatedProperties": false + }, + "RedeemerTag": { + "title": "RedeemerTag", + "type": "string", + "enum": [ + "spend", + "mint", + "cert", + "reward", + "vote", + "propose" + ] + }, + "Redeemer": { + "title": "Redeemer", + "type": "object", + "properties": { + "data": { + "$ref": "cardano-conway.json#/definitions/PlutusData" + }, + "tag": { + "$ref": "cardano-conway.json#/definitions/RedeemerTag" + }, + "index": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "ex_units": { + "$ref": "cardano-conway.json#/definitions/ExUnits" + } + }, + "required": [ + "data", + "tag", + "index", + "ex_units" + ], + "unevaluatedProperties": false + }, + "Vkeywitness": { + "title": "Vkeywitness", + "type": "object", + "properties": { + "vkey": { + "$ref": "cardano-conway.json#/definitions/Ed25519PublicKey" + }, + "signature": { + "$ref": "cardano-conway.json#/definitions/Ed25519Signature" + } + }, + "required": [ + "vkey", + "signature" + ], + "unevaluatedProperties": false + }, + "TransactionWitnessSet": { + "title": "TransactionWitnessSet", + "type": "object", + "properties": { + "bootstraps": { + "title": "BootstrapWitnesses", + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/BootstrapWitness" + } + }, + "native_scripts": { + "title": "NativeScripts", + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/NativeScript" + } + }, + "plutus_data": { + "type": "array", + "title": "PlutusList", + "items": { + "$ref": "cardano-conway.json#/definitions/PlutusData" + } + }, + "plutus_scripts": { + "type": "array", + "title": "PlutusScripts", + "items": { + "$ref": "cardano-conway.json#/definitions/PlutusScript" + } + }, + "redeemers": { + "type": "array", + "title": "Redeemers", + "items": { + "$ref": "cardano-conway.json#/definitions/Redeemer" + } + }, + "vkeywitnesses": { + "type": "array", + "title": "VkeyWitnesses", + "items": { + "$ref": "cardano-conway.json#/definitions/Vkeywitness" + } + } + }, + "required": [] + }, + "Transaction": { + "type": "object", + "title": "Transaction", + "properties": { + "auxiliary_data": { + "$ref": "cardano-conway.json#/definitions/AuxiliaryData" + }, + "body": { + "$ref": "cardano-conway.json#/definitions/TransactionBody" + }, + "is_valid": { + "type": "boolean" + }, + "witness_set": { + "$ref": "cardano-conway.json#/definitions/TransactionWitnessSet" + } + }, + "required": [ + "body", + "is_valid", + "witness_set" + ], + "unevaluatedProperties": false + }, + "VRFCert": { + "title": "VRFCert", + "type": "object", + "properties": { + "output": { + "$ref": "cardano-conway.json#/definitions/ByteString" + }, + "proof": { + "$ref": "cardano-conway.json#/definitions/ByteString", + "type": "string", + "pattern": "^[0-9a-f]{160}$" + } + }, + "required": [ + "output", + "proof" + ], + "unevaluatedProperties": false + }, + "KESVKey": { + "title": "KESVKey", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{64}$", + "maxLength": 64, + "minLength": 64 + }, + "BlockHash": { + "title": "BlockHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{64}$", + "maxLength": 64, + "minLength": 64 + }, + "VRFVKey": { + "title": "VRFVKey", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{64}$", + "maxLength": 64, + "minLength": 64 + }, + "KESSignature": { + "title": "KESSignature", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{896}$", + "maxLength": 896, + "minLength": 896 + }, + "OperationalCert": { + "title": "OperationalCert", + "type": "object", + "properties": { + "hot_vkey": { + "$ref": "cardano-conway.json#/definitions/KESVKey" + }, + "kes_period": { + "$ref": "cardano-conway.json#/definitions/UInt32" + }, + "sequence_number": { + "$ref": "cardano-conway.json#/definitions/UInt32" + }, + "sigma": { + "$ref": "cardano-conway.json#/definitions/Ed25519Signature" + } + }, + "required": [ + "hot_vkey", + "kes_period", + "sequence_number", + "sigma" + ], + "unevaluatedProperties": false + }, + "HeaderBody": { + "title": "HeaderBody", + "type": "object", + "properties": { + "block_number": { + "$ref": "cardano-conway.json#/definitions/UInt32" + }, + "slot": { + "$ref": "cardano-conway.json#/definitions/UInt64" + }, + "prev_hash": { + "$ref": "cardano-conway.json#/definitions/BlockHash" + }, + "issuer_vkey": { + "$ref": "cardano-conway.json#/definitions/Ed25519PublicKey" + }, + "vrf_vkey": { + "$ref": "cardano-conway.json#/definitions/VRFVKey" + }, + "vrf_result": { + "$ref": "cardano-conway.json#/definitions/VRFCert" + }, + "block_body_size": { + "$ref": "cardano-conway.json#/definitions/UInt32" + }, + "block_body_hash": { + "$ref": "cardano-conway.json#/definitions/BlockHash" + }, + "operational_cert": { + "$ref": "cardano-conway.json#/definitions/OperationalCert" + }, + "protocol_version": { + "$ref": "cardano-conway.json#/definitions/ProtocolVersion" + } + }, + "unevaluatedProperties": false, + "required": [ + "block_number", + "slot", + "issuer_vkey", + "vrf_vkey", + "vrf_result", + "block_body_size", + "block_body_hash", + "operational_cert", + "protocol_version" + ] + }, + "Header": { + "title": "Header", + "type": "object", + "properties": { + "body_signature": { + "$ref": "cardano-conway.json#/definitions/KESSignature" + }, + "header_body": { + "$ref": "cardano-conway.json#/definitions/HeaderBody" + } + }, + "required": [ + "body_signature", + "header_body" + ], + "unevaluatedProperties": false + }, + "Block": { + "title": "Block", + "type": "object", + "properties": { + "auxiliary_data_set": { + "type": "object", + "title": "AuxiliaryDataSet", + "description": "A mapping from transaction indices to AuxiliaryData values", + "patternProperties": { + "^(0|[1-9][0-9]*)$": { + "$ref": "cardano-conway.json#/definitions/AuxiliaryData" + } + }, + "unevaluatedProperties": false + }, + "header": { + "$ref": "cardano-conway.json#/definitions/Header" + }, + "invalid_transactions": { + "type": "array", + "items": { + "allOf": [ + { + "title": "TransactionIndex" + }, + { + "$ref": "cardano-conway.json#/definitions/UInt32" + } + ] + } + }, + "transaction_bodies": { + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/TransactionBody" + } + }, + "transaction_witness_sets": { + "type": "array", + "items": { + "$ref": "cardano-conway.json#/definitions/TransactionWitnessSet" + } + } + }, + "unevaluatedProperties": false, + "required": [ + "auxiliary_data_set", + "header", + "invalid_transactions", + "transaction_bodies", + "transaction_witness_sets" + ] + } + } + }, + "cardano-babbage.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "cardano-babbage.json", + "title": "Cardano Babbage Era Domain Types", + "definitions": { + "BigInt": { + "title": "BigInt", + "type": "string", + "description": "A long integer domain type", + "pattern": "^(0|-?[1-9][0-9]*)$", + "examples": [ + "0", + "-123", + "123" + ] + }, + "ByteString": { + "title": "ByteString", + "description": "Arbitrary-length byte array", + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f])*$" + }, + "UInt64": { + "title": "UInt64", + "description": "64-bit unsigned integer", + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "format": "uint64" + }, + "PosInt64": { + "title": "PosInt64", + "description": "64-bit unsigned integer, zero-excluded. 1-18446744073709551615", + "type": "string", + "pattern": "^([1-9][0-9]*)$", + "format": "posint64" + }, + "Int128": { + "title": "Int128", + "description": "128-bit signed integer", + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "format": "int128" + }, + "NonZeroInt64": { + "title": "NonZeroInt64", + "description": "64-bit signed integer, zero excluded. Ranges: -9223372036854775808..-1 and 1..9223372036854775807", + "type": "string", + "pattern": "^-?([1-9][0-9]*)$" + }, + "UInt32": { + "title": "UInt32", + "description": "32-bit unsigned integer", + "type": "integer", + "minimum": 0, + "maximum": 4294967295 + }, + "RewardAddress": { + "title": "RewardAddress", + "type": "string", + "format": "bech32", + "pattern": "^(stake1|stake_test1)[02-9ac-hj-np-z]*$", + "examples": [ + "stake1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5egfu2p0u" + ] + }, + "ByronAddress": { + "title": "ByronAddress", + "type": "string", + "format": "base58", + "pattern": "^[1-9A-HJ-NP-Za-km-z]+$", + "examples": [ + "37btjrVyb4KDXBNC4haBVPCrro8AQPHwvCMp3RFhhSVWwfFmZ6wwzSK6JK1hY6wHNmtrpTf1kdbva8TCneM2YsiXT7mrzT21EacHnPpz5YyUdj64na" + ] + }, + "PointerAddress": { + "title": "PointerAddress", + "type": "string", + "format": "bech32", + "pattern": "^(addr1|addr_test1)[02-9ac-hj-np-z]*$", + "examples": [ + "addr1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5eg0yu80w" + ] + }, + "EnterpriseAddress": { + "title": "EnterpriseAddress", + "type": "string", + "format": "bech32", + "pattern": "^(addr1|addr_test1)[02-9ac-hj-np-z]*$", + "examples": [ + "addr1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5eg0yu80w" + ] + }, + "BaseAddress": { + "title": "BaseAddress", + "type": "string", + "format": "bech32", + "pattern": "^(addr1|addr_test1)[02-9ac-hj-np-z]*$", + "examples": [ + "addr1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5eg0yu80w" + ] + }, + "Address": { + "title": "Address", + "anyOf": [ + { + "$ref": "cardano-babbage.json#/definitions/RewardAddress" + }, + { + "$ref": "cardano-babbage.json#/definitions/BaseAddress" + }, + { + "$ref": "cardano-babbage.json#/definitions/PointerAddress" + }, + { + "$ref": "cardano-babbage.json#/definitions/EnterpriseAddress" + }, + { + "$ref": "cardano-babbage.json#/definitions/ByronAddress" + } + ] + }, + "Ed25519KeyHash": { + "title": "Ed25519KeyHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{56}$" + }, + "ScriptHash": { + "title": "ScriptHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{56}$" + }, + "AssetName": { + "title": "AssetName", + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f]){0,32}$", + "examples": [ + "504154415445", + "1e349c9bdea19fd6c147626a5260bc44b71635f398b67c59881df209", + "7eae28af2208be856f7a119668ae52a49b73725e326dc16579dcc373" + ] + }, + "Credential": { + "title": "Credential", + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "pubkey_hash" + ] + }, + "value": { + "$ref": "cardano-babbage.json#/definitions/Ed25519KeyHash" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "script_hash" + ] + }, + "value": { + "$ref": "cardano-babbage.json#/definitions/ScriptHash" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + } + ] + }, + "MultiAsset": { + "title": "MultiAsset", + "description": "A mapping from policy IDs (script hashes) to mappings from asset names to amounts", + "type": "object", + "patternProperties": { + "^[0-9a-f]{56}$": { + "type": "object", + "patternProperties": { + "^([0-9a-f][0-9a-f]){0,32}$": { + "$ref": "cardano-babbage.json#/definitions/PosInt64" + } + }, + "unevaluatedProperties": false + } + }, + "unevaluatedProperties": false + }, + "Value": { + "title": "Value", + "type": "object", + "properties": { + "coin": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "assets": { + "$ref": "cardano-babbage.json#/definitions/MultiAsset" + } + }, + "required": [ + "coin" + ], + "unevaluatedProperties": false + }, + "TransactionHash": { + "title": "TransactionHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{64}$", + "maxLength": 64, + "minLength": 64, + "examples": [ + "eca40340fa6e65d964915ba4bc8bd811a0493d263ffe95875291114cbb2d0686", + "7420a723bf4ee4417ec1aa2262ff60921270681e7a9d537132cbcc82917e8006", + "fbc1da46d62a431e69855ad48a6b49b0e2aaafc6fd3dc4a066c6851b7bd31a91", + "c6726192662abeab149098095eabe004ecbec47f5e564748ab0d394affca47d9" + ] + }, + "TransactionInput": { + "title": "TransactionInput", + "type": "object", + "properties": { + "transaction_id": { + "$ref": "cardano-babbage.json#/definitions/TransactionHash" + }, + "index": { + "$ref": "cardano-babbage.json#/definitions/UInt32" + } + }, + "required": [ + "transaction_id", + "index" + ], + "unevaluatedProperties": false + }, + "PlutusScript": { + "title": "PlutusScript", + "type": "object", + "properties": { + "language": { + "$ref": "cardano-babbage.json#/definitions/Language" + }, + "bytes": { + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f])+$" + } + }, + "required": [ + "language", + "bytes" + ], + "unevaluatedProperties": false + }, + "NativeScript": { + "title": "NativeScript", + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "title": "ScriptPubkey", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "pubkey" + ] + }, + "pubkey": { + "$ref": "cardano-babbage.json#/definitions/Ed25519KeyHash" + } + }, + "unevaluatedProperties": false, + "required": [ + "tag", + "pubkey" + ] + }, + { + "title": "ScriptAll", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "all" + ] + }, + "scripts": { + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/NativeScript" + } + } + }, + "unevaluatedProperties": false, + "required": [ + "tag", + "scripts" + ] + }, + { + "title": "ScriptAny", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "any" + ] + }, + "scripts": { + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/NativeScript" + } + } + }, + "unevaluatedProperties": false, + "required": [ + "tag", + "scripts" + ] + }, + { + "title": "ScriptNOfK", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "n_of_k" + ] + }, + "scripts": { + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/NativeScript" + } + }, + "n": { + "$ref": "cardano-babbage.json#/definitions/UInt32" + } + }, + "unevaluatedProperties": false, + "required": [ + "tag", + "scripts", + "n" + ] + }, + { + "title": "TimelockStart", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "timelock_start" + ] + }, + "slot": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + } + }, + "unevaluatedProperties": false, + "required": [ + "tag", + "slot" + ] + }, + { + "title": "TimelockExpiry", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "timelock_expiry" + ] + }, + "slot": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + } + }, + "unevaluatedProperties": false, + "required": [ + "tag", + "slot" + ] + } + ] + }, + "ScriptRef": { + "title": "ScriptRef", + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "title": "PlutusScript", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "plutus_script" + ] + }, + "value": { + "$ref": "cardano-babbage.json#/definitions/PlutusScript" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + }, + { + "title": "NativeScript", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "native_script" + ] + }, + "value": { + "$ref": "cardano-babbage.json#/definitions/NativeScript" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + } + ] + }, + "DataHash": { + "title": "DataHash", + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f]){32}$" + }, + "TransactionOutput": { + "title": "TransactionOutput", + "type": "object", + "properties": { + "address": { + "$ref": "cardano-babbage.json#/definitions/Address" + }, + "amount": { + "$ref": "cardano-babbage.json#/definitions/Value" + }, + "plutus_data": { + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "datum" + ] + }, + "value": { + "$ref": "cardano-babbage.json#/definitions/PlutusData" + } + } + }, + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "datum_hash" + ] + }, + "value": { + "$ref": "cardano-babbage.json#/definitions/DataHash" + } + } + } + ], + "unevaluatedProperties": false + }, + "script_ref": { + "$ref": "cardano-babbage.json#/definitions/ScriptRef" + } + }, + "required": [ + "address", + "amount" + ] + }, + "TransactionUnspentOutput": { + "title": "TransactionUnspentOutput", + "type": "object", + "properties": { + "input": { + "$ref": "cardano-babbage.json#/definitions/TransactionInput" + }, + "output": { + "$ref": "cardano-babbage.json#/definitions/TransactionOutput" + } + }, + "required": [ + "input", + "output" + ], + "unevaluatedProperties": false + }, + "TransactionMetadatum": { + "title": "TransactionMetadatum", + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "map" + ] + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "$ref": "cardano-babbage.json#/definitions/TransactionMetadatum" + }, + "value": { + "$ref": "cardano-babbage.json#/definitions/TransactionMetadatum" + } + }, + "required": [ + "key", + "value" + ], + "unevaluatedProperties": false + } + } + }, + "required": [ + "tag", + "contents" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "list" + ] + }, + "contents": { + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/TransactionMetadatum" + } + } + }, + "required": [ + "tag", + "contents" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "int" + ] + }, + "value": { + "$ref": "cardano-babbage.json#/definitions/Int128" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "properties": { + "tag": { + "enum": [ + "bytes" + ] + }, + "value": { + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f]){0,64}$" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + }, + { + "title": "Metadata String", + "description": "UTF-8 string. Maximum size is 64 bytes, but there is no way to express byte length limit in a json-schema (maxLength limits the number of characters)", + "type": "object", + "properties": { + "tag": { + "enum": [ + "string" + ] + }, + "value": { + "type": "string", + "maxLength": 64, + "format": "string64" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + } + ] + }, + "PlutusV1CostModel": { + "title": "PlutusV1CostModel", + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/Int128" + }, + "maxItems": 166, + "minItems": 166 + }, + "PlutusV2CostModel": { + "title": "PlutusV2CostModel", + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/Int128" + }, + "maxItems": 175, + "minItems": 175 + }, + "CostModels": { + "title": "CostModels", + "type": "object", + "properties": { + "plutus_v1": { + "$ref": "cardano-babbage.json#/definitions/PlutusV1CostModel" + }, + "plutus_v2": { + "$ref": "cardano-babbage.json#/definitions/PlutusV2CostModel" + } + }, + "required": [], + "unevaluatedProperties": false + }, + "ExUnitPrices": { + "title": "ExUnitPrices", + "type": "object", + "properties": { + "mem_price": { + "$ref": "cardano-babbage.json#/definitions/UnitInterval" + }, + "step_price": { + "$ref": "cardano-babbage.json#/definitions/UnitInterval" + } + }, + "unevaluatedProperties": false, + "required": [ + "mem_price", + "step_price" + ] + }, + "ExUnits": { + "title": "ExUnits", + "type": "object", + "properties": { + "mem": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "steps": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + } + }, + "required": [ + "mem", + "steps" + ], + "unevaluatedProperties": false + }, + "ProtocolVersion": { + "title": "ProtocolVersion", + "type": "object", + "properties": { + "major": { + "$ref": "cardano-babbage.json#/definitions/UInt32" + }, + "minor": { + "$ref": "cardano-babbage.json#/definitions/UInt32" + } + }, + "required": [ + "major", + "minor" + ], + "unevaluatedProperties": false + }, + "ProtocolParamUpdate": { + "title": "ProtocolParamUpdate", + "type": "object", + "properties": { + "ada_per_utxo_byte": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "collateral_percentage": { + "$ref": "cardano-babbage.json#/definitions/UInt32" + }, + "cost_models": { + "$ref": "cardano-babbage.json#/definitions/CostModels" + }, + "d": { + "$ref": "cardano-babbage.json#/definitions/UnitInterval" + }, + "execution_costs": { + "$ref": "cardano-babbage.json#/definitions/ExUnitPrices" + }, + "expansion_rate": { + "$ref": "cardano-babbage.json#/definitions/UnitInterval" + }, + "key_deposit": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "max_block_body_size": { + "$ref": "cardano-babbage.json#/definitions/UInt32" + }, + "max_block_ex_units": { + "$ref": "cardano-babbage.json#/definitions/ExUnits" + }, + "max_block_header_size": { + "$ref": "cardano-babbage.json#/definitions/UInt32" + }, + "max_collateral_inputs": { + "$ref": "cardano-babbage.json#/definitions/UInt32" + }, + "max_epoch": { + "$ref": "cardano-babbage.json#/definitions/UInt32" + }, + "max_tx_ex_units": { + "$ref": "cardano-babbage.json#/definitions/ExUnits" + }, + "max_tx_size": { + "$ref": "cardano-babbage.json#/definitions/UInt32" + }, + "max_value_size": { + "$ref": "cardano-babbage.json#/definitions/UInt32" + }, + "min_pool_cost": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "minfee_a": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "minfee_b": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "n_opt": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "pool_deposit": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "pool_pledge_influence": { + "$ref": "cardano-babbage.json#/definitions/UnitInterval" + }, + "protocol_version": { + "$ref": "cardano-babbage.json#/definitions/ProtocolVersion" + }, + "treasury_growth_rate": { + "$ref": "cardano-babbage.json#/definitions/UnitInterval" + } + }, + "unevaluatedProperties": false, + "required": [] + }, + "Update": { + "title": "Update", + "type": "object", + "properties": { + "epoch": { + "$ref": "cardano-babbage.json#/definitions/UInt32" + }, + "proposed_protocol_parameter_updates": { + "type": "object", + "title": "ProposedProtocolParameterUpdates", + "description": "A mapping from GenesisHash to ProtocolParamUpdate", + "patternProperties": { + "^[0-9a-f]{56}$": { + "title": "ProtocolParamUpdate for a given GenesisHash", + "$ref": "cardano-babbage.json#/definitions/ProtocolParamUpdate" + } + }, + "unevaluatedProperties": false + } + }, + "required": [ + "epoch", + "proposed_protocol_parameter_updates" + ], + "unevaluatedProperties": false + }, + "ScriptDataHash": { + "title": "ScriptDataHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{64}$" + }, + "TransactionMetadata": { + "title": "TransactionMetadata", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "value": { + "$ref": "cardano-babbage.json#/definitions/TransactionMetadatum" + } + }, + "required": [ + "key", + "value" + ], + "unevaluatedProperties": false + } + }, + "AuxiliaryDataHash": { + "title": "AuxiliaryDataHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{64}$" + }, + "AuxiliaryData": { + "title": "AuxiliaryData", + "type": "object", + "properties": { + "metadata": { + "$ref": "cardano-babbage.json#/definitions/TransactionMetadata" + }, + "native_scripts": { + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/NativeScript" + } + }, + "plutus_scripts": { + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/PlutusScript" + } + } + }, + "required": [], + "unevaluatedProperties": false + }, + "TransactionBody": { + "title": "TransactionBody", + "type": "object", + "properties": { + "auxiliary_data_hash": { + "$ref": "cardano-babbage.json#/definitions/AuxiliaryDataHash" + }, + "inputs": { + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/TransactionInput" + } + }, + "outputs": { + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/TransactionOutput" + } + }, + "fee": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "certs": { + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/Certificate" + } + }, + "collateral": { + "title": "Collateral Inputs", + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/TransactionInput" + } + }, + "collateral_return": { + "allOf": [ + { + "$ref": "cardano-babbage.json#/definitions/TransactionOutput" + }, + { + "title": "Collateral Return", + "description": "Collateral return, introduced in CIP-40" + } + ] + }, + "mint": { + "$ref": "cardano-babbage.json#/definitions/Mint" + }, + "network_id": { + "$ref": "cardano-babbage.json#/definitions/NetworkId" + }, + "reference_inputs": { + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/TransactionInput" + } + }, + "required_signers": { + "title": "Required signers", + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/Ed25519KeyHash" + } + }, + "script_data_hash": { + "$ref": "cardano-babbage.json#/definitions/ScriptDataHash" + }, + "total_collateral": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "ttl": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "update": { + "$ref": "cardano-babbage.json#/definitions/Update" + }, + "validity_start_interval": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "withdrawals": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "$ref": "cardano-babbage.json#/definitions/RewardAddress" + }, + "value": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + } + }, + "unevaluatedProperties": false + } + } + }, + "required": [ + "inputs", + "outputs", + "fee" + ], + "unevaluatedProperties": false + }, + "NetworkId": { + "title": "NetworkId", + "type": "string", + "enum": [ + "testnet", + "mainnet" + ] + }, + "PlutusData": { + "title": "PlutusData", + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "title": "PlutusDataList", + "type": "object", + "properties": { + "tag": { + "enum": [ + "list" + ] + }, + "contents": { + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/PlutusData" + } + } + }, + "required": [ + "tag", + "contents" + ], + "unevaluatedProperties": false + }, + { + "title": "PlutusDataConstr", + "type": "object", + "properties": { + "tag": { + "enum": [ + "constr" + ] + }, + "alternative": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "data": { + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/PlutusData" + } + } + }, + "required": [ + "tag", + "alternative", + "data" + ], + "unevaluatedProperties": false + }, + { + "title": "PlutusDataMap", + "type": "object", + "properties": { + "tag": { + "enum": [ + "map" + ] + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "$ref": "cardano-babbage.json#/definitions/PlutusData" + }, + "value": { + "$ref": "cardano-babbage.json#/definitions/PlutusData" + } + }, + "unevaluatedProperties": false + } + } + }, + "required": [ + "tag", + "contents" + ], + "unevaluatedProperties": false + }, + { + "title": "PlutusDataInteger", + "type": "object", + "properties": { + "tag": { + "type": "string", + "enum": [ + "integer" + ] + }, + "value": { + "$ref": "cardano-babbage.json#/definitions/BigInt" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + }, + { + "title": "PlutusDataBytes", + "type": "object", + "properties": { + "tag": { + "enum": [ + "bytes" + ] + }, + "value": { + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f])*$" + } + }, + "required": [ + "tag", + "value" + ], + "unevaluatedProperties": false + } + ] + }, + "UnitInterval": { + "title": "UnitInterval", + "type": "object", + "properties": { + "numerator": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "denominator": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + } + }, + "required": [ + "numerator", + "denominator" + ], + "unevaluatedProperties": false + }, + "Ipv4": { + "title": "Ipv4", + "description": "IPv4 Address", + "type": "string", + "pattern": "^((25[0-5]|(2[0-4]|1\\d|[1-9]|)\\d)\\.){3}(25[0-5]|(2[0-4]|1\\d|[1-9]|)\\d)$" + }, + "Ipv6": { + "title": "Ipv6", + "description": "IPv6 address", + "type": "string", + "format": "ipv6" + }, + "DNSName": { + "title": "DNSName", + "type": "string", + "maxLength": 64, + "format": "string64" + }, + "Relay": { + "title": "Relay", + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "type": "object", + "title": "SingleHostAddr", + "properties": { + "tag": { + "enum": [ + "single_host_addr" + ] + }, + "port": { + "type": "integer", + "maximum": 65535 + }, + "ipv4": { + "$ref": "cardano-babbage.json#/definitions/Ipv4" + }, + "ipv6": { + "$ref": "cardano-babbage.json#/definitions/Ipv6" + } + }, + "required": [ + "tag" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "SingleHostName", + "properties": { + "tag": { + "enum": [ + "single_host_name" + ] + }, + "port": { + "type": "integer", + "minimum": 1, + "maximum": 65535 + }, + "dns_name": { + "$ref": "cardano-babbage.json#/definitions/DNSName" + } + }, + "unevaluatedProperties": false, + "required": [ + "tag", + "dns_name" + ] + }, + { + "type": "object", + "title": "MultiHostName", + "properties": { + "tag": { + "enum": [ + "multi_host_name" + ] + }, + "dns_name": { + "$ref": "cardano-babbage.json#/definitions/DNSName" + } + }, + "unevaluatedProperties": false, + "required": [ + "tag", + "dns_name" + ] + } + ] + }, + "VRFKeyHash": { + "title": "VRFKeyHash", + "type": "string", + "description": "blake2b_256 digest of a VRF verification key, encoded as bech32", + "pattern": "^vrf_vkh[02-9ac-hj-np-z]*", + "format": "bech32", + "examples": [ + "vrf_vkh3ak4chlh2xj9tw3jjwxdgs7v2uq6ev86l03vw" + ] + }, + "URL": { + "title": "URL", + "description": "UTF-8 URL string. Maximum size is 64 bytes, but there is no way to express byte length limit in a json-schema (maxLength limits the number of characters)", + "type": "string", + "maxLength": 64, + "format": "string64" + }, + "PoolMetadataHash": { + "title": "PoolMetadataHash", + "description": "Pool Metadata Hash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{64}$" + }, + "PoolMetadata": { + "title": "PoolMetadata", + "type": "object", + "properties": { + "url": { + "$ref": "cardano-babbage.json#/definitions/URL" + }, + "hash": { + "$ref": "cardano-babbage.json#/definitions/PoolMetadataHash" + } + }, + "unevaluatedProperties": false, + "required": [ + "url", + "hash" + ] + }, + "PoolPubKeyHash": { + "title": "PoolPubKeyHash", + "type": "string", + "format": "bech32", + "pattern": "^(pool1)[02-9ac-hj-np-z]*$", + "examples": [ + "pool12a39rkzfylvn9wfe8j6y8ucq6g2l4mw4azj70y0gd8ejczznyj2" + ] + }, + "PoolParams": { + "title": "PoolParams", + "type": "object", + "properties": { + "operator": { + "$ref": "cardano-babbage.json#/definitions/PoolPubKeyHash" + }, + "vrf_keyhash": { + "$ref": "cardano-babbage.json#/definitions/VRFKeyHash" + }, + "pledge": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "cost": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "margin": { + "$ref": "cardano-babbage.json#/definitions/UnitInterval" + }, + "reward_account": { + "$ref": "cardano-babbage.json#/definitions/RewardAddress" + }, + "pool_owners": { + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/Ed25519KeyHash" + } + }, + "relays": { + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/Relay" + } + }, + "pool_metadata": { + "$ref": "cardano-babbage.json#/definitions/PoolMetadata" + } + }, + "required": [ + "cost", + "margin", + "operator", + "pledge", + "pool_owners", + "relays", + "reward_account", + "vrf_keyhash" + ], + "unevaluatedProperties": false + }, + "GenesisHash": { + "title": "GenesisHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{56}$" + }, + "GenesisDelegateHash": { + "title": "GenesisDelegateHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{56}$" + }, + "MIRPot": { + "title": "MIRPot", + "enum": [ + "reserves", + "treasury" + ] + }, + "MoveInstantaneousRewards": { + "title": "MoveInstantaneousRewards", + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "type": "object", + "title": "Move Instantaneous Rewards to stake credentials", + "properties": { + "tag": { + "enum": [ + "to_stake_creds" + ] + }, + "pot": { + "$ref": "cardano-babbage.json#/definitions/MIRPot" + }, + "rewards": { + "title": "MIRToStakeCredentials", + "description": "Distribution of rewards", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "$ref": "cardano-babbage.json#/definitions/Credential" + }, + "value": { + "$ref": "cardano-babbage.json#/definitions/Int128" + } + }, + "required": [ + "key", + "value" + ], + "unevaluatedProperties": false + } + } + }, + "unevaluatedProperties": false, + "required": [ + "pot", + "rewards" + ] + }, + { + "type": "object", + "title": "Move Instantaneous Rewards to other Pot (reserves or treasury)", + "properties": { + "tag": { + "enum": [ + "to_other_pot" + ] + }, + "pot": { + "$ref": "cardano-babbage.json#/definitions/MIRPot" + }, + "amount": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + } + }, + "unevaluatedProperties": false, + "required": [ + "pot", + "amount" + ] + } + ] + }, + "Certificate": { + "title": "Certificate", + "type": "object", + "discriminator": { + "propertyName": "tag" + }, + "oneOf": [ + { + "type": "object", + "title": "Stake Registration Certificate", + "properties": { + "tag": { + "enum": [ + "stake_registration" + ] + }, + "credential": { + "$ref": "cardano-babbage.json#/definitions/Credential" + } + }, + "required": [ + "tag", + "credential" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Stake Deregistration Certificate", + "properties": { + "tag": { + "enum": [ + "stake_deregistration" + ] + }, + "credential": { + "$ref": "cardano-babbage.json#/definitions/Credential" + } + }, + "required": [ + "tag", + "credential" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Stake Delegation Certificate", + "properties": { + "tag": { + "enum": [ + "stake_delegation" + ] + }, + "credential": { + "$ref": "cardano-babbage.json#/definitions/Credential" + }, + "pool_keyhash": { + "$ref": "cardano-babbage.json#/definitions/PoolPubKeyHash" + } + }, + "required": [ + "tag", + "credential", + "pool_keyhash" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Pool Registration Certificate", + "properties": { + "tag": { + "enum": [ + "pool_registration" + ] + }, + "pool_params": { + "$ref": "cardano-babbage.json#/definitions/PoolParams" + } + }, + "required": [ + "tag", + "pool_params" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Pool Retirement Certificate", + "properties": { + "tag": { + "type": "string", + "enum": [ + "pool_retirement" + ] + }, + "pool_keyhash": { + "$ref": "cardano-babbage.json#/definitions/PoolPubKeyHash" + }, + "epoch": { + "$ref": "cardano-babbage.json#/definitions/UInt32" + } + }, + "required": [ + "tag", + "pool_keyhash", + "epoch" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Genesis Key Delegation Certificate", + "properties": { + "tag": { + "type": "string", + "enum": [ + "genesis_key_delegation" + ] + }, + "genesis_hash": { + "$ref": "cardano-babbage.json#/definitions/GenesisHash" + }, + "genesis_delegate_hash": { + "$ref": "cardano-babbage.json#/definitions/GenesisDelegateHash" + }, + "vrf_keyhash": { + "$ref": "cardano-babbage.json#/definitions/VRFKeyHash" + } + }, + "required": [ + "tag", + "genesis_hash", + "genesis_delegate_hash", + "vrf_keyhash" + ], + "unevaluatedProperties": false + }, + { + "type": "object", + "title": "Move Instantaneous Rewards Certificate", + "properties": { + "tag": { + "enum": [ + "move_instantaneous_rewards" + ] + }, + "move_instantaneous_rewards": { + "$ref": "cardano-babbage.json#/definitions/MoveInstantaneousRewards" + } + }, + "required": [ + "tag", + "move_instantaneous_rewards" + ], + "unevaluatedProperties": false + } + ] + }, + "Language": { + "title": "Language", + "type": "string", + "enum": [ + "plutus_v1", + "plutus_v2" + ] + }, + "Mint": { + "title": "Mint", + "description": "Minting or burning of assets. A mapping from policy IDs (script hashes) to mappings from asset names to amounts (that can be negative). Allows for duplicate script hash keys.", + "type": "array", + "items": { + "type": "object", + "properties": { + "script_hash": { + "$ref": "cardano-babbage.json#/definitions/ScriptHash" + }, + "assets": { + "type": "array", + "items": { + "title": "Assets", + "type": "object", + "properties": { + "asset_name": { + "$ref": "cardano-babbage.json#/definitions/AssetName" + }, + "amount": { + "$ref": "cardano-babbage.json#/definitions/NonZeroInt64" + } + }, + "required": [ + "asset_name", + "amount" + ], + "unevaluatedProperties": false + } + } + }, + "required": [ + "script_hash", + "assets" + ], + "unevaluatedProperties": false + } + }, + "Ed25519Signature": { + "title": "Ed25519Signature", + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f]){64}$" + }, + "Ed25519PublicKey": { + "title": "Ed25519PublicKey", + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f]){32}$" + }, + "BootstrapWitness": { + "title": "BootstrapWitness", + "type": "object", + "properties": { + "attributes": { + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f])*$" + }, + "chain_code": { + "type": "string", + "format": "hex", + "pattern": "^([0-9a-f][0-9a-f]){32}$" + }, + "signature": { + "$ref": "cardano-babbage.json#/definitions/Ed25519Signature" + }, + "vkey": { + "$ref": "cardano-babbage.json#/definitions/Ed25519PublicKey" + } + }, + "required": [ + "attributes", + "chain_code", + "signature", + "vkey" + ], + "unevaluatedProperties": false + }, + "RedeemerTag": { + "title": "RedeemerTag", + "type": "string", + "enum": [ + "spend", + "mint", + "cert", + "reward" + ] + }, + "Redeemer": { + "title": "Redeemer", + "type": "object", + "properties": { + "data": { + "$ref": "cardano-babbage.json#/definitions/PlutusData" + }, + "tag": { + "$ref": "cardano-babbage.json#/definitions/RedeemerTag" + }, + "index": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "ex_units": { + "$ref": "cardano-babbage.json#/definitions/ExUnits" + } + }, + "required": [ + "data", + "tag", + "index", + "ex_units" + ], + "unevaluatedProperties": false + }, + "Vkeywitness": { + "title": "Vkeywitness", + "type": "object", + "properties": { + "vkey": { + "$ref": "cardano-babbage.json#/definitions/Ed25519PublicKey" + }, + "signature": { + "$ref": "cardano-babbage.json#/definitions/Ed25519Signature" + } + }, + "required": [ + "vkey", + "signature" + ], + "unevaluatedProperties": false + }, + "TransactionWitnessSet": { + "title": "TransactionWitnessSet", + "type": "object", + "properties": { + "bootstraps": { + "title": "BootstrapWitnesses", + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/BootstrapWitness" + } + }, + "native_scripts": { + "title": "NativeScripts", + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/NativeScript" + } + }, + "plutus_data": { + "type": "array", + "title": "PlutusList", + "items": { + "$ref": "cardano-babbage.json#/definitions/PlutusData" + } + }, + "plutus_scripts": { + "type": "array", + "title": "PlutusScripts", + "items": { + "$ref": "cardano-babbage.json#/definitions/PlutusScript" + } + }, + "redeemers": { + "type": "array", + "title": "Redeemers", + "items": { + "$ref": "cardano-babbage.json#/definitions/Redeemer" + } + }, + "vkeywitnesses": { + "type": "array", + "title": "VkeyWitnesses", + "items": { + "$ref": "cardano-babbage.json#/definitions/Vkeywitness" + } + } + }, + "required": [] + }, + "Transaction": { + "type": "object", + "title": "Transaction", + "properties": { + "auxiliary_data": { + "$ref": "cardano-babbage.json#/definitions/AuxiliaryData" + }, + "body": { + "$ref": "cardano-babbage.json#/definitions/TransactionBody" + }, + "is_valid": { + "type": "boolean" + }, + "witness_set": { + "$ref": "cardano-babbage.json#/definitions/TransactionWitnessSet" + } + }, + "required": [ + "body", + "is_valid", + "witness_set" + ], + "unevaluatedProperties": false + }, + "VRFCert": { + "title": "VRFCert", + "type": "object", + "properties": { + "output": { + "$ref": "cardano-babbage.json#/definitions/ByteString" + }, + "proof": { + "$ref": "cardano-babbage.json#/definitions/ByteString", + "type": "string", + "pattern": "^[0-9a-f]{160}$" + } + }, + "required": [ + "output", + "proof" + ], + "unevaluatedProperties": false + }, + "KESVKey": { + "title": "KESVKey", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{64}$", + "maxLength": 64, + "minLength": 64 + }, + "BlockHash": { + "title": "BlockHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{64}$", + "maxLength": 64, + "minLength": 64 + }, + "VRFVKey": { + "title": "VRFVKey", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{64}$", + "maxLength": 64, + "minLength": 64 + }, + "KESSignature": { + "title": "KESSignature", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{896}$", + "maxLength": 896, + "minLength": 896 + }, + "OperationalCert": { + "title": "OperationalCert", + "type": "object", + "properties": { + "hot_vkey": { + "$ref": "cardano-babbage.json#/definitions/KESVKey" + }, + "kes_period": { + "$ref": "cardano-babbage.json#/definitions/UInt32" + }, + "sequence_number": { + "$ref": "cardano-babbage.json#/definitions/UInt32" + }, + "sigma": { + "$ref": "cardano-babbage.json#/definitions/Ed25519Signature" + } + }, + "required": [ + "hot_vkey", + "kes_period", + "sequence_number", + "sigma" + ], + "unevaluatedProperties": false + }, + "HeaderBody": { + "title": "HeaderBody", + "type": "object", + "properties": { + "block_number": { + "$ref": "cardano-babbage.json#/definitions/UInt32" + }, + "slot": { + "$ref": "cardano-babbage.json#/definitions/UInt64" + }, + "prev_hash": { + "$ref": "cardano-babbage.json#/definitions/BlockHash" + }, + "issuer_vkey": { + "$ref": "cardano-babbage.json#/definitions/Ed25519PublicKey" + }, + "vrf_vkey": { + "$ref": "cardano-babbage.json#/definitions/VRFVKey" + }, + "vrf_result": { + "$ref": "cardano-babbage.json#/definitions/VRFCert" + }, + "block_body_size": { + "$ref": "cardano-babbage.json#/definitions/UInt32" + }, + "block_body_hash": { + "$ref": "cardano-babbage.json#/definitions/BlockHash" + }, + "operational_cert": { + "$ref": "cardano-babbage.json#/definitions/OperationalCert" + }, + "protocol_version": { + "$ref": "cardano-babbage.json#/definitions/ProtocolVersion" + } + }, + "unevaluatedProperties": false, + "required": [ + "block_number", + "slot", + "issuer_vkey", + "vrf_vkey", + "vrf_result", + "block_body_size", + "block_body_hash", + "operational_cert", + "protocol_version" + ] + }, + "Header": { + "title": "Header", + "type": "object", + "properties": { + "body_signature": { + "$ref": "cardano-babbage.json#/definitions/KESSignature" + }, + "header_body": { + "$ref": "cardano-babbage.json#/definitions/HeaderBody" + } + }, + "required": [ + "body_signature", + "header_body" + ], + "unevaluatedProperties": false + }, + "Block": { + "title": "Block", + "type": "object", + "properties": { + "auxiliary_data_set": { + "type": "object", + "title": "AuxiliaryDataSet", + "description": "A mapping from transaction indices to AuxiliaryData values", + "patternProperties": { + "^(0|[1-9][0-9]*)$": { + "$ref": "cardano-babbage.json#/definitions/AuxiliaryData" + } + }, + "unevaluatedProperties": false + }, + "header": { + "$ref": "cardano-babbage.json#/definitions/Header" + }, + "invalid_transactions": { + "type": "array", + "items": { + "allOf": [ + { + "title": "TransactionIndex" + }, + { + "$ref": "cardano-babbage.json#/definitions/UInt32" + } + ] + } + }, + "transaction_bodies": { + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/TransactionBody" + } + }, + "transaction_witness_sets": { + "type": "array", + "items": { + "$ref": "cardano-babbage.json#/definitions/TransactionWitnessSet" + } + } + }, + "unevaluatedProperties": false, + "required": [ + "auxiliary_data_set", + "header", + "invalid_transactions", + "transaction_bodies", + "transaction_witness_sets" + ] + } + } + }, + "query-layer.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "query-layer.json", + "title": "Cardano Query Layer Types", + "definitions": { + "UInt16": { + "title": "UInt16", + "description": "16-bit unsigned integer", + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "format": "uint16" + }, + "UInt32": { + "title": "UInt32", + "description": "32-bit unsigned integer", + "type": "integer", + "minimum": 0, + "maximum": 4294967295 + }, + "UInt64": { + "title": "UInt64", + "description": "64-bit unsigned integer", + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "format": "uint64" + }, + "PosInt64": { + "title": "PosInt64", + "description": "64-bit unsigned integer, zero-excluded. 1-18446744073709551615", + "type": "string", + "pattern": "^([1-9][0-9]*)$", + "format": "posint64" + }, + "Int128": { + "title": "Int128", + "description": "128-bit signed integer", + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "format": "int128" + }, + "DRepId": { + "title": "DRepId", + "type": "string", + "format": "bech32", + "pattern": "^(drep1)[02-9ac-hj-np-z]*$", + "examples": [ + "drep1ygqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq7vlc9n" + ] + }, + "CCColdId": { + "title": "CCColdId", + "type": "string", + "format": "bech32", + "pattern": "^(cc_cold1)[02-9ac-hj-np-z]*$", + "examples": [ + "cc_cold1zvqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6kflvs" + ] + }, + "CCHotId": { + "title": "CCHotId", + "type": "string", + "format": "bech32", + "pattern": "^(cc_hot1)[02-9ac-hj-np-z]*$", + "examples": [ + "cc_hot1qgqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvcdjk7" + ] + }, + "ProposalId": { + "title": "ProposalId", + "type": "string", + "format": "bech32", + "pattern": "^(gov_action1)[02-9ac-hj-np-z]*$", + "examples": [ + "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf" + ] + }, + "PoolPubKeyHash": { + "title": "PoolPubKeyHash", + "type": "string", + "format": "bech32", + "pattern": "^(pool1)[02-9ac-hj-np-z]*$", + "examples": [ + "pool12a39rkzfylvn9wfe8j6y8ucq6g2l4mw4azj70y0gd8ejczznyj2" + ] + }, + "TransactionHash": { + "title": "TransactionHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{64}$", + "maxLength": 64, + "minLength": 64, + "examples": [ + "eca40340fa6e65d964915ba4bc8bd811a0493d263ffe95875291114cbb2d0686", + "7420a723bf4ee4417ec1aa2262ff60921270681e7a9d537132cbcc82917e8006", + "fbc1da46d62a431e69855ad48a6b49b0e2aaafc6fd3dc4a066c6851b7bd31a91", + "c6726192662abeab149098095eabe004ecbec47f5e564748ab0d394affca47d9" + ] + }, + "Vote": { + "title": "Vote", + "type": "string", + "enum": [ + "yes", + "no", + "abstain" + ] + }, + "PlutusV1CostModel": { + "title": "PlutusV1CostModel", + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/Int128" + }, + "maxItems": 166, + "minItems": 166 + }, + "PlutusV2CostModel": { + "title": "PlutusV2CostModel", + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/Int128" + }, + "maxItems": 175, + "minItems": 175 + }, + "PlutusV3CostModel": { + "title": "PlutusV3CostModel", + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/Int128" + }, + "maxItems": 251, + "minItems": 251 + }, + "CostModels": { + "title": "CostModels", + "type": "object", + "properties": { + "plutus_v1": { + "$ref": "query-layer.json#/definitions/PlutusV1CostModel" + }, + "plutus_v2": { + "$ref": "query-layer.json#/definitions/PlutusV2CostModel" + }, + "plutus_v3": { + "$ref": "query-layer.json#/definitions/PlutusV3CostModel" + } + }, + "required": [], + "unevaluatedProperties": false + }, + "UnitInterval": { + "title": "UnitInterval", + "type": "object", + "properties": { + "numerator": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "denominator": { + "$ref": "query-layer.json#/definitions/UInt64" + } + }, + "required": [ + "numerator", + "denominator" + ], + "unevaluatedProperties": false + }, + "NonnegativeInterval": { + "title": "NonnegativeInterval", + "type": "object", + "properties": { + "numerator": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "denominator": { + "$ref": "query-layer.json#/definitions/PosInt64" + } + }, + "required": [ + "numerator", + "denominator" + ], + "unevaluatedProperties": false + }, + "ExUnitPrices": { + "title": "ExUnitPrices", + "type": "object", + "properties": { + "mem_price": { + "$ref": "query-layer.json#/definitions/UnitInterval" + }, + "step_price": { + "$ref": "query-layer.json#/definitions/UnitInterval" + } + }, + "unevaluatedProperties": false, + "required": [ + "mem_price", + "step_price" + ] + }, + "ExUnits": { + "title": "ExUnits", + "type": "object", + "properties": { + "mem": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "steps": { + "$ref": "query-layer.json#/definitions/UInt64" + } + }, + "required": [ + "mem", + "steps" + ], + "unevaluatedProperties": false + }, + "ProtocolVersion": { + "title": "ProtocolVersion", + "type": "object", + "properties": { + "major": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "minor": { + "$ref": "query-layer.json#/definitions/UInt32" + } + }, + "required": [ + "major", + "minor" + ], + "unevaluatedProperties": false + }, + "PoolVotingThresholds": { + "title": "PoolVotingThresholds", + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/UnitInterval" + }, + "minItems": 5, + "maxItems": 5 + }, + "DRepVotingThresholds": { + "title": "DRepVotingThresholds", + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/UnitInterval" + }, + "minItems": 10, + "maxItems": 10 + }, + "ProtocolParamUpdate": { + "title": "ProtocolParamUpdate", + "type": "object", + "properties": { + "ada_per_utxo_byte": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "collateral_percentage": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "cost_models": { + "$ref": "query-layer.json#/definitions/CostModels" + }, + "d": { + "$ref": "query-layer.json#/definitions/UnitInterval" + }, + "execution_costs": { + "$ref": "query-layer.json#/definitions/ExUnitPrices" + }, + "expansion_rate": { + "$ref": "query-layer.json#/definitions/UnitInterval" + }, + "key_deposit": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "max_block_body_size": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "max_block_ex_units": { + "$ref": "query-layer.json#/definitions/ExUnits" + }, + "max_block_header_size": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "max_collateral_inputs": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "max_epoch": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "max_tx_ex_units": { + "$ref": "query-layer.json#/definitions/ExUnits" + }, + "max_tx_size": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "max_value_size": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "min_pool_cost": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "minfee_a": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "minfee_b": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "n_opt": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "pool_deposit": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "pool_pledge_influence": { + "$ref": "query-layer.json#/definitions/UnitInterval" + }, + "protocol_version": { + "$ref": "query-layer.json#/definitions/ProtocolVersion" + }, + "treasury_growth_rate": { + "$ref": "query-layer.json#/definitions/UnitInterval" + }, + "pool_voting_thresholds": { + "$ref": "query-layer.json#/definitions/PoolVotingThresholds" + }, + "drep_voting_thresholds": { + "$ref": "query-layer.json#/definitions/DRepVotingThresholds" + }, + "committee_min_size": { + "$ref": "query-layer.json#/definitions/UInt16" + }, + "committee_max_term_length": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "gov_action_lifetime": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "gov_action_deposit": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "drep_deposit": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "drep_activity": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "min_fee_ref_script_cost_per_byte": { + "$ref": "query-layer.json#/definitions/NonnegativeInterval" + } + }, + "unevaluatedProperties": false, + "required": [] + }, + "ProtocolParams": { + "title": "ProtocolParams", + "type": "object", + "description": "Protocol parameters", + "allOf": [ + { + "$ref": "query-layer.json#/definitions/ProtocolParamUpdate" + } + ], + "required": [ + "ada_per_utxo_byte", + "collateral_percentage", + "cost_models", + "d", + "execution_costs", + "expansion_rate", + "key_deposit", + "max_block_body_size", + "max_block_ex_units", + "max_block_header_size", + "max_collateral_inputs", + "max_epoch", + "max_tx_ex_units", + "max_tx_size", + "max_value_size", + "min_pool_cost", + "minfee_a", + "minfee_b", + "n_opt", + "pool_deposit", + "pool_pledge_influence", + "protocol_version", + "treasury_growth_rate", + "pool_voting_thresholds", + "drep_voting_thresholds", + "committee_min_size", + "committee_max_term_length", + "gov_action_lifetime", + "gov_action_deposit", + "drep_deposit", + "drep_activity", + "min_fee_ref_script_cost_per_byte" + ], + "unevaluatedProperties": false + }, + "DRepInfo": { + "type": "object", + "title": "DRepInfo", + "properties": { + "drep_id": { + "$ref": "query-layer.json#/definitions/DRepId" + }, + "amount": { + "$ref": "query-layer.json#/definitions/PosInt64" + }, + "active": { + "type": "boolean" + } + }, + "required": [ + "drep_id", + "amount", + "active" + ], + "unevaluatedProperties": false + }, + "CCMember": { + "type": "object", + "title": "CCMember", + "properties": { + "cc_cold_key": { + "$ref": "query-layer.json#/definitions/CCColdId" + }, + "cc_hot_key": { + "$ref": "query-layer.json#/definitions/CCHotId" + }, + "status": { + "type": "string", + "enum": [ + "authorised", + "not_authorised", + "resigned" + ] + } + }, + "required": [ + "cc_cold_key", + "cc_hot_key", + "status" + ], + "unevaluatedProperties": false + }, + "Pool": { + "type": "object", + "title": "Pool", + "properties": { + "pool_id": { + "$ref": "query-layer.json#/definitions/PoolPubKeyHash" + }, + "status": { + "type": "string", + "enum": [ + "active", + "retiring", + "retired" + ] + }, + "active_stake": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "live_stake": { + "$ref": "query-layer.json#/definitions/UInt64" + } + }, + "required": [ + "pool_id", + "status", + "active_stake", + "live_stake" + ], + "unevaluatedProperties": false + }, + "Proposal": { + "type": "object", + "title": "Proposal", + "properties": { + "proposal_id": { + "$ref": "query-layer.json#/definitions/ProposalId" + }, + "ratified_epoch": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "enacted_epoch": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "expired_epoch": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "expiration": { + "$ref": "query-layer.json#/definitions/UInt32" + } + }, + "required": [ + "proposal_id" + ], + "unevaluatedProperties": false + }, + "VoteInfo": { + "type": "object", + "title": "VoteInfo", + "properties": { + "proposal_id": { + "$ref": "query-layer.json#/definitions/ProposalId" + }, + "vote_tx_hash": { + "$ref": "query-layer.json#/definitions/TransactionHash" + }, + "vote": { + "$ref": "query-layer.json#/definitions/Vote" + } + }, + "required": [ + "proposal_id", + "vote_tx_hash", + "vote" + ] + }, + "EraInfo": { + "type": "object", + "title": "EraInfo", + "properties": { + "time": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "slot": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "epoch": { + "$ref": "query-layer.json#/definitions/UInt32" + } + }, + "required": [ + "time", + "slot", + "epoch" + ] + }, + "EraParameters": { + "type": "object", + "title": "EraParameters", + "properties": { + "epoch_length": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "slot_length": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "safe_zone": { + "$ref": "query-layer.json#/definitions/UInt32" + } + }, + "required": [ + "epoch_length", + "slot_length", + "safe_zone" + ] + }, + "EraSummary": { + "type": "object", + "title": "EraSummary", + "properties": { + "start": { + "$ref": "query-layer.json#/definitions/EraInfo" + }, + "end": { + "$ref": "query-layer.json#/definitions/EraInfo" + }, + "parameters": { + "$ref": "query-layer.json#/definitions/EraParameters" + } + }, + "required": [ + "start", + "end", + "parameters" + ] + } + } + } + } + } +} diff --git a/CIP-0139/query-layer.json b/CIP-0139/query-layer.json new file mode 100644 index 0000000000..a06b3e7b45 --- /dev/null +++ b/CIP-0139/query-layer.json @@ -0,0 +1,541 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "query-layer.json", + "title": "Cardano Query Layer Types", + "definitions": { + "UInt16": { + "title": "UInt16", + "description": "16-bit unsigned integer", + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "format": "uint16" + }, + "UInt32": { + "title": "UInt32", + "description": "32-bit unsigned integer", + "type": "integer", + "minimum": 0, + "maximum": 4294967295 + }, + "UInt64": { + "title": "UInt64", + "description": "64-bit unsigned integer", + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "format": "uint64" + }, + "PosInt64": { + "title": "PosInt64", + "description": "64-bit unsigned integer, zero-excluded. 1-18446744073709551615", + "type": "string", + "pattern": "^([1-9][0-9]*)$", + "format": "posint64" + }, + "Int128": { + "title": "Int128", + "description": "128-bit signed integer", + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "format": "int128" + }, + "DRepId": { + "title": "DRepId", + "type": "string", + "format": "bech32", + "pattern": "^(drep1)[02-9ac-hj-np-z]*$", + "examples": [ + "drep1ygqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq7vlc9n" + ] + }, + "CCColdId": { + "title": "CCColdId", + "type": "string", + "format": "bech32", + "pattern": "^(cc_cold1)[02-9ac-hj-np-z]*$", + "examples": [ + "cc_cold1zvqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6kflvs" + ] + }, + "CCHotId": { + "title": "CCHotId", + "type": "string", + "format": "bech32", + "pattern": "^(cc_hot1)[02-9ac-hj-np-z]*$", + "examples": [ + "cc_hot1qgqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvcdjk7" + ] + }, + "ProposalId": { + "title": "ProposalId", + "type": "string", + "format": "bech32", + "pattern": "^(gov_action1)[02-9ac-hj-np-z]*$", + "examples": [ + "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf" + ] + }, + "PoolPubKeyHash": { + "title": "PoolPubKeyHash", + "type": "string", + "format": "bech32", + "pattern": "^(pool1)[02-9ac-hj-np-z]*$", + "examples": [ + "pool12a39rkzfylvn9wfe8j6y8ucq6g2l4mw4azj70y0gd8ejczznyj2" + ] + }, + "TransactionHash": { + "title": "TransactionHash", + "type": "string", + "format": "hex", + "pattern": "^[0-9a-f]{64}$", + "maxLength": 64, + "minLength": 64, + "examples": [ + "eca40340fa6e65d964915ba4bc8bd811a0493d263ffe95875291114cbb2d0686", + "7420a723bf4ee4417ec1aa2262ff60921270681e7a9d537132cbcc82917e8006", + "fbc1da46d62a431e69855ad48a6b49b0e2aaafc6fd3dc4a066c6851b7bd31a91", + "c6726192662abeab149098095eabe004ecbec47f5e564748ab0d394affca47d9" + ] + }, + "Vote": { + "title": "Vote", + "type": "string", + "enum": [ + "yes", + "no", + "abstain" + ] + }, + "PlutusV1CostModel": { + "title": "PlutusV1CostModel", + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/Int128" + }, + "maxItems": 166, + "minItems": 166 + }, + "PlutusV2CostModel": { + "title": "PlutusV2CostModel", + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/Int128" + }, + "maxItems": 175, + "minItems": 175 + }, + "PlutusV3CostModel": { + "title": "PlutusV3CostModel", + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/Int128" + }, + "maxItems": 251, + "minItems": 251 + }, + "CostModels": { + "title": "CostModels", + "type": "object", + "properties": { + "plutus_v1": { + "$ref": "query-layer.json#/definitions/PlutusV1CostModel" + }, + "plutus_v2": { + "$ref": "query-layer.json#/definitions/PlutusV2CostModel" + }, + "plutus_v3": { + "$ref": "query-layer.json#/definitions/PlutusV3CostModel" + } + }, + "required": [], + "unevaluatedProperties": false + }, + "UnitInterval": { + "title": "UnitInterval", + "type": "object", + "properties": { + "numerator": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "denominator": { + "$ref": "query-layer.json#/definitions/UInt64" + } + }, + "required": ["numerator", "denominator"], + "unevaluatedProperties": false + }, + "NonnegativeInterval": { + "title": "NonnegativeInterval", + "type": "object", + "properties": { + "numerator": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "denominator": { + "$ref": "query-layer.json#/definitions/PosInt64" + } + }, + "required": ["numerator", "denominator"], + "unevaluatedProperties": false + }, + "ExUnitPrices": { + "title": "ExUnitPrices", + "type": "object", + "properties": { + "mem_price": { + "$ref": "query-layer.json#/definitions/UnitInterval" + }, + "step_price": { + "$ref": "query-layer.json#/definitions/UnitInterval" + } + }, + "unevaluatedProperties": false, + "required": [ + "mem_price", + "step_price" + ] + }, + "ExUnits": { + "title": "ExUnits", + "type": "object", + "properties": { + "mem": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "steps": { + "$ref": "query-layer.json#/definitions/UInt64" + } + }, + "required": [ + "mem", + "steps" + ], + "unevaluatedProperties": false + }, + "ProtocolVersion": { + "title": "ProtocolVersion", + "type": "object", + "properties": { + "major": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "minor": { + "$ref": "query-layer.json#/definitions/UInt32" + } + }, + "required": [ + "major", + "minor" + ], + "unevaluatedProperties": false + }, + "PoolVotingThresholds": { + "title": "PoolVotingThresholds", + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/UnitInterval" + }, + "minItems": 5, + "maxItems": 5 + }, + "DRepVotingThresholds": { + "title": "DRepVotingThresholds", + "type": "array", + "items": { + "$ref": "query-layer.json#/definitions/UnitInterval" + }, + "minItems": 10, + "maxItems": 10 + }, + "ProtocolParamUpdate": { + "title": "ProtocolParamUpdate", + "type": "object", + "properties": { + "ada_per_utxo_byte": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "collateral_percentage": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "cost_models": { + "$ref": "query-layer.json#/definitions/CostModels" + }, + "d": { + "$ref": "query-layer.json#/definitions/UnitInterval" + }, + "execution_costs": { + "$ref": "query-layer.json#/definitions/ExUnitPrices" + }, + "expansion_rate": { + "$ref": "query-layer.json#/definitions/UnitInterval" + }, + "key_deposit": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "max_block_body_size": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "max_block_ex_units": { + "$ref": "query-layer.json#/definitions/ExUnits" + }, + "max_block_header_size": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "max_collateral_inputs": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "max_epoch": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "max_tx_ex_units": { + "$ref": "query-layer.json#/definitions/ExUnits" + }, + "max_tx_size": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "max_value_size": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "min_pool_cost": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "minfee_a": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "minfee_b": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "n_opt": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "pool_deposit": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "pool_pledge_influence": { + "$ref": "query-layer.json#/definitions/UnitInterval" + }, + "protocol_version": { + "$ref": "query-layer.json#/definitions/ProtocolVersion" + }, + "treasury_growth_rate": { + "$ref": "query-layer.json#/definitions/UnitInterval" + }, + "pool_voting_thresholds": { + "$ref": "query-layer.json#/definitions/PoolVotingThresholds" + }, + "drep_voting_thresholds": { + "$ref": "query-layer.json#/definitions/DRepVotingThresholds" + }, + "committee_min_size": { + "$ref": "query-layer.json#/definitions/UInt16" + }, + "committee_max_term_length": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "gov_action_lifetime": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "gov_action_deposit": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "drep_deposit": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "drep_activity": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "min_fee_ref_script_cost_per_byte": { + "$ref": "query-layer.json#/definitions/NonnegativeInterval" + } + }, + "unevaluatedProperties": false, + "required": [] + }, + "ProtocolParams": { + "title": "ProtocolParams", + "type": "object", + "description": "Protocol parameters", + "allOf": [{ + "$ref": "query-layer.json#/definitions/ProtocolParamUpdate" + }], + "required": [ + "ada_per_utxo_byte", + "collateral_percentage", + "cost_models", + "d", + "execution_costs", + "expansion_rate", + "key_deposit", + "max_block_body_size", + "max_block_ex_units", + "max_block_header_size", + "max_collateral_inputs", + "max_epoch", + "max_tx_ex_units", + "max_tx_size", + "max_value_size", + "min_pool_cost", + "minfee_a", + "minfee_b", + "n_opt", + "pool_deposit", + "pool_pledge_influence", + "protocol_version", + "treasury_growth_rate", + "pool_voting_thresholds", + "drep_voting_thresholds", + "committee_min_size", + "committee_max_term_length", + "gov_action_lifetime", + "gov_action_deposit", + "drep_deposit", + "drep_activity", + "min_fee_ref_script_cost_per_byte" + ], + "unevaluatedProperties": false + }, + "DRepInfo": { + "type": "object", + "title": "DRepInfo", + "properties": { + "drep_id": { + "$ref": "query-layer.json#/definitions/DRepId" + }, + "amount": { + "$ref": "query-layer.json#/definitions/PosInt64" + }, + "active": { + "type": "boolean" + } + }, + "required": ["drep_id", "amount", "active"], + "unevaluatedProperties": false + }, + "CCMember": { + "type": "object", + "title": "CCMember", + "properties": { + "cc_cold_key": { + "$ref": "query-layer.json#/definitions/CCColdId" + }, + "cc_hot_key": { + "$ref": "query-layer.json#/definitions/CCHotId" + }, + "status": { + "type": "string", + "enum": ["authorised", "not_authorised", "resigned"] + } + }, + "required": ["cc_cold_key", "cc_hot_key", "status"], + "unevaluatedProperties": false + }, + "Pool": { + "type": "object", + "title": "Pool", + "properties": { + "pool_id": { + "$ref": "query-layer.json#/definitions/PoolPubKeyHash" + }, + "status": { + "type": "string", + "enum": ["active", "retiring", "retired"] + }, + "active_stake": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "live_stake": { + "$ref": "query-layer.json#/definitions/UInt64" + } + }, + "required": ["pool_id", "status", "active_stake", "live_stake"], + "unevaluatedProperties": false + }, + "Proposal": { + "type": "object", + "title": "Proposal", + "properties": { + "proposal_id": { + "$ref": "query-layer.json#/definitions/ProposalId" + }, + "ratified_epoch": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "enacted_epoch": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "expired_epoch": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "expiration": { + "$ref": "query-layer.json#/definitions/UInt32" + } + }, + "required": ["proposal_id"], + "unevaluatedProperties": false + }, + "VoteInfo": { + "type": "object", + "title": "VoteInfo", + "properties": { + "proposal_id": { + "$ref": "query-layer.json#/definitions/ProposalId" + }, + "vote_tx_hash": { + "$ref": "query-layer.json#/definitions/TransactionHash" + }, + "vote": { + "$ref": "query-layer.json#/definitions/Vote" + } + }, + "required": ["proposal_id", "vote_tx_hash", "vote"] + }, + "EraInfo": { + "type": "object", + "title": "EraInfo", + "properties": { + "time": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "slot": { + "$ref": "query-layer.json#/definitions/UInt64" + }, + "epoch": { + "$ref": "query-layer.json#/definitions/UInt32" + } + }, + "required": ["time", "slot", "epoch"] + }, + "EraParameters": { + "type": "object", + "title": "EraParameters", + "properties": { + "epoch_length": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "slot_length": { + "$ref": "query-layer.json#/definitions/UInt32" + }, + "safe_zone": { + "$ref": "query-layer.json#/definitions/UInt32" + } + }, + "required": ["epoch_length", "slot_length", "safe_zone"] + }, + "EraSummary": { + "type": "object", + "title": "EraSummary", + "properties": { + "start": { + "$ref": "query-layer.json#/definitions/EraInfo" + }, + "end": { + "$ref": "query-layer.json#/definitions/EraInfo" + }, + "parameters": { + "$ref": "query-layer.json#/definitions/EraParameters" + } + }, + "required": ["start", "end", "parameters"] + } + } +} diff --git a/CIP-0139/ts-api.md b/CIP-0139/ts-api.md new file mode 100644 index 0000000000..643a0a7452 --- /dev/null +++ b/CIP-0139/ts-api.md @@ -0,0 +1,151 @@ +## TS API + +In this document we list the API endpoints as methods of an Typescript object called `api`. Implementations are free to add further namespaces, as long as they implement an object with the following methods: + +### Utxos + +#### `api.query.utxos.asset(asset_name: AssetName, minting_policy_hash: ScriptHash) : Promise` + +Get all UTxOs that contain some of the specified asset + +#### `api.query.utxos.transaction_hash(transaction_hash: TransactionHash) : Promise` + +Get all UTxOs produced by the transaction + +#### `api.query.utxos.address(address: Address) : Promise` + +Get all UTxOs present at the address + +#### `api.query.utxos.payment_credential(credential: Credential) : Promise` + +Get all UTxOs present at the addresses which use the payment credential + +#### `api.query.utxos.stake_credential(reward_address: RewardAddress) : Promise` + +Get all UTxOs present at the addresses which use the stake credential + +### Block + +#### `api.query.block.number(u_int64: UInt64) : Promise` + +Get the block with the supplied block number + +#### `api.query.block.hash(block_hash: BlockHash) : Promise` + +Get the block with the supplied block hash + +### Transaction + +#### `api.query.transaction.hash(transaction_hash: TransactionHash) : Promise` + +Get the transaction with the supplied transaction hash + +#### `api.query.transaction.block_number(u_int64: UInt64) : Promise` + +Get all transactions contained in the block with the supplied block number [] + +#### `api.query.transaction.block_hash(block_hash: BlockHash) : Promise` + +Get all transactions contained in the block with the supplied block hash + +### Datum + +#### `api.query.datum.hash(data_hash: DataHash) : Promise` + +Get the datum that hashes to the supplied data hash + +### Plutus Script + +#### `api.query.plutus_script.hash(script_hash: ScriptHash) : Promise` + +Get the plutus script that hashes to the supplied script hash + +### Native Script + +#### `api.query.native_script.hash(script_hash: ScriptHash) : Promise` + +Get the native script that hashes to the supplied script hash + +### Metadata + +#### `api.query.metadata.transaction_hash(transaction_hash: TransactionHash) : Promise` + +Get the metadata present on the transaction with the supplied transaction hash + +### Protocol Parameters + +#### `api.query.protocol_parameters.latest() : Promise` + +Get the latest protocol parameters + +#### `api.query.protocol_parameters.epoch(u_int32: UInt32) : Promise` + +Get the protocol parameters at the supplied epoch number + +### Votes + +#### `api.query.votes.cc_id(cc_hot_id: CCHotId) : Promise` + +Votes cast by the supplied cc credential + +#### `api.query.votes.spo_id(pool_pubkeyhash: PoolPubKeyHash) : Promise` + +Votes cast by the supplied stake pool operator + +#### `api.query.votes.drep_id(drep_id: DRepId) : Promise` + +Votes cast by the supplied DRep + +#### `api.query.votes.proposal_id(proposal_id: ProposalId) : Promise` + +Votes cast on the supplied proposal + +### Drep + +#### `api.query.drep.all() : Promise` + +Get all the known DReps + +#### `api.query.drep.id(drep_id: DRepId) : Promise` + +Get a specific DRep by id + +#### `api.query.drep.stake_credential(reward_address: RewardAddress) : Promise` + +Get the DRep that the stake credential has delegated to + +### Committee + +#### `api.query.committee.all() : Promise` + +Get all known committee members + +#### `api.query.committee.id(cc_hot_id: CCHotId) : Promise` + +Get a specific Committee member by id + +### Pool + +#### `api.query.pool.all() : Promise` + +Get all known stake pools + +#### `api.query.pool.id(pool_pubkeyhash: PoolPubKeyHash) : Promise` + +Get a specific stake pool by id + +### Proposal + +#### `api.query.proposal.all() : Promise` + +Get all known proposals + +#### `api.query.proposal.id(proposal_id: ProposalId) : Promise` + +Get a specific proposal by id + +### Era + +#### `api.query.era.summary() : Promise` + +Get the start and end of each era along with parameters that can vary between hard forks