From 40c82c7a263c8d12f52377681f8b640cae02e1ee Mon Sep 17 00:00:00 2001 From: Priyank <3169068+rdlrt@users.noreply.github.com> Date: Tue, 12 Sep 2023 10:37:08 +1000 Subject: [PATCH] Fixes discovered during schemathesis tests --- files/grest/rpc/account/account_addresses.sql | 8 +- files/grest/rpc/account/account_txs.sql | 4 +- files/grest/rpc/address/address_txs.sql | 4 +- files/grest/rpc/address/credential_txs.sql | 4 +- files/grest/rpc/assets/asset_addresses.sql | 2 +- files/grest/rpc/assets/asset_txs.sql | 1 + files/grest/rpc/assets/asset_utxos.sql | 5 +- .../rpc/assets/policy_asset_addresses.sql | 2 +- files/grest/rpc/pool/pool_metadata.sql | 6 +- specs/results/koiosapi-guild.yaml | 338 +++++++++--------- specs/results/koiosapi-mainnet.yaml | 332 ++++++++--------- specs/results/koiosapi-preprod.yaml | 332 ++++++++--------- specs/results/koiosapi-preview.yaml | 332 ++++++++--------- specs/templates/3-api-requestBodies.yaml | 3 +- specs/templates/api-main.yaml | 325 ++++++++--------- specs/templates/example-map.json | 10 +- 16 files changed, 858 insertions(+), 850 deletions(-) diff --git a/files/grest/rpc/account/account_addresses.sql b/files/grest/rpc/account/account_addresses.sql index 5cf301e4..b3039088 100644 --- a/files/grest/rpc/account/account_addresses.sql +++ b/files/grest/rpc/account/account_addresses.sql @@ -28,9 +28,8 @@ BEGIN txo.stake_address_id, txo.id FROM tx_out AS txo - WHERE - txo.stake_address_id = ANY(sa_id_list) - AND tx_out.consumed_by_tx_in_id IS NULL + WHERE txo.stake_address_id = ANY(sa_id_list) + AND txo.consumed_by_tx_in_id IS NULL ) AS x ) @@ -55,8 +54,7 @@ BEGIN txo.stake_address_id, txo.id FROM tx_out AS txo - WHERE - txo.stake_address_id = ANY(sa_id_list) + WHERE txo.stake_address_id = ANY(sa_id_list) LIMIT (CASE WHEN _first_only IS TRUE THEN 1 ELSE NULL END) ) AS x ) diff --git a/files/grest/rpc/account/account_txs.sql b/files/grest/rpc/account/account_txs.sql index bcf8c76b..d44455a2 100644 --- a/files/grest/rpc/account/account_txs.sql +++ b/files/grest/rpc/account/account_txs.sql @@ -45,8 +45,8 @@ BEGIN FROM public.tx INNER JOIN public.block AS b ON b.id = tx.block_id WHERE tx.id = ANY(_tx_id_list) - AND block.block_no >= _after_block_height - ORDER BY block.block_no DESC; + AND b.block_no >= _after_block_height + ORDER BY b.block_no DESC; END; $$; diff --git a/files/grest/rpc/address/address_txs.sql b/files/grest/rpc/address/address_txs.sql index 743ea71f..a40fe57e 100644 --- a/files/grest/rpc/address/address_txs.sql +++ b/files/grest/rpc/address/address_txs.sql @@ -44,8 +44,8 @@ BEGIN FROM public.tx INNER JOIN public.block AS b ON b.id = tx.block_id WHERE tx.id = ANY(_tx_id_list) - AND block.block_no >= _after_block_height - ORDER BY block.block_no DESC; + AND b.block_no >= _after_block_height + ORDER BY b.block_no DESC; END; $$; diff --git a/files/grest/rpc/address/credential_txs.sql b/files/grest/rpc/address/credential_txs.sql index e3ad6a4e..780423d7 100644 --- a/files/grest/rpc/address/credential_txs.sql +++ b/files/grest/rpc/address/credential_txs.sql @@ -52,8 +52,8 @@ BEGIN FROM public.tx INNER JOIN public.block AS b ON b.id = tx.block_id WHERE tx.id = ANY(_tx_id_list) - AND block.block_no >= _after_block_height - ORDER BY block.block_no DESC; + AND b.block_no >= _after_block_height + ORDER BY b.block_no DESC; END; $$; diff --git a/files/grest/rpc/assets/asset_addresses.sql b/files/grest/rpc/assets/asset_addresses.sql index 8216671c..dd6d605d 100644 --- a/files/grest/rpc/assets/asset_addresses.sql +++ b/files/grest/rpc/assets/asset_addresses.sql @@ -45,7 +45,7 @@ BEGIN FROM ma_tx_out AS mto INNER JOIN tx_out AS txo ON txo.id = mto.tx_out_id WHERE mto.ident = _asset_id - AND tx_out.consumed_by_tx_in_id IS NULL + AND txo.consumed_by_tx_in_id IS NULL ) AS x GROUP BY x.address; END; diff --git a/files/grest/rpc/assets/asset_txs.sql b/files/grest/rpc/assets/asset_txs.sql index 01d950f2..8c426b8e 100644 --- a/files/grest/rpc/assets/asset_txs.sql +++ b/files/grest/rpc/assets/asset_txs.sql @@ -54,6 +54,7 @@ BEGIN GROUP BY ident, tx.hash, + txo.index::smallint, block.epoch_no, block.block_no, block.time diff --git a/files/grest/rpc/assets/asset_utxos.sql b/files/grest/rpc/assets/asset_utxos.sql index 8af487b3..9fd7ed86 100644 --- a/files/grest/rpc/assets/asset_utxos.sql +++ b/files/grest/rpc/assets/asset_utxos.sql @@ -97,9 +97,8 @@ BEGIN LEFT JOIN block AS b ON b.id = tx.block_id LEFT JOIN datum ON datum.id = tx_out.inline_datum_id LEFT JOIN script ON script.tx_id = tx_out.reference_script_id - LEFT JOIN _assets ON tx_out.id = _assets.id - WHERE mto.ident = ANY(_asset_id_list) - AND tx_out.consumed_by_tx_in_id IS NULL + INNER JOIN _assets ON tx_out.id = _assets.id + WHERE tx_out.consumed_by_tx_in_id IS NULL ; END; $$; diff --git a/files/grest/rpc/assets/policy_asset_addresses.sql b/files/grest/rpc/assets/policy_asset_addresses.sql index 5287b4a1..062310c2 100644 --- a/files/grest/rpc/assets/policy_asset_addresses.sql +++ b/files/grest/rpc/assets/policy_asset_addresses.sql @@ -33,7 +33,7 @@ BEGIN FROM _all_assets AS aa INNER JOIN ma_tx_out AS mto ON mto.ident = aa.id INNER JOIN tx_out AS txo ON txo.id = mto.tx_out_id - WHERE tx_out.consumed_by_tx_in_id IS NULL + WHERE txo.consumed_by_tx_in_id IS NULL ) AS x GROUP BY x.asset_name, diff --git a/files/grest/rpc/pool/pool_metadata.sql b/files/grest/rpc/pool/pool_metadata.sql index 83bc4a35..c919791c 100644 --- a/files/grest/rpc/pool/pool_metadata.sql +++ b/files/grest/rpc/pool/pool_metadata.sql @@ -17,8 +17,8 @@ BEGIN pic.meta_hash, pod.json, pic.pool_status - FROM grest.pool_hash AS ph - LEFT JOIN grest.pool_infor_cache AS pic ON ph.view = pic.pool_id_bech32 + FROM public.pool_hash AS ph + LEFT JOIN grest.pool_info_cache AS pic ON ph.view = pic.pool_id_bech32 LEFT JOIN public.pool_offline_data AS pod ON pod.pmr_id = pic.meta_id WHERE CASE @@ -26,7 +26,7 @@ BEGIN WHEN _pool_bech32_ids IS NOT NULL THEN pic.pool_id_bech32 = ANY(SELECT UNNEST(_pool_bech32_ids)) END ORDER BY - ph.view, + pic.pool_id_bech32, pic.tx_id DESC; END; $$; diff --git a/specs/results/koiosapi-guild.yaml b/specs/results/koiosapi-guild.yaml index 70c4bd10..98413b5b 100644 --- a/specs/results/koiosapi-guild.yaml +++ b/specs/results/koiosapi-guild.yaml @@ -151,6 +151,7 @@ servers: - url: https://preview.koios.rest/api/v0 - url: https://preprod.koios.rest/api/v0 paths: + /tip: #RPC get: tags: @@ -231,6 +232,7 @@ paths: $ref: "#/components/responses/NotFound" summary: Param Update Proposals description: Get all parameter update proposals submitted to the chain starting Shelley era + /epoch_info: #RPC get: tags: @@ -298,6 +300,7 @@ paths: summary: Epoch's Block Protocols description: >- Get the information about block protocol distribution in epoch + /blocks: get: tags: @@ -359,28 +362,29 @@ paths: $ref: "#/components/responses/NotFound" summary: Block Transactions description: Get a list of all transactions included in provided blocks - /tx_info: #RPC + + /utxo_info: #RPC post: tags: - Transactions requestBody: - $ref: "#/components/requestBodies/tx_ids" + $ref: "#/components/requestBodies/utxo_refs_with_extended" responses: "200": - description: Array of detailed information about transaction(s) + description: Array of UTXO details content: application/json: schema: - $ref: "#/components/schemas/tx_info" + $ref: "#/components/schemas/utxo_infos" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Transaction Information - description: Get detailed information about transaction(s) - /tx_utxos: #RPC + summary: UTxO Info + description: Get UTxO set for requested UTxO references + /tx_info: #RPC post: tags: - Transactions @@ -388,19 +392,19 @@ paths: $ref: "#/components/requestBodies/tx_ids" responses: "200": - description: Array of inputs and outputs for given transaction(s) + description: Array of detailed information about transaction(s) content: application/json: schema: - $ref: "#/components/schemas/tx_utxos" + $ref: "#/components/schemas/tx_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Transaction UTxOs [DEPRECATED] - description: Get UTxO set (inputs/outputs) of transactions. + summary: Transaction Information + description: Get detailed information about transaction(s) /tx_metadata: #RPC post: tags: @@ -492,50 +496,51 @@ paths: $ref: "#/components/responses/NotFound" summary: Transaction Status (Block Confirmations) description: Get the number of block confirmations for a given transaction hash list - /address_info: #RPC + /tx_utxos: #RPC post: tags: - - Address + - Transactions + deprecated: true requestBody: - $ref: "#/components/requestBodies/payment_addresses" + $ref: "#/components/requestBodies/tx_ids" responses: "200": - description: Array of address information + description: Array of inputs and outputs for given transaction(s) content: application/json: schema: - $ref: "#/components/schemas/address_info" + $ref: "#/components/schemas/tx_utxos" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Address Information - description: Get address info - balance, associated stake address (if any) and UTxO set for given addresses - /address_txs: #RPC + summary: Transaction UTxOs + description: Get UTxO set (inputs/outputs) of transactions [DEPRECATED: Use /utxo_info instead]. + + /address_info: #RPC post: tags: - Address requestBody: - $ref: "#/components/requestBodies/address_txs" + $ref: "#/components/requestBodies/payment_addresses" responses: "200": - description: Array of transaction hashes + description: Array of address information content: application/json: schema: - $ref: "#/components/schemas/address_txs" + $ref: "#/components/schemas/address_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Address Transactions - description: Get the transaction hash list of input address array, optionally filtering after specified block height (inclusive) - - /address_utxos: #RPC #todo new + summary: Address Information + description: Get address info - balance, associated stake address (if any) and UTxO set for given addresses + /address_utxos: #RPC post: tags: - Address @@ -577,28 +582,27 @@ paths: $ref: "#/components/responses/NotFound" summary: UTxOs from payment credentials description: Get UTxO details for requested payment credentials - - /address_assets: #RPC + /address_txs: #RPC post: tags: - Address requestBody: - $ref: "#/components/requestBodies/payment_addresses" + $ref: "#/components/requestBodies/address_txs" responses: "200": - description: Array of address-owned assets + description: Array of transaction hashes content: application/json: schema: - $ref: "#/components/schemas/address_assets" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Address Assets - description: Get the list of all the assets (policy, name and quantity) for given addresses + summary: Address Transactions + description: Get the transaction hash list of input address array, optionally filtering after specified block height (inclusive) /credential_txs: #RPC post: tags: @@ -620,6 +624,28 @@ paths: $ref: "#/components/responses/NotFound" summary: Transactions from payment credentials description: Get the transaction hash list of input payment credential array, optionally filtering after specified block height (inclusive) + /address_assets: #RPC + post: + tags: + - Address + requestBody: + $ref: "#/components/requestBodies/payment_addresses" + responses: + "200": + description: Array of address-owned assets + content: + application/json: + schema: + $ref: "#/components/schemas/address_assets" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Address Assets + description: Get the list of all the assets (policy, name and quantity) for given addresses + /account_list: get: tags: @@ -660,30 +686,27 @@ paths: $ref: "#/components/responses/NotFound" summary: Account Information description: Get the account information for given stake addresses - - /account_txs: #RPC # todo - new - get: + /account_info_cached: #RPC + post: tags: - Stake Account - parameters: - - $ref: "#/components/parameters/_stake_address" - - $ref: "#/components/parameters/_after_block_height" + requestBody: + $ref: "#/components/requestBodies/stake_addresses" responses: "200": - description: Array of Txs associated with stake address (account) + description: Array of account information content: application/json: schema: - $ref: "#/components/schemas/address_txs" + $ref: "#/components/schemas/account_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Account Txs - description: Get a list of all Txs for a given stake address (account) - + summary: Account Information (Cached) + description: Get the cached account information for given stake addresses (effective for performance query against registered accounts) /account_utxos: #RPC post: tags: @@ -705,28 +728,28 @@ paths: $ref: "#/components/responses/NotFound" summary: UTxOs for stake addresses (accounts) description: Get a list of all UTxOs for given stake addresses (account)s - - /account_info_cached: #RPC - post: + /account_txs: #RPC + get: tags: - Stake Account - requestBody: - $ref: "#/components/requestBodies/stake_addresses" + parameters: + - $ref: "#/components/parameters/_stake_address" + - $ref: "#/components/parameters/_after_block_height" responses: "200": - description: Array of account information + description: Array of Txs associated with stake address (account) content: application/json: schema: - $ref: "#/components/schemas/account_info" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Account Information (Cached) - description: Get the cached account information for given stake addresses, effective for registered accounts + summary: Account Txs + description: Get a list of all Txs for a given stake address (account) /account_rewards: #RPC post: tags: @@ -835,6 +858,7 @@ paths: $ref: "#/components/responses/NotFound" summary: Account History description: Get the staking history of given stake addresses (accounts) + /asset_list: get: tags: @@ -854,96 +878,49 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset List description: Get the list of all native assets (paginated) - /asset_token_registry: - get: - tags: - - Asset - responses: - "200": - description: Array of token registry information for each asset - content: - application/json: - schema: - $ref: "#/components/schemas/asset_token_registry" - "400": - $ref: "#/components/responses/BadRequest" - "401": - $ref: "#/components/responses/Unauthorized" - "404": - $ref: "#/components/responses/NotFound" - summary: Asset Token Registry - description: Get a list of assets registered via token registry on github - /asset_addresses: #RPC - get: - tags: - - Asset - parameters: - - $ref: "#/components/parameters/_asset_policy" - - $ref: "#/components/parameters/_asset_name" - responses: - "200": - description: Array of payment addresses holding the given token (including balances) - content: - application/json: - schema: - $ref: "#/components/schemas/asset_addresses" - "400": - $ref: "#/components/responses/BadRequest" - "401": - $ref: "#/components/responses/Unauthorized" - "404": - $ref: "#/components/responses/NotFound" - summary: Asset Addresses - description: Get the list of all addresses holding a given asset

- `Note - Due to cardano's UTxO design and usage from projects, asset to addresses map can be infinite. Thus, for a small subset of active projects - with millions of transactions, these might end up with timeouts (HTTP code 504) on free layer. Such large-scale projects are free to subscribe to - query layers to have a dedicated cache table for themselves served via Koios.` - /asset_address_list: #RPC + /policy_asset_list: #RPC get: tags: - Asset parameters: - $ref: "#/components/parameters/_asset_policy" - - $ref: "#/components/parameters/_asset_name" responses: "200": - description: Array of payment addresses holding the given token (including balances) + description: Array of detailed information of assets under the same policy content: application/json: schema: - $ref: "#/components/schemas/asset_addresses" + $ref: "#/components/schemas/policy_asset_list" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Asset Address List [DEPRECATED] - description: Get the list of all addresses holding a given asset (replaced by asset_addresses) - /asset_nft_address: #RPC + summary: Policy Asset List + description: Get the list of asset under the given policy (including balances) + /asset_token_registry: get: tags: - Asset - parameters: - - $ref: "#/components/parameters/_asset_policy_nft" - - $ref: "#/components/parameters/_asset_name_nft" responses: "200": - description: Payment addresses currently holding the given NFT + description: Array of token registry information for each asset content: application/json: schema: - $ref: "#/components/schemas/asset_nft_address" + $ref: "#/components/schemas/asset_token_registry" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: NFT Address - description: Get the address where specified NFT currently reside on. + summary: Asset Token Registry + description: Get a list of assets registered via token registry on github /asset_info: #RPC get: + deprecated: true tags: - Asset parameters: @@ -984,7 +961,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset Information (Bulk) description: Get the information of a list of assets including first minting & token registry metadata - /asset_utxos: #RPC post: tags: @@ -1006,7 +982,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset UTXO Information (Bulk) description: Get the UTXO information of a list of assets including - /asset_history: #RPC get: tags: @@ -1029,52 +1004,54 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset History description: Get the mint/burn history of an asset - /policy_asset_addresses: #RPC + /asset_addresses: #RPC get: tags: - Asset parameters: - $ref: "#/components/parameters/_asset_policy" + - $ref: "#/components/parameters/_asset_name" responses: "200": - description: Array of asset names and payment addresses for the given policy (including balances) + description: Array of payment addresses holding the given token (including balances) content: application/json: schema: - $ref: "#/components/schemas/policy_asset_addresses" + $ref: "#/components/schemas/asset_addresses" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Policy Asset Address List - description: Get the list of addresses with quantity for each asset on the given policy

+ summary: Asset Addresses + description: Get the list of all addresses holding a given asset

`Note - Due to cardano's UTxO design and usage from projects, asset to addresses map can be infinite. Thus, for a small subset of active projects with millions of transactions, these might end up with timeouts (HTTP code 504) on free layer. Such large-scale projects are free to subscribe to query layers to have a dedicated cache table for themselves served via Koios.` - /policy_asset_info: #RPC + /asset_nft_address: #RPC get: tags: - Asset parameters: - - $ref: "#/components/parameters/_asset_policy" + - $ref: "#/components/parameters/_asset_policy_nft" + - $ref: "#/components/parameters/_asset_name_nft" responses: "200": - description: Array of detailed information of assets under the same policy + description: Payment addresses currently holding the given NFT content: application/json: schema: - $ref: "#/components/schemas/policy_asset_info" + $ref: "#/components/schemas/asset_nft_address" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Policy Asset Information - description: Get the information for all assets under the same policy - /asset_policy_info: #RPC + summary: NFT Address + description: Get the address where specified NFT currently reside on. + /policy_asset_addresses: #RPC get: tags: - Asset @@ -1082,20 +1059,23 @@ paths: - $ref: "#/components/parameters/_asset_policy" responses: "200": - description: Array of detailed information of assets under the same policy + description: Array of asset names and payment addresses for the given policy (including balances) content: application/json: schema: - $ref: "#/components/schemas/policy_asset_info" + $ref: "#/components/schemas/policy_asset_addresses" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Asset Policy Information [DEPRECATED] - description: Get the information for all assets under the same policy (replaced by asset_addresses) - /policy_asset_list: #RPC + summary: Policy Asset Address List + description: Get the list of addresses with quantity for each asset on the given policy

+ `Note - Due to cardano's UTxO design and usage from projects, asset to addresses map can be infinite. Thus, for a small subset of active projects + with millions of transactions, these might end up with timeouts (HTTP code 504) on free layer. Such large-scale projects are free to subscribe to + query layers to have a dedicated cache table for themselves served via Koios.` + /policy_asset_info: #RPC get: tags: - Asset @@ -1107,15 +1087,15 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/policy_asset_list" + $ref: "#/components/schemas/policy_asset_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Policy Asset List - description: Get the list of asset under the given policy (including balances) + summary: Policy Asset Information + description: Get the information for all assets under the same policy /asset_summary: #RPC get: tags: @@ -1162,6 +1142,52 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset Transactions description: Get the list of current or all asset transaction hashes (newest first) + /asset_address_list: #RPC + get: + tags: + - Asset + deprecated: true + parameters: + - $ref: "#/components/parameters/_asset_policy" + - $ref: "#/components/parameters/_asset_name" + responses: + "200": + description: Array of payment addresses holding the given token (including balances) + content: + application/json: + schema: + $ref: "#/components/schemas/asset_addresses" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Asset Address List + description: Get the list of all addresses holding a given asset [DEPRECATED: replaced by asset_addresses] + /asset_policy_info: #RPC + get: + deprecated: true + tags: + - Asset + parameters: + - $ref: "#/components/parameters/_asset_policy" + responses: + "200": + description: Array of detailed information of assets under the same policy + content: + application/json: + schema: + $ref: "#/components/schemas/policy_asset_info" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Asset Policy Information + description: Get the information for all assets under the same policy (DEPRECATED: replaced by policy_asset_info) + /pool_list: #RPC get: tags: @@ -1398,7 +1424,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Datum Information description: List of datum information for given datum hashes - /native_script_list: #RPC get: tags: @@ -1458,8 +1483,7 @@ paths: $ref: "#/components/responses/NotFound" summary: Script Redeemers description: List of all redeemers for a given script hash - - /script_utxos: #RPC todo new + /script_utxos: #RPC get: tags: - Script @@ -1481,7 +1505,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Script UTXOs description: List of all UTXOs for a given script hash - /datum_info: #RPC post: tags: @@ -1504,28 +1527,6 @@ paths: summary: Datum Information description: List of datum information for given datum hashes - /utxo_info: #RPC #todonew - post: - tags: - - UTXO - requestBody: - $ref: "#/components/requestBodies/utxo_refs_with_extended" - responses: - "200": - description: Array of UTXO details - content: - application/json: - schema: - $ref: "#/components/schemas/utxo_infos" - "400": - $ref: "#/components/responses/BadRequest" - "401": - $ref: "#/components/responses/Unauthorized" - "404": - $ref: "#/components/responses/NotFound" - summary: UTXOs Info - description: Get UTxO set for requested UTxO references - components: parameters: select: @@ -1755,7 +1756,7 @@ components: description: Script hash in hexadecimal format (hex) schema: type: string - example: 160301a01ee86d8e46cbe3aef1e3bf69bfa28c65d5be2dde56a37af8 + example: 1392eec7d575292ae1523da65ff1b4b021886e917c8c43de54aa7cbd in: query required: true allowEmptyValue: false @@ -1911,7 +1912,8 @@ components: _stake_addresses: - stake_test17zt9x005zkd2usz2vhvktyzqsuwz25gmgnaqdka5hcj9m2qfg2py2 - stake_test1uzzm95hs7dzw23ftj3cly3rgm64crqxet7g46k6y5kcy3zcs3mpjd - todo: add examples referencing all existing param + _first_only: false + _empty: false stake_addresses_with_extended: content: @@ -2075,8 +2077,8 @@ components: description: Array of Cardano script hashes example: _script_hashes: - - 964af1ff2a66ce472d34ac39b47f356b6d971d62c794a89ec12825d5de30f3aa - - 17bdb9c96b77c7718d546be50193a80bc9d72081b7375e5e16891db196af14fc + - a08a267e92456ba48e157dd7e77bdd35aba0fc50fe625a10a6a7fc5e + - 1f3a4aa08cfa0e47fff200578f0d4847b6890b7093a765773feb35de datum_hashes: content: application/json: @@ -2158,8 +2160,8 @@ components: description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call example: _utxo_refs: - - ##utxo_ref1_rb## - - ##utxo_ref2_rb## + - f82e568d42604fd71424d193c86ec00c97aead2b8f018e81c3139d9e3770c735#0 + - 88ae22495123c7ee37a0bbe865243757185a302ed5359d1eae9347030628290a#0 _extended: false securitySchemes: bearerAuth: @@ -4027,12 +4029,12 @@ tags: - name: Transactions description: Query blockchain transaction details x-tag-expanded: false + - name: Stake Account + description: Query details about specific stake account addresses + x-tag-expanded: false - name: Address description: Query information about specific address(es) x-tag-expanded: false - - name: Account - description: Query details about specific stake account addresses - x-tag-expanded: false - name: Asset description: Query Asset related informations x-tag-expanded: false diff --git a/specs/results/koiosapi-mainnet.yaml b/specs/results/koiosapi-mainnet.yaml index 884698d3..4e692aea 100644 --- a/specs/results/koiosapi-mainnet.yaml +++ b/specs/results/koiosapi-mainnet.yaml @@ -151,6 +151,7 @@ servers: - url: https://preview.koios.rest/api/v0 - url: https://preprod.koios.rest/api/v0 paths: + /tip: #RPC get: tags: @@ -231,6 +232,7 @@ paths: $ref: "#/components/responses/NotFound" summary: Param Update Proposals description: Get all parameter update proposals submitted to the chain starting Shelley era + /epoch_info: #RPC get: tags: @@ -298,6 +300,7 @@ paths: summary: Epoch's Block Protocols description: >- Get the information about block protocol distribution in epoch + /blocks: get: tags: @@ -359,28 +362,29 @@ paths: $ref: "#/components/responses/NotFound" summary: Block Transactions description: Get a list of all transactions included in provided blocks - /tx_info: #RPC + + /utxo_info: #RPC post: tags: - Transactions requestBody: - $ref: "#/components/requestBodies/tx_ids" + $ref: "#/components/requestBodies/utxo_refs_with_extended" responses: "200": - description: Array of detailed information about transaction(s) + description: Array of UTXO details content: application/json: schema: - $ref: "#/components/schemas/tx_info" + $ref: "#/components/schemas/utxo_infos" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Transaction Information - description: Get detailed information about transaction(s) - /tx_utxos: #RPC + summary: UTxO Info + description: Get UTxO set for requested UTxO references + /tx_info: #RPC post: tags: - Transactions @@ -388,19 +392,19 @@ paths: $ref: "#/components/requestBodies/tx_ids" responses: "200": - description: Array of inputs and outputs for given transaction(s) + description: Array of detailed information about transaction(s) content: application/json: schema: - $ref: "#/components/schemas/tx_utxos" + $ref: "#/components/schemas/tx_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Transaction UTxOs [DEPRECATED] - description: Get UTxO set (inputs/outputs) of transactions. + summary: Transaction Information + description: Get detailed information about transaction(s) /tx_metadata: #RPC post: tags: @@ -492,50 +496,51 @@ paths: $ref: "#/components/responses/NotFound" summary: Transaction Status (Block Confirmations) description: Get the number of block confirmations for a given transaction hash list - /address_info: #RPC + /tx_utxos: #RPC post: tags: - - Address + - Transactions + deprecated: true requestBody: - $ref: "#/components/requestBodies/payment_addresses" + $ref: "#/components/requestBodies/tx_ids" responses: "200": - description: Array of address information + description: Array of inputs and outputs for given transaction(s) content: application/json: schema: - $ref: "#/components/schemas/address_info" + $ref: "#/components/schemas/tx_utxos" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Address Information - description: Get address info - balance, associated stake address (if any) and UTxO set for given addresses - /address_txs: #RPC + summary: Transaction UTxOs + description: Get UTxO set (inputs/outputs) of transactions [DEPRECATED: Use /utxo_info instead]. + + /address_info: #RPC post: tags: - Address requestBody: - $ref: "#/components/requestBodies/address_txs" + $ref: "#/components/requestBodies/payment_addresses" responses: "200": - description: Array of transaction hashes + description: Array of address information content: application/json: schema: - $ref: "#/components/schemas/address_txs" + $ref: "#/components/schemas/address_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Address Transactions - description: Get the transaction hash list of input address array, optionally filtering after specified block height (inclusive) - - /address_utxos: #RPC #todo new + summary: Address Information + description: Get address info - balance, associated stake address (if any) and UTxO set for given addresses + /address_utxos: #RPC post: tags: - Address @@ -577,28 +582,27 @@ paths: $ref: "#/components/responses/NotFound" summary: UTxOs from payment credentials description: Get UTxO details for requested payment credentials - - /address_assets: #RPC + /address_txs: #RPC post: tags: - Address requestBody: - $ref: "#/components/requestBodies/payment_addresses" + $ref: "#/components/requestBodies/address_txs" responses: "200": - description: Array of address-owned assets + description: Array of transaction hashes content: application/json: schema: - $ref: "#/components/schemas/address_assets" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Address Assets - description: Get the list of all the assets (policy, name and quantity) for given addresses + summary: Address Transactions + description: Get the transaction hash list of input address array, optionally filtering after specified block height (inclusive) /credential_txs: #RPC post: tags: @@ -620,6 +624,28 @@ paths: $ref: "#/components/responses/NotFound" summary: Transactions from payment credentials description: Get the transaction hash list of input payment credential array, optionally filtering after specified block height (inclusive) + /address_assets: #RPC + post: + tags: + - Address + requestBody: + $ref: "#/components/requestBodies/payment_addresses" + responses: + "200": + description: Array of address-owned assets + content: + application/json: + schema: + $ref: "#/components/schemas/address_assets" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Address Assets + description: Get the list of all the assets (policy, name and quantity) for given addresses + /account_list: get: tags: @@ -660,30 +686,27 @@ paths: $ref: "#/components/responses/NotFound" summary: Account Information description: Get the account information for given stake addresses - - /account_txs: #RPC # todo - new - get: + /account_info_cached: #RPC + post: tags: - Stake Account - parameters: - - $ref: "#/components/parameters/_stake_address" - - $ref: "#/components/parameters/_after_block_height" + requestBody: + $ref: "#/components/requestBodies/stake_addresses" responses: "200": - description: Array of Txs associated with stake address (account) + description: Array of account information content: application/json: schema: - $ref: "#/components/schemas/address_txs" + $ref: "#/components/schemas/account_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Account Txs - description: Get a list of all Txs for a given stake address (account) - + summary: Account Information (Cached) + description: Get the cached account information for given stake addresses (effective for performance query against registered accounts) /account_utxos: #RPC post: tags: @@ -705,28 +728,28 @@ paths: $ref: "#/components/responses/NotFound" summary: UTxOs for stake addresses (accounts) description: Get a list of all UTxOs for given stake addresses (account)s - - /account_info_cached: #RPC - post: + /account_txs: #RPC + get: tags: - Stake Account - requestBody: - $ref: "#/components/requestBodies/stake_addresses" + parameters: + - $ref: "#/components/parameters/_stake_address" + - $ref: "#/components/parameters/_after_block_height" responses: "200": - description: Array of account information + description: Array of Txs associated with stake address (account) content: application/json: schema: - $ref: "#/components/schemas/account_info" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Account Information (Cached) - description: Get the cached account information for given stake addresses, effective for registered accounts + summary: Account Txs + description: Get a list of all Txs for a given stake address (account) /account_rewards: #RPC post: tags: @@ -835,6 +858,7 @@ paths: $ref: "#/components/responses/NotFound" summary: Account History description: Get the staking history of given stake addresses (accounts) + /asset_list: get: tags: @@ -854,96 +878,49 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset List description: Get the list of all native assets (paginated) - /asset_token_registry: - get: - tags: - - Asset - responses: - "200": - description: Array of token registry information for each asset - content: - application/json: - schema: - $ref: "#/components/schemas/asset_token_registry" - "400": - $ref: "#/components/responses/BadRequest" - "401": - $ref: "#/components/responses/Unauthorized" - "404": - $ref: "#/components/responses/NotFound" - summary: Asset Token Registry - description: Get a list of assets registered via token registry on github - /asset_addresses: #RPC - get: - tags: - - Asset - parameters: - - $ref: "#/components/parameters/_asset_policy" - - $ref: "#/components/parameters/_asset_name" - responses: - "200": - description: Array of payment addresses holding the given token (including balances) - content: - application/json: - schema: - $ref: "#/components/schemas/asset_addresses" - "400": - $ref: "#/components/responses/BadRequest" - "401": - $ref: "#/components/responses/Unauthorized" - "404": - $ref: "#/components/responses/NotFound" - summary: Asset Addresses - description: Get the list of all addresses holding a given asset

- `Note - Due to cardano's UTxO design and usage from projects, asset to addresses map can be infinite. Thus, for a small subset of active projects - with millions of transactions, these might end up with timeouts (HTTP code 504) on free layer. Such large-scale projects are free to subscribe to - query layers to have a dedicated cache table for themselves served via Koios.` - /asset_address_list: #RPC + /policy_asset_list: #RPC get: tags: - Asset parameters: - $ref: "#/components/parameters/_asset_policy" - - $ref: "#/components/parameters/_asset_name" responses: "200": - description: Array of payment addresses holding the given token (including balances) + description: Array of detailed information of assets under the same policy content: application/json: schema: - $ref: "#/components/schemas/asset_addresses" + $ref: "#/components/schemas/policy_asset_list" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Asset Address List [DEPRECATED] - description: Get the list of all addresses holding a given asset (replaced by asset_addresses) - /asset_nft_address: #RPC + summary: Policy Asset List + description: Get the list of asset under the given policy (including balances) + /asset_token_registry: get: tags: - Asset - parameters: - - $ref: "#/components/parameters/_asset_policy_nft" - - $ref: "#/components/parameters/_asset_name_nft" responses: "200": - description: Payment addresses currently holding the given NFT + description: Array of token registry information for each asset content: application/json: schema: - $ref: "#/components/schemas/asset_nft_address" + $ref: "#/components/schemas/asset_token_registry" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: NFT Address - description: Get the address where specified NFT currently reside on. + summary: Asset Token Registry + description: Get a list of assets registered via token registry on github /asset_info: #RPC get: + deprecated: true tags: - Asset parameters: @@ -984,7 +961,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset Information (Bulk) description: Get the information of a list of assets including first minting & token registry metadata - /asset_utxos: #RPC post: tags: @@ -1006,7 +982,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset UTXO Information (Bulk) description: Get the UTXO information of a list of assets including - /asset_history: #RPC get: tags: @@ -1029,52 +1004,54 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset History description: Get the mint/burn history of an asset - /policy_asset_addresses: #RPC + /asset_addresses: #RPC get: tags: - Asset parameters: - $ref: "#/components/parameters/_asset_policy" + - $ref: "#/components/parameters/_asset_name" responses: "200": - description: Array of asset names and payment addresses for the given policy (including balances) + description: Array of payment addresses holding the given token (including balances) content: application/json: schema: - $ref: "#/components/schemas/policy_asset_addresses" + $ref: "#/components/schemas/asset_addresses" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Policy Asset Address List - description: Get the list of addresses with quantity for each asset on the given policy

+ summary: Asset Addresses + description: Get the list of all addresses holding a given asset

`Note - Due to cardano's UTxO design and usage from projects, asset to addresses map can be infinite. Thus, for a small subset of active projects with millions of transactions, these might end up with timeouts (HTTP code 504) on free layer. Such large-scale projects are free to subscribe to query layers to have a dedicated cache table for themselves served via Koios.` - /policy_asset_info: #RPC + /asset_nft_address: #RPC get: tags: - Asset parameters: - - $ref: "#/components/parameters/_asset_policy" + - $ref: "#/components/parameters/_asset_policy_nft" + - $ref: "#/components/parameters/_asset_name_nft" responses: "200": - description: Array of detailed information of assets under the same policy + description: Payment addresses currently holding the given NFT content: application/json: schema: - $ref: "#/components/schemas/policy_asset_info" + $ref: "#/components/schemas/asset_nft_address" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Policy Asset Information - description: Get the information for all assets under the same policy - /asset_policy_info: #RPC + summary: NFT Address + description: Get the address where specified NFT currently reside on. + /policy_asset_addresses: #RPC get: tags: - Asset @@ -1082,20 +1059,23 @@ paths: - $ref: "#/components/parameters/_asset_policy" responses: "200": - description: Array of detailed information of assets under the same policy + description: Array of asset names and payment addresses for the given policy (including balances) content: application/json: schema: - $ref: "#/components/schemas/policy_asset_info" + $ref: "#/components/schemas/policy_asset_addresses" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Asset Policy Information [DEPRECATED] - description: Get the information for all assets under the same policy (replaced by asset_addresses) - /policy_asset_list: #RPC + summary: Policy Asset Address List + description: Get the list of addresses with quantity for each asset on the given policy

+ `Note - Due to cardano's UTxO design and usage from projects, asset to addresses map can be infinite. Thus, for a small subset of active projects + with millions of transactions, these might end up with timeouts (HTTP code 504) on free layer. Such large-scale projects are free to subscribe to + query layers to have a dedicated cache table for themselves served via Koios.` + /policy_asset_info: #RPC get: tags: - Asset @@ -1107,15 +1087,15 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/policy_asset_list" + $ref: "#/components/schemas/policy_asset_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Policy Asset List - description: Get the list of asset under the given policy (including balances) + summary: Policy Asset Information + description: Get the information for all assets under the same policy /asset_summary: #RPC get: tags: @@ -1162,6 +1142,52 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset Transactions description: Get the list of current or all asset transaction hashes (newest first) + /asset_address_list: #RPC + get: + tags: + - Asset + deprecated: true + parameters: + - $ref: "#/components/parameters/_asset_policy" + - $ref: "#/components/parameters/_asset_name" + responses: + "200": + description: Array of payment addresses holding the given token (including balances) + content: + application/json: + schema: + $ref: "#/components/schemas/asset_addresses" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Asset Address List + description: Get the list of all addresses holding a given asset [DEPRECATED: replaced by asset_addresses] + /asset_policy_info: #RPC + get: + deprecated: true + tags: + - Asset + parameters: + - $ref: "#/components/parameters/_asset_policy" + responses: + "200": + description: Array of detailed information of assets under the same policy + content: + application/json: + schema: + $ref: "#/components/schemas/policy_asset_info" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Asset Policy Information + description: Get the information for all assets under the same policy (DEPRECATED: replaced by policy_asset_info) + /pool_list: #RPC get: tags: @@ -1398,7 +1424,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Datum Information description: List of datum information for given datum hashes - /native_script_list: #RPC get: tags: @@ -1458,8 +1483,7 @@ paths: $ref: "#/components/responses/NotFound" summary: Script Redeemers description: List of all redeemers for a given script hash - - /script_utxos: #RPC todo new + /script_utxos: #RPC get: tags: - Script @@ -1481,7 +1505,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Script UTXOs description: List of all UTXOs for a given script hash - /datum_info: #RPC post: tags: @@ -1504,28 +1527,6 @@ paths: summary: Datum Information description: List of datum information for given datum hashes - /utxo_info: #RPC #todonew - post: - tags: - - UTXO - requestBody: - $ref: "#/components/requestBodies/utxo_refs_with_extended" - responses: - "200": - description: Array of UTXO details - content: - application/json: - schema: - $ref: "#/components/schemas/utxo_infos" - "400": - $ref: "#/components/responses/BadRequest" - "401": - $ref: "#/components/responses/Unauthorized" - "404": - $ref: "#/components/responses/NotFound" - summary: UTXOs Info - description: Get UTxO set for requested UTxO references - components: parameters: select: @@ -1911,7 +1912,8 @@ components: _stake_addresses: - stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250 - stake1uxpdrerp9wrxunfh6ukyv5267j70fzxgw0fr3z8zeac5vyqhf9jhy - todo: add examples referencing all existing param + _first_only: false + _empty: false stake_addresses_with_extended: content: @@ -2158,8 +2160,8 @@ components: description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call example: _utxo_refs: - - ##utxo_ref1_rb## - - ##utxo_ref2_rb## + - fixme + - fixme _extended: false securitySchemes: bearerAuth: @@ -4027,12 +4029,12 @@ tags: - name: Transactions description: Query blockchain transaction details x-tag-expanded: false + - name: Stake Account + description: Query details about specific stake account addresses + x-tag-expanded: false - name: Address description: Query information about specific address(es) x-tag-expanded: false - - name: Account - description: Query details about specific stake account addresses - x-tag-expanded: false - name: Asset description: Query Asset related informations x-tag-expanded: false diff --git a/specs/results/koiosapi-preprod.yaml b/specs/results/koiosapi-preprod.yaml index dacd0610..756b3c8a 100644 --- a/specs/results/koiosapi-preprod.yaml +++ b/specs/results/koiosapi-preprod.yaml @@ -151,6 +151,7 @@ servers: - url: https://preview.koios.rest/api/v0 - url: https://preprod.koios.rest/api/v0 paths: + /tip: #RPC get: tags: @@ -231,6 +232,7 @@ paths: $ref: "#/components/responses/NotFound" summary: Param Update Proposals description: Get all parameter update proposals submitted to the chain starting Shelley era + /epoch_info: #RPC get: tags: @@ -298,6 +300,7 @@ paths: summary: Epoch's Block Protocols description: >- Get the information about block protocol distribution in epoch + /blocks: get: tags: @@ -359,28 +362,29 @@ paths: $ref: "#/components/responses/NotFound" summary: Block Transactions description: Get a list of all transactions included in provided blocks - /tx_info: #RPC + + /utxo_info: #RPC post: tags: - Transactions requestBody: - $ref: "#/components/requestBodies/tx_ids" + $ref: "#/components/requestBodies/utxo_refs_with_extended" responses: "200": - description: Array of detailed information about transaction(s) + description: Array of UTXO details content: application/json: schema: - $ref: "#/components/schemas/tx_info" + $ref: "#/components/schemas/utxo_infos" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Transaction Information - description: Get detailed information about transaction(s) - /tx_utxos: #RPC + summary: UTxO Info + description: Get UTxO set for requested UTxO references + /tx_info: #RPC post: tags: - Transactions @@ -388,19 +392,19 @@ paths: $ref: "#/components/requestBodies/tx_ids" responses: "200": - description: Array of inputs and outputs for given transaction(s) + description: Array of detailed information about transaction(s) content: application/json: schema: - $ref: "#/components/schemas/tx_utxos" + $ref: "#/components/schemas/tx_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Transaction UTxOs [DEPRECATED] - description: Get UTxO set (inputs/outputs) of transactions. + summary: Transaction Information + description: Get detailed information about transaction(s) /tx_metadata: #RPC post: tags: @@ -492,50 +496,51 @@ paths: $ref: "#/components/responses/NotFound" summary: Transaction Status (Block Confirmations) description: Get the number of block confirmations for a given transaction hash list - /address_info: #RPC + /tx_utxos: #RPC post: tags: - - Address + - Transactions + deprecated: true requestBody: - $ref: "#/components/requestBodies/payment_addresses" + $ref: "#/components/requestBodies/tx_ids" responses: "200": - description: Array of address information + description: Array of inputs and outputs for given transaction(s) content: application/json: schema: - $ref: "#/components/schemas/address_info" + $ref: "#/components/schemas/tx_utxos" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Address Information - description: Get address info - balance, associated stake address (if any) and UTxO set for given addresses - /address_txs: #RPC + summary: Transaction UTxOs + description: Get UTxO set (inputs/outputs) of transactions [DEPRECATED: Use /utxo_info instead]. + + /address_info: #RPC post: tags: - Address requestBody: - $ref: "#/components/requestBodies/address_txs" + $ref: "#/components/requestBodies/payment_addresses" responses: "200": - description: Array of transaction hashes + description: Array of address information content: application/json: schema: - $ref: "#/components/schemas/address_txs" + $ref: "#/components/schemas/address_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Address Transactions - description: Get the transaction hash list of input address array, optionally filtering after specified block height (inclusive) - - /address_utxos: #RPC #todo new + summary: Address Information + description: Get address info - balance, associated stake address (if any) and UTxO set for given addresses + /address_utxos: #RPC post: tags: - Address @@ -577,28 +582,27 @@ paths: $ref: "#/components/responses/NotFound" summary: UTxOs from payment credentials description: Get UTxO details for requested payment credentials - - /address_assets: #RPC + /address_txs: #RPC post: tags: - Address requestBody: - $ref: "#/components/requestBodies/payment_addresses" + $ref: "#/components/requestBodies/address_txs" responses: "200": - description: Array of address-owned assets + description: Array of transaction hashes content: application/json: schema: - $ref: "#/components/schemas/address_assets" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Address Assets - description: Get the list of all the assets (policy, name and quantity) for given addresses + summary: Address Transactions + description: Get the transaction hash list of input address array, optionally filtering after specified block height (inclusive) /credential_txs: #RPC post: tags: @@ -620,6 +624,28 @@ paths: $ref: "#/components/responses/NotFound" summary: Transactions from payment credentials description: Get the transaction hash list of input payment credential array, optionally filtering after specified block height (inclusive) + /address_assets: #RPC + post: + tags: + - Address + requestBody: + $ref: "#/components/requestBodies/payment_addresses" + responses: + "200": + description: Array of address-owned assets + content: + application/json: + schema: + $ref: "#/components/schemas/address_assets" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Address Assets + description: Get the list of all the assets (policy, name and quantity) for given addresses + /account_list: get: tags: @@ -660,30 +686,27 @@ paths: $ref: "#/components/responses/NotFound" summary: Account Information description: Get the account information for given stake addresses - - /account_txs: #RPC # todo - new - get: + /account_info_cached: #RPC + post: tags: - Stake Account - parameters: - - $ref: "#/components/parameters/_stake_address" - - $ref: "#/components/parameters/_after_block_height" + requestBody: + $ref: "#/components/requestBodies/stake_addresses" responses: "200": - description: Array of Txs associated with stake address (account) + description: Array of account information content: application/json: schema: - $ref: "#/components/schemas/address_txs" + $ref: "#/components/schemas/account_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Account Txs - description: Get a list of all Txs for a given stake address (account) - + summary: Account Information (Cached) + description: Get the cached account information for given stake addresses (effective for performance query against registered accounts) /account_utxos: #RPC post: tags: @@ -705,28 +728,28 @@ paths: $ref: "#/components/responses/NotFound" summary: UTxOs for stake addresses (accounts) description: Get a list of all UTxOs for given stake addresses (account)s - - /account_info_cached: #RPC - post: + /account_txs: #RPC + get: tags: - Stake Account - requestBody: - $ref: "#/components/requestBodies/stake_addresses" + parameters: + - $ref: "#/components/parameters/_stake_address" + - $ref: "#/components/parameters/_after_block_height" responses: "200": - description: Array of account information + description: Array of Txs associated with stake address (account) content: application/json: schema: - $ref: "#/components/schemas/account_info" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Account Information (Cached) - description: Get the cached account information for given stake addresses, effective for registered accounts + summary: Account Txs + description: Get a list of all Txs for a given stake address (account) /account_rewards: #RPC post: tags: @@ -835,6 +858,7 @@ paths: $ref: "#/components/responses/NotFound" summary: Account History description: Get the staking history of given stake addresses (accounts) + /asset_list: get: tags: @@ -854,96 +878,49 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset List description: Get the list of all native assets (paginated) - /asset_token_registry: - get: - tags: - - Asset - responses: - "200": - description: Array of token registry information for each asset - content: - application/json: - schema: - $ref: "#/components/schemas/asset_token_registry" - "400": - $ref: "#/components/responses/BadRequest" - "401": - $ref: "#/components/responses/Unauthorized" - "404": - $ref: "#/components/responses/NotFound" - summary: Asset Token Registry - description: Get a list of assets registered via token registry on github - /asset_addresses: #RPC - get: - tags: - - Asset - parameters: - - $ref: "#/components/parameters/_asset_policy" - - $ref: "#/components/parameters/_asset_name" - responses: - "200": - description: Array of payment addresses holding the given token (including balances) - content: - application/json: - schema: - $ref: "#/components/schemas/asset_addresses" - "400": - $ref: "#/components/responses/BadRequest" - "401": - $ref: "#/components/responses/Unauthorized" - "404": - $ref: "#/components/responses/NotFound" - summary: Asset Addresses - description: Get the list of all addresses holding a given asset

- `Note - Due to cardano's UTxO design and usage from projects, asset to addresses map can be infinite. Thus, for a small subset of active projects - with millions of transactions, these might end up with timeouts (HTTP code 504) on free layer. Such large-scale projects are free to subscribe to - query layers to have a dedicated cache table for themselves served via Koios.` - /asset_address_list: #RPC + /policy_asset_list: #RPC get: tags: - Asset parameters: - $ref: "#/components/parameters/_asset_policy" - - $ref: "#/components/parameters/_asset_name" responses: "200": - description: Array of payment addresses holding the given token (including balances) + description: Array of detailed information of assets under the same policy content: application/json: schema: - $ref: "#/components/schemas/asset_addresses" + $ref: "#/components/schemas/policy_asset_list" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Asset Address List [DEPRECATED] - description: Get the list of all addresses holding a given asset (replaced by asset_addresses) - /asset_nft_address: #RPC + summary: Policy Asset List + description: Get the list of asset under the given policy (including balances) + /asset_token_registry: get: tags: - Asset - parameters: - - $ref: "#/components/parameters/_asset_policy_nft" - - $ref: "#/components/parameters/_asset_name_nft" responses: "200": - description: Payment addresses currently holding the given NFT + description: Array of token registry information for each asset content: application/json: schema: - $ref: "#/components/schemas/asset_nft_address" + $ref: "#/components/schemas/asset_token_registry" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: NFT Address - description: Get the address where specified NFT currently reside on. + summary: Asset Token Registry + description: Get a list of assets registered via token registry on github /asset_info: #RPC get: + deprecated: true tags: - Asset parameters: @@ -984,7 +961,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset Information (Bulk) description: Get the information of a list of assets including first minting & token registry metadata - /asset_utxos: #RPC post: tags: @@ -1006,7 +982,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset UTXO Information (Bulk) description: Get the UTXO information of a list of assets including - /asset_history: #RPC get: tags: @@ -1029,52 +1004,54 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset History description: Get the mint/burn history of an asset - /policy_asset_addresses: #RPC + /asset_addresses: #RPC get: tags: - Asset parameters: - $ref: "#/components/parameters/_asset_policy" + - $ref: "#/components/parameters/_asset_name" responses: "200": - description: Array of asset names and payment addresses for the given policy (including balances) + description: Array of payment addresses holding the given token (including balances) content: application/json: schema: - $ref: "#/components/schemas/policy_asset_addresses" + $ref: "#/components/schemas/asset_addresses" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Policy Asset Address List - description: Get the list of addresses with quantity for each asset on the given policy

+ summary: Asset Addresses + description: Get the list of all addresses holding a given asset

`Note - Due to cardano's UTxO design and usage from projects, asset to addresses map can be infinite. Thus, for a small subset of active projects with millions of transactions, these might end up with timeouts (HTTP code 504) on free layer. Such large-scale projects are free to subscribe to query layers to have a dedicated cache table for themselves served via Koios.` - /policy_asset_info: #RPC + /asset_nft_address: #RPC get: tags: - Asset parameters: - - $ref: "#/components/parameters/_asset_policy" + - $ref: "#/components/parameters/_asset_policy_nft" + - $ref: "#/components/parameters/_asset_name_nft" responses: "200": - description: Array of detailed information of assets under the same policy + description: Payment addresses currently holding the given NFT content: application/json: schema: - $ref: "#/components/schemas/policy_asset_info" + $ref: "#/components/schemas/asset_nft_address" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Policy Asset Information - description: Get the information for all assets under the same policy - /asset_policy_info: #RPC + summary: NFT Address + description: Get the address where specified NFT currently reside on. + /policy_asset_addresses: #RPC get: tags: - Asset @@ -1082,20 +1059,23 @@ paths: - $ref: "#/components/parameters/_asset_policy" responses: "200": - description: Array of detailed information of assets under the same policy + description: Array of asset names and payment addresses for the given policy (including balances) content: application/json: schema: - $ref: "#/components/schemas/policy_asset_info" + $ref: "#/components/schemas/policy_asset_addresses" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Asset Policy Information [DEPRECATED] - description: Get the information for all assets under the same policy (replaced by asset_addresses) - /policy_asset_list: #RPC + summary: Policy Asset Address List + description: Get the list of addresses with quantity for each asset on the given policy

+ `Note - Due to cardano's UTxO design and usage from projects, asset to addresses map can be infinite. Thus, for a small subset of active projects + with millions of transactions, these might end up with timeouts (HTTP code 504) on free layer. Such large-scale projects are free to subscribe to + query layers to have a dedicated cache table for themselves served via Koios.` + /policy_asset_info: #RPC get: tags: - Asset @@ -1107,15 +1087,15 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/policy_asset_list" + $ref: "#/components/schemas/policy_asset_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Policy Asset List - description: Get the list of asset under the given policy (including balances) + summary: Policy Asset Information + description: Get the information for all assets under the same policy /asset_summary: #RPC get: tags: @@ -1162,6 +1142,52 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset Transactions description: Get the list of current or all asset transaction hashes (newest first) + /asset_address_list: #RPC + get: + tags: + - Asset + deprecated: true + parameters: + - $ref: "#/components/parameters/_asset_policy" + - $ref: "#/components/parameters/_asset_name" + responses: + "200": + description: Array of payment addresses holding the given token (including balances) + content: + application/json: + schema: + $ref: "#/components/schemas/asset_addresses" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Asset Address List + description: Get the list of all addresses holding a given asset [DEPRECATED: replaced by asset_addresses] + /asset_policy_info: #RPC + get: + deprecated: true + tags: + - Asset + parameters: + - $ref: "#/components/parameters/_asset_policy" + responses: + "200": + description: Array of detailed information of assets under the same policy + content: + application/json: + schema: + $ref: "#/components/schemas/policy_asset_info" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Asset Policy Information + description: Get the information for all assets under the same policy (DEPRECATED: replaced by policy_asset_info) + /pool_list: #RPC get: tags: @@ -1398,7 +1424,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Datum Information description: List of datum information for given datum hashes - /native_script_list: #RPC get: tags: @@ -1458,8 +1483,7 @@ paths: $ref: "#/components/responses/NotFound" summary: Script Redeemers description: List of all redeemers for a given script hash - - /script_utxos: #RPC todo new + /script_utxos: #RPC get: tags: - Script @@ -1481,7 +1505,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Script UTXOs description: List of all UTXOs for a given script hash - /datum_info: #RPC post: tags: @@ -1504,28 +1527,6 @@ paths: summary: Datum Information description: List of datum information for given datum hashes - /utxo_info: #RPC #todonew - post: - tags: - - UTXO - requestBody: - $ref: "#/components/requestBodies/utxo_refs_with_extended" - responses: - "200": - description: Array of UTXO details - content: - application/json: - schema: - $ref: "#/components/schemas/utxo_infos" - "400": - $ref: "#/components/responses/BadRequest" - "401": - $ref: "#/components/responses/Unauthorized" - "404": - $ref: "#/components/responses/NotFound" - summary: UTXOs Info - description: Get UTxO set for requested UTxO references - components: parameters: select: @@ -1911,7 +1912,8 @@ components: _stake_addresses: - stake_test1urq4rcynzj4uxqc74c852zky7wa6epgmn9r6k3j3gv7502q8jks0l - stake_test1ur4t5nhceyn2amfuj7z74uxmmj8jf9fmgd2egqw8c98ve3cp2g4wx - todo: add examples referencing all existing param + _first_only: false + _empty: false stake_addresses_with_extended: content: @@ -2158,8 +2160,8 @@ components: description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call example: _utxo_refs: - - ##utxo_ref1_rb## - - ##utxo_ref2_rb## + - fixme + - fixme _extended: false securitySchemes: bearerAuth: @@ -4027,12 +4029,12 @@ tags: - name: Transactions description: Query blockchain transaction details x-tag-expanded: false + - name: Stake Account + description: Query details about specific stake account addresses + x-tag-expanded: false - name: Address description: Query information about specific address(es) x-tag-expanded: false - - name: Account - description: Query details about specific stake account addresses - x-tag-expanded: false - name: Asset description: Query Asset related informations x-tag-expanded: false diff --git a/specs/results/koiosapi-preview.yaml b/specs/results/koiosapi-preview.yaml index ecb956ce..4d9ece69 100644 --- a/specs/results/koiosapi-preview.yaml +++ b/specs/results/koiosapi-preview.yaml @@ -151,6 +151,7 @@ servers: - url: https://preview.koios.rest/api/v0 - url: https://preprod.koios.rest/api/v0 paths: + /tip: #RPC get: tags: @@ -231,6 +232,7 @@ paths: $ref: "#/components/responses/NotFound" summary: Param Update Proposals description: Get all parameter update proposals submitted to the chain starting Shelley era + /epoch_info: #RPC get: tags: @@ -298,6 +300,7 @@ paths: summary: Epoch's Block Protocols description: >- Get the information about block protocol distribution in epoch + /blocks: get: tags: @@ -359,28 +362,29 @@ paths: $ref: "#/components/responses/NotFound" summary: Block Transactions description: Get a list of all transactions included in provided blocks - /tx_info: #RPC + + /utxo_info: #RPC post: tags: - Transactions requestBody: - $ref: "#/components/requestBodies/tx_ids" + $ref: "#/components/requestBodies/utxo_refs_with_extended" responses: "200": - description: Array of detailed information about transaction(s) + description: Array of UTXO details content: application/json: schema: - $ref: "#/components/schemas/tx_info" + $ref: "#/components/schemas/utxo_infos" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Transaction Information - description: Get detailed information about transaction(s) - /tx_utxos: #RPC + summary: UTxO Info + description: Get UTxO set for requested UTxO references + /tx_info: #RPC post: tags: - Transactions @@ -388,19 +392,19 @@ paths: $ref: "#/components/requestBodies/tx_ids" responses: "200": - description: Array of inputs and outputs for given transaction(s) + description: Array of detailed information about transaction(s) content: application/json: schema: - $ref: "#/components/schemas/tx_utxos" + $ref: "#/components/schemas/tx_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Transaction UTxOs [DEPRECATED] - description: Get UTxO set (inputs/outputs) of transactions. + summary: Transaction Information + description: Get detailed information about transaction(s) /tx_metadata: #RPC post: tags: @@ -492,50 +496,51 @@ paths: $ref: "#/components/responses/NotFound" summary: Transaction Status (Block Confirmations) description: Get the number of block confirmations for a given transaction hash list - /address_info: #RPC + /tx_utxos: #RPC post: tags: - - Address + - Transactions + deprecated: true requestBody: - $ref: "#/components/requestBodies/payment_addresses" + $ref: "#/components/requestBodies/tx_ids" responses: "200": - description: Array of address information + description: Array of inputs and outputs for given transaction(s) content: application/json: schema: - $ref: "#/components/schemas/address_info" + $ref: "#/components/schemas/tx_utxos" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Address Information - description: Get address info - balance, associated stake address (if any) and UTxO set for given addresses - /address_txs: #RPC + summary: Transaction UTxOs + description: Get UTxO set (inputs/outputs) of transactions [DEPRECATED: Use /utxo_info instead]. + + /address_info: #RPC post: tags: - Address requestBody: - $ref: "#/components/requestBodies/address_txs" + $ref: "#/components/requestBodies/payment_addresses" responses: "200": - description: Array of transaction hashes + description: Array of address information content: application/json: schema: - $ref: "#/components/schemas/address_txs" + $ref: "#/components/schemas/address_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Address Transactions - description: Get the transaction hash list of input address array, optionally filtering after specified block height (inclusive) - - /address_utxos: #RPC #todo new + summary: Address Information + description: Get address info - balance, associated stake address (if any) and UTxO set for given addresses + /address_utxos: #RPC post: tags: - Address @@ -577,28 +582,27 @@ paths: $ref: "#/components/responses/NotFound" summary: UTxOs from payment credentials description: Get UTxO details for requested payment credentials - - /address_assets: #RPC + /address_txs: #RPC post: tags: - Address requestBody: - $ref: "#/components/requestBodies/payment_addresses" + $ref: "#/components/requestBodies/address_txs" responses: "200": - description: Array of address-owned assets + description: Array of transaction hashes content: application/json: schema: - $ref: "#/components/schemas/address_assets" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Address Assets - description: Get the list of all the assets (policy, name and quantity) for given addresses + summary: Address Transactions + description: Get the transaction hash list of input address array, optionally filtering after specified block height (inclusive) /credential_txs: #RPC post: tags: @@ -620,6 +624,28 @@ paths: $ref: "#/components/responses/NotFound" summary: Transactions from payment credentials description: Get the transaction hash list of input payment credential array, optionally filtering after specified block height (inclusive) + /address_assets: #RPC + post: + tags: + - Address + requestBody: + $ref: "#/components/requestBodies/payment_addresses" + responses: + "200": + description: Array of address-owned assets + content: + application/json: + schema: + $ref: "#/components/schemas/address_assets" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Address Assets + description: Get the list of all the assets (policy, name and quantity) for given addresses + /account_list: get: tags: @@ -660,30 +686,27 @@ paths: $ref: "#/components/responses/NotFound" summary: Account Information description: Get the account information for given stake addresses - - /account_txs: #RPC # todo - new - get: + /account_info_cached: #RPC + post: tags: - Stake Account - parameters: - - $ref: "#/components/parameters/_stake_address" - - $ref: "#/components/parameters/_after_block_height" + requestBody: + $ref: "#/components/requestBodies/stake_addresses" responses: "200": - description: Array of Txs associated with stake address (account) + description: Array of account information content: application/json: schema: - $ref: "#/components/schemas/address_txs" + $ref: "#/components/schemas/account_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Account Txs - description: Get a list of all Txs for a given stake address (account) - + summary: Account Information (Cached) + description: Get the cached account information for given stake addresses (effective for performance query against registered accounts) /account_utxos: #RPC post: tags: @@ -705,28 +728,28 @@ paths: $ref: "#/components/responses/NotFound" summary: UTxOs for stake addresses (accounts) description: Get a list of all UTxOs for given stake addresses (account)s - - /account_info_cached: #RPC - post: + /account_txs: #RPC + get: tags: - Stake Account - requestBody: - $ref: "#/components/requestBodies/stake_addresses" + parameters: + - $ref: "#/components/parameters/_stake_address" + - $ref: "#/components/parameters/_after_block_height" responses: "200": - description: Array of account information + description: Array of Txs associated with stake address (account) content: application/json: schema: - $ref: "#/components/schemas/account_info" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Account Information (Cached) - description: Get the cached account information for given stake addresses, effective for registered accounts + summary: Account Txs + description: Get a list of all Txs for a given stake address (account) /account_rewards: #RPC post: tags: @@ -835,6 +858,7 @@ paths: $ref: "#/components/responses/NotFound" summary: Account History description: Get the staking history of given stake addresses (accounts) + /asset_list: get: tags: @@ -854,96 +878,49 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset List description: Get the list of all native assets (paginated) - /asset_token_registry: - get: - tags: - - Asset - responses: - "200": - description: Array of token registry information for each asset - content: - application/json: - schema: - $ref: "#/components/schemas/asset_token_registry" - "400": - $ref: "#/components/responses/BadRequest" - "401": - $ref: "#/components/responses/Unauthorized" - "404": - $ref: "#/components/responses/NotFound" - summary: Asset Token Registry - description: Get a list of assets registered via token registry on github - /asset_addresses: #RPC - get: - tags: - - Asset - parameters: - - $ref: "#/components/parameters/_asset_policy" - - $ref: "#/components/parameters/_asset_name" - responses: - "200": - description: Array of payment addresses holding the given token (including balances) - content: - application/json: - schema: - $ref: "#/components/schemas/asset_addresses" - "400": - $ref: "#/components/responses/BadRequest" - "401": - $ref: "#/components/responses/Unauthorized" - "404": - $ref: "#/components/responses/NotFound" - summary: Asset Addresses - description: Get the list of all addresses holding a given asset

- `Note - Due to cardano's UTxO design and usage from projects, asset to addresses map can be infinite. Thus, for a small subset of active projects - with millions of transactions, these might end up with timeouts (HTTP code 504) on free layer. Such large-scale projects are free to subscribe to - query layers to have a dedicated cache table for themselves served via Koios.` - /asset_address_list: #RPC + /policy_asset_list: #RPC get: tags: - Asset parameters: - $ref: "#/components/parameters/_asset_policy" - - $ref: "#/components/parameters/_asset_name" responses: "200": - description: Array of payment addresses holding the given token (including balances) + description: Array of detailed information of assets under the same policy content: application/json: schema: - $ref: "#/components/schemas/asset_addresses" + $ref: "#/components/schemas/policy_asset_list" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Asset Address List [DEPRECATED] - description: Get the list of all addresses holding a given asset (replaced by asset_addresses) - /asset_nft_address: #RPC + summary: Policy Asset List + description: Get the list of asset under the given policy (including balances) + /asset_token_registry: get: tags: - Asset - parameters: - - $ref: "#/components/parameters/_asset_policy_nft" - - $ref: "#/components/parameters/_asset_name_nft" responses: "200": - description: Payment addresses currently holding the given NFT + description: Array of token registry information for each asset content: application/json: schema: - $ref: "#/components/schemas/asset_nft_address" + $ref: "#/components/schemas/asset_token_registry" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: NFT Address - description: Get the address where specified NFT currently reside on. + summary: Asset Token Registry + description: Get a list of assets registered via token registry on github /asset_info: #RPC get: + deprecated: true tags: - Asset parameters: @@ -984,7 +961,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset Information (Bulk) description: Get the information of a list of assets including first minting & token registry metadata - /asset_utxos: #RPC post: tags: @@ -1006,7 +982,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset UTXO Information (Bulk) description: Get the UTXO information of a list of assets including - /asset_history: #RPC get: tags: @@ -1029,52 +1004,54 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset History description: Get the mint/burn history of an asset - /policy_asset_addresses: #RPC + /asset_addresses: #RPC get: tags: - Asset parameters: - $ref: "#/components/parameters/_asset_policy" + - $ref: "#/components/parameters/_asset_name" responses: "200": - description: Array of asset names and payment addresses for the given policy (including balances) + description: Array of payment addresses holding the given token (including balances) content: application/json: schema: - $ref: "#/components/schemas/policy_asset_addresses" + $ref: "#/components/schemas/asset_addresses" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Policy Asset Address List - description: Get the list of addresses with quantity for each asset on the given policy

+ summary: Asset Addresses + description: Get the list of all addresses holding a given asset

`Note - Due to cardano's UTxO design and usage from projects, asset to addresses map can be infinite. Thus, for a small subset of active projects with millions of transactions, these might end up with timeouts (HTTP code 504) on free layer. Such large-scale projects are free to subscribe to query layers to have a dedicated cache table for themselves served via Koios.` - /policy_asset_info: #RPC + /asset_nft_address: #RPC get: tags: - Asset parameters: - - $ref: "#/components/parameters/_asset_policy" + - $ref: "#/components/parameters/_asset_policy_nft" + - $ref: "#/components/parameters/_asset_name_nft" responses: "200": - description: Array of detailed information of assets under the same policy + description: Payment addresses currently holding the given NFT content: application/json: schema: - $ref: "#/components/schemas/policy_asset_info" + $ref: "#/components/schemas/asset_nft_address" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Policy Asset Information - description: Get the information for all assets under the same policy - /asset_policy_info: #RPC + summary: NFT Address + description: Get the address where specified NFT currently reside on. + /policy_asset_addresses: #RPC get: tags: - Asset @@ -1082,20 +1059,23 @@ paths: - $ref: "#/components/parameters/_asset_policy" responses: "200": - description: Array of detailed information of assets under the same policy + description: Array of asset names and payment addresses for the given policy (including balances) content: application/json: schema: - $ref: "#/components/schemas/policy_asset_info" + $ref: "#/components/schemas/policy_asset_addresses" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Asset Policy Information [DEPRECATED] - description: Get the information for all assets under the same policy (replaced by asset_addresses) - /policy_asset_list: #RPC + summary: Policy Asset Address List + description: Get the list of addresses with quantity for each asset on the given policy

+ `Note - Due to cardano's UTxO design and usage from projects, asset to addresses map can be infinite. Thus, for a small subset of active projects + with millions of transactions, these might end up with timeouts (HTTP code 504) on free layer. Such large-scale projects are free to subscribe to + query layers to have a dedicated cache table for themselves served via Koios.` + /policy_asset_info: #RPC get: tags: - Asset @@ -1107,15 +1087,15 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/policy_asset_list" + $ref: "#/components/schemas/policy_asset_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Policy Asset List - description: Get the list of asset under the given policy (including balances) + summary: Policy Asset Information + description: Get the information for all assets under the same policy /asset_summary: #RPC get: tags: @@ -1162,6 +1142,52 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset Transactions description: Get the list of current or all asset transaction hashes (newest first) + /asset_address_list: #RPC + get: + tags: + - Asset + deprecated: true + parameters: + - $ref: "#/components/parameters/_asset_policy" + - $ref: "#/components/parameters/_asset_name" + responses: + "200": + description: Array of payment addresses holding the given token (including balances) + content: + application/json: + schema: + $ref: "#/components/schemas/asset_addresses" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Asset Address List + description: Get the list of all addresses holding a given asset [DEPRECATED: replaced by asset_addresses] + /asset_policy_info: #RPC + get: + deprecated: true + tags: + - Asset + parameters: + - $ref: "#/components/parameters/_asset_policy" + responses: + "200": + description: Array of detailed information of assets under the same policy + content: + application/json: + schema: + $ref: "#/components/schemas/policy_asset_info" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Asset Policy Information + description: Get the information for all assets under the same policy (DEPRECATED: replaced by policy_asset_info) + /pool_list: #RPC get: tags: @@ -1398,7 +1424,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Datum Information description: List of datum information for given datum hashes - /native_script_list: #RPC get: tags: @@ -1458,8 +1483,7 @@ paths: $ref: "#/components/responses/NotFound" summary: Script Redeemers description: List of all redeemers for a given script hash - - /script_utxos: #RPC todo new + /script_utxos: #RPC get: tags: - Script @@ -1481,7 +1505,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Script UTXOs description: List of all UTXOs for a given script hash - /datum_info: #RPC post: tags: @@ -1504,28 +1527,6 @@ paths: summary: Datum Information description: List of datum information for given datum hashes - /utxo_info: #RPC #todonew - post: - tags: - - UTXO - requestBody: - $ref: "#/components/requestBodies/utxo_refs_with_extended" - responses: - "200": - description: Array of UTXO details - content: - application/json: - schema: - $ref: "#/components/schemas/utxo_infos" - "400": - $ref: "#/components/responses/BadRequest" - "401": - $ref: "#/components/responses/Unauthorized" - "404": - $ref: "#/components/responses/NotFound" - summary: UTXOs Info - description: Get UTxO set for requested UTxO references - components: parameters: select: @@ -1911,7 +1912,8 @@ components: _stake_addresses: - stake_test1urqntq4wexjylnrdnp97qq79qkxxvrsa9lcnwr7ckjd6w0cr04y4p - stake_test1up6wqzrw2h9vvjy5zfkjn0dwtymy5r29zyhf8fyhm6fat9c2am5hl - todo: add examples referencing all existing param + _first_only: false + _empty: false stake_addresses_with_extended: content: @@ -2158,8 +2160,8 @@ components: description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call example: _utxo_refs: - - ##utxo_ref1_rb## - - ##utxo_ref2_rb## + - fixme + - fixme _extended: false securitySchemes: bearerAuth: @@ -4027,12 +4029,12 @@ tags: - name: Transactions description: Query blockchain transaction details x-tag-expanded: false + - name: Stake Account + description: Query details about specific stake account addresses + x-tag-expanded: false - name: Address description: Query information about specific address(es) x-tag-expanded: false - - name: Account - description: Query details about specific stake account addresses - x-tag-expanded: false - name: Asset description: Query Asset related informations x-tag-expanded: false diff --git a/specs/templates/3-api-requestBodies.yaml b/specs/templates/3-api-requestBodies.yaml index 3a57d2a7..4ef376b5 100644 --- a/specs/templates/3-api-requestBodies.yaml +++ b/specs/templates/3-api-requestBodies.yaml @@ -130,7 +130,8 @@ requestBodies: _stake_addresses: - ##stake_addresses1_rb## - ##stake_addresses2_rb## - todo: add examples referencing all existing param + _first_only: false + _empty: false stake_addresses_with_extended: content: diff --git a/specs/templates/api-main.yaml b/specs/templates/api-main.yaml index 33c335c5..44f21099 100644 --- a/specs/templates/api-main.yaml +++ b/specs/templates/api-main.yaml @@ -6,6 +6,7 @@ servers: - url: https://preview.koios.rest/api/v0 - url: https://preprod.koios.rest/api/v0 paths: + /tip: #RPC get: tags: @@ -86,6 +87,7 @@ paths: $ref: "#/components/responses/NotFound" summary: Param Update Proposals description: Get all parameter update proposals submitted to the chain starting Shelley era + /epoch_info: #RPC get: tags: @@ -153,6 +155,7 @@ paths: summary: Epoch's Block Protocols description: >- Get the information about block protocol distribution in epoch + /blocks: get: tags: @@ -214,28 +217,29 @@ paths: $ref: "#/components/responses/NotFound" summary: Block Transactions description: Get a list of all transactions included in provided blocks - /tx_info: #RPC + + /utxo_info: #RPC post: tags: - Transactions requestBody: - $ref: "#/components/requestBodies/tx_ids" + $ref: "#/components/requestBodies/utxo_refs_with_extended" responses: "200": - description: Array of detailed information about transaction(s) + description: Array of UTXO details content: application/json: schema: - $ref: "#/components/schemas/tx_info" + $ref: "#/components/schemas/utxo_infos" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Transaction Information - description: Get detailed information about transaction(s) - /tx_utxos: #RPC + summary: UTxO Info + description: Get UTxO set for requested UTxO references + /tx_info: #RPC post: tags: - Transactions @@ -243,19 +247,19 @@ paths: $ref: "#/components/requestBodies/tx_ids" responses: "200": - description: Array of inputs and outputs for given transaction(s) + description: Array of detailed information about transaction(s) content: application/json: schema: - $ref: "#/components/schemas/tx_utxos" + $ref: "#/components/schemas/tx_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Transaction UTxOs [DEPRECATED] - description: Get UTxO set (inputs/outputs) of transactions. + summary: Transaction Information + description: Get detailed information about transaction(s) /tx_metadata: #RPC post: tags: @@ -347,50 +351,51 @@ paths: $ref: "#/components/responses/NotFound" summary: Transaction Status (Block Confirmations) description: Get the number of block confirmations for a given transaction hash list - /address_info: #RPC + /tx_utxos: #RPC post: tags: - - Address + - Transactions + deprecated: true requestBody: - $ref: "#/components/requestBodies/payment_addresses" + $ref: "#/components/requestBodies/tx_ids" responses: "200": - description: Array of address information + description: Array of inputs and outputs for given transaction(s) content: application/json: schema: - $ref: "#/components/schemas/address_info" + $ref: "#/components/schemas/tx_utxos" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Address Information - description: Get address info - balance, associated stake address (if any) and UTxO set for given addresses - /address_txs: #RPC + summary: Transaction UTxOs + description: Get UTxO set (inputs/outputs) of transactions [DEPRECATED: Use /utxo_info instead]. + + /address_info: #RPC post: tags: - Address requestBody: - $ref: "#/components/requestBodies/address_txs" + $ref: "#/components/requestBodies/payment_addresses" responses: "200": - description: Array of transaction hashes + description: Array of address information content: application/json: schema: - $ref: "#/components/schemas/address_txs" + $ref: "#/components/schemas/address_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Address Transactions - description: Get the transaction hash list of input address array, optionally filtering after specified block height (inclusive) - - /address_utxos: #RPC #todo new + summary: Address Information + description: Get address info - balance, associated stake address (if any) and UTxO set for given addresses + /address_utxos: #RPC post: tags: - Address @@ -432,28 +437,27 @@ paths: $ref: "#/components/responses/NotFound" summary: UTxOs from payment credentials description: Get UTxO details for requested payment credentials - - /address_assets: #RPC + /address_txs: #RPC post: tags: - Address requestBody: - $ref: "#/components/requestBodies/payment_addresses" + $ref: "#/components/requestBodies/address_txs" responses: "200": - description: Array of address-owned assets + description: Array of transaction hashes content: application/json: schema: - $ref: "#/components/schemas/address_assets" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Address Assets - description: Get the list of all the assets (policy, name and quantity) for given addresses + summary: Address Transactions + description: Get the transaction hash list of input address array, optionally filtering after specified block height (inclusive) /credential_txs: #RPC post: tags: @@ -475,6 +479,28 @@ paths: $ref: "#/components/responses/NotFound" summary: Transactions from payment credentials description: Get the transaction hash list of input payment credential array, optionally filtering after specified block height (inclusive) + /address_assets: #RPC + post: + tags: + - Address + requestBody: + $ref: "#/components/requestBodies/payment_addresses" + responses: + "200": + description: Array of address-owned assets + content: + application/json: + schema: + $ref: "#/components/schemas/address_assets" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Address Assets + description: Get the list of all the assets (policy, name and quantity) for given addresses + /account_list: get: tags: @@ -515,30 +541,27 @@ paths: $ref: "#/components/responses/NotFound" summary: Account Information description: Get the account information for given stake addresses - - /account_txs: #RPC # todo - new - get: + /account_info_cached: #RPC + post: tags: - Stake Account - parameters: - - $ref: "#/components/parameters/_stake_address" - - $ref: "#/components/parameters/_after_block_height" + requestBody: + $ref: "#/components/requestBodies/stake_addresses" responses: "200": - description: Array of Txs associated with stake address (account) + description: Array of account information content: application/json: schema: - $ref: "#/components/schemas/address_txs" + $ref: "#/components/schemas/account_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Account Txs - description: Get a list of all Txs for a given stake address (account) - + summary: Account Information (Cached) + description: Get the cached account information for given stake addresses (effective for performance query against registered accounts) /account_utxos: #RPC post: tags: @@ -560,28 +583,28 @@ paths: $ref: "#/components/responses/NotFound" summary: UTxOs for stake addresses (accounts) description: Get a list of all UTxOs for given stake addresses (account)s - - /account_info_cached: #RPC - post: + /account_txs: #RPC + get: tags: - Stake Account - requestBody: - $ref: "#/components/requestBodies/stake_addresses" + parameters: + - $ref: "#/components/parameters/_stake_address" + - $ref: "#/components/parameters/_after_block_height" responses: "200": - description: Array of account information + description: Array of Txs associated with stake address (account) content: application/json: schema: - $ref: "#/components/schemas/account_info" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Account Information (Cached) - description: Get the cached account information for given stake addresses, effective for registered accounts + summary: Account Txs + description: Get a list of all Txs for a given stake address (account) /account_rewards: #RPC post: tags: @@ -690,6 +713,7 @@ paths: $ref: "#/components/responses/NotFound" summary: Account History description: Get the staking history of given stake addresses (accounts) + /asset_list: get: tags: @@ -709,96 +733,49 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset List description: Get the list of all native assets (paginated) - /asset_token_registry: - get: - tags: - - Asset - responses: - "200": - description: Array of token registry information for each asset - content: - application/json: - schema: - $ref: "#/components/schemas/asset_token_registry" - "400": - $ref: "#/components/responses/BadRequest" - "401": - $ref: "#/components/responses/Unauthorized" - "404": - $ref: "#/components/responses/NotFound" - summary: Asset Token Registry - description: Get a list of assets registered via token registry on github - /asset_addresses: #RPC - get: - tags: - - Asset - parameters: - - $ref: "#/components/parameters/_asset_policy" - - $ref: "#/components/parameters/_asset_name" - responses: - "200": - description: Array of payment addresses holding the given token (including balances) - content: - application/json: - schema: - $ref: "#/components/schemas/asset_addresses" - "400": - $ref: "#/components/responses/BadRequest" - "401": - $ref: "#/components/responses/Unauthorized" - "404": - $ref: "#/components/responses/NotFound" - summary: Asset Addresses - description: Get the list of all addresses holding a given asset

- `Note - Due to cardano's UTxO design and usage from projects, asset to addresses map can be infinite. Thus, for a small subset of active projects - with millions of transactions, these might end up with timeouts (HTTP code 504) on free layer. Such large-scale projects are free to subscribe to - query layers to have a dedicated cache table for themselves served via Koios.` - /asset_address_list: #RPC + /policy_asset_list: #RPC get: tags: - Asset parameters: - $ref: "#/components/parameters/_asset_policy" - - $ref: "#/components/parameters/_asset_name" responses: "200": - description: Array of payment addresses holding the given token (including balances) + description: Array of detailed information of assets under the same policy content: application/json: schema: - $ref: "#/components/schemas/asset_addresses" + $ref: "#/components/schemas/policy_asset_list" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Asset Address List [DEPRECATED] - description: Get the list of all addresses holding a given asset (replaced by asset_addresses) - /asset_nft_address: #RPC + summary: Policy Asset List + description: Get the list of asset under the given policy (including balances) + /asset_token_registry: get: tags: - Asset - parameters: - - $ref: "#/components/parameters/_asset_policy_nft" - - $ref: "#/components/parameters/_asset_name_nft" responses: "200": - description: Payment addresses currently holding the given NFT + description: Array of token registry information for each asset content: application/json: schema: - $ref: "#/components/schemas/asset_nft_address" + $ref: "#/components/schemas/asset_token_registry" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: NFT Address - description: Get the address where specified NFT currently reside on. + summary: Asset Token Registry + description: Get a list of assets registered via token registry on github /asset_info: #RPC get: + deprecated: true tags: - Asset parameters: @@ -839,7 +816,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset Information (Bulk) description: Get the information of a list of assets including first minting & token registry metadata - /asset_utxos: #RPC post: tags: @@ -861,7 +837,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset UTXO Information (Bulk) description: Get the UTXO information of a list of assets including - /asset_history: #RPC get: tags: @@ -884,52 +859,54 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset History description: Get the mint/burn history of an asset - /policy_asset_addresses: #RPC + /asset_addresses: #RPC get: tags: - Asset parameters: - $ref: "#/components/parameters/_asset_policy" + - $ref: "#/components/parameters/_asset_name" responses: "200": - description: Array of asset names and payment addresses for the given policy (including balances) + description: Array of payment addresses holding the given token (including balances) content: application/json: schema: - $ref: "#/components/schemas/policy_asset_addresses" + $ref: "#/components/schemas/asset_addresses" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Policy Asset Address List - description: Get the list of addresses with quantity for each asset on the given policy

+ summary: Asset Addresses + description: Get the list of all addresses holding a given asset

`Note - Due to cardano's UTxO design and usage from projects, asset to addresses map can be infinite. Thus, for a small subset of active projects with millions of transactions, these might end up with timeouts (HTTP code 504) on free layer. Such large-scale projects are free to subscribe to query layers to have a dedicated cache table for themselves served via Koios.` - /policy_asset_info: #RPC + /asset_nft_address: #RPC get: tags: - Asset parameters: - - $ref: "#/components/parameters/_asset_policy" + - $ref: "#/components/parameters/_asset_policy_nft" + - $ref: "#/components/parameters/_asset_name_nft" responses: "200": - description: Array of detailed information of assets under the same policy + description: Payment addresses currently holding the given NFT content: application/json: schema: - $ref: "#/components/schemas/policy_asset_info" + $ref: "#/components/schemas/asset_nft_address" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Policy Asset Information - description: Get the information for all assets under the same policy - /asset_policy_info: #RPC + summary: NFT Address + description: Get the address where specified NFT currently reside on. + /policy_asset_addresses: #RPC get: tags: - Asset @@ -937,20 +914,23 @@ paths: - $ref: "#/components/parameters/_asset_policy" responses: "200": - description: Array of detailed information of assets under the same policy + description: Array of asset names and payment addresses for the given policy (including balances) content: application/json: schema: - $ref: "#/components/schemas/policy_asset_info" + $ref: "#/components/schemas/policy_asset_addresses" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Asset Policy Information [DEPRECATED] - description: Get the information for all assets under the same policy (replaced by asset_addresses) - /policy_asset_list: #RPC + summary: Policy Asset Address List + description: Get the list of addresses with quantity for each asset on the given policy

+ `Note - Due to cardano's UTxO design and usage from projects, asset to addresses map can be infinite. Thus, for a small subset of active projects + with millions of transactions, these might end up with timeouts (HTTP code 504) on free layer. Such large-scale projects are free to subscribe to + query layers to have a dedicated cache table for themselves served via Koios.` + /policy_asset_info: #RPC get: tags: - Asset @@ -962,15 +942,15 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/policy_asset_list" + $ref: "#/components/schemas/policy_asset_info" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Policy Asset List - description: Get the list of asset under the given policy (including balances) + summary: Policy Asset Information + description: Get the information for all assets under the same policy /asset_summary: #RPC get: tags: @@ -1017,6 +997,52 @@ paths: $ref: "#/components/responses/NotFound" summary: Asset Transactions description: Get the list of current or all asset transaction hashes (newest first) + /asset_address_list: #RPC + get: + tags: + - Asset + deprecated: true + parameters: + - $ref: "#/components/parameters/_asset_policy" + - $ref: "#/components/parameters/_asset_name" + responses: + "200": + description: Array of payment addresses holding the given token (including balances) + content: + application/json: + schema: + $ref: "#/components/schemas/asset_addresses" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Asset Address List + description: Get the list of all addresses holding a given asset [DEPRECATED: replaced by asset_addresses] + /asset_policy_info: #RPC + get: + deprecated: true + tags: + - Asset + parameters: + - $ref: "#/components/parameters/_asset_policy" + responses: + "200": + description: Array of detailed information of assets under the same policy + content: + application/json: + schema: + $ref: "#/components/schemas/policy_asset_info" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Asset Policy Information + description: Get the information for all assets under the same policy (DEPRECATED: replaced by policy_asset_info) + /pool_list: #RPC get: tags: @@ -1253,7 +1279,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Datum Information description: List of datum information for given datum hashes - /native_script_list: #RPC get: tags: @@ -1313,8 +1338,7 @@ paths: $ref: "#/components/responses/NotFound" summary: Script Redeemers description: List of all redeemers for a given script hash - - /script_utxos: #RPC todo new + /script_utxos: #RPC get: tags: - Script @@ -1336,7 +1360,6 @@ paths: $ref: "#/components/responses/NotFound" summary: Script UTXOs description: List of all UTXOs for a given script hash - /datum_info: #RPC post: tags: @@ -1359,28 +1382,6 @@ paths: summary: Datum Information description: List of datum information for given datum hashes - /utxo_info: #RPC #todonew - post: - tags: - - UTXO - requestBody: - $ref: "#/components/requestBodies/utxo_refs_with_extended" - responses: - "200": - description: Array of UTXO details - content: - application/json: - schema: - $ref: "#/components/schemas/utxo_infos" - "400": - $ref: "#/components/responses/BadRequest" - "401": - $ref: "#/components/responses/Unauthorized" - "404": - $ref: "#/components/responses/NotFound" - summary: UTXOs Info - description: Get UTxO set for requested UTxO references - components: #!params!# #!requestBodies!# @@ -1415,12 +1416,12 @@ tags: - name: Transactions description: Query blockchain transaction details x-tag-expanded: false + - name: Stake Account + description: Query details about specific stake account addresses + x-tag-expanded: false - name: Address description: Query information about specific address(es) x-tag-expanded: false - - name: Account - description: Query details about specific stake account addresses - x-tag-expanded: false - name: Asset description: Query Asset related informations x-tag-expanded: false diff --git a/specs/templates/example-map.json b/specs/templates/example-map.json index dee62c17..5ff9d44e 100644 --- a/specs/templates/example-map.json +++ b/specs/templates/example-map.json @@ -80,7 +80,7 @@ }, "_script_hash": { "m": "d8480dc869b94b80e81ec91b0abe307279311fe0e7001a9488f61ff8", - "g": "160301a01ee86d8e46cbe3aef1e3bf69bfa28c65d5be2dde56a37af8", + "g": "1392eec7d575292ae1523da65ff1b4b021886e917c8c43de54aa7cbd", "pv": "f758cf422ca0cbed7d9d6fad1eb5a3c70537d62e661ad450dd2a3810", "pp": "590555d7b5760e98ae2bdd29b356247776251dfab0a207bfce98a485" } @@ -182,13 +182,13 @@ "pv": "f1592b29b79ae85d753913dd25644c60925a4a0683979faa33832fead4b4bd9c", "pp": "d10133964da9e443b303917fd0b7644ae3d01c133deff85b4f59416c2d00f530" }, - "_utxo_ref1": { + "utxo_ref1": { "m": "fixme", "g": "f82e568d42604fd71424d193c86ec00c97aead2b8f018e81c3139d9e3770c735#0", "pv": "fixme", "pp": "fixme" }, - "_utxo_ref2": { + "utxo_ref2": { "m": "fixme", "g": "88ae22495123c7ee37a0bbe865243757185a302ed5359d1eae9347030628290a#0", "pv": "fixme", @@ -214,13 +214,13 @@ }, "script_hashes1": { "m": "818ee3db3bbbd04f9f2ce21778cac3ac605802a4fcb00c8b3a58ee2dafc17d46", - "g": "964af1ff2a66ce472d34ac39b47f356b6d971d62c794a89ec12825d5de30f3aa", + "g": "a08a267e92456ba48e157dd7e77bdd35aba0fc50fe625a10a6a7fc5e", "pv": "6181b3dc623cd8812caf027a3507e9b3095388a7cf3db65983e1fddd3a84c88c", "pp": "5571e2c3549f15934a38382d1318707a86751fb70827f4cbd29b104480f1be9b" }, "script_hashes2": { "m": "45b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0", - "g": "17bdb9c96b77c7718d546be50193a80bc9d72081b7375e5e16891db196af14fc", + "g": "1f3a4aa08cfa0e47fff200578f0d4847b6890b7093a765773feb35de", "pv": "f8ae55ff89e1f5366f23e16bcaf2073252337b96031a02d79e41d653b5f0a978", "pp": "5f7212f546d7e7308ce99b925f05538db19981f4ea3084559c0b28a363245826" },