diff --git a/files/grest/rpc/01_cached_tables/epoch_info_cache.sql b/files/grest/rpc/01_cached_tables/epoch_info_cache.sql index fe89319d..c210d664 100644 --- a/files/grest/rpc/01_cached_tables/epoch_info_cache.sql +++ b/files/grest/rpc/01_cached_tables/epoch_info_cache.sql @@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS grest.epoch_info_cache ( i_avg_blk_reward lovelace, i_last_tx_id bigint, p_nonce text, - p_block_hash text, + p_block_hash text ); COMMENT ON TABLE grest.epoch_info_cache IS 'Contains detailed info for epochs including protocol parameters'; @@ -76,6 +76,20 @@ BEGIN DELETE FROM grest.epoch_info_cache WHERE epoch_no >= _epoch_no_to_insert_from; + DROP TABLE IF EXISTS last_tx_id_subset; + CREATE TEMP TABLE last_tx_id_subset ( + epoch_no bigint, + tx_id bigint + ); + + INSERT INTO last_tx_id_subset + SELECT b.epoch_no, MAX(tx.id) + FROM block AS b + INNER JOIN tx ON tx.block_id = b.id + WHERE b.block_no IS NOT NULL + AND b.tx_count != 0 + GROUP BY b.epoch_no; + INSERT INTO grest.epoch_info_cache SELECT DISTINCT ON (b.time) e.no AS epoch_no, @@ -93,7 +107,11 @@ BEGIN WHEN e.no <= _curr_epoch THEN ROUND(reward_pot.amount / e.blk_count) ELSE NULL END AS i_avg_blk_reward, - last_tx.tx_id AS i_last_tx_id, + ( + SELECT MAX(tx_id) + FROM last_tx_id_subset + WHERE epoch_no <= e.no + ) AS i_last_tx_id, ENCODE(ep.nonce, 'hex') AS p_nonce, ENCODE(b.hash, 'hex') AS p_block_hash FROM epoch AS e @@ -109,14 +127,6 @@ BEGIN GROUP BY e.no ) AS reward_pot ON TRUE - LEFT JOIN LATERAL ( - SELECT MAX(tx.id) AS tx_id - FROM block AS b - INNER JOIN tx ON tx.block_id = b.id - WHERE b.epoch_no <= e.no - AND b.block_no IS NOT NULL - AND b.tx_count != 0 - ) AS last_tx ON TRUE WHERE e.no >= _epoch_no_to_insert_from ORDER BY b.time ASC, diff --git a/files/grest/rpc/account/account_utxos.sql b/files/grest/rpc/account/account_utxos.sql index 55163cc5..5efa664e 100644 --- a/files/grest/rpc/account/account_utxos.sql +++ b/files/grest/rpc/account/account_utxos.sql @@ -91,4 +91,4 @@ BEGIN END; $$; -COMMENT ON FUNCTION grest.address_utxos IS 'Get UTxO details for requested addresses'; -- noqa: LT01 \ No newline at end of file +COMMENT ON FUNCTION grest.account_utxos IS 'Get UTxO details for requested stake account'; -- noqa: LT01 \ No newline at end of file diff --git a/files/grest/rpc/script/datum_info.sql b/files/grest/rpc/script/datum_info.sql index e74352fd..c09c7d81 100644 --- a/files/grest/rpc/script/datum_info.sql +++ b/files/grest/rpc/script/datum_info.sql @@ -1,6 +1,7 @@ CREATE OR REPLACE FUNCTION grest.datum_info(_datum_hashes text []) RETURNS TABLE ( - hash text, + datum_hash text, + creation_tx_hash text, value jsonb, bytes text ) @@ -13,14 +14,14 @@ BEGIN FROM UNNEST(_datum_hashes) AS d_hash; RETURN QUERY SELECT - ENCODE(d.hash, 'hex'), + ENCODE(d.hash,'hex'), + ENCODE(tx.hash,'hex') AS creation_tx_hash, d.value, - ENCODE(d.bytes, 'hex') - FROM - datum AS d - WHERE - d.hash = ANY(_datum_hashes_decoded); + ENCODE(d.bytes,'hex') + FROM datum AS d + INNER JOIN tx ON tx.id = d.tx_id + WHERE d.hash = ANY(_datum_hashes_decoded); END; $$; -COMMENT ON FUNCTION grest.datum_info IS 'Get information about a given data FROM hashes.'; -- noqa: LT01 +COMMENT ON FUNCTION grest.datum_info IS 'Get information about a given datum FROM hashes.'; -- noqa: LT01 \ No newline at end of file diff --git a/files/grest/rpc/script/native_script_list.sql b/files/grest/rpc/script/native_script_list.sql index a0af9728..7f0482e1 100644 --- a/files/grest/rpc/script/native_script_list.sql +++ b/files/grest/rpc/script/native_script_list.sql @@ -2,22 +2,22 @@ CREATE OR REPLACE FUNCTION grest.native_script_list() RETURNS TABLE ( script_hash text, creation_tx_hash text, - type scripttype, - script jsonb + type text, + size word31type ) LANGUAGE plpgsql AS $$ BEGIN RETURN QUERY SELECT - ENCODE(script.hash, 'hex'), - ENCODE(tx.hash, 'hex'), - script.type, - script.json - FROM script - INNER JOIN tx ON tx.id = script.tx_id - WHERE script.type IN ('timelock', 'multisig'); + ENCODE(s.hash, 'hex')::text AS script_hash, + ENCODE(tx.hash, 'hex')::text AS creation_tx_hash, + s.type::text AS type, + s.serialised_size AS size + FROM script AS s + INNER JOIN tx ON tx.id = s.tx_id + WHERE s.type IN ('timelock', 'multisig'); END; $$; -COMMENT ON FUNCTION grest.native_script_list IS 'Get a list of all native(multisig/timelock) script hashes with creation tx hash, type and script in json format.'; --noqa: LT01 +COMMENT ON FUNCTION grest.native_script_list IS 'Get a list of all native(multisig/timelock) script hashes with creation tx hash, type and script size.'; --noqa: LT01 \ No newline at end of file diff --git a/files/grest/rpc/script/plutus_script_list.sql b/files/grest/rpc/script/plutus_script_list.sql index e149f5d8..b7f66b56 100644 --- a/files/grest/rpc/script/plutus_script_list.sql +++ b/files/grest/rpc/script/plutus_script_list.sql @@ -1,19 +1,23 @@ CREATE OR REPLACE FUNCTION grest.plutus_script_list() RETURNS TABLE ( script_hash text, - creation_tx_hash text + creation_tx_hash text, + type text, + size word31type ) LANGUAGE plpgsql AS $$ BEGIN RETURN QUERY SELECT - ENCODE(script.hash, 'hex') AS script_hash, - ENCODE(tx.hash, 'hex') AS creation_tx_hash - FROM script - INNER JOIN tx ON tx.id = script.tx_id - WHERE script.type IN ('plutusV1', 'plutusV2'); + ENCODE(s.hash,'hex')::text AS script_hash, + ENCODE(tx.hash,'hex')::text AS creation_tx_hash, + s.type::text AS type, + s.serialised_size AS size + FROM script AS s + INNER JOIN tx ON tx.id = s.tx_id + WHERE s.type IN ('plutusV1', 'plutusV2'); END; $$; -COMMENT ON FUNCTION grest.plutus_script_list IS 'Get a list of all plutus script hashes with creation tx hash.'; --noqa: LT01 +COMMENT ON FUNCTION grest.plutus_script_list IS 'Get a list of all plutus script hashes with creation tx hash.'; --noqa: LT01 \ No newline at end of file diff --git a/files/grest/rpc/script/script_info.sql b/files/grest/rpc/script/script_info.sql new file mode 100644 index 00000000..c7322d4b --- /dev/null +++ b/files/grest/rpc/script/script_info.sql @@ -0,0 +1,32 @@ +CREATE OR REPLACE FUNCTION grest.script_info(_script_hashes text []) +RETURNS TABLE ( + script_hash text, + creation_tx_hash text, + type text, + value jsonb, + bytes text, + size word31type +) +LANGUAGE plpgsql +AS $$ +DECLARE + _script_hashes_decoded bytea[]; +BEGIN + SELECT INTO _script_hashes_decoded ARRAY_AGG(DECODE(s_hash, 'hex')) + FROM UNNEST(_script_hashes) AS s_hash; + RETURN QUERY + SELECT + ENCODE(s.hash,'hex') AS script_hash, + ENCODE(tx.hash,'hex') AS creation_tx_hash, + s.type::text AS type, + s.json AS value, + ENCODE(s.bytes,'hex')::text AS bytes, + s.serialised_size AS size + FROM script AS s + INNER JOIN tx ON tx.id = s.tx_id + WHERE s.hash = ANY(_script_hashes_decoded) + ; +END; +$$; + +COMMENT ON FUNCTION grest.script_info IS 'Get information about a given script FROM hashes.'; -- noqa: LT01 \ No newline at end of file diff --git a/specs/results/koiosapi-guild.yaml b/specs/results/koiosapi-guild.yaml index 602d299e..a7763c32 100644 --- a/specs/results/koiosapi-guild.yaml +++ b/specs/results/koiosapi-guild.yaml @@ -1,7 +1,7 @@ openapi: 3.0.2 info: title: Koios API - version: 1.0.11rc + version: v1.0.11rc description: | Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples. @@ -534,19 +534,41 @@ paths: $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 + post: + tags: + - Address + requestBody: + $ref: "#/components/requestBodies/payment_addresses_with_extended" + responses: + "200": + description: Array of address UTXOs + 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: Address UTXOs + description: Get UTxO set for given addresses /credential_utxos: #RPC post: tags: - Address requestBody: - $ref: "#/components/requestBodies/credential_utxos" + $ref: "#/components/requestBodies/utxo_infos" responses: "200": description: Array of UTxOs with balances content: application/json: schema: - $ref: "#/components/schemas/credential_utxos" + $ref: "#/components/schemas/utxo_infos" "400": $ref: "#/components/responses/BadRequest" "401": @@ -554,7 +576,8 @@ paths: "404": $ref: "#/components/responses/NotFound" summary: UTxOs from payment credentials - description: Get a list of UTxO against input payment credential array including their balances + description: Get UTxO details for requested payment credentials + /address_assets: #RPC post: tags: @@ -588,7 +611,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/credential_txs" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": @@ -637,27 +660,52 @@ paths: $ref: "#/components/responses/NotFound" summary: Account Information description: Get the account information for given stake addresses - /account_utxos: #RPC + + /account_txs: #RPC # todo - new get: tags: - Stake Account parameters: - $ref: "#/components/parameters/_stake_address" + - $ref: "#/components/parameters/_after_block_height" + responses: + "200": + description: Array of Txs associated with stake address (account) + content: + application/json: + schema: + $ref: "#/components/schemas/address_txs" + "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) + + /account_utxos: #RPC + post: + tags: + - Stake Account + requestBody: + $ref: "#/components/requestBodies/stake_addresses_with_extended" responses: "200": - description: Array of account UTxOs associated with stake address + description: Array of account UTxOs associated with given stake addresses content: application/json: schema: - $ref: "#/components/schemas/account_utxos" + $ref: "#/components/schemas/utxo_infos" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Account UTxOs - description: Get a list of all UTxOs for a given stake address (account) + summary: UTxOs for stake addresses (accounts) + description: Get a list of all UTxOs for given stake addresses (account)s + /account_info_cached: #RPC post: tags: @@ -936,6 +984,29 @@ 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: + - Asset + requestBody: + $ref: "#/components/requestBodies/asset_list_with_extended" + responses: + "200": + description: Array of UTXOs for given asset list + 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: Asset UTXO Information (Bulk) + description: Get the UTXO information of a list of assets including + /asset_history: #RPC get: tags: @@ -1078,11 +1149,11 @@ paths: - $ref: "#/components/parameters/_history" responses: "200": - description: Array of Tx hashes that included the given asset + description: An array of Tx hashes that included the given asset (latest first) content: application/json: schema: - $ref: "#/components/schemas/asset_txs" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": @@ -1109,7 +1180,7 @@ paths: "404": $ref: "#/components/responses/NotFound" summary: Pool List - description: A list of all currently registered/retiring (not retired) pools + description: List of brief info for all pools /pool_info: #RPC post: tags: @@ -1305,6 +1376,29 @@ paths: $ref: "#/components/responses/NotFound" summary: Pool Metadata description: Metadata (on & off-chain) for all pools + + /script_info: #RPC + post: + tags: + - Script + requestBody: + $ref: "#/components/requestBodies/script_hashes" + responses: + "200": + description: List of datum information for given datum hashes + content: + application/json: + schema: + $ref: "#/components/schemas/script_info" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Datum Information + description: List of datum information for given datum hashes + /native_script_list: #RPC get: tags: @@ -1315,7 +1409,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/native_script_list" + $ref: "#/components/schemas/script_list" "400": $ref: "#/components/responses/BadRequest" "401": @@ -1334,7 +1428,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/plutus_script_list" + $ref: "#/components/schemas/script_list" "400": $ref: "#/components/responses/BadRequest" "401": @@ -1364,6 +1458,30 @@ paths: $ref: "#/components/responses/NotFound" summary: Script Redeemers description: List of all redeemers for a given script hash + + /script_utxos: #RPC todo new + get: + tags: + - Script + parameters: + - $ref: "#/components/parameters/_script_hash" + - $ref: "#/components/parameters/_extended" + responses: + "200": + description: List of UTXOs for a given script hash + 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: Script UTXOs + description: List of all UTXOs for a given script hash + /datum_info: #RPC post: tags: @@ -1385,6 +1503,29 @@ paths: $ref: "#/components/responses/NotFound" 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: @@ -1558,6 +1699,16 @@ components: in: query required: false allowEmptyValue: true + _extended: + deprecated: false + name: _extended + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + schema: + type: boolean + example: "false" + in: query + required: false + allowEmptyValue: true _history: deprecated: false name: _history @@ -1665,6 +1816,29 @@ components: _addresses: - addr_test1qzmtfv43a8ncx6ve92ja6yy25npn9raz9pu5a2tfxsqv9gy9ktf0pu6yu4zjh9r37fzx3h4tsxqdjhu3t4d5ffdsfz9s6ska3z - addr_test1vq67g5u8ls4vm4wdvs0r8xvsuej66nvaqedyrj2tcz6tuycz275pu + payment_addresses_with_extended: + content: + application/json: + schema: + required: + - _addresses + type: object + properties: + _addresses: + format: text + type: array + items: + type: string + description: Array of Cardano payment address(es) in bech32 format + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + example: + _addresses: + - addr_test1qzmtfv43a8ncx6ve92ja6yy25npn9raz9pu5a2tfxsqv9gy9ktf0pu6yu4zjh9r37fzx3h4tsxqdjhu3t4d5ffdsfz9s6ska3z + - addr_test1vq67g5u8ls4vm4wdvs0r8xvsuej66nvaqedyrj2tcz6tuycz275pu + _extended: true address_txs: content: application/json: @@ -1737,6 +1911,31 @@ components: _stake_addresses: - stake_test17zt9x005zkd2usz2vhvktyzqsuwz25gmgnaqdka5hcj9m2qfg2py2 - stake_test1uzzm95hs7dzw23ftj3cly3rgm64crqxet7g46k6y5kcy3zcs3mpjd + todo: add examples referencing all existing param + + stake_addresses_with_extended: + content: + application/json: + schema: + required: + - _stake_addresses + type: object + properties: + _stake_addresses: + format: text + type: array + items: + type: string + description: Array of Cardano stake address(es) in bech32 format + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + example: + _stake_addresses: + - stake_test17zt9x005zkd2usz2vhvktyzqsuwz25gmgnaqdka5hcj9m2qfg2py2 + - stake_test1uzzm95hs7dzw23ftj3cly3rgm64crqxet7g46k6y5kcy3zcs3mpjd + _extended: true stake_addresses: content: application/json: @@ -1792,10 +1991,15 @@ components: items: type: string description: Array of Cardano payment credential(s) in hex format + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call example: _payment_credentials: - b6b4b2b1e9e78369992aa5dd108aa4c3328fa228794ea9693400c2a0 - 35e45387fc2acdd5cd641e339990e665ad4d9d065a41c94bc0b4be13 + _extended: true tx_ids: content: application/json: @@ -1857,6 +2061,22 @@ components: - pool19st4a2vvu78tjtyywjte2eml3kx6ynersgd2nyw0y4jvyhlfu0u - pool1uul8pytp2p0xq4ckjn3l294km0m7fuef46teehvh3x5tk46sfx3 - pool1us9ww725p0vygae5zaydme3apt7wg9se2yemhl8mgwkes3tlrqp + script_hashes: + content: + application/json: + schema: + type: object + properties: + _script_hashes: + format: text + type: array + items: + type: string + description: Array of Cardano script hashes + example: + _script_hashes: + - 964af1ff2a66ce472d34ac39b47f356b6d971d62c794a89ec12825d5de30f3aa + - 17bdb9c96b77c7718d546be50193a80bc9d72081b7375e5e16891db196af14fc datum_hashes: content: application/json: @@ -1893,6 +2113,54 @@ components: _asset_list: - ['313534a537bc476c86ff7c57ec511bd7f24a9d15654091b24e9c606e','41484c636f696e'] - ['313534a537bc476c86ff7c57ec511bd7f24a9d15654091b24e9c606e','41484c636f696e'] + asset_list_with_extended: + content: + application/json: + schema: + required: + - _asset_list + type: object + properties: + _asset_list: + format: text + type: array + description: Array of array of policy ID and asset names (hex) + items: + type: array + items: + type: string + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + example: + _asset_list: + - ['313534a537bc476c86ff7c57ec511bd7f24a9d15654091b24e9c606e','41484c636f696e'] + - ['313534a537bc476c86ff7c57ec511bd7f24a9d15654091b24e9c606e','41484c636f696e'] + _extended: true + utxo_refs_with_extended: + content: + application/json: + schema: + required: + - _utxo_refs + type: object + properties: + _utxo_refs: + format: text + type: array + items: + type: string + description: Array of Cardano utxo references in the form "hash#index" + _extended: + format: boolean + type: boolean + 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## + _extended: false securitySchemes: bearerAuth: type: http @@ -2566,8 +2834,8 @@ components: description: The hash of the first block where these parameters are valid example: f9dc2a2fc3a2db09a71af007a740261de585afc9e3022b8e30535592ff4dd9e5 cost_models: - type: string - description: The per language cost models + type: object + description: The per language cost model in JSON example: null nullable: true price_mem: @@ -2757,17 +3025,21 @@ components: properties: block_hash: $ref: "#/components/schemas/blocks/items/properties/hash" - tx_hashes: - type: array - items: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + tx_hash: + $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + epoch_no: + $ref: "#/components/schemas/blocks/items/properties/epoch_no" + block_height: + $ref: "#/components/schemas/blocks/items/properties/block_height" + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" address_info: type: array items: type: object properties: address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" balance: type: string description: Sum of all UTxO values beloning to address @@ -2786,9 +3058,9 @@ components: type: object properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_index" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" block_height: $ref: "#/components/schemas/blocks/items/properties/block_height" block_time: @@ -2802,7 +3074,7 @@ components: reference_script: $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/reference_script" asset_list: - $ref: "#/components/schemas/account_assets/items/properties/asset_list" + $ref: "#/components/schemas/utxo_infos/items/properties/asset_list" address_txs: type: array items: @@ -2822,22 +3094,17 @@ components: type: object properties: address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" - asset_list: - $ref: "#/components/schemas/account_assets/items/properties/asset_list" - credential_txs: - $ref: "#/components/schemas/address_txs" - credential_utxos: - type: array - items: - type: object - properties: - tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_hash" - tx_index: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_index" - value: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/value" + $ref: "#/components/schemas/utxo_infos/items/properties/address" + policy_id: + $ref: "#/components/schemas/asset_info/items/properties/policy_id" + asset_name: + $ref: "#/components/schemas/asset_info/items/properties/asset_name" + fingerprint: + $ref: "#/components/schemas/asset_info/items/properties/fingerprint" + decimals: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + quantity: + $ref: "#/components/schemas/asset_addresses/items/properties/quantity" account_list: type: array items: @@ -2858,7 +3125,9 @@ components: enum: ["registered", "not registered"] example: registered delegated_pool: - $ref: "#/components/schemas/pool_list/items/properties/pool_id_bech32" + nullable: true + allOf: + - $ref: "#/components/schemas/pool_list/items/properties/pool_id_bech32" total_balance: type: string description: Total balance of the account including UTxO, rewards and MIRs (in lovelace) @@ -2887,23 +3156,66 @@ components: type: string description: Total treasury MIR value of the account example: "0" - account_utxos: + utxo_infos: type: array items: type: object properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_hash" + type: string + description: Hash identifier of the transaction + example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e tx_index: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_index" + type: integer + description: Index of UTxO in the transaction + example: 0 address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + type: string + description: A Cardano payment/base address (bech32 encoded) + example: addr1qxkfe8s6m8qt5436lec3f0320hrmpppwqgs2gah4360krvyssntpwjcz303mx3h4avg7p29l3zd8u3jyglmewds9ezrqdc3cxp value: $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/value" + stake_address: + $ref: "#/components/schemas/account_history/items/properties/stake_address" + payment_cred: + type: string + description: Payment credential + example: de3c1c527e8826b9cd2030f88f75fc44cd4ce519b9ded9eb794b3794 + epoch_no: + $ref: "#/components/schemas/blocks/items/properties/epoch_no" block_height: $ref: "#/components/schemas/blocks/items/properties/block_height" block_time: $ref: "#/components/schemas/blocks/items/properties/block_time" + datum_hash: + $ref: "#/components/schemas/script_redeemers/items/properties/redeemers/items/properties/datum_hash" + inline_datum: + $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/inline_datum" + reference_script: + $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/reference_script" + asset_list: + type: array + nullable: true + description: An array of assets on the UTxO + items: + properties: + policy_id: + $ref: "#/components/schemas/asset_info/items/properties/policy_id" + asset_name: + $ref: "#/components/schemas/asset_info/items/properties/asset_name" + fingerprint: + $ref: "#/components/schemas/asset_info/items/properties/fingerprint" + decimals: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + quantity: + type: string + description: Quantity of assets on the UTxO + example: 1 + is_spent: + type: boolean + description: True if the UTXO has been spent + example: true + account_rewards: type: array items: @@ -2948,7 +3260,7 @@ components: enum: ["registration", "delegation", "withdrawal", "deregistration"] example: "registration" tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" epoch_no: $ref: "#/components/schemas/blocks/items/properties/epoch_no" epoch_slot: @@ -2967,7 +3279,7 @@ components: addresses: type: array items: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" account_assets: type: array items: @@ -2975,25 +3287,16 @@ components: properties: stake_address: $ref: "#/components/schemas/account_history/items/properties/stake_address" - asset_list: - type: array - items: - type: object - properties: - policy_id: - $ref: "#/components/schemas/asset_info/items/properties/policy_id" - asset_name: - $ref: "#/components/schemas/asset_info/items/properties/asset_name" - fingerprint: - $ref: "#/components/schemas/asset_info/items/properties/fingerprint" - decimals: - type: integer - description: Asset decimals - example: 6 - quantity: - type: string - description: Asset quantity owned by account - example: 990000 + policy_id: + $ref: "#/components/schemas/asset_info/items/properties/policy_id" + asset_name: + $ref: "#/components/schemas/asset_info/items/properties/asset_name" + fingerprint: + $ref: "#/components/schemas/asset_info/items/properties/fingerprint" + decimals: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + quantity: + $ref: "#/components/schemas/asset_addresses/items/properties/quantity" account_history: type: array items: @@ -3025,9 +3328,7 @@ components: type: object properties: tx_hash: - type: string - description: Hash identifier of the transaction - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" block_hash: $ref: "#/components/schemas/blocks/items/properties/hash" block_height: @@ -3094,9 +3395,7 @@ components: type: object properties: bech32: - type: string - description: A Cardano payment/base address (bech32 encoded) where funds were sent or change to be returned - example: addr1q80rc8zj06yzdwwdyqc03rm4l3zv6n89rxuaak0t099n09yssntpwjcz303mx3h4avg7p29l3zd8u3jyglmewds9ezrqad9mkw + $ref: "#/components/schemas/utxo_infos/items/properties/address" cred: type: string description: Payment credential @@ -3106,13 +3405,9 @@ components: allOf: - $ref: "#/components/schemas/account_history/items/properties/stake_address" tx_hash: - type: string - description: Hash of transaction for UTxO - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - type: integer - description: Index of UTxO in the transaction - example: 0 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" value: type: string description: Total sum of ADA on the UTxO @@ -3162,23 +3457,7 @@ components: description: Value (json) example: null asset_list: - type: array - nullable: true - description: An array of assets on the UTxO - items: - properties: - policy_id: - $ref: "#/components/schemas/asset_info/items/properties/policy_id" - asset_name: - $ref: "#/components/schemas/asset_info/items/properties/asset_name" - fingerprint: - $ref: "#/components/schemas/asset_info/items/properties/fingerprint" - decimals: - $ref: "#/components/schemas/account_assets/items/properties/asset_list/items/properties/decimals" - quantity: - type: string - description: Quantity of assets on the UTxO - example: 1 + $ref: "#/components/schemas/utxo_infos/items/properties/asset_list" withdrawals: type: array description: Array of withdrawals with-in a transaction @@ -3207,7 +3486,7 @@ components: fingerprint: $ref: "#/components/schemas/asset_info/items/properties/fingerprint" decimals: - $ref: "#/components/schemas/account_assets/items/properties/asset_list/items/properties/decimals" + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" quantity: type: string description: Quantity of minted assets (negative on burn) @@ -3245,7 +3524,7 @@ components: items: properties: script_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/script_hash" + $ref: "#/components/schemas/script_info/items/properties/script_hash" script_json: type: object description: JSON representation of the timelock script (null for other script types) @@ -3270,6 +3549,7 @@ components: } plutus_contracts: type: array + nullable: true description: Plutus contracts present in transaction (if any) items: properties: @@ -3279,15 +3559,11 @@ components: example: addr1w999n67e86jn6xal07pzxtrmqynspgx0fwmcmpua4wc6yzsxpljz3 nullable: true script_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/script_hash" + $ref: "#/components/schemas/script_info/items/properties/script_hash" bytecode: - type: string - description: CBOR-encoded Plutus script data - example: 5911ea010000332333222332233223322332232323332223233322232333333332222222232333222323333222232323322323332223233322232323322332232323333322222332233223322332233223322223223223232533530333330083333573466e1cd55cea8032400046460a000264646464646666ae68cdc39aab9d5004480008cccc8888cccc16c01000c008004dd71aba15004375c6ae85400cdd71aba15002375a6ae84d5d1280111a8279a982819ab9c491035054310005149926135744a00226ae8940044d55cf280089baa001357426aae79401c8d4124d4c128cd5ce2481035054310004b499263333573466e1d40112002205323333573466e1d40152000205523504a35304b335738921035054310004c49926498cccd5cd19b8735573aa004900011980599191919191919191919191999ab9a3370e6aae754029200023333333333019335027232323333573466e1cd55cea8012400046603e60746ae854008c0b0d5d09aba2500223505935305a3357389201035054310005b49926135573ca00226ea8004d5d0a80519a8138141aba150093335502e75ca05a6ae854020ccd540b9d728169aba1500733502704335742a00c66a04e66aa0a8098eb4d5d0a8029919191999ab9a3370e6aae754009200023350213232323333573466e1cd55cea80124000466a05266a084eb4d5d0a80118239aba135744a00446a0ba6a60bc66ae712401035054310005f49926135573ca00226ea8004d5d0a8011919191999ab9a3370e6aae7540092000233502733504275a6ae854008c11cd5d09aba2500223505d35305e3357389201035054310005f49926135573ca00226ea8004d5d09aba2500223505935305a3357389201035054310005b49926135573ca00226ea8004d5d0a80219a813bae35742a00666a04e66aa0a8eb88004d5d0a801181c9aba135744a00446a0aa6a60ac66ae71241035054310005749926135744a00226ae8940044d5d1280089aba25001135744a00226ae8940044d5d1280089aba25001135573ca00226ea8004d5d0a8011919191999ab9a3370ea00290031180f181d9aba135573ca00646666ae68cdc3a801240084603a608a6ae84d55cf280211999ab9a3370ea00690011180e98181aba135573ca00a46666ae68cdc3a80224000460406eb8d5d09aab9e50062350503530513357389201035054310005249926499264984d55cea80089baa001357426ae8940088d4124d4c128cd5ce249035054310004b49926104a1350483530493357389201035054350004a4984d55cf280089baa001135573a6ea80044dd50009109198008018011000911111111109199999999980080580500480400380300280200180110009109198008018011000891091980080180109000891091980080180109000891091980080180109000909111180200290911118018029091111801002909111180080290008919118011bac0013200135503b2233335573e0024a01c466a01a60086ae84008c00cd5d100101991919191999ab9a3370e6aae75400d200023330073232323333573466e1cd55cea8012400046601a60626ae854008cd404c0b4d5d09aba25002235036353037335738921035054310003849926135573ca00226ea8004d5d0a801999aa805bae500a35742a00466a01eeb8d5d09aba25002235032353033335738921035054310003449926135744a00226aae7940044dd50009110919980080200180110009109198008018011000899aa800bae75a224464460046eac004c8004d540d488c8cccd55cf80112804919a80419aa81898031aab9d5002300535573ca00460086ae8800c0b84d5d08008891001091091198008020018900089119191999ab9a3370ea002900011a80418029aba135573ca00646666ae68cdc3a801240044a01046a0526a605466ae712401035054310002b499264984d55cea80089baa001121223002003112200112001232323333573466e1cd55cea8012400046600c600e6ae854008dd69aba135744a00446a0466a604866ae71241035054310002549926135573ca00226ea80048848cc00400c00880048c8cccd5cd19b8735573aa002900011bae357426aae7940088d407cd4c080cd5ce24810350543100021499261375400224464646666ae68cdc3a800a40084a00e46666ae68cdc3a8012400446a014600c6ae84d55cf280211999ab9a3370ea00690001280511a8111a981199ab9c490103505431000244992649926135573aa00226ea8004484888c00c0104488800844888004480048c8cccd5cd19b8750014800880188cccd5cd19b8750024800080188d4068d4c06ccd5ce249035054310001c499264984d55ce9baa0011220021220012001232323232323333573466e1d4005200c200b23333573466e1d4009200a200d23333573466e1d400d200823300b375c6ae854014dd69aba135744a00a46666ae68cdc3a8022400c46601a6eb8d5d0a8039bae357426ae89401c8cccd5cd19b875005480108cc048c050d5d0a8049bae357426ae8940248cccd5cd19b875006480088c050c054d5d09aab9e500b23333573466e1d401d2000230133016357426aae7940308d407cd4c080cd5ce2481035054310002149926499264992649926135573aa00826aae79400c4d55cf280109aab9e500113754002424444444600e01044244444446600c012010424444444600a010244444440082444444400644244444446600401201044244444446600201201040024646464646666ae68cdc3a800a400446660106eb4d5d0a8021bad35742a0066eb4d5d09aba2500323333573466e1d400920002300a300b357426aae7940188d4040d4c044cd5ce2490350543100012499264984d55cea80189aba25001135573ca00226ea80048488c00800c888488ccc00401401000c80048c8c8cccd5cd19b875001480088c018dd71aba135573ca00646666ae68cdc3a80124000460106eb8d5d09aab9e500423500a35300b3357389201035054310000c499264984d55cea80089baa001212230020032122300100320011122232323333573466e1cd55cea80124000466aa016600c6ae854008c014d5d09aba25002235007353008335738921035054310000949926135573ca00226ea8004498480048004448848cc00400c008448004848c0040088004888848cccc00401401000c00880044880084880048004448c8c00400488cc00cc008008004c8ccc888c8c8cc88cc88ccc888c8c8c8c8cc88c8c8cc88c8cccc8888c8c8c8c8c8c8c8c8ccc888c8ccc888ccc888cccccccc88888888cc88ccccc88888cccc8888cc88cc88cc88ccc888cc88cc88cc88cc88cc88c8c8c8cc88c8c8c8c8c8c8cc88c8c8c8c8c8c8cc888c888c8c94cd4c1240104cc0352401297369676e617475726520646f6573206e6f74206d617463682063726561746f7220696e20646174756d0033223530200022222222222533535032333553068120015027253353079333573466e3c0300041ec1e84d40d4004540d000c841ec41e54008c04540144cc054cc03524012f65787065637465642063726561746f7220746f2067657420616c6c206f66207768617420736865206f72646572656400330153350133335500e305c12001504f350481223335501b2253353070333505006353353502a3235302900122335304c0022350300012502f300e00221001132635300b335738920117696e76616c6964207075626c6963206b657920686173680000c498c05540244cc010c0340080044004004c8d4c08400488888888880254010ccd41354138c1894014c04920c08db7013350133335500e305c12001504f350481223335501b22533530703005002133004335506500d30100020011001001300d5004333504d504e30625005333504d504e533535026301a00321300a300d0011630124830236dc04cc0352401276f6e6c79206d617463686573206f66207061697273206f66206f726465727320616c6c6f77656400533535063350481223335501b225335307030050021330040020011001001300d50041306a162215335350650011306c16221533535067001107222130701623253353502732353024001222001500121333504e223530280022235302a0032232335304e0052335304f004253353077333573466e3c0080041e41e05400c41e081e08cd4c13c01081e094cd4c1dcccd5cd19b8f002001079078150031078153353502e0032153353502f00221335304c0022335304d002233530510022335305200223306d002001207b23353052002207b23306d00200122207b222335304f004207b2225335307c333573466e1c01800c1f81f454cd4c1f0ccd5cd19b8700500207e07d1333573466e1c0100041f81f441f441f441d854cd4d40b8004841d841d8c03140094cd4d40a0c07001484cd54190034c03c0045841b84c0300044d4c068004880084d4c02800480044800480048d4c0680048880088d4c06400488800c8d4c05000488888888880288d4c05400488004894cd4c184004418c4cd5ce001031089119aa8011a82600090009091800801100091a982c0009111002119a82999aa82b245003350533355056489000015054505412233355304b120013500550032353550560012233355304e120013500850062353550590012233353550490012330614800000488cc1880080048cc184005200000133040002001133500400105a22533530590021001105a123350492233353500400322002002001353500200122001122123300100300212001112232001320013550582253353504e00110032213300600230040012353003001223530070022222222222533335302600b21501b21501b21501b2133355305012001500f2353015001225335306353353063333573466e3cd4c0bc00888008d4c0bc010880081941904ccd5cd19b8735302f0022200135302f00422001065064106413501f0031501e00b13350432253353500d002210031001500c2212330010030022001222222222212333333333300100b00a009008007006005004003002200122123300100300220012221233300100400300220012212330010030022001121223002003112200112001122123300100300212001122123300100300212001122123300100300212001121222300300411222002112220011200121222230040052122223003005212222300200521222230010052001221233001003002200121222222230070082212222222330060090082122222223005008122222220041222222200322122222223300200900822122222223300100900820012122300200322212233300100500400320012122300200321223001003200112335001501d501e1220021220012001120011200113002012133500b2233300301300200150162223355300e1200123535501a00122335501d002335530111200123535501d001223355020002333535500d00123300a4800000488cc02c0080048cc028005200000133004002001223355300c1200123535501800122335501b00233353550080012335530101200123535501c00122335501f00235500f001001223335550080150020012335530101200123535501c00122335501f00235500d0010013335550030100020011112223335530041200150153355300c1200123535501800122335501b00235500b0013335530041200122353550190022253353021333553011120013500d33500f22533530230021025100102223535501c001223300a0020050061003133501900400350160013355300c120012353550180012232335501c00330010053200135502322533535019001135500b0032213535501e00222533530263300c00200813355010007001130060030023200135501c221122253353501500110022213300500233355300712001005004001112122230030041122122233002005004112122230010041120011233500722333535004003220020020013535002001220011221233001003002120013200135501422112253353500c0011500e22133500f3004002335530061200100400132001355013221122253353500c00113535006003220012213335350080052200230040023335530071200100500400112212330010030021200122333573466e3c00800404404088cdc000100088911801000919991119a80319aa80480199a80319aa804801000a803a8039a980380091110019a980380091110011a98038009111000889100109109119800802001890008891091980080180108900091110919998008028020018011000900211199ab9a3371000400200800a244004244002400222464600200244660066004004003 + $ref: "#/components/schemas/script_info/items/properties/bytes" size: - type: integer - description: The size of the CBOR serialised script (in bytes) - example: 234895 + $ref: "#/components/schemas/script_info/items/properties/size" valid_contract: type: boolean description: True if the contract is valid or there is no contract @@ -3351,13 +3627,9 @@ components: allOf: - $ref: "#/components/schemas/account_history/items/properties/stake_address" tx_hash: - type: string - description: Hash of transaction for UTxO - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - type: integer - description: Index of UTxO in the transaction - example: 0 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" value: type: string description: Total sum of ADA on the UTxO @@ -3372,7 +3644,7 @@ components: items: properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" metadata: type: object nullable: true @@ -3393,7 +3665,7 @@ components: items: properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" num_confirmations: type: integer description: Number of block confirmations @@ -3447,9 +3719,7 @@ components: items: properties: payment_address: - type: string - description: A Cardano payment/base address (bech32 encoded) for transaction's input UTxO - example: addr1qxkfe8s6m8qt5436lec3f0320hrmpppwqgs2gah4360krvyssntpwjcz303mx3h4avg7p29l3zd8u3jyglmewds9ezrqdc3cxp + $ref: "#/components/schemas/utxo_infos/items/properties/address" quantity: type: string description: Asset balance on the payment address @@ -3460,7 +3730,7 @@ components: items: properties: payment_address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" asset_summary: type: array items: @@ -3592,7 +3862,7 @@ components: asset_name: $ref: "#/components/schemas/asset_info/items/properties/asset_name" payment_address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" quantity: $ref: "#/components/schemas/asset_addresses/items/properties/quantity" policy_asset_info: @@ -3632,67 +3902,65 @@ components: total_supply: $ref: "#/components/schemas/asset_info/items/properties/total_supply" decimals: - $ref: "#/components/schemas/account_assets/items/properties/asset_list/items/properties/decimals" - asset_txs: - type: array - description: An array of Tx hashes that included the given asset (latest first) - items: - properties: - tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" - epoch_no: - $ref: "#/components/schemas/blocks/items/properties/epoch_no" - block_height: - $ref: "#/components/schemas/blocks/items/properties/block_height" - block_time: - $ref: "#/components/schemas/blocks/items/properties/block_time" - native_script_list: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + script_info: type: array items: properties: script_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/script_hash" + type: string + description: Hash of a script + example: bfa7ffa9b2e164873db6ac6d0528c82e212963bc62e10fd1d81da4af creation_tx_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/creation_tx_hash" + type: string + description: Hash of the script creation transaction + example: 255f061502ad83230351fbcf2d9fade1b5d118d332f92c9861075010a1fe3fbe type: type: string description: Type of the script - enum: ["timelock", "multisig"] - example: timelock - plutus_script_list: + enum: ["plutusV1","plutusV2","timelock","multisig"] + example: plutusV1 + value: + type: object + nullable: true + description: Data in JSON format + example: null + bytes: + type: string + description: Script bytes (cborSeq) + example: 5907f4010000332323232323232323233223232323232332232323232322223232533532533533355300712001323212330012233350052200200200100235001220011233001225335002101710010142325335333573466e3cd400488008d4020880080580544ccd5cd19b873500122001350082200101601510153500122002353500122002222222222200a101413357389201115554784f206e6f7420636f6e73756d6564000133333573466e1cd55cea8012400046644246600200600464646464646464646464646666ae68cdc39aab9d500a480008cccccccccc888888888848cccccccccc00402c02802402001c01801401000c008cd40508c8c8cccd5cd19b8735573aa0049000119910919800801801180f9aba150023019357426ae8940088c98d4cd5ce01581501481409aab9e5001137540026ae854028cd4050054d5d0a804999aa80bbae501635742a010666aa02eeb94058d5d0a80399a80a0109aba15006335014335502402275a6ae854014c8c8c8cccd5cd19b8735573aa00490001199109198008018011919191999ab9a3370e6aae754009200023322123300100300233502575a6ae854008c098d5d09aba2500223263533573805e05c05a05826aae7940044dd50009aba150023232323333573466e1cd55cea8012400046644246600200600466a04aeb4d5d0a80118131aba135744a004464c6a66ae700bc0b80b40b04d55cf280089baa001357426ae8940088c98d4cd5ce01581501481409aab9e5001137540026ae854010cd4051d71aba15003335014335502475c40026ae854008c070d5d09aba2500223263533573804e04c04a04826ae8940044d5d1280089aba25001135744a00226ae8940044d5d1280089aba25001135744a00226aae7940044dd50009aba150023232323333573466e1d400520062321222230040053019357426aae79400c8cccd5cd19b875002480108c848888c008014c06cd5d09aab9e500423333573466e1d400d20022321222230010053015357426aae7940148cccd5cd19b875004480008c848888c00c014dd71aba135573ca00c464c6a66ae7008808408007c0780740704d55cea80089baa001357426ae8940088c98d4cd5ce00d80d00c80c080c89931a99ab9c4910350543500019018135573ca00226ea8004c8004d5405888448894cd40044d400c88004884ccd401488008c010008ccd54c01c4800401401000448c88c008dd6000990009aa80b111999aab9f00125009233500830043574200460066ae880080548c8c8c8cccd5cd19b8735573aa00690001199911091998008020018011919191999ab9a3370e6aae7540092000233221233001003002301735742a00466a01c02c6ae84d5d1280111931a99ab9c01b01a019018135573ca00226ea8004d5d0a801999aa803bae500635742a00466a014eb8d5d09aba2500223263533573802e02c02a02826ae8940044d55cf280089baa0011335500175ceb44488c88c008dd5800990009aa80a11191999aab9f0022500823350073355017300635573aa004600a6aae794008c010d5d100180a09aba100111220021221223300100400312232323333573466e1d4005200023212230020033005357426aae79400c8cccd5cd19b8750024800884880048c98d4cd5ce00980900880800789aab9d500113754002464646666ae68cdc39aab9d5002480008cc8848cc00400c008c014d5d0a8011bad357426ae8940088c98d4cd5ce00800780700689aab9e5001137540024646666ae68cdc39aab9d5001480008dd71aba135573ca004464c6a66ae7003803403002c4dd500089119191999ab9a3370ea00290021091100091999ab9a3370ea00490011190911180180218031aba135573ca00846666ae68cdc3a801a400042444004464c6a66ae7004404003c0380340304d55cea80089baa0012323333573466e1d40052002200523333573466e1d40092000200523263533573801a01801601401226aae74dd5000891001091000919191919191999ab9a3370ea002900610911111100191999ab9a3370ea004900510911111100211999ab9a3370ea00690041199109111111198008048041bae35742a00a6eb4d5d09aba2500523333573466e1d40112006233221222222233002009008375c6ae85401cdd71aba135744a00e46666ae68cdc3a802a400846644244444446600c01201060186ae854024dd71aba135744a01246666ae68cdc3a8032400446424444444600e010601a6ae84d55cf280591999ab9a3370ea00e900011909111111180280418071aba135573ca018464c6a66ae7004c04804404003c03803403002c0284d55cea80209aab9e5003135573ca00426aae7940044dd50009191919191999ab9a3370ea002900111999110911998008028020019bad35742a0086eb4d5d0a8019bad357426ae89400c8cccd5cd19b875002480008c8488c00800cc020d5d09aab9e500623263533573801801601401201026aae75400c4d5d1280089aab9e500113754002464646666ae68cdc3a800a400446424460020066eb8d5d09aab9e500323333573466e1d400920002321223002003375c6ae84d55cf280211931a99ab9c009008007006005135573aa00226ea800444888c8c8cccd5cd19b8735573aa0049000119aa80518031aba150023005357426ae8940088c98d4cd5ce00480400380309aab9e5001137540029309000a490350543100112212330010030021123230010012233003300200200133512233002489209366f09fe40eaaeb17d3cb6b0b61e087d664174c39a48a986f86b2b0ba6e2a7b00480008848cc00400c0088005 + size: + type: integer + description: The size of the CBOR serialised script (in bytes) + example: 2039 + script_list: type: array items: properties: script_hash: - type: string - description: Hash of a script - example: d8480dc869b94b80e81ec91b0abe307279311fe0e7001a9488f61ff8 + $ref: "#/components/schemas/script_info/items/properties/script_hash" creation_tx_hash: - type: string - description: Hash of the script creation transaction - example: fda6c7697009237975ffc30f36666addf4c6e2a2c6f90411a24431b700baaab1 + $ref: "#/components/schemas/script_info/items/properties/creation_tx_hash" + type: + $ref: "#/components/schemas/script_info/items/properties/type" + size: + $ref: "#/components/schemas/script_info/items/properties/size" script_redeemers: type: array items: type: object properties: script_hash: - type: string - description: Hash of Transaction for which details are being shown - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/script_info/items/properties/script_hash" redeemers: type: array items: type: object properties: tx_hash: - type: string - description: Hash of Transaction containing the redeemer - example: fda6c7697009237975ffc30f36666addf4c6e2a2c6f90411a24431b700baaab1 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - type: integer - description: The index of the redeemer pointer in the transaction - example: 0 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" unit_mem: description: The budget in Memory to run a script example: 520448 @@ -3724,20 +3992,20 @@ components: nullable: true example: 5a595ce795815e81d22a1a522cf3987d546dc5bb016de61b002edd63a5413ec4 datum_value: - type: object - description: The actual data in json format - example: { "bytes": "3c33" } + $ref: "#/components/schemas/script_info/items/properties/value" datum_info: type: array items: type: object properties: - hash: + datum_hash: $ref: "#/components/schemas/script_redeemers/items/properties/redeemers/items/properties/datum_hash" + creation_tx_hash: + $ref: "#/components/schemas/script_info/items/properties/creation_tx_hash" value: - $ref: "#/components/schemas/script_redeemers/items/properties/redeemers/items/properties/datum_value" + $ref: "#/components/schemas/script_info/items/properties/value" bytes: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/inline_datum/properties/bytes" + $ref: "#/components/schemas/script_info/items/properties/bytes" headers: {} responses: OK: diff --git a/specs/results/koiosapi-mainnet.yaml b/specs/results/koiosapi-mainnet.yaml index 1fba8708..d210d314 100644 --- a/specs/results/koiosapi-mainnet.yaml +++ b/specs/results/koiosapi-mainnet.yaml @@ -1,7 +1,7 @@ openapi: 3.0.2 info: title: Koios API - version: 1.0.11rc + version: v1.0.11rc description: | Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples. @@ -534,19 +534,41 @@ paths: $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 + post: + tags: + - Address + requestBody: + $ref: "#/components/requestBodies/payment_addresses_with_extended" + responses: + "200": + description: Array of address UTXOs + 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: Address UTXOs + description: Get UTxO set for given addresses /credential_utxos: #RPC post: tags: - Address requestBody: - $ref: "#/components/requestBodies/credential_utxos" + $ref: "#/components/requestBodies/utxo_infos" responses: "200": description: Array of UTxOs with balances content: application/json: schema: - $ref: "#/components/schemas/credential_utxos" + $ref: "#/components/schemas/utxo_infos" "400": $ref: "#/components/responses/BadRequest" "401": @@ -554,7 +576,8 @@ paths: "404": $ref: "#/components/responses/NotFound" summary: UTxOs from payment credentials - description: Get a list of UTxO against input payment credential array including their balances + description: Get UTxO details for requested payment credentials + /address_assets: #RPC post: tags: @@ -588,7 +611,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/credential_txs" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": @@ -637,27 +660,52 @@ paths: $ref: "#/components/responses/NotFound" summary: Account Information description: Get the account information for given stake addresses - /account_utxos: #RPC + + /account_txs: #RPC # todo - new get: tags: - Stake Account parameters: - $ref: "#/components/parameters/_stake_address" + - $ref: "#/components/parameters/_after_block_height" + responses: + "200": + description: Array of Txs associated with stake address (account) + content: + application/json: + schema: + $ref: "#/components/schemas/address_txs" + "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) + + /account_utxos: #RPC + post: + tags: + - Stake Account + requestBody: + $ref: "#/components/requestBodies/stake_addresses_with_extended" responses: "200": - description: Array of account UTxOs associated with stake address + description: Array of account UTxOs associated with given stake addresses content: application/json: schema: - $ref: "#/components/schemas/account_utxos" + $ref: "#/components/schemas/utxo_infos" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Account UTxOs - description: Get a list of all UTxOs for a given stake address (account) + summary: UTxOs for stake addresses (accounts) + description: Get a list of all UTxOs for given stake addresses (account)s + /account_info_cached: #RPC post: tags: @@ -936,6 +984,29 @@ 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: + - Asset + requestBody: + $ref: "#/components/requestBodies/asset_list_with_extended" + responses: + "200": + description: Array of UTXOs for given asset list + 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: Asset UTXO Information (Bulk) + description: Get the UTXO information of a list of assets including + /asset_history: #RPC get: tags: @@ -1078,11 +1149,11 @@ paths: - $ref: "#/components/parameters/_history" responses: "200": - description: Array of Tx hashes that included the given asset + description: An array of Tx hashes that included the given asset (latest first) content: application/json: schema: - $ref: "#/components/schemas/asset_txs" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": @@ -1109,7 +1180,7 @@ paths: "404": $ref: "#/components/responses/NotFound" summary: Pool List - description: A list of all currently registered/retiring (not retired) pools + description: List of brief info for all pools /pool_info: #RPC post: tags: @@ -1305,6 +1376,29 @@ paths: $ref: "#/components/responses/NotFound" summary: Pool Metadata description: Metadata (on & off-chain) for all pools + + /script_info: #RPC + post: + tags: + - Script + requestBody: + $ref: "#/components/requestBodies/script_hashes" + responses: + "200": + description: List of datum information for given datum hashes + content: + application/json: + schema: + $ref: "#/components/schemas/script_info" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Datum Information + description: List of datum information for given datum hashes + /native_script_list: #RPC get: tags: @@ -1315,7 +1409,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/native_script_list" + $ref: "#/components/schemas/script_list" "400": $ref: "#/components/responses/BadRequest" "401": @@ -1334,7 +1428,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/plutus_script_list" + $ref: "#/components/schemas/script_list" "400": $ref: "#/components/responses/BadRequest" "401": @@ -1364,6 +1458,30 @@ paths: $ref: "#/components/responses/NotFound" summary: Script Redeemers description: List of all redeemers for a given script hash + + /script_utxos: #RPC todo new + get: + tags: + - Script + parameters: + - $ref: "#/components/parameters/_script_hash" + - $ref: "#/components/parameters/_extended" + responses: + "200": + description: List of UTXOs for a given script hash + 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: Script UTXOs + description: List of all UTXOs for a given script hash + /datum_info: #RPC post: tags: @@ -1385,6 +1503,29 @@ paths: $ref: "#/components/responses/NotFound" 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: @@ -1558,6 +1699,16 @@ components: in: query required: false allowEmptyValue: true + _extended: + deprecated: false + name: _extended + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + schema: + type: boolean + example: "false" + in: query + required: false + allowEmptyValue: true _history: deprecated: false name: _history @@ -1665,6 +1816,29 @@ components: _addresses: - addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv - addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y + payment_addresses_with_extended: + content: + application/json: + schema: + required: + - _addresses + type: object + properties: + _addresses: + format: text + type: array + items: + type: string + description: Array of Cardano payment address(es) in bech32 format + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + example: + _addresses: + - addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv + - addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y + _extended: true address_txs: content: application/json: @@ -1737,6 +1911,31 @@ components: _stake_addresses: - stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250 - stake1uxpdrerp9wrxunfh6ukyv5267j70fzxgw0fr3z8zeac5vyqhf9jhy + todo: add examples referencing all existing param + + stake_addresses_with_extended: + content: + application/json: + schema: + required: + - _stake_addresses + type: object + properties: + _stake_addresses: + format: text + type: array + items: + type: string + description: Array of Cardano stake address(es) in bech32 format + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + example: + _stake_addresses: + - stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250 + - stake1uxpdrerp9wrxunfh6ukyv5267j70fzxgw0fr3z8zeac5vyqhf9jhy + _extended: true stake_addresses: content: application/json: @@ -1792,10 +1991,15 @@ components: items: type: string description: Array of Cardano payment credential(s) in hex format + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call example: _payment_credentials: - 025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52 - 13f6870c5e4f3b242463e4dc1f2f56b02a032d3797d933816f15e555 + _extended: true tx_ids: content: application/json: @@ -1857,6 +2061,22 @@ components: - pool100wj94uzf54vup2hdzk0afng4dhjaqggt7j434mtgm8v2gfvfgp - pool102s2nqtea2hf5q0s4amj0evysmfnhrn4apyyhd4azcmsclzm96m - pool102vsulhfx8ua2j9fwl2u7gv57fhhutc3tp6juzaefgrn7ae35wm + script_hashes: + content: + application/json: + schema: + type: object + properties: + _script_hashes: + format: text + type: array + items: + type: string + description: Array of Cardano script hashes + example: + _script_hashes: + - 818ee3db3bbbd04f9f2ce21778cac3ac605802a4fcb00c8b3a58ee2dafc17d46 + - 45b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0 datum_hashes: content: application/json: @@ -1893,6 +2113,54 @@ components: _asset_list: - ['750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501','424f4f4b'] - ['1d7f33bd23d85e1a25d87d86fac4f199c3197a2f7afeb662a0f34e1e','776f726c646d6f62696c65746f6b656e'] + asset_list_with_extended: + content: + application/json: + schema: + required: + - _asset_list + type: object + properties: + _asset_list: + format: text + type: array + description: Array of array of policy ID and asset names (hex) + items: + type: array + items: + type: string + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + example: + _asset_list: + - ['750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501','424f4f4b'] + - ['1d7f33bd23d85e1a25d87d86fac4f199c3197a2f7afeb662a0f34e1e','776f726c646d6f62696c65746f6b656e'] + _extended: true + utxo_refs_with_extended: + content: + application/json: + schema: + required: + - _utxo_refs + type: object + properties: + _utxo_refs: + format: text + type: array + items: + type: string + description: Array of Cardano utxo references in the form "hash#index" + _extended: + format: boolean + type: boolean + 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## + _extended: false securitySchemes: bearerAuth: type: http @@ -2566,8 +2834,8 @@ components: description: The hash of the first block where these parameters are valid example: f9dc2a2fc3a2db09a71af007a740261de585afc9e3022b8e30535592ff4dd9e5 cost_models: - type: string - description: The per language cost models + type: object + description: The per language cost model in JSON example: null nullable: true price_mem: @@ -2757,17 +3025,21 @@ components: properties: block_hash: $ref: "#/components/schemas/blocks/items/properties/hash" - tx_hashes: - type: array - items: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + tx_hash: + $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + epoch_no: + $ref: "#/components/schemas/blocks/items/properties/epoch_no" + block_height: + $ref: "#/components/schemas/blocks/items/properties/block_height" + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" address_info: type: array items: type: object properties: address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" balance: type: string description: Sum of all UTxO values beloning to address @@ -2786,9 +3058,9 @@ components: type: object properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_index" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" block_height: $ref: "#/components/schemas/blocks/items/properties/block_height" block_time: @@ -2802,7 +3074,7 @@ components: reference_script: $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/reference_script" asset_list: - $ref: "#/components/schemas/account_assets/items/properties/asset_list" + $ref: "#/components/schemas/utxo_infos/items/properties/asset_list" address_txs: type: array items: @@ -2822,22 +3094,17 @@ components: type: object properties: address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" - asset_list: - $ref: "#/components/schemas/account_assets/items/properties/asset_list" - credential_txs: - $ref: "#/components/schemas/address_txs" - credential_utxos: - type: array - items: - type: object - properties: - tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_hash" - tx_index: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_index" - value: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/value" + $ref: "#/components/schemas/utxo_infos/items/properties/address" + policy_id: + $ref: "#/components/schemas/asset_info/items/properties/policy_id" + asset_name: + $ref: "#/components/schemas/asset_info/items/properties/asset_name" + fingerprint: + $ref: "#/components/schemas/asset_info/items/properties/fingerprint" + decimals: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + quantity: + $ref: "#/components/schemas/asset_addresses/items/properties/quantity" account_list: type: array items: @@ -2858,7 +3125,9 @@ components: enum: ["registered", "not registered"] example: registered delegated_pool: - $ref: "#/components/schemas/pool_list/items/properties/pool_id_bech32" + nullable: true + allOf: + - $ref: "#/components/schemas/pool_list/items/properties/pool_id_bech32" total_balance: type: string description: Total balance of the account including UTxO, rewards and MIRs (in lovelace) @@ -2887,23 +3156,66 @@ components: type: string description: Total treasury MIR value of the account example: "0" - account_utxos: + utxo_infos: type: array items: type: object properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_hash" + type: string + description: Hash identifier of the transaction + example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e tx_index: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_index" + type: integer + description: Index of UTxO in the transaction + example: 0 address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + type: string + description: A Cardano payment/base address (bech32 encoded) + example: addr1qxkfe8s6m8qt5436lec3f0320hrmpppwqgs2gah4360krvyssntpwjcz303mx3h4avg7p29l3zd8u3jyglmewds9ezrqdc3cxp value: $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/value" + stake_address: + $ref: "#/components/schemas/account_history/items/properties/stake_address" + payment_cred: + type: string + description: Payment credential + example: de3c1c527e8826b9cd2030f88f75fc44cd4ce519b9ded9eb794b3794 + epoch_no: + $ref: "#/components/schemas/blocks/items/properties/epoch_no" block_height: $ref: "#/components/schemas/blocks/items/properties/block_height" block_time: $ref: "#/components/schemas/blocks/items/properties/block_time" + datum_hash: + $ref: "#/components/schemas/script_redeemers/items/properties/redeemers/items/properties/datum_hash" + inline_datum: + $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/inline_datum" + reference_script: + $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/reference_script" + asset_list: + type: array + nullable: true + description: An array of assets on the UTxO + items: + properties: + policy_id: + $ref: "#/components/schemas/asset_info/items/properties/policy_id" + asset_name: + $ref: "#/components/schemas/asset_info/items/properties/asset_name" + fingerprint: + $ref: "#/components/schemas/asset_info/items/properties/fingerprint" + decimals: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + quantity: + type: string + description: Quantity of assets on the UTxO + example: 1 + is_spent: + type: boolean + description: True if the UTXO has been spent + example: true + account_rewards: type: array items: @@ -2948,7 +3260,7 @@ components: enum: ["registration", "delegation", "withdrawal", "deregistration"] example: "registration" tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" epoch_no: $ref: "#/components/schemas/blocks/items/properties/epoch_no" epoch_slot: @@ -2967,7 +3279,7 @@ components: addresses: type: array items: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" account_assets: type: array items: @@ -2975,25 +3287,16 @@ components: properties: stake_address: $ref: "#/components/schemas/account_history/items/properties/stake_address" - asset_list: - type: array - items: - type: object - properties: - policy_id: - $ref: "#/components/schemas/asset_info/items/properties/policy_id" - asset_name: - $ref: "#/components/schemas/asset_info/items/properties/asset_name" - fingerprint: - $ref: "#/components/schemas/asset_info/items/properties/fingerprint" - decimals: - type: integer - description: Asset decimals - example: 6 - quantity: - type: string - description: Asset quantity owned by account - example: 990000 + policy_id: + $ref: "#/components/schemas/asset_info/items/properties/policy_id" + asset_name: + $ref: "#/components/schemas/asset_info/items/properties/asset_name" + fingerprint: + $ref: "#/components/schemas/asset_info/items/properties/fingerprint" + decimals: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + quantity: + $ref: "#/components/schemas/asset_addresses/items/properties/quantity" account_history: type: array items: @@ -3025,9 +3328,7 @@ components: type: object properties: tx_hash: - type: string - description: Hash identifier of the transaction - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" block_hash: $ref: "#/components/schemas/blocks/items/properties/hash" block_height: @@ -3094,9 +3395,7 @@ components: type: object properties: bech32: - type: string - description: A Cardano payment/base address (bech32 encoded) where funds were sent or change to be returned - example: addr1q80rc8zj06yzdwwdyqc03rm4l3zv6n89rxuaak0t099n09yssntpwjcz303mx3h4avg7p29l3zd8u3jyglmewds9ezrqad9mkw + $ref: "#/components/schemas/utxo_infos/items/properties/address" cred: type: string description: Payment credential @@ -3106,13 +3405,9 @@ components: allOf: - $ref: "#/components/schemas/account_history/items/properties/stake_address" tx_hash: - type: string - description: Hash of transaction for UTxO - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - type: integer - description: Index of UTxO in the transaction - example: 0 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" value: type: string description: Total sum of ADA on the UTxO @@ -3162,23 +3457,7 @@ components: description: Value (json) example: null asset_list: - type: array - nullable: true - description: An array of assets on the UTxO - items: - properties: - policy_id: - $ref: "#/components/schemas/asset_info/items/properties/policy_id" - asset_name: - $ref: "#/components/schemas/asset_info/items/properties/asset_name" - fingerprint: - $ref: "#/components/schemas/asset_info/items/properties/fingerprint" - decimals: - $ref: "#/components/schemas/account_assets/items/properties/asset_list/items/properties/decimals" - quantity: - type: string - description: Quantity of assets on the UTxO - example: 1 + $ref: "#/components/schemas/utxo_infos/items/properties/asset_list" withdrawals: type: array description: Array of withdrawals with-in a transaction @@ -3207,7 +3486,7 @@ components: fingerprint: $ref: "#/components/schemas/asset_info/items/properties/fingerprint" decimals: - $ref: "#/components/schemas/account_assets/items/properties/asset_list/items/properties/decimals" + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" quantity: type: string description: Quantity of minted assets (negative on burn) @@ -3245,7 +3524,7 @@ components: items: properties: script_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/script_hash" + $ref: "#/components/schemas/script_info/items/properties/script_hash" script_json: type: object description: JSON representation of the timelock script (null for other script types) @@ -3270,6 +3549,7 @@ components: } plutus_contracts: type: array + nullable: true description: Plutus contracts present in transaction (if any) items: properties: @@ -3279,15 +3559,11 @@ components: example: addr1w999n67e86jn6xal07pzxtrmqynspgx0fwmcmpua4wc6yzsxpljz3 nullable: true script_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/script_hash" + $ref: "#/components/schemas/script_info/items/properties/script_hash" bytecode: - type: string - description: CBOR-encoded Plutus script data - example: 5911ea010000332333222332233223322332232323332223233322232333333332222222232333222323333222232323322323332223233322232323322332232323333322222332233223322332233223322223223223232533530333330083333573466e1cd55cea8032400046460a000264646464646666ae68cdc39aab9d5004480008cccc8888cccc16c01000c008004dd71aba15004375c6ae85400cdd71aba15002375a6ae84d5d1280111a8279a982819ab9c491035054310005149926135744a00226ae8940044d55cf280089baa001357426aae79401c8d4124d4c128cd5ce2481035054310004b499263333573466e1d40112002205323333573466e1d40152000205523504a35304b335738921035054310004c49926498cccd5cd19b8735573aa004900011980599191919191919191919191999ab9a3370e6aae754029200023333333333019335027232323333573466e1cd55cea8012400046603e60746ae854008c0b0d5d09aba2500223505935305a3357389201035054310005b49926135573ca00226ea8004d5d0a80519a8138141aba150093335502e75ca05a6ae854020ccd540b9d728169aba1500733502704335742a00c66a04e66aa0a8098eb4d5d0a8029919191999ab9a3370e6aae754009200023350213232323333573466e1cd55cea80124000466a05266a084eb4d5d0a80118239aba135744a00446a0ba6a60bc66ae712401035054310005f49926135573ca00226ea8004d5d0a8011919191999ab9a3370e6aae7540092000233502733504275a6ae854008c11cd5d09aba2500223505d35305e3357389201035054310005f49926135573ca00226ea8004d5d09aba2500223505935305a3357389201035054310005b49926135573ca00226ea8004d5d0a80219a813bae35742a00666a04e66aa0a8eb88004d5d0a801181c9aba135744a00446a0aa6a60ac66ae71241035054310005749926135744a00226ae8940044d5d1280089aba25001135744a00226ae8940044d5d1280089aba25001135573ca00226ea8004d5d0a8011919191999ab9a3370ea00290031180f181d9aba135573ca00646666ae68cdc3a801240084603a608a6ae84d55cf280211999ab9a3370ea00690011180e98181aba135573ca00a46666ae68cdc3a80224000460406eb8d5d09aab9e50062350503530513357389201035054310005249926499264984d55cea80089baa001357426ae8940088d4124d4c128cd5ce249035054310004b49926104a1350483530493357389201035054350004a4984d55cf280089baa001135573a6ea80044dd50009109198008018011000911111111109199999999980080580500480400380300280200180110009109198008018011000891091980080180109000891091980080180109000891091980080180109000909111180200290911118018029091111801002909111180080290008919118011bac0013200135503b2233335573e0024a01c466a01a60086ae84008c00cd5d100101991919191999ab9a3370e6aae75400d200023330073232323333573466e1cd55cea8012400046601a60626ae854008cd404c0b4d5d09aba25002235036353037335738921035054310003849926135573ca00226ea8004d5d0a801999aa805bae500a35742a00466a01eeb8d5d09aba25002235032353033335738921035054310003449926135744a00226aae7940044dd50009110919980080200180110009109198008018011000899aa800bae75a224464460046eac004c8004d540d488c8cccd55cf80112804919a80419aa81898031aab9d5002300535573ca00460086ae8800c0b84d5d08008891001091091198008020018900089119191999ab9a3370ea002900011a80418029aba135573ca00646666ae68cdc3a801240044a01046a0526a605466ae712401035054310002b499264984d55cea80089baa001121223002003112200112001232323333573466e1cd55cea8012400046600c600e6ae854008dd69aba135744a00446a0466a604866ae71241035054310002549926135573ca00226ea80048848cc00400c00880048c8cccd5cd19b8735573aa002900011bae357426aae7940088d407cd4c080cd5ce24810350543100021499261375400224464646666ae68cdc3a800a40084a00e46666ae68cdc3a8012400446a014600c6ae84d55cf280211999ab9a3370ea00690001280511a8111a981199ab9c490103505431000244992649926135573aa00226ea8004484888c00c0104488800844888004480048c8cccd5cd19b8750014800880188cccd5cd19b8750024800080188d4068d4c06ccd5ce249035054310001c499264984d55ce9baa0011220021220012001232323232323333573466e1d4005200c200b23333573466e1d4009200a200d23333573466e1d400d200823300b375c6ae854014dd69aba135744a00a46666ae68cdc3a8022400c46601a6eb8d5d0a8039bae357426ae89401c8cccd5cd19b875005480108cc048c050d5d0a8049bae357426ae8940248cccd5cd19b875006480088c050c054d5d09aab9e500b23333573466e1d401d2000230133016357426aae7940308d407cd4c080cd5ce2481035054310002149926499264992649926135573aa00826aae79400c4d55cf280109aab9e500113754002424444444600e01044244444446600c012010424444444600a010244444440082444444400644244444446600401201044244444446600201201040024646464646666ae68cdc3a800a400446660106eb4d5d0a8021bad35742a0066eb4d5d09aba2500323333573466e1d400920002300a300b357426aae7940188d4040d4c044cd5ce2490350543100012499264984d55cea80189aba25001135573ca00226ea80048488c00800c888488ccc00401401000c80048c8c8cccd5cd19b875001480088c018dd71aba135573ca00646666ae68cdc3a80124000460106eb8d5d09aab9e500423500a35300b3357389201035054310000c499264984d55cea80089baa001212230020032122300100320011122232323333573466e1cd55cea80124000466aa016600c6ae854008c014d5d09aba25002235007353008335738921035054310000949926135573ca00226ea8004498480048004448848cc00400c008448004848c0040088004888848cccc00401401000c00880044880084880048004448c8c00400488cc00cc008008004c8ccc888c8c8cc88cc88ccc888c8c8c8c8cc88c8c8cc88c8cccc8888c8c8c8c8c8c8c8c8ccc888c8ccc888ccc888cccccccc88888888cc88ccccc88888cccc8888cc88cc88cc88ccc888cc88cc88cc88cc88cc88c8c8c8cc88c8c8c8c8c8c8cc88c8c8c8c8c8c8cc888c888c8c94cd4c1240104cc0352401297369676e617475726520646f6573206e6f74206d617463682063726561746f7220696e20646174756d0033223530200022222222222533535032333553068120015027253353079333573466e3c0300041ec1e84d40d4004540d000c841ec41e54008c04540144cc054cc03524012f65787065637465642063726561746f7220746f2067657420616c6c206f66207768617420736865206f72646572656400330153350133335500e305c12001504f350481223335501b2253353070333505006353353502a3235302900122335304c0022350300012502f300e00221001132635300b335738920117696e76616c6964207075626c6963206b657920686173680000c498c05540244cc010c0340080044004004c8d4c08400488888888880254010ccd41354138c1894014c04920c08db7013350133335500e305c12001504f350481223335501b22533530703005002133004335506500d30100020011001001300d5004333504d504e30625005333504d504e533535026301a00321300a300d0011630124830236dc04cc0352401276f6e6c79206d617463686573206f66207061697273206f66206f726465727320616c6c6f77656400533535063350481223335501b225335307030050021330040020011001001300d50041306a162215335350650011306c16221533535067001107222130701623253353502732353024001222001500121333504e223530280022235302a0032232335304e0052335304f004253353077333573466e3c0080041e41e05400c41e081e08cd4c13c01081e094cd4c1dcccd5cd19b8f002001079078150031078153353502e0032153353502f00221335304c0022335304d002233530510022335305200223306d002001207b23353052002207b23306d00200122207b222335304f004207b2225335307c333573466e1c01800c1f81f454cd4c1f0ccd5cd19b8700500207e07d1333573466e1c0100041f81f441f441f441d854cd4d40b8004841d841d8c03140094cd4d40a0c07001484cd54190034c03c0045841b84c0300044d4c068004880084d4c02800480044800480048d4c0680048880088d4c06400488800c8d4c05000488888888880288d4c05400488004894cd4c184004418c4cd5ce001031089119aa8011a82600090009091800801100091a982c0009111002119a82999aa82b245003350533355056489000015054505412233355304b120013500550032353550560012233355304e120013500850062353550590012233353550490012330614800000488cc1880080048cc184005200000133040002001133500400105a22533530590021001105a123350492233353500400322002002001353500200122001122123300100300212001112232001320013550582253353504e00110032213300600230040012353003001223530070022222222222533335302600b21501b21501b21501b2133355305012001500f2353015001225335306353353063333573466e3cd4c0bc00888008d4c0bc010880081941904ccd5cd19b8735302f0022200135302f00422001065064106413501f0031501e00b13350432253353500d002210031001500c2212330010030022001222222222212333333333300100b00a009008007006005004003002200122123300100300220012221233300100400300220012212330010030022001121223002003112200112001122123300100300212001122123300100300212001122123300100300212001121222300300411222002112220011200121222230040052122223003005212222300200521222230010052001221233001003002200121222222230070082212222222330060090082122222223005008122222220041222222200322122222223300200900822122222223300100900820012122300200322212233300100500400320012122300200321223001003200112335001501d501e1220021220012001120011200113002012133500b2233300301300200150162223355300e1200123535501a00122335501d002335530111200123535501d001223355020002333535500d00123300a4800000488cc02c0080048cc028005200000133004002001223355300c1200123535501800122335501b00233353550080012335530101200123535501c00122335501f00235500f001001223335550080150020012335530101200123535501c00122335501f00235500d0010013335550030100020011112223335530041200150153355300c1200123535501800122335501b00235500b0013335530041200122353550190022253353021333553011120013500d33500f22533530230021025100102223535501c001223300a0020050061003133501900400350160013355300c120012353550180012232335501c00330010053200135502322533535019001135500b0032213535501e00222533530263300c00200813355010007001130060030023200135501c221122253353501500110022213300500233355300712001005004001112122230030041122122233002005004112122230010041120011233500722333535004003220020020013535002001220011221233001003002120013200135501422112253353500c0011500e22133500f3004002335530061200100400132001355013221122253353500c00113535006003220012213335350080052200230040023335530071200100500400112212330010030021200122333573466e3c00800404404088cdc000100088911801000919991119a80319aa80480199a80319aa804801000a803a8039a980380091110019a980380091110011a98038009111000889100109109119800802001890008891091980080180108900091110919998008028020018011000900211199ab9a3371000400200800a244004244002400222464600200244660066004004003 + $ref: "#/components/schemas/script_info/items/properties/bytes" size: - type: integer - description: The size of the CBOR serialised script (in bytes) - example: 234895 + $ref: "#/components/schemas/script_info/items/properties/size" valid_contract: type: boolean description: True if the contract is valid or there is no contract @@ -3351,13 +3627,9 @@ components: allOf: - $ref: "#/components/schemas/account_history/items/properties/stake_address" tx_hash: - type: string - description: Hash of transaction for UTxO - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - type: integer - description: Index of UTxO in the transaction - example: 0 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" value: type: string description: Total sum of ADA on the UTxO @@ -3372,7 +3644,7 @@ components: items: properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" metadata: type: object nullable: true @@ -3393,7 +3665,7 @@ components: items: properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" num_confirmations: type: integer description: Number of block confirmations @@ -3447,9 +3719,7 @@ components: items: properties: payment_address: - type: string - description: A Cardano payment/base address (bech32 encoded) for transaction's input UTxO - example: addr1qxkfe8s6m8qt5436lec3f0320hrmpppwqgs2gah4360krvyssntpwjcz303mx3h4avg7p29l3zd8u3jyglmewds9ezrqdc3cxp + $ref: "#/components/schemas/utxo_infos/items/properties/address" quantity: type: string description: Asset balance on the payment address @@ -3460,7 +3730,7 @@ components: items: properties: payment_address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" asset_summary: type: array items: @@ -3592,7 +3862,7 @@ components: asset_name: $ref: "#/components/schemas/asset_info/items/properties/asset_name" payment_address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" quantity: $ref: "#/components/schemas/asset_addresses/items/properties/quantity" policy_asset_info: @@ -3632,67 +3902,65 @@ components: total_supply: $ref: "#/components/schemas/asset_info/items/properties/total_supply" decimals: - $ref: "#/components/schemas/account_assets/items/properties/asset_list/items/properties/decimals" - asset_txs: - type: array - description: An array of Tx hashes that included the given asset (latest first) - items: - properties: - tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" - epoch_no: - $ref: "#/components/schemas/blocks/items/properties/epoch_no" - block_height: - $ref: "#/components/schemas/blocks/items/properties/block_height" - block_time: - $ref: "#/components/schemas/blocks/items/properties/block_time" - native_script_list: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + script_info: type: array items: properties: script_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/script_hash" + type: string + description: Hash of a script + example: bfa7ffa9b2e164873db6ac6d0528c82e212963bc62e10fd1d81da4af creation_tx_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/creation_tx_hash" + type: string + description: Hash of the script creation transaction + example: 255f061502ad83230351fbcf2d9fade1b5d118d332f92c9861075010a1fe3fbe type: type: string description: Type of the script - enum: ["timelock", "multisig"] - example: timelock - plutus_script_list: + enum: ["plutusV1","plutusV2","timelock","multisig"] + example: plutusV1 + value: + type: object + nullable: true + description: Data in JSON format + example: null + bytes: + type: string + description: Script bytes (cborSeq) + example: 5907f4010000332323232323232323233223232323232332232323232322223232533532533533355300712001323212330012233350052200200200100235001220011233001225335002101710010142325335333573466e3cd400488008d4020880080580544ccd5cd19b873500122001350082200101601510153500122002353500122002222222222200a101413357389201115554784f206e6f7420636f6e73756d6564000133333573466e1cd55cea8012400046644246600200600464646464646464646464646666ae68cdc39aab9d500a480008cccccccccc888888888848cccccccccc00402c02802402001c01801401000c008cd40508c8c8cccd5cd19b8735573aa0049000119910919800801801180f9aba150023019357426ae8940088c98d4cd5ce01581501481409aab9e5001137540026ae854028cd4050054d5d0a804999aa80bbae501635742a010666aa02eeb94058d5d0a80399a80a0109aba15006335014335502402275a6ae854014c8c8c8cccd5cd19b8735573aa00490001199109198008018011919191999ab9a3370e6aae754009200023322123300100300233502575a6ae854008c098d5d09aba2500223263533573805e05c05a05826aae7940044dd50009aba150023232323333573466e1cd55cea8012400046644246600200600466a04aeb4d5d0a80118131aba135744a004464c6a66ae700bc0b80b40b04d55cf280089baa001357426ae8940088c98d4cd5ce01581501481409aab9e5001137540026ae854010cd4051d71aba15003335014335502475c40026ae854008c070d5d09aba2500223263533573804e04c04a04826ae8940044d5d1280089aba25001135744a00226ae8940044d5d1280089aba25001135744a00226aae7940044dd50009aba150023232323333573466e1d400520062321222230040053019357426aae79400c8cccd5cd19b875002480108c848888c008014c06cd5d09aab9e500423333573466e1d400d20022321222230010053015357426aae7940148cccd5cd19b875004480008c848888c00c014dd71aba135573ca00c464c6a66ae7008808408007c0780740704d55cea80089baa001357426ae8940088c98d4cd5ce00d80d00c80c080c89931a99ab9c4910350543500019018135573ca00226ea8004c8004d5405888448894cd40044d400c88004884ccd401488008c010008ccd54c01c4800401401000448c88c008dd6000990009aa80b111999aab9f00125009233500830043574200460066ae880080548c8c8c8cccd5cd19b8735573aa00690001199911091998008020018011919191999ab9a3370e6aae7540092000233221233001003002301735742a00466a01c02c6ae84d5d1280111931a99ab9c01b01a019018135573ca00226ea8004d5d0a801999aa803bae500635742a00466a014eb8d5d09aba2500223263533573802e02c02a02826ae8940044d55cf280089baa0011335500175ceb44488c88c008dd5800990009aa80a11191999aab9f0022500823350073355017300635573aa004600a6aae794008c010d5d100180a09aba100111220021221223300100400312232323333573466e1d4005200023212230020033005357426aae79400c8cccd5cd19b8750024800884880048c98d4cd5ce00980900880800789aab9d500113754002464646666ae68cdc39aab9d5002480008cc8848cc00400c008c014d5d0a8011bad357426ae8940088c98d4cd5ce00800780700689aab9e5001137540024646666ae68cdc39aab9d5001480008dd71aba135573ca004464c6a66ae7003803403002c4dd500089119191999ab9a3370ea00290021091100091999ab9a3370ea00490011190911180180218031aba135573ca00846666ae68cdc3a801a400042444004464c6a66ae7004404003c0380340304d55cea80089baa0012323333573466e1d40052002200523333573466e1d40092000200523263533573801a01801601401226aae74dd5000891001091000919191919191999ab9a3370ea002900610911111100191999ab9a3370ea004900510911111100211999ab9a3370ea00690041199109111111198008048041bae35742a00a6eb4d5d09aba2500523333573466e1d40112006233221222222233002009008375c6ae85401cdd71aba135744a00e46666ae68cdc3a802a400846644244444446600c01201060186ae854024dd71aba135744a01246666ae68cdc3a8032400446424444444600e010601a6ae84d55cf280591999ab9a3370ea00e900011909111111180280418071aba135573ca018464c6a66ae7004c04804404003c03803403002c0284d55cea80209aab9e5003135573ca00426aae7940044dd50009191919191999ab9a3370ea002900111999110911998008028020019bad35742a0086eb4d5d0a8019bad357426ae89400c8cccd5cd19b875002480008c8488c00800cc020d5d09aab9e500623263533573801801601401201026aae75400c4d5d1280089aab9e500113754002464646666ae68cdc3a800a400446424460020066eb8d5d09aab9e500323333573466e1d400920002321223002003375c6ae84d55cf280211931a99ab9c009008007006005135573aa00226ea800444888c8c8cccd5cd19b8735573aa0049000119aa80518031aba150023005357426ae8940088c98d4cd5ce00480400380309aab9e5001137540029309000a490350543100112212330010030021123230010012233003300200200133512233002489209366f09fe40eaaeb17d3cb6b0b61e087d664174c39a48a986f86b2b0ba6e2a7b00480008848cc00400c0088005 + size: + type: integer + description: The size of the CBOR serialised script (in bytes) + example: 2039 + script_list: type: array items: properties: script_hash: - type: string - description: Hash of a script - example: d8480dc869b94b80e81ec91b0abe307279311fe0e7001a9488f61ff8 + $ref: "#/components/schemas/script_info/items/properties/script_hash" creation_tx_hash: - type: string - description: Hash of the script creation transaction - example: fda6c7697009237975ffc30f36666addf4c6e2a2c6f90411a24431b700baaab1 + $ref: "#/components/schemas/script_info/items/properties/creation_tx_hash" + type: + $ref: "#/components/schemas/script_info/items/properties/type" + size: + $ref: "#/components/schemas/script_info/items/properties/size" script_redeemers: type: array items: type: object properties: script_hash: - type: string - description: Hash of Transaction for which details are being shown - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/script_info/items/properties/script_hash" redeemers: type: array items: type: object properties: tx_hash: - type: string - description: Hash of Transaction containing the redeemer - example: fda6c7697009237975ffc30f36666addf4c6e2a2c6f90411a24431b700baaab1 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - type: integer - description: The index of the redeemer pointer in the transaction - example: 0 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" unit_mem: description: The budget in Memory to run a script example: 520448 @@ -3724,20 +3992,20 @@ components: nullable: true example: 5a595ce795815e81d22a1a522cf3987d546dc5bb016de61b002edd63a5413ec4 datum_value: - type: object - description: The actual data in json format - example: { "bytes": "3c33" } + $ref: "#/components/schemas/script_info/items/properties/value" datum_info: type: array items: type: object properties: - hash: + datum_hash: $ref: "#/components/schemas/script_redeemers/items/properties/redeemers/items/properties/datum_hash" + creation_tx_hash: + $ref: "#/components/schemas/script_info/items/properties/creation_tx_hash" value: - $ref: "#/components/schemas/script_redeemers/items/properties/redeemers/items/properties/datum_value" + $ref: "#/components/schemas/script_info/items/properties/value" bytes: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/inline_datum/properties/bytes" + $ref: "#/components/schemas/script_info/items/properties/bytes" headers: {} responses: OK: diff --git a/specs/results/koiosapi-preprod.yaml b/specs/results/koiosapi-preprod.yaml index 1a36baa0..b9386c42 100644 --- a/specs/results/koiosapi-preprod.yaml +++ b/specs/results/koiosapi-preprod.yaml @@ -1,7 +1,7 @@ openapi: 3.0.2 info: title: Koios API - version: 1.0.11rc + version: v1.0.11rc description: | Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples. @@ -534,19 +534,41 @@ paths: $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 + post: + tags: + - Address + requestBody: + $ref: "#/components/requestBodies/payment_addresses_with_extended" + responses: + "200": + description: Array of address UTXOs + 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: Address UTXOs + description: Get UTxO set for given addresses /credential_utxos: #RPC post: tags: - Address requestBody: - $ref: "#/components/requestBodies/credential_utxos" + $ref: "#/components/requestBodies/utxo_infos" responses: "200": description: Array of UTxOs with balances content: application/json: schema: - $ref: "#/components/schemas/credential_utxos" + $ref: "#/components/schemas/utxo_infos" "400": $ref: "#/components/responses/BadRequest" "401": @@ -554,7 +576,8 @@ paths: "404": $ref: "#/components/responses/NotFound" summary: UTxOs from payment credentials - description: Get a list of UTxO against input payment credential array including their balances + description: Get UTxO details for requested payment credentials + /address_assets: #RPC post: tags: @@ -588,7 +611,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/credential_txs" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": @@ -637,27 +660,52 @@ paths: $ref: "#/components/responses/NotFound" summary: Account Information description: Get the account information for given stake addresses - /account_utxos: #RPC + + /account_txs: #RPC # todo - new get: tags: - Stake Account parameters: - $ref: "#/components/parameters/_stake_address" + - $ref: "#/components/parameters/_after_block_height" + responses: + "200": + description: Array of Txs associated with stake address (account) + content: + application/json: + schema: + $ref: "#/components/schemas/address_txs" + "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) + + /account_utxos: #RPC + post: + tags: + - Stake Account + requestBody: + $ref: "#/components/requestBodies/stake_addresses_with_extended" responses: "200": - description: Array of account UTxOs associated with stake address + description: Array of account UTxOs associated with given stake addresses content: application/json: schema: - $ref: "#/components/schemas/account_utxos" + $ref: "#/components/schemas/utxo_infos" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Account UTxOs - description: Get a list of all UTxOs for a given stake address (account) + summary: UTxOs for stake addresses (accounts) + description: Get a list of all UTxOs for given stake addresses (account)s + /account_info_cached: #RPC post: tags: @@ -936,6 +984,29 @@ 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: + - Asset + requestBody: + $ref: "#/components/requestBodies/asset_list_with_extended" + responses: + "200": + description: Array of UTXOs for given asset list + 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: Asset UTXO Information (Bulk) + description: Get the UTXO information of a list of assets including + /asset_history: #RPC get: tags: @@ -1078,11 +1149,11 @@ paths: - $ref: "#/components/parameters/_history" responses: "200": - description: Array of Tx hashes that included the given asset + description: An array of Tx hashes that included the given asset (latest first) content: application/json: schema: - $ref: "#/components/schemas/asset_txs" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": @@ -1109,7 +1180,7 @@ paths: "404": $ref: "#/components/responses/NotFound" summary: Pool List - description: A list of all currently registered/retiring (not retired) pools + description: List of brief info for all pools /pool_info: #RPC post: tags: @@ -1305,6 +1376,29 @@ paths: $ref: "#/components/responses/NotFound" summary: Pool Metadata description: Metadata (on & off-chain) for all pools + + /script_info: #RPC + post: + tags: + - Script + requestBody: + $ref: "#/components/requestBodies/script_hashes" + responses: + "200": + description: List of datum information for given datum hashes + content: + application/json: + schema: + $ref: "#/components/schemas/script_info" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Datum Information + description: List of datum information for given datum hashes + /native_script_list: #RPC get: tags: @@ -1315,7 +1409,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/native_script_list" + $ref: "#/components/schemas/script_list" "400": $ref: "#/components/responses/BadRequest" "401": @@ -1334,7 +1428,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/plutus_script_list" + $ref: "#/components/schemas/script_list" "400": $ref: "#/components/responses/BadRequest" "401": @@ -1364,6 +1458,30 @@ paths: $ref: "#/components/responses/NotFound" summary: Script Redeemers description: List of all redeemers for a given script hash + + /script_utxos: #RPC todo new + get: + tags: + - Script + parameters: + - $ref: "#/components/parameters/_script_hash" + - $ref: "#/components/parameters/_extended" + responses: + "200": + description: List of UTXOs for a given script hash + 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: Script UTXOs + description: List of all UTXOs for a given script hash + /datum_info: #RPC post: tags: @@ -1385,6 +1503,29 @@ paths: $ref: "#/components/responses/NotFound" 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: @@ -1558,6 +1699,16 @@ components: in: query required: false allowEmptyValue: true + _extended: + deprecated: false + name: _extended + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + schema: + type: boolean + example: "false" + in: query + required: false + allowEmptyValue: true _history: deprecated: false name: _history @@ -1665,6 +1816,29 @@ components: _addresses: - addr_test1vzpwq95z3xyum8vqndgdd9mdnmafh3djcxnc6jemlgdmswcve6tkw - addr_test1vpfwv0ezc5g8a4mkku8hhy3y3vp92t7s3ul8g778g5yegsgalc6gc + payment_addresses_with_extended: + content: + application/json: + schema: + required: + - _addresses + type: object + properties: + _addresses: + format: text + type: array + items: + type: string + description: Array of Cardano payment address(es) in bech32 format + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + example: + _addresses: + - addr_test1vzpwq95z3xyum8vqndgdd9mdnmafh3djcxnc6jemlgdmswcve6tkw + - addr_test1vpfwv0ezc5g8a4mkku8hhy3y3vp92t7s3ul8g778g5yegsgalc6gc + _extended: true address_txs: content: application/json: @@ -1737,6 +1911,31 @@ components: _stake_addresses: - stake_test1urq4rcynzj4uxqc74c852zky7wa6epgmn9r6k3j3gv7502q8jks0l - stake_test1ur4t5nhceyn2amfuj7z74uxmmj8jf9fmgd2egqw8c98ve3cp2g4wx + todo: add examples referencing all existing param + + stake_addresses_with_extended: + content: + application/json: + schema: + required: + - _stake_addresses + type: object + properties: + _stake_addresses: + format: text + type: array + items: + type: string + description: Array of Cardano stake address(es) in bech32 format + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + example: + _stake_addresses: + - stake_test1urq4rcynzj4uxqc74c852zky7wa6epgmn9r6k3j3gv7502q8jks0l + - stake_test1ur4t5nhceyn2amfuj7z74uxmmj8jf9fmgd2egqw8c98ve3cp2g4wx + _extended: true stake_addresses: content: application/json: @@ -1792,10 +1991,15 @@ components: items: type: string description: Array of Cardano payment credential(s) in hex format + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call example: _payment_credentials: - b429738bd6cc58b5c7932d001aa2bd05cfea47020a556c8c753d4436 - 82e016828989cd9d809b50d6976d9efa9bc5b2c1a78d4b3bfa1bb83b + _extended: true tx_ids: content: application/json: @@ -1857,6 +2061,22 @@ components: - pool1ext7qrwjzaxcdfhdnkq5mth59ukuu2atcg6tgqpmevpt7ratkta - pool1x4p3cwemsm356vpxnjwuud7w76jz64hyss729zp7xa6wuey6yr9 - pool1ws42l6rawqjv58crs5l32v0eem3qnngpnjfd7epwd4lmjccc5cg + script_hashes: + content: + application/json: + schema: + type: object + properties: + _script_hashes: + format: text + type: array + items: + type: string + description: Array of Cardano script hashes + example: + _script_hashes: + - 5571e2c3549f15934a38382d1318707a86751fb70827f4cbd29b104480f1be9b + - 5f7212f546d7e7308ce99b925f05538db19981f4ea3084559c0b28a363245826 datum_hashes: content: application/json: @@ -1893,6 +2113,54 @@ components: _asset_list: - ['c6e65ba7878b2f8ea0ad39287d3e2fd256dc5c4160fc19bdf4c4d87e','7447454e53'] - ['777e6b4903dab74963ae581d39875c5dac16c09bb1f511c0af1ddda8','6141414441'] + asset_list_with_extended: + content: + application/json: + schema: + required: + - _asset_list + type: object + properties: + _asset_list: + format: text + type: array + description: Array of array of policy ID and asset names (hex) + items: + type: array + items: + type: string + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + example: + _asset_list: + - ['c6e65ba7878b2f8ea0ad39287d3e2fd256dc5c4160fc19bdf4c4d87e','7447454e53'] + - ['777e6b4903dab74963ae581d39875c5dac16c09bb1f511c0af1ddda8','6141414441'] + _extended: true + utxo_refs_with_extended: + content: + application/json: + schema: + required: + - _utxo_refs + type: object + properties: + _utxo_refs: + format: text + type: array + items: + type: string + description: Array of Cardano utxo references in the form "hash#index" + _extended: + format: boolean + type: boolean + 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## + _extended: false securitySchemes: bearerAuth: type: http @@ -2566,8 +2834,8 @@ components: description: The hash of the first block where these parameters are valid example: f9dc2a2fc3a2db09a71af007a740261de585afc9e3022b8e30535592ff4dd9e5 cost_models: - type: string - description: The per language cost models + type: object + description: The per language cost model in JSON example: null nullable: true price_mem: @@ -2757,17 +3025,21 @@ components: properties: block_hash: $ref: "#/components/schemas/blocks/items/properties/hash" - tx_hashes: - type: array - items: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + tx_hash: + $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + epoch_no: + $ref: "#/components/schemas/blocks/items/properties/epoch_no" + block_height: + $ref: "#/components/schemas/blocks/items/properties/block_height" + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" address_info: type: array items: type: object properties: address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" balance: type: string description: Sum of all UTxO values beloning to address @@ -2786,9 +3058,9 @@ components: type: object properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_index" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" block_height: $ref: "#/components/schemas/blocks/items/properties/block_height" block_time: @@ -2802,7 +3074,7 @@ components: reference_script: $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/reference_script" asset_list: - $ref: "#/components/schemas/account_assets/items/properties/asset_list" + $ref: "#/components/schemas/utxo_infos/items/properties/asset_list" address_txs: type: array items: @@ -2822,22 +3094,17 @@ components: type: object properties: address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" - asset_list: - $ref: "#/components/schemas/account_assets/items/properties/asset_list" - credential_txs: - $ref: "#/components/schemas/address_txs" - credential_utxos: - type: array - items: - type: object - properties: - tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_hash" - tx_index: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_index" - value: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/value" + $ref: "#/components/schemas/utxo_infos/items/properties/address" + policy_id: + $ref: "#/components/schemas/asset_info/items/properties/policy_id" + asset_name: + $ref: "#/components/schemas/asset_info/items/properties/asset_name" + fingerprint: + $ref: "#/components/schemas/asset_info/items/properties/fingerprint" + decimals: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + quantity: + $ref: "#/components/schemas/asset_addresses/items/properties/quantity" account_list: type: array items: @@ -2858,7 +3125,9 @@ components: enum: ["registered", "not registered"] example: registered delegated_pool: - $ref: "#/components/schemas/pool_list/items/properties/pool_id_bech32" + nullable: true + allOf: + - $ref: "#/components/schemas/pool_list/items/properties/pool_id_bech32" total_balance: type: string description: Total balance of the account including UTxO, rewards and MIRs (in lovelace) @@ -2887,23 +3156,66 @@ components: type: string description: Total treasury MIR value of the account example: "0" - account_utxos: + utxo_infos: type: array items: type: object properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_hash" + type: string + description: Hash identifier of the transaction + example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e tx_index: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_index" + type: integer + description: Index of UTxO in the transaction + example: 0 address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + type: string + description: A Cardano payment/base address (bech32 encoded) + example: addr1qxkfe8s6m8qt5436lec3f0320hrmpppwqgs2gah4360krvyssntpwjcz303mx3h4avg7p29l3zd8u3jyglmewds9ezrqdc3cxp value: $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/value" + stake_address: + $ref: "#/components/schemas/account_history/items/properties/stake_address" + payment_cred: + type: string + description: Payment credential + example: de3c1c527e8826b9cd2030f88f75fc44cd4ce519b9ded9eb794b3794 + epoch_no: + $ref: "#/components/schemas/blocks/items/properties/epoch_no" block_height: $ref: "#/components/schemas/blocks/items/properties/block_height" block_time: $ref: "#/components/schemas/blocks/items/properties/block_time" + datum_hash: + $ref: "#/components/schemas/script_redeemers/items/properties/redeemers/items/properties/datum_hash" + inline_datum: + $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/inline_datum" + reference_script: + $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/reference_script" + asset_list: + type: array + nullable: true + description: An array of assets on the UTxO + items: + properties: + policy_id: + $ref: "#/components/schemas/asset_info/items/properties/policy_id" + asset_name: + $ref: "#/components/schemas/asset_info/items/properties/asset_name" + fingerprint: + $ref: "#/components/schemas/asset_info/items/properties/fingerprint" + decimals: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + quantity: + type: string + description: Quantity of assets on the UTxO + example: 1 + is_spent: + type: boolean + description: True if the UTXO has been spent + example: true + account_rewards: type: array items: @@ -2948,7 +3260,7 @@ components: enum: ["registration", "delegation", "withdrawal", "deregistration"] example: "registration" tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" epoch_no: $ref: "#/components/schemas/blocks/items/properties/epoch_no" epoch_slot: @@ -2967,7 +3279,7 @@ components: addresses: type: array items: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" account_assets: type: array items: @@ -2975,25 +3287,16 @@ components: properties: stake_address: $ref: "#/components/schemas/account_history/items/properties/stake_address" - asset_list: - type: array - items: - type: object - properties: - policy_id: - $ref: "#/components/schemas/asset_info/items/properties/policy_id" - asset_name: - $ref: "#/components/schemas/asset_info/items/properties/asset_name" - fingerprint: - $ref: "#/components/schemas/asset_info/items/properties/fingerprint" - decimals: - type: integer - description: Asset decimals - example: 6 - quantity: - type: string - description: Asset quantity owned by account - example: 990000 + policy_id: + $ref: "#/components/schemas/asset_info/items/properties/policy_id" + asset_name: + $ref: "#/components/schemas/asset_info/items/properties/asset_name" + fingerprint: + $ref: "#/components/schemas/asset_info/items/properties/fingerprint" + decimals: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + quantity: + $ref: "#/components/schemas/asset_addresses/items/properties/quantity" account_history: type: array items: @@ -3025,9 +3328,7 @@ components: type: object properties: tx_hash: - type: string - description: Hash identifier of the transaction - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" block_hash: $ref: "#/components/schemas/blocks/items/properties/hash" block_height: @@ -3094,9 +3395,7 @@ components: type: object properties: bech32: - type: string - description: A Cardano payment/base address (bech32 encoded) where funds were sent or change to be returned - example: addr1q80rc8zj06yzdwwdyqc03rm4l3zv6n89rxuaak0t099n09yssntpwjcz303mx3h4avg7p29l3zd8u3jyglmewds9ezrqad9mkw + $ref: "#/components/schemas/utxo_infos/items/properties/address" cred: type: string description: Payment credential @@ -3106,13 +3405,9 @@ components: allOf: - $ref: "#/components/schemas/account_history/items/properties/stake_address" tx_hash: - type: string - description: Hash of transaction for UTxO - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - type: integer - description: Index of UTxO in the transaction - example: 0 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" value: type: string description: Total sum of ADA on the UTxO @@ -3162,23 +3457,7 @@ components: description: Value (json) example: null asset_list: - type: array - nullable: true - description: An array of assets on the UTxO - items: - properties: - policy_id: - $ref: "#/components/schemas/asset_info/items/properties/policy_id" - asset_name: - $ref: "#/components/schemas/asset_info/items/properties/asset_name" - fingerprint: - $ref: "#/components/schemas/asset_info/items/properties/fingerprint" - decimals: - $ref: "#/components/schemas/account_assets/items/properties/asset_list/items/properties/decimals" - quantity: - type: string - description: Quantity of assets on the UTxO - example: 1 + $ref: "#/components/schemas/utxo_infos/items/properties/asset_list" withdrawals: type: array description: Array of withdrawals with-in a transaction @@ -3207,7 +3486,7 @@ components: fingerprint: $ref: "#/components/schemas/asset_info/items/properties/fingerprint" decimals: - $ref: "#/components/schemas/account_assets/items/properties/asset_list/items/properties/decimals" + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" quantity: type: string description: Quantity of minted assets (negative on burn) @@ -3245,7 +3524,7 @@ components: items: properties: script_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/script_hash" + $ref: "#/components/schemas/script_info/items/properties/script_hash" script_json: type: object description: JSON representation of the timelock script (null for other script types) @@ -3270,6 +3549,7 @@ components: } plutus_contracts: type: array + nullable: true description: Plutus contracts present in transaction (if any) items: properties: @@ -3279,15 +3559,11 @@ components: example: addr1w999n67e86jn6xal07pzxtrmqynspgx0fwmcmpua4wc6yzsxpljz3 nullable: true script_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/script_hash" + $ref: "#/components/schemas/script_info/items/properties/script_hash" bytecode: - type: string - description: CBOR-encoded Plutus script data - example: 5911ea010000332333222332233223322332232323332223233322232333333332222222232333222323333222232323322323332223233322232323322332232323333322222332233223322332233223322223223223232533530333330083333573466e1cd55cea8032400046460a000264646464646666ae68cdc39aab9d5004480008cccc8888cccc16c01000c008004dd71aba15004375c6ae85400cdd71aba15002375a6ae84d5d1280111a8279a982819ab9c491035054310005149926135744a00226ae8940044d55cf280089baa001357426aae79401c8d4124d4c128cd5ce2481035054310004b499263333573466e1d40112002205323333573466e1d40152000205523504a35304b335738921035054310004c49926498cccd5cd19b8735573aa004900011980599191919191919191919191999ab9a3370e6aae754029200023333333333019335027232323333573466e1cd55cea8012400046603e60746ae854008c0b0d5d09aba2500223505935305a3357389201035054310005b49926135573ca00226ea8004d5d0a80519a8138141aba150093335502e75ca05a6ae854020ccd540b9d728169aba1500733502704335742a00c66a04e66aa0a8098eb4d5d0a8029919191999ab9a3370e6aae754009200023350213232323333573466e1cd55cea80124000466a05266a084eb4d5d0a80118239aba135744a00446a0ba6a60bc66ae712401035054310005f49926135573ca00226ea8004d5d0a8011919191999ab9a3370e6aae7540092000233502733504275a6ae854008c11cd5d09aba2500223505d35305e3357389201035054310005f49926135573ca00226ea8004d5d09aba2500223505935305a3357389201035054310005b49926135573ca00226ea8004d5d0a80219a813bae35742a00666a04e66aa0a8eb88004d5d0a801181c9aba135744a00446a0aa6a60ac66ae71241035054310005749926135744a00226ae8940044d5d1280089aba25001135744a00226ae8940044d5d1280089aba25001135573ca00226ea8004d5d0a8011919191999ab9a3370ea00290031180f181d9aba135573ca00646666ae68cdc3a801240084603a608a6ae84d55cf280211999ab9a3370ea00690011180e98181aba135573ca00a46666ae68cdc3a80224000460406eb8d5d09aab9e50062350503530513357389201035054310005249926499264984d55cea80089baa001357426ae8940088d4124d4c128cd5ce249035054310004b49926104a1350483530493357389201035054350004a4984d55cf280089baa001135573a6ea80044dd50009109198008018011000911111111109199999999980080580500480400380300280200180110009109198008018011000891091980080180109000891091980080180109000891091980080180109000909111180200290911118018029091111801002909111180080290008919118011bac0013200135503b2233335573e0024a01c466a01a60086ae84008c00cd5d100101991919191999ab9a3370e6aae75400d200023330073232323333573466e1cd55cea8012400046601a60626ae854008cd404c0b4d5d09aba25002235036353037335738921035054310003849926135573ca00226ea8004d5d0a801999aa805bae500a35742a00466a01eeb8d5d09aba25002235032353033335738921035054310003449926135744a00226aae7940044dd50009110919980080200180110009109198008018011000899aa800bae75a224464460046eac004c8004d540d488c8cccd55cf80112804919a80419aa81898031aab9d5002300535573ca00460086ae8800c0b84d5d08008891001091091198008020018900089119191999ab9a3370ea002900011a80418029aba135573ca00646666ae68cdc3a801240044a01046a0526a605466ae712401035054310002b499264984d55cea80089baa001121223002003112200112001232323333573466e1cd55cea8012400046600c600e6ae854008dd69aba135744a00446a0466a604866ae71241035054310002549926135573ca00226ea80048848cc00400c00880048c8cccd5cd19b8735573aa002900011bae357426aae7940088d407cd4c080cd5ce24810350543100021499261375400224464646666ae68cdc3a800a40084a00e46666ae68cdc3a8012400446a014600c6ae84d55cf280211999ab9a3370ea00690001280511a8111a981199ab9c490103505431000244992649926135573aa00226ea8004484888c00c0104488800844888004480048c8cccd5cd19b8750014800880188cccd5cd19b8750024800080188d4068d4c06ccd5ce249035054310001c499264984d55ce9baa0011220021220012001232323232323333573466e1d4005200c200b23333573466e1d4009200a200d23333573466e1d400d200823300b375c6ae854014dd69aba135744a00a46666ae68cdc3a8022400c46601a6eb8d5d0a8039bae357426ae89401c8cccd5cd19b875005480108cc048c050d5d0a8049bae357426ae8940248cccd5cd19b875006480088c050c054d5d09aab9e500b23333573466e1d401d2000230133016357426aae7940308d407cd4c080cd5ce2481035054310002149926499264992649926135573aa00826aae79400c4d55cf280109aab9e500113754002424444444600e01044244444446600c012010424444444600a010244444440082444444400644244444446600401201044244444446600201201040024646464646666ae68cdc3a800a400446660106eb4d5d0a8021bad35742a0066eb4d5d09aba2500323333573466e1d400920002300a300b357426aae7940188d4040d4c044cd5ce2490350543100012499264984d55cea80189aba25001135573ca00226ea80048488c00800c888488ccc00401401000c80048c8c8cccd5cd19b875001480088c018dd71aba135573ca00646666ae68cdc3a80124000460106eb8d5d09aab9e500423500a35300b3357389201035054310000c499264984d55cea80089baa001212230020032122300100320011122232323333573466e1cd55cea80124000466aa016600c6ae854008c014d5d09aba25002235007353008335738921035054310000949926135573ca00226ea8004498480048004448848cc00400c008448004848c0040088004888848cccc00401401000c00880044880084880048004448c8c00400488cc00cc008008004c8ccc888c8c8cc88cc88ccc888c8c8c8c8cc88c8c8cc88c8cccc8888c8c8c8c8c8c8c8c8ccc888c8ccc888ccc888cccccccc88888888cc88ccccc88888cccc8888cc88cc88cc88ccc888cc88cc88cc88cc88cc88c8c8c8cc88c8c8c8c8c8c8cc88c8c8c8c8c8c8cc888c888c8c94cd4c1240104cc0352401297369676e617475726520646f6573206e6f74206d617463682063726561746f7220696e20646174756d0033223530200022222222222533535032333553068120015027253353079333573466e3c0300041ec1e84d40d4004540d000c841ec41e54008c04540144cc054cc03524012f65787065637465642063726561746f7220746f2067657420616c6c206f66207768617420736865206f72646572656400330153350133335500e305c12001504f350481223335501b2253353070333505006353353502a3235302900122335304c0022350300012502f300e00221001132635300b335738920117696e76616c6964207075626c6963206b657920686173680000c498c05540244cc010c0340080044004004c8d4c08400488888888880254010ccd41354138c1894014c04920c08db7013350133335500e305c12001504f350481223335501b22533530703005002133004335506500d30100020011001001300d5004333504d504e30625005333504d504e533535026301a00321300a300d0011630124830236dc04cc0352401276f6e6c79206d617463686573206f66207061697273206f66206f726465727320616c6c6f77656400533535063350481223335501b225335307030050021330040020011001001300d50041306a162215335350650011306c16221533535067001107222130701623253353502732353024001222001500121333504e223530280022235302a0032232335304e0052335304f004253353077333573466e3c0080041e41e05400c41e081e08cd4c13c01081e094cd4c1dcccd5cd19b8f002001079078150031078153353502e0032153353502f00221335304c0022335304d002233530510022335305200223306d002001207b23353052002207b23306d00200122207b222335304f004207b2225335307c333573466e1c01800c1f81f454cd4c1f0ccd5cd19b8700500207e07d1333573466e1c0100041f81f441f441f441d854cd4d40b8004841d841d8c03140094cd4d40a0c07001484cd54190034c03c0045841b84c0300044d4c068004880084d4c02800480044800480048d4c0680048880088d4c06400488800c8d4c05000488888888880288d4c05400488004894cd4c184004418c4cd5ce001031089119aa8011a82600090009091800801100091a982c0009111002119a82999aa82b245003350533355056489000015054505412233355304b120013500550032353550560012233355304e120013500850062353550590012233353550490012330614800000488cc1880080048cc184005200000133040002001133500400105a22533530590021001105a123350492233353500400322002002001353500200122001122123300100300212001112232001320013550582253353504e00110032213300600230040012353003001223530070022222222222533335302600b21501b21501b21501b2133355305012001500f2353015001225335306353353063333573466e3cd4c0bc00888008d4c0bc010880081941904ccd5cd19b8735302f0022200135302f00422001065064106413501f0031501e00b13350432253353500d002210031001500c2212330010030022001222222222212333333333300100b00a009008007006005004003002200122123300100300220012221233300100400300220012212330010030022001121223002003112200112001122123300100300212001122123300100300212001122123300100300212001121222300300411222002112220011200121222230040052122223003005212222300200521222230010052001221233001003002200121222222230070082212222222330060090082122222223005008122222220041222222200322122222223300200900822122222223300100900820012122300200322212233300100500400320012122300200321223001003200112335001501d501e1220021220012001120011200113002012133500b2233300301300200150162223355300e1200123535501a00122335501d002335530111200123535501d001223355020002333535500d00123300a4800000488cc02c0080048cc028005200000133004002001223355300c1200123535501800122335501b00233353550080012335530101200123535501c00122335501f00235500f001001223335550080150020012335530101200123535501c00122335501f00235500d0010013335550030100020011112223335530041200150153355300c1200123535501800122335501b00235500b0013335530041200122353550190022253353021333553011120013500d33500f22533530230021025100102223535501c001223300a0020050061003133501900400350160013355300c120012353550180012232335501c00330010053200135502322533535019001135500b0032213535501e00222533530263300c00200813355010007001130060030023200135501c221122253353501500110022213300500233355300712001005004001112122230030041122122233002005004112122230010041120011233500722333535004003220020020013535002001220011221233001003002120013200135501422112253353500c0011500e22133500f3004002335530061200100400132001355013221122253353500c00113535006003220012213335350080052200230040023335530071200100500400112212330010030021200122333573466e3c00800404404088cdc000100088911801000919991119a80319aa80480199a80319aa804801000a803a8039a980380091110019a980380091110011a98038009111000889100109109119800802001890008891091980080180108900091110919998008028020018011000900211199ab9a3371000400200800a244004244002400222464600200244660066004004003 + $ref: "#/components/schemas/script_info/items/properties/bytes" size: - type: integer - description: The size of the CBOR serialised script (in bytes) - example: 234895 + $ref: "#/components/schemas/script_info/items/properties/size" valid_contract: type: boolean description: True if the contract is valid or there is no contract @@ -3351,13 +3627,9 @@ components: allOf: - $ref: "#/components/schemas/account_history/items/properties/stake_address" tx_hash: - type: string - description: Hash of transaction for UTxO - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - type: integer - description: Index of UTxO in the transaction - example: 0 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" value: type: string description: Total sum of ADA on the UTxO @@ -3372,7 +3644,7 @@ components: items: properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" metadata: type: object nullable: true @@ -3393,7 +3665,7 @@ components: items: properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" num_confirmations: type: integer description: Number of block confirmations @@ -3447,9 +3719,7 @@ components: items: properties: payment_address: - type: string - description: A Cardano payment/base address (bech32 encoded) for transaction's input UTxO - example: addr1qxkfe8s6m8qt5436lec3f0320hrmpppwqgs2gah4360krvyssntpwjcz303mx3h4avg7p29l3zd8u3jyglmewds9ezrqdc3cxp + $ref: "#/components/schemas/utxo_infos/items/properties/address" quantity: type: string description: Asset balance on the payment address @@ -3460,7 +3730,7 @@ components: items: properties: payment_address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" asset_summary: type: array items: @@ -3592,7 +3862,7 @@ components: asset_name: $ref: "#/components/schemas/asset_info/items/properties/asset_name" payment_address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" quantity: $ref: "#/components/schemas/asset_addresses/items/properties/quantity" policy_asset_info: @@ -3632,67 +3902,65 @@ components: total_supply: $ref: "#/components/schemas/asset_info/items/properties/total_supply" decimals: - $ref: "#/components/schemas/account_assets/items/properties/asset_list/items/properties/decimals" - asset_txs: - type: array - description: An array of Tx hashes that included the given asset (latest first) - items: - properties: - tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" - epoch_no: - $ref: "#/components/schemas/blocks/items/properties/epoch_no" - block_height: - $ref: "#/components/schemas/blocks/items/properties/block_height" - block_time: - $ref: "#/components/schemas/blocks/items/properties/block_time" - native_script_list: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + script_info: type: array items: properties: script_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/script_hash" + type: string + description: Hash of a script + example: bfa7ffa9b2e164873db6ac6d0528c82e212963bc62e10fd1d81da4af creation_tx_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/creation_tx_hash" + type: string + description: Hash of the script creation transaction + example: 255f061502ad83230351fbcf2d9fade1b5d118d332f92c9861075010a1fe3fbe type: type: string description: Type of the script - enum: ["timelock", "multisig"] - example: timelock - plutus_script_list: + enum: ["plutusV1","plutusV2","timelock","multisig"] + example: plutusV1 + value: + type: object + nullable: true + description: Data in JSON format + example: null + bytes: + type: string + description: Script bytes (cborSeq) + example: 5907f4010000332323232323232323233223232323232332232323232322223232533532533533355300712001323212330012233350052200200200100235001220011233001225335002101710010142325335333573466e3cd400488008d4020880080580544ccd5cd19b873500122001350082200101601510153500122002353500122002222222222200a101413357389201115554784f206e6f7420636f6e73756d6564000133333573466e1cd55cea8012400046644246600200600464646464646464646464646666ae68cdc39aab9d500a480008cccccccccc888888888848cccccccccc00402c02802402001c01801401000c008cd40508c8c8cccd5cd19b8735573aa0049000119910919800801801180f9aba150023019357426ae8940088c98d4cd5ce01581501481409aab9e5001137540026ae854028cd4050054d5d0a804999aa80bbae501635742a010666aa02eeb94058d5d0a80399a80a0109aba15006335014335502402275a6ae854014c8c8c8cccd5cd19b8735573aa00490001199109198008018011919191999ab9a3370e6aae754009200023322123300100300233502575a6ae854008c098d5d09aba2500223263533573805e05c05a05826aae7940044dd50009aba150023232323333573466e1cd55cea8012400046644246600200600466a04aeb4d5d0a80118131aba135744a004464c6a66ae700bc0b80b40b04d55cf280089baa001357426ae8940088c98d4cd5ce01581501481409aab9e5001137540026ae854010cd4051d71aba15003335014335502475c40026ae854008c070d5d09aba2500223263533573804e04c04a04826ae8940044d5d1280089aba25001135744a00226ae8940044d5d1280089aba25001135744a00226aae7940044dd50009aba150023232323333573466e1d400520062321222230040053019357426aae79400c8cccd5cd19b875002480108c848888c008014c06cd5d09aab9e500423333573466e1d400d20022321222230010053015357426aae7940148cccd5cd19b875004480008c848888c00c014dd71aba135573ca00c464c6a66ae7008808408007c0780740704d55cea80089baa001357426ae8940088c98d4cd5ce00d80d00c80c080c89931a99ab9c4910350543500019018135573ca00226ea8004c8004d5405888448894cd40044d400c88004884ccd401488008c010008ccd54c01c4800401401000448c88c008dd6000990009aa80b111999aab9f00125009233500830043574200460066ae880080548c8c8c8cccd5cd19b8735573aa00690001199911091998008020018011919191999ab9a3370e6aae7540092000233221233001003002301735742a00466a01c02c6ae84d5d1280111931a99ab9c01b01a019018135573ca00226ea8004d5d0a801999aa803bae500635742a00466a014eb8d5d09aba2500223263533573802e02c02a02826ae8940044d55cf280089baa0011335500175ceb44488c88c008dd5800990009aa80a11191999aab9f0022500823350073355017300635573aa004600a6aae794008c010d5d100180a09aba100111220021221223300100400312232323333573466e1d4005200023212230020033005357426aae79400c8cccd5cd19b8750024800884880048c98d4cd5ce00980900880800789aab9d500113754002464646666ae68cdc39aab9d5002480008cc8848cc00400c008c014d5d0a8011bad357426ae8940088c98d4cd5ce00800780700689aab9e5001137540024646666ae68cdc39aab9d5001480008dd71aba135573ca004464c6a66ae7003803403002c4dd500089119191999ab9a3370ea00290021091100091999ab9a3370ea00490011190911180180218031aba135573ca00846666ae68cdc3a801a400042444004464c6a66ae7004404003c0380340304d55cea80089baa0012323333573466e1d40052002200523333573466e1d40092000200523263533573801a01801601401226aae74dd5000891001091000919191919191999ab9a3370ea002900610911111100191999ab9a3370ea004900510911111100211999ab9a3370ea00690041199109111111198008048041bae35742a00a6eb4d5d09aba2500523333573466e1d40112006233221222222233002009008375c6ae85401cdd71aba135744a00e46666ae68cdc3a802a400846644244444446600c01201060186ae854024dd71aba135744a01246666ae68cdc3a8032400446424444444600e010601a6ae84d55cf280591999ab9a3370ea00e900011909111111180280418071aba135573ca018464c6a66ae7004c04804404003c03803403002c0284d55cea80209aab9e5003135573ca00426aae7940044dd50009191919191999ab9a3370ea002900111999110911998008028020019bad35742a0086eb4d5d0a8019bad357426ae89400c8cccd5cd19b875002480008c8488c00800cc020d5d09aab9e500623263533573801801601401201026aae75400c4d5d1280089aab9e500113754002464646666ae68cdc3a800a400446424460020066eb8d5d09aab9e500323333573466e1d400920002321223002003375c6ae84d55cf280211931a99ab9c009008007006005135573aa00226ea800444888c8c8cccd5cd19b8735573aa0049000119aa80518031aba150023005357426ae8940088c98d4cd5ce00480400380309aab9e5001137540029309000a490350543100112212330010030021123230010012233003300200200133512233002489209366f09fe40eaaeb17d3cb6b0b61e087d664174c39a48a986f86b2b0ba6e2a7b00480008848cc00400c0088005 + size: + type: integer + description: The size of the CBOR serialised script (in bytes) + example: 2039 + script_list: type: array items: properties: script_hash: - type: string - description: Hash of a script - example: d8480dc869b94b80e81ec91b0abe307279311fe0e7001a9488f61ff8 + $ref: "#/components/schemas/script_info/items/properties/script_hash" creation_tx_hash: - type: string - description: Hash of the script creation transaction - example: fda6c7697009237975ffc30f36666addf4c6e2a2c6f90411a24431b700baaab1 + $ref: "#/components/schemas/script_info/items/properties/creation_tx_hash" + type: + $ref: "#/components/schemas/script_info/items/properties/type" + size: + $ref: "#/components/schemas/script_info/items/properties/size" script_redeemers: type: array items: type: object properties: script_hash: - type: string - description: Hash of Transaction for which details are being shown - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/script_info/items/properties/script_hash" redeemers: type: array items: type: object properties: tx_hash: - type: string - description: Hash of Transaction containing the redeemer - example: fda6c7697009237975ffc30f36666addf4c6e2a2c6f90411a24431b700baaab1 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - type: integer - description: The index of the redeemer pointer in the transaction - example: 0 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" unit_mem: description: The budget in Memory to run a script example: 520448 @@ -3724,20 +3992,20 @@ components: nullable: true example: 5a595ce795815e81d22a1a522cf3987d546dc5bb016de61b002edd63a5413ec4 datum_value: - type: object - description: The actual data in json format - example: { "bytes": "3c33" } + $ref: "#/components/schemas/script_info/items/properties/value" datum_info: type: array items: type: object properties: - hash: + datum_hash: $ref: "#/components/schemas/script_redeemers/items/properties/redeemers/items/properties/datum_hash" + creation_tx_hash: + $ref: "#/components/schemas/script_info/items/properties/creation_tx_hash" value: - $ref: "#/components/schemas/script_redeemers/items/properties/redeemers/items/properties/datum_value" + $ref: "#/components/schemas/script_info/items/properties/value" bytes: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/inline_datum/properties/bytes" + $ref: "#/components/schemas/script_info/items/properties/bytes" headers: {} responses: OK: diff --git a/specs/results/koiosapi-preview.yaml b/specs/results/koiosapi-preview.yaml index c3b14e54..521424d9 100644 --- a/specs/results/koiosapi-preview.yaml +++ b/specs/results/koiosapi-preview.yaml @@ -1,7 +1,7 @@ openapi: 3.0.2 info: title: Koios API - version: 1.0.11rc + version: v1.0.11rc description: | Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples. @@ -534,19 +534,41 @@ paths: $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 + post: + tags: + - Address + requestBody: + $ref: "#/components/requestBodies/payment_addresses_with_extended" + responses: + "200": + description: Array of address UTXOs + 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: Address UTXOs + description: Get UTxO set for given addresses /credential_utxos: #RPC post: tags: - Address requestBody: - $ref: "#/components/requestBodies/credential_utxos" + $ref: "#/components/requestBodies/utxo_infos" responses: "200": description: Array of UTxOs with balances content: application/json: schema: - $ref: "#/components/schemas/credential_utxos" + $ref: "#/components/schemas/utxo_infos" "400": $ref: "#/components/responses/BadRequest" "401": @@ -554,7 +576,8 @@ paths: "404": $ref: "#/components/responses/NotFound" summary: UTxOs from payment credentials - description: Get a list of UTxO against input payment credential array including their balances + description: Get UTxO details for requested payment credentials + /address_assets: #RPC post: tags: @@ -588,7 +611,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/credential_txs" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": @@ -637,27 +660,52 @@ paths: $ref: "#/components/responses/NotFound" summary: Account Information description: Get the account information for given stake addresses - /account_utxos: #RPC + + /account_txs: #RPC # todo - new get: tags: - Stake Account parameters: - $ref: "#/components/parameters/_stake_address" + - $ref: "#/components/parameters/_after_block_height" + responses: + "200": + description: Array of Txs associated with stake address (account) + content: + application/json: + schema: + $ref: "#/components/schemas/address_txs" + "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) + + /account_utxos: #RPC + post: + tags: + - Stake Account + requestBody: + $ref: "#/components/requestBodies/stake_addresses_with_extended" responses: "200": - description: Array of account UTxOs associated with stake address + description: Array of account UTxOs associated with given stake addresses content: application/json: schema: - $ref: "#/components/schemas/account_utxos" + $ref: "#/components/schemas/utxo_infos" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Account UTxOs - description: Get a list of all UTxOs for a given stake address (account) + summary: UTxOs for stake addresses (accounts) + description: Get a list of all UTxOs for given stake addresses (account)s + /account_info_cached: #RPC post: tags: @@ -936,6 +984,29 @@ 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: + - Asset + requestBody: + $ref: "#/components/requestBodies/asset_list_with_extended" + responses: + "200": + description: Array of UTXOs for given asset list + 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: Asset UTXO Information (Bulk) + description: Get the UTXO information of a list of assets including + /asset_history: #RPC get: tags: @@ -1078,11 +1149,11 @@ paths: - $ref: "#/components/parameters/_history" responses: "200": - description: Array of Tx hashes that included the given asset + description: An array of Tx hashes that included the given asset (latest first) content: application/json: schema: - $ref: "#/components/schemas/asset_txs" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": @@ -1109,7 +1180,7 @@ paths: "404": $ref: "#/components/responses/NotFound" summary: Pool List - description: A list of all currently registered/retiring (not retired) pools + description: List of brief info for all pools /pool_info: #RPC post: tags: @@ -1305,6 +1376,29 @@ paths: $ref: "#/components/responses/NotFound" summary: Pool Metadata description: Metadata (on & off-chain) for all pools + + /script_info: #RPC + post: + tags: + - Script + requestBody: + $ref: "#/components/requestBodies/script_hashes" + responses: + "200": + description: List of datum information for given datum hashes + content: + application/json: + schema: + $ref: "#/components/schemas/script_info" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Datum Information + description: List of datum information for given datum hashes + /native_script_list: #RPC get: tags: @@ -1315,7 +1409,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/native_script_list" + $ref: "#/components/schemas/script_list" "400": $ref: "#/components/responses/BadRequest" "401": @@ -1334,7 +1428,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/plutus_script_list" + $ref: "#/components/schemas/script_list" "400": $ref: "#/components/responses/BadRequest" "401": @@ -1364,6 +1458,30 @@ paths: $ref: "#/components/responses/NotFound" summary: Script Redeemers description: List of all redeemers for a given script hash + + /script_utxos: #RPC todo new + get: + tags: + - Script + parameters: + - $ref: "#/components/parameters/_script_hash" + - $ref: "#/components/parameters/_extended" + responses: + "200": + description: List of UTXOs for a given script hash + 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: Script UTXOs + description: List of all UTXOs for a given script hash + /datum_info: #RPC post: tags: @@ -1385,6 +1503,29 @@ paths: $ref: "#/components/responses/NotFound" 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: @@ -1558,6 +1699,16 @@ components: in: query required: false allowEmptyValue: true + _extended: + deprecated: false + name: _extended + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + schema: + type: boolean + example: "false" + in: query + required: false + allowEmptyValue: true _history: deprecated: false name: _history @@ -1665,6 +1816,29 @@ components: _addresses: - addr_test1vpfwv0ezc5g8a4mkku8hhy3y3vp92t7s3ul8g778g5yegsgalc6gc - addr_test1vqneq3v0dqh3x3muv6ee3lt8e5729xymnxuavx6tndcjc2cv24ef9 + payment_addresses_with_extended: + content: + application/json: + schema: + required: + - _addresses + type: object + properties: + _addresses: + format: text + type: array + items: + type: string + description: Array of Cardano payment address(es) in bech32 format + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + example: + _addresses: + - addr_test1vpfwv0ezc5g8a4mkku8hhy3y3vp92t7s3ul8g778g5yegsgalc6gc + - addr_test1vqneq3v0dqh3x3muv6ee3lt8e5729xymnxuavx6tndcjc2cv24ef9 + _extended: true address_txs: content: application/json: @@ -1737,6 +1911,31 @@ components: _stake_addresses: - stake_test1urqntq4wexjylnrdnp97qq79qkxxvrsa9lcnwr7ckjd6w0cr04y4p - stake_test1up6wqzrw2h9vvjy5zfkjn0dwtymy5r29zyhf8fyhm6fat9c2am5hl + todo: add examples referencing all existing param + + stake_addresses_with_extended: + content: + application/json: + schema: + required: + - _stake_addresses + type: object + properties: + _stake_addresses: + format: text + type: array + items: + type: string + description: Array of Cardano stake address(es) in bech32 format + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + example: + _stake_addresses: + - stake_test1urqntq4wexjylnrdnp97qq79qkxxvrsa9lcnwr7ckjd6w0cr04y4p + - stake_test1up6wqzrw2h9vvjy5zfkjn0dwtymy5r29zyhf8fyhm6fat9c2am5hl + _extended: true stake_addresses: content: application/json: @@ -1792,10 +1991,15 @@ components: items: type: string description: Array of Cardano payment credential(s) in hex format + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call example: _payment_credentials: - 33c378cee41b2e15ac848f7f6f1d2f78155ab12d93b713de898d855f - 52e63f22c5107ed776b70f7b92248b02552fd08f3e747bc745099441 + _extended: true tx_ids: content: application/json: @@ -1857,6 +2061,22 @@ components: - pool1p90428kec03mjdya3k4gv5d20w7lmed7ca0snknef5j977l3y8l - pool1wwh3k3ldzujdvgxllfwlnnkxyheafkacqlufnvpr77n5q72f9hw - pool1p835jxsj8py5n34lrgk6fvpgpxxvh585qm8dzvp7ups37vdet5a + script_hashes: + content: + application/json: + schema: + type: object + properties: + _script_hashes: + format: text + type: array + items: + type: string + description: Array of Cardano script hashes + example: + _script_hashes: + - 6181b3dc623cd8812caf027a3507e9b3095388a7cf3db65983e1fddd3a84c88c + - f8ae55ff89e1f5366f23e16bcaf2073252337b96031a02d79e41d653b5f0a978 datum_hashes: content: application/json: @@ -1893,6 +2113,54 @@ components: _asset_list: - ['065270479316f1d92e00f7f9f095ebeaac9d009c878dc35ce36d3404','433374'] - ['189e2c53985411addb8df0f3e09f70e343da69f06746c408aba672a8','15fc257714a51769e192761d674db2ee2e80137428e522f9b914debb5f785301'] + asset_list_with_extended: + content: + application/json: + schema: + required: + - _asset_list + type: object + properties: + _asset_list: + format: text + type: array + description: Array of array of policy ID and asset names (hex) + items: + type: array + items: + type: string + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + example: + _asset_list: + - ['065270479316f1d92e00f7f9f095ebeaac9d009c878dc35ce36d3404','433374'] + - ['189e2c53985411addb8df0f3e09f70e343da69f06746c408aba672a8','15fc257714a51769e192761d674db2ee2e80137428e522f9b914debb5f785301'] + _extended: true + utxo_refs_with_extended: + content: + application/json: + schema: + required: + - _utxo_refs + type: object + properties: + _utxo_refs: + format: text + type: array + items: + type: string + description: Array of Cardano utxo references in the form "hash#index" + _extended: + format: boolean + type: boolean + 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## + _extended: false securitySchemes: bearerAuth: type: http @@ -2566,8 +2834,8 @@ components: description: The hash of the first block where these parameters are valid example: f9dc2a2fc3a2db09a71af007a740261de585afc9e3022b8e30535592ff4dd9e5 cost_models: - type: string - description: The per language cost models + type: object + description: The per language cost model in JSON example: null nullable: true price_mem: @@ -2757,17 +3025,21 @@ components: properties: block_hash: $ref: "#/components/schemas/blocks/items/properties/hash" - tx_hashes: - type: array - items: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + tx_hash: + $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + epoch_no: + $ref: "#/components/schemas/blocks/items/properties/epoch_no" + block_height: + $ref: "#/components/schemas/blocks/items/properties/block_height" + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" address_info: type: array items: type: object properties: address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" balance: type: string description: Sum of all UTxO values beloning to address @@ -2786,9 +3058,9 @@ components: type: object properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_index" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" block_height: $ref: "#/components/schemas/blocks/items/properties/block_height" block_time: @@ -2802,7 +3074,7 @@ components: reference_script: $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/reference_script" asset_list: - $ref: "#/components/schemas/account_assets/items/properties/asset_list" + $ref: "#/components/schemas/utxo_infos/items/properties/asset_list" address_txs: type: array items: @@ -2822,22 +3094,17 @@ components: type: object properties: address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" - asset_list: - $ref: "#/components/schemas/account_assets/items/properties/asset_list" - credential_txs: - $ref: "#/components/schemas/address_txs" - credential_utxos: - type: array - items: - type: object - properties: - tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_hash" - tx_index: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_index" - value: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/value" + $ref: "#/components/schemas/utxo_infos/items/properties/address" + policy_id: + $ref: "#/components/schemas/asset_info/items/properties/policy_id" + asset_name: + $ref: "#/components/schemas/asset_info/items/properties/asset_name" + fingerprint: + $ref: "#/components/schemas/asset_info/items/properties/fingerprint" + decimals: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + quantity: + $ref: "#/components/schemas/asset_addresses/items/properties/quantity" account_list: type: array items: @@ -2858,7 +3125,9 @@ components: enum: ["registered", "not registered"] example: registered delegated_pool: - $ref: "#/components/schemas/pool_list/items/properties/pool_id_bech32" + nullable: true + allOf: + - $ref: "#/components/schemas/pool_list/items/properties/pool_id_bech32" total_balance: type: string description: Total balance of the account including UTxO, rewards and MIRs (in lovelace) @@ -2887,23 +3156,66 @@ components: type: string description: Total treasury MIR value of the account example: "0" - account_utxos: + utxo_infos: type: array items: type: object properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_hash" + type: string + description: Hash identifier of the transaction + example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e tx_index: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_index" + type: integer + description: Index of UTxO in the transaction + example: 0 address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + type: string + description: A Cardano payment/base address (bech32 encoded) + example: addr1qxkfe8s6m8qt5436lec3f0320hrmpppwqgs2gah4360krvyssntpwjcz303mx3h4avg7p29l3zd8u3jyglmewds9ezrqdc3cxp value: $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/value" + stake_address: + $ref: "#/components/schemas/account_history/items/properties/stake_address" + payment_cred: + type: string + description: Payment credential + example: de3c1c527e8826b9cd2030f88f75fc44cd4ce519b9ded9eb794b3794 + epoch_no: + $ref: "#/components/schemas/blocks/items/properties/epoch_no" block_height: $ref: "#/components/schemas/blocks/items/properties/block_height" block_time: $ref: "#/components/schemas/blocks/items/properties/block_time" + datum_hash: + $ref: "#/components/schemas/script_redeemers/items/properties/redeemers/items/properties/datum_hash" + inline_datum: + $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/inline_datum" + reference_script: + $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/reference_script" + asset_list: + type: array + nullable: true + description: An array of assets on the UTxO + items: + properties: + policy_id: + $ref: "#/components/schemas/asset_info/items/properties/policy_id" + asset_name: + $ref: "#/components/schemas/asset_info/items/properties/asset_name" + fingerprint: + $ref: "#/components/schemas/asset_info/items/properties/fingerprint" + decimals: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + quantity: + type: string + description: Quantity of assets on the UTxO + example: 1 + is_spent: + type: boolean + description: True if the UTXO has been spent + example: true + account_rewards: type: array items: @@ -2948,7 +3260,7 @@ components: enum: ["registration", "delegation", "withdrawal", "deregistration"] example: "registration" tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" epoch_no: $ref: "#/components/schemas/blocks/items/properties/epoch_no" epoch_slot: @@ -2967,7 +3279,7 @@ components: addresses: type: array items: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" account_assets: type: array items: @@ -2975,25 +3287,16 @@ components: properties: stake_address: $ref: "#/components/schemas/account_history/items/properties/stake_address" - asset_list: - type: array - items: - type: object - properties: - policy_id: - $ref: "#/components/schemas/asset_info/items/properties/policy_id" - asset_name: - $ref: "#/components/schemas/asset_info/items/properties/asset_name" - fingerprint: - $ref: "#/components/schemas/asset_info/items/properties/fingerprint" - decimals: - type: integer - description: Asset decimals - example: 6 - quantity: - type: string - description: Asset quantity owned by account - example: 990000 + policy_id: + $ref: "#/components/schemas/asset_info/items/properties/policy_id" + asset_name: + $ref: "#/components/schemas/asset_info/items/properties/asset_name" + fingerprint: + $ref: "#/components/schemas/asset_info/items/properties/fingerprint" + decimals: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + quantity: + $ref: "#/components/schemas/asset_addresses/items/properties/quantity" account_history: type: array items: @@ -3025,9 +3328,7 @@ components: type: object properties: tx_hash: - type: string - description: Hash identifier of the transaction - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" block_hash: $ref: "#/components/schemas/blocks/items/properties/hash" block_height: @@ -3094,9 +3395,7 @@ components: type: object properties: bech32: - type: string - description: A Cardano payment/base address (bech32 encoded) where funds were sent or change to be returned - example: addr1q80rc8zj06yzdwwdyqc03rm4l3zv6n89rxuaak0t099n09yssntpwjcz303mx3h4avg7p29l3zd8u3jyglmewds9ezrqad9mkw + $ref: "#/components/schemas/utxo_infos/items/properties/address" cred: type: string description: Payment credential @@ -3106,13 +3405,9 @@ components: allOf: - $ref: "#/components/schemas/account_history/items/properties/stake_address" tx_hash: - type: string - description: Hash of transaction for UTxO - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - type: integer - description: Index of UTxO in the transaction - example: 0 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" value: type: string description: Total sum of ADA on the UTxO @@ -3162,23 +3457,7 @@ components: description: Value (json) example: null asset_list: - type: array - nullable: true - description: An array of assets on the UTxO - items: - properties: - policy_id: - $ref: "#/components/schemas/asset_info/items/properties/policy_id" - asset_name: - $ref: "#/components/schemas/asset_info/items/properties/asset_name" - fingerprint: - $ref: "#/components/schemas/asset_info/items/properties/fingerprint" - decimals: - $ref: "#/components/schemas/account_assets/items/properties/asset_list/items/properties/decimals" - quantity: - type: string - description: Quantity of assets on the UTxO - example: 1 + $ref: "#/components/schemas/utxo_infos/items/properties/asset_list" withdrawals: type: array description: Array of withdrawals with-in a transaction @@ -3207,7 +3486,7 @@ components: fingerprint: $ref: "#/components/schemas/asset_info/items/properties/fingerprint" decimals: - $ref: "#/components/schemas/account_assets/items/properties/asset_list/items/properties/decimals" + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" quantity: type: string description: Quantity of minted assets (negative on burn) @@ -3245,7 +3524,7 @@ components: items: properties: script_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/script_hash" + $ref: "#/components/schemas/script_info/items/properties/script_hash" script_json: type: object description: JSON representation of the timelock script (null for other script types) @@ -3270,6 +3549,7 @@ components: } plutus_contracts: type: array + nullable: true description: Plutus contracts present in transaction (if any) items: properties: @@ -3279,15 +3559,11 @@ components: example: addr1w999n67e86jn6xal07pzxtrmqynspgx0fwmcmpua4wc6yzsxpljz3 nullable: true script_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/script_hash" + $ref: "#/components/schemas/script_info/items/properties/script_hash" bytecode: - type: string - description: CBOR-encoded Plutus script data - example: 5911ea010000332333222332233223322332232323332223233322232333333332222222232333222323333222232323322323332223233322232323322332232323333322222332233223322332233223322223223223232533530333330083333573466e1cd55cea8032400046460a000264646464646666ae68cdc39aab9d5004480008cccc8888cccc16c01000c008004dd71aba15004375c6ae85400cdd71aba15002375a6ae84d5d1280111a8279a982819ab9c491035054310005149926135744a00226ae8940044d55cf280089baa001357426aae79401c8d4124d4c128cd5ce2481035054310004b499263333573466e1d40112002205323333573466e1d40152000205523504a35304b335738921035054310004c49926498cccd5cd19b8735573aa004900011980599191919191919191919191999ab9a3370e6aae754029200023333333333019335027232323333573466e1cd55cea8012400046603e60746ae854008c0b0d5d09aba2500223505935305a3357389201035054310005b49926135573ca00226ea8004d5d0a80519a8138141aba150093335502e75ca05a6ae854020ccd540b9d728169aba1500733502704335742a00c66a04e66aa0a8098eb4d5d0a8029919191999ab9a3370e6aae754009200023350213232323333573466e1cd55cea80124000466a05266a084eb4d5d0a80118239aba135744a00446a0ba6a60bc66ae712401035054310005f49926135573ca00226ea8004d5d0a8011919191999ab9a3370e6aae7540092000233502733504275a6ae854008c11cd5d09aba2500223505d35305e3357389201035054310005f49926135573ca00226ea8004d5d09aba2500223505935305a3357389201035054310005b49926135573ca00226ea8004d5d0a80219a813bae35742a00666a04e66aa0a8eb88004d5d0a801181c9aba135744a00446a0aa6a60ac66ae71241035054310005749926135744a00226ae8940044d5d1280089aba25001135744a00226ae8940044d5d1280089aba25001135573ca00226ea8004d5d0a8011919191999ab9a3370ea00290031180f181d9aba135573ca00646666ae68cdc3a801240084603a608a6ae84d55cf280211999ab9a3370ea00690011180e98181aba135573ca00a46666ae68cdc3a80224000460406eb8d5d09aab9e50062350503530513357389201035054310005249926499264984d55cea80089baa001357426ae8940088d4124d4c128cd5ce249035054310004b49926104a1350483530493357389201035054350004a4984d55cf280089baa001135573a6ea80044dd50009109198008018011000911111111109199999999980080580500480400380300280200180110009109198008018011000891091980080180109000891091980080180109000891091980080180109000909111180200290911118018029091111801002909111180080290008919118011bac0013200135503b2233335573e0024a01c466a01a60086ae84008c00cd5d100101991919191999ab9a3370e6aae75400d200023330073232323333573466e1cd55cea8012400046601a60626ae854008cd404c0b4d5d09aba25002235036353037335738921035054310003849926135573ca00226ea8004d5d0a801999aa805bae500a35742a00466a01eeb8d5d09aba25002235032353033335738921035054310003449926135744a00226aae7940044dd50009110919980080200180110009109198008018011000899aa800bae75a224464460046eac004c8004d540d488c8cccd55cf80112804919a80419aa81898031aab9d5002300535573ca00460086ae8800c0b84d5d08008891001091091198008020018900089119191999ab9a3370ea002900011a80418029aba135573ca00646666ae68cdc3a801240044a01046a0526a605466ae712401035054310002b499264984d55cea80089baa001121223002003112200112001232323333573466e1cd55cea8012400046600c600e6ae854008dd69aba135744a00446a0466a604866ae71241035054310002549926135573ca00226ea80048848cc00400c00880048c8cccd5cd19b8735573aa002900011bae357426aae7940088d407cd4c080cd5ce24810350543100021499261375400224464646666ae68cdc3a800a40084a00e46666ae68cdc3a8012400446a014600c6ae84d55cf280211999ab9a3370ea00690001280511a8111a981199ab9c490103505431000244992649926135573aa00226ea8004484888c00c0104488800844888004480048c8cccd5cd19b8750014800880188cccd5cd19b8750024800080188d4068d4c06ccd5ce249035054310001c499264984d55ce9baa0011220021220012001232323232323333573466e1d4005200c200b23333573466e1d4009200a200d23333573466e1d400d200823300b375c6ae854014dd69aba135744a00a46666ae68cdc3a8022400c46601a6eb8d5d0a8039bae357426ae89401c8cccd5cd19b875005480108cc048c050d5d0a8049bae357426ae8940248cccd5cd19b875006480088c050c054d5d09aab9e500b23333573466e1d401d2000230133016357426aae7940308d407cd4c080cd5ce2481035054310002149926499264992649926135573aa00826aae79400c4d55cf280109aab9e500113754002424444444600e01044244444446600c012010424444444600a010244444440082444444400644244444446600401201044244444446600201201040024646464646666ae68cdc3a800a400446660106eb4d5d0a8021bad35742a0066eb4d5d09aba2500323333573466e1d400920002300a300b357426aae7940188d4040d4c044cd5ce2490350543100012499264984d55cea80189aba25001135573ca00226ea80048488c00800c888488ccc00401401000c80048c8c8cccd5cd19b875001480088c018dd71aba135573ca00646666ae68cdc3a80124000460106eb8d5d09aab9e500423500a35300b3357389201035054310000c499264984d55cea80089baa001212230020032122300100320011122232323333573466e1cd55cea80124000466aa016600c6ae854008c014d5d09aba25002235007353008335738921035054310000949926135573ca00226ea8004498480048004448848cc00400c008448004848c0040088004888848cccc00401401000c00880044880084880048004448c8c00400488cc00cc008008004c8ccc888c8c8cc88cc88ccc888c8c8c8c8cc88c8c8cc88c8cccc8888c8c8c8c8c8c8c8c8ccc888c8ccc888ccc888cccccccc88888888cc88ccccc88888cccc8888cc88cc88cc88ccc888cc88cc88cc88cc88cc88c8c8c8cc88c8c8c8c8c8c8cc88c8c8c8c8c8c8cc888c888c8c94cd4c1240104cc0352401297369676e617475726520646f6573206e6f74206d617463682063726561746f7220696e20646174756d0033223530200022222222222533535032333553068120015027253353079333573466e3c0300041ec1e84d40d4004540d000c841ec41e54008c04540144cc054cc03524012f65787065637465642063726561746f7220746f2067657420616c6c206f66207768617420736865206f72646572656400330153350133335500e305c12001504f350481223335501b2253353070333505006353353502a3235302900122335304c0022350300012502f300e00221001132635300b335738920117696e76616c6964207075626c6963206b657920686173680000c498c05540244cc010c0340080044004004c8d4c08400488888888880254010ccd41354138c1894014c04920c08db7013350133335500e305c12001504f350481223335501b22533530703005002133004335506500d30100020011001001300d5004333504d504e30625005333504d504e533535026301a00321300a300d0011630124830236dc04cc0352401276f6e6c79206d617463686573206f66207061697273206f66206f726465727320616c6c6f77656400533535063350481223335501b225335307030050021330040020011001001300d50041306a162215335350650011306c16221533535067001107222130701623253353502732353024001222001500121333504e223530280022235302a0032232335304e0052335304f004253353077333573466e3c0080041e41e05400c41e081e08cd4c13c01081e094cd4c1dcccd5cd19b8f002001079078150031078153353502e0032153353502f00221335304c0022335304d002233530510022335305200223306d002001207b23353052002207b23306d00200122207b222335304f004207b2225335307c333573466e1c01800c1f81f454cd4c1f0ccd5cd19b8700500207e07d1333573466e1c0100041f81f441f441f441d854cd4d40b8004841d841d8c03140094cd4d40a0c07001484cd54190034c03c0045841b84c0300044d4c068004880084d4c02800480044800480048d4c0680048880088d4c06400488800c8d4c05000488888888880288d4c05400488004894cd4c184004418c4cd5ce001031089119aa8011a82600090009091800801100091a982c0009111002119a82999aa82b245003350533355056489000015054505412233355304b120013500550032353550560012233355304e120013500850062353550590012233353550490012330614800000488cc1880080048cc184005200000133040002001133500400105a22533530590021001105a123350492233353500400322002002001353500200122001122123300100300212001112232001320013550582253353504e00110032213300600230040012353003001223530070022222222222533335302600b21501b21501b21501b2133355305012001500f2353015001225335306353353063333573466e3cd4c0bc00888008d4c0bc010880081941904ccd5cd19b8735302f0022200135302f00422001065064106413501f0031501e00b13350432253353500d002210031001500c2212330010030022001222222222212333333333300100b00a009008007006005004003002200122123300100300220012221233300100400300220012212330010030022001121223002003112200112001122123300100300212001122123300100300212001122123300100300212001121222300300411222002112220011200121222230040052122223003005212222300200521222230010052001221233001003002200121222222230070082212222222330060090082122222223005008122222220041222222200322122222223300200900822122222223300100900820012122300200322212233300100500400320012122300200321223001003200112335001501d501e1220021220012001120011200113002012133500b2233300301300200150162223355300e1200123535501a00122335501d002335530111200123535501d001223355020002333535500d00123300a4800000488cc02c0080048cc028005200000133004002001223355300c1200123535501800122335501b00233353550080012335530101200123535501c00122335501f00235500f001001223335550080150020012335530101200123535501c00122335501f00235500d0010013335550030100020011112223335530041200150153355300c1200123535501800122335501b00235500b0013335530041200122353550190022253353021333553011120013500d33500f22533530230021025100102223535501c001223300a0020050061003133501900400350160013355300c120012353550180012232335501c00330010053200135502322533535019001135500b0032213535501e00222533530263300c00200813355010007001130060030023200135501c221122253353501500110022213300500233355300712001005004001112122230030041122122233002005004112122230010041120011233500722333535004003220020020013535002001220011221233001003002120013200135501422112253353500c0011500e22133500f3004002335530061200100400132001355013221122253353500c00113535006003220012213335350080052200230040023335530071200100500400112212330010030021200122333573466e3c00800404404088cdc000100088911801000919991119a80319aa80480199a80319aa804801000a803a8039a980380091110019a980380091110011a98038009111000889100109109119800802001890008891091980080180108900091110919998008028020018011000900211199ab9a3371000400200800a244004244002400222464600200244660066004004003 + $ref: "#/components/schemas/script_info/items/properties/bytes" size: - type: integer - description: The size of the CBOR serialised script (in bytes) - example: 234895 + $ref: "#/components/schemas/script_info/items/properties/size" valid_contract: type: boolean description: True if the contract is valid or there is no contract @@ -3351,13 +3627,9 @@ components: allOf: - $ref: "#/components/schemas/account_history/items/properties/stake_address" tx_hash: - type: string - description: Hash of transaction for UTxO - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - type: integer - description: Index of UTxO in the transaction - example: 0 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" value: type: string description: Total sum of ADA on the UTxO @@ -3372,7 +3644,7 @@ components: items: properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" metadata: type: object nullable: true @@ -3393,7 +3665,7 @@ components: items: properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" num_confirmations: type: integer description: Number of block confirmations @@ -3447,9 +3719,7 @@ components: items: properties: payment_address: - type: string - description: A Cardano payment/base address (bech32 encoded) for transaction's input UTxO - example: addr1qxkfe8s6m8qt5436lec3f0320hrmpppwqgs2gah4360krvyssntpwjcz303mx3h4avg7p29l3zd8u3jyglmewds9ezrqdc3cxp + $ref: "#/components/schemas/utxo_infos/items/properties/address" quantity: type: string description: Asset balance on the payment address @@ -3460,7 +3730,7 @@ components: items: properties: payment_address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" asset_summary: type: array items: @@ -3592,7 +3862,7 @@ components: asset_name: $ref: "#/components/schemas/asset_info/items/properties/asset_name" payment_address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" quantity: $ref: "#/components/schemas/asset_addresses/items/properties/quantity" policy_asset_info: @@ -3632,67 +3902,65 @@ components: total_supply: $ref: "#/components/schemas/asset_info/items/properties/total_supply" decimals: - $ref: "#/components/schemas/account_assets/items/properties/asset_list/items/properties/decimals" - asset_txs: - type: array - description: An array of Tx hashes that included the given asset (latest first) - items: - properties: - tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" - epoch_no: - $ref: "#/components/schemas/blocks/items/properties/epoch_no" - block_height: - $ref: "#/components/schemas/blocks/items/properties/block_height" - block_time: - $ref: "#/components/schemas/blocks/items/properties/block_time" - native_script_list: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + script_info: type: array items: properties: script_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/script_hash" + type: string + description: Hash of a script + example: bfa7ffa9b2e164873db6ac6d0528c82e212963bc62e10fd1d81da4af creation_tx_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/creation_tx_hash" + type: string + description: Hash of the script creation transaction + example: 255f061502ad83230351fbcf2d9fade1b5d118d332f92c9861075010a1fe3fbe type: type: string description: Type of the script - enum: ["timelock", "multisig"] - example: timelock - plutus_script_list: + enum: ["plutusV1","plutusV2","timelock","multisig"] + example: plutusV1 + value: + type: object + nullable: true + description: Data in JSON format + example: null + bytes: + type: string + description: Script bytes (cborSeq) + example: 5907f4010000332323232323232323233223232323232332232323232322223232533532533533355300712001323212330012233350052200200200100235001220011233001225335002101710010142325335333573466e3cd400488008d4020880080580544ccd5cd19b873500122001350082200101601510153500122002353500122002222222222200a101413357389201115554784f206e6f7420636f6e73756d6564000133333573466e1cd55cea8012400046644246600200600464646464646464646464646666ae68cdc39aab9d500a480008cccccccccc888888888848cccccccccc00402c02802402001c01801401000c008cd40508c8c8cccd5cd19b8735573aa0049000119910919800801801180f9aba150023019357426ae8940088c98d4cd5ce01581501481409aab9e5001137540026ae854028cd4050054d5d0a804999aa80bbae501635742a010666aa02eeb94058d5d0a80399a80a0109aba15006335014335502402275a6ae854014c8c8c8cccd5cd19b8735573aa00490001199109198008018011919191999ab9a3370e6aae754009200023322123300100300233502575a6ae854008c098d5d09aba2500223263533573805e05c05a05826aae7940044dd50009aba150023232323333573466e1cd55cea8012400046644246600200600466a04aeb4d5d0a80118131aba135744a004464c6a66ae700bc0b80b40b04d55cf280089baa001357426ae8940088c98d4cd5ce01581501481409aab9e5001137540026ae854010cd4051d71aba15003335014335502475c40026ae854008c070d5d09aba2500223263533573804e04c04a04826ae8940044d5d1280089aba25001135744a00226ae8940044d5d1280089aba25001135744a00226aae7940044dd50009aba150023232323333573466e1d400520062321222230040053019357426aae79400c8cccd5cd19b875002480108c848888c008014c06cd5d09aab9e500423333573466e1d400d20022321222230010053015357426aae7940148cccd5cd19b875004480008c848888c00c014dd71aba135573ca00c464c6a66ae7008808408007c0780740704d55cea80089baa001357426ae8940088c98d4cd5ce00d80d00c80c080c89931a99ab9c4910350543500019018135573ca00226ea8004c8004d5405888448894cd40044d400c88004884ccd401488008c010008ccd54c01c4800401401000448c88c008dd6000990009aa80b111999aab9f00125009233500830043574200460066ae880080548c8c8c8cccd5cd19b8735573aa00690001199911091998008020018011919191999ab9a3370e6aae7540092000233221233001003002301735742a00466a01c02c6ae84d5d1280111931a99ab9c01b01a019018135573ca00226ea8004d5d0a801999aa803bae500635742a00466a014eb8d5d09aba2500223263533573802e02c02a02826ae8940044d55cf280089baa0011335500175ceb44488c88c008dd5800990009aa80a11191999aab9f0022500823350073355017300635573aa004600a6aae794008c010d5d100180a09aba100111220021221223300100400312232323333573466e1d4005200023212230020033005357426aae79400c8cccd5cd19b8750024800884880048c98d4cd5ce00980900880800789aab9d500113754002464646666ae68cdc39aab9d5002480008cc8848cc00400c008c014d5d0a8011bad357426ae8940088c98d4cd5ce00800780700689aab9e5001137540024646666ae68cdc39aab9d5001480008dd71aba135573ca004464c6a66ae7003803403002c4dd500089119191999ab9a3370ea00290021091100091999ab9a3370ea00490011190911180180218031aba135573ca00846666ae68cdc3a801a400042444004464c6a66ae7004404003c0380340304d55cea80089baa0012323333573466e1d40052002200523333573466e1d40092000200523263533573801a01801601401226aae74dd5000891001091000919191919191999ab9a3370ea002900610911111100191999ab9a3370ea004900510911111100211999ab9a3370ea00690041199109111111198008048041bae35742a00a6eb4d5d09aba2500523333573466e1d40112006233221222222233002009008375c6ae85401cdd71aba135744a00e46666ae68cdc3a802a400846644244444446600c01201060186ae854024dd71aba135744a01246666ae68cdc3a8032400446424444444600e010601a6ae84d55cf280591999ab9a3370ea00e900011909111111180280418071aba135573ca018464c6a66ae7004c04804404003c03803403002c0284d55cea80209aab9e5003135573ca00426aae7940044dd50009191919191999ab9a3370ea002900111999110911998008028020019bad35742a0086eb4d5d0a8019bad357426ae89400c8cccd5cd19b875002480008c8488c00800cc020d5d09aab9e500623263533573801801601401201026aae75400c4d5d1280089aab9e500113754002464646666ae68cdc3a800a400446424460020066eb8d5d09aab9e500323333573466e1d400920002321223002003375c6ae84d55cf280211931a99ab9c009008007006005135573aa00226ea800444888c8c8cccd5cd19b8735573aa0049000119aa80518031aba150023005357426ae8940088c98d4cd5ce00480400380309aab9e5001137540029309000a490350543100112212330010030021123230010012233003300200200133512233002489209366f09fe40eaaeb17d3cb6b0b61e087d664174c39a48a986f86b2b0ba6e2a7b00480008848cc00400c0088005 + size: + type: integer + description: The size of the CBOR serialised script (in bytes) + example: 2039 + script_list: type: array items: properties: script_hash: - type: string - description: Hash of a script - example: d8480dc869b94b80e81ec91b0abe307279311fe0e7001a9488f61ff8 + $ref: "#/components/schemas/script_info/items/properties/script_hash" creation_tx_hash: - type: string - description: Hash of the script creation transaction - example: fda6c7697009237975ffc30f36666addf4c6e2a2c6f90411a24431b700baaab1 + $ref: "#/components/schemas/script_info/items/properties/creation_tx_hash" + type: + $ref: "#/components/schemas/script_info/items/properties/type" + size: + $ref: "#/components/schemas/script_info/items/properties/size" script_redeemers: type: array items: type: object properties: script_hash: - type: string - description: Hash of Transaction for which details are being shown - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/script_info/items/properties/script_hash" redeemers: type: array items: type: object properties: tx_hash: - type: string - description: Hash of Transaction containing the redeemer - example: fda6c7697009237975ffc30f36666addf4c6e2a2c6f90411a24431b700baaab1 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - type: integer - description: The index of the redeemer pointer in the transaction - example: 0 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" unit_mem: description: The budget in Memory to run a script example: 520448 @@ -3724,20 +3992,20 @@ components: nullable: true example: 5a595ce795815e81d22a1a522cf3987d546dc5bb016de61b002edd63a5413ec4 datum_value: - type: object - description: The actual data in json format - example: { "bytes": "3c33" } + $ref: "#/components/schemas/script_info/items/properties/value" datum_info: type: array items: type: object properties: - hash: + datum_hash: $ref: "#/components/schemas/script_redeemers/items/properties/redeemers/items/properties/datum_hash" + creation_tx_hash: + $ref: "#/components/schemas/script_info/items/properties/creation_tx_hash" value: - $ref: "#/components/schemas/script_redeemers/items/properties/redeemers/items/properties/datum_value" + $ref: "#/components/schemas/script_info/items/properties/value" bytes: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/inline_datum/properties/bytes" + $ref: "#/components/schemas/script_info/items/properties/bytes" headers: {} responses: OK: diff --git a/specs/templates/1-api-info.yaml b/specs/templates/1-api-info.yaml index 40a81dda..2d741b0c 100644 --- a/specs/templates/1-api-info.yaml +++ b/specs/templates/1-api-info.yaml @@ -1,6 +1,6 @@ info: title: Koios API - version: 1.0.11rc + version: v1.0.11rc description: | Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples. diff --git a/specs/templates/2-api-params.yaml b/specs/templates/2-api-params.yaml index 40dac816..5c1a3d7d 100644 --- a/specs/templates/2-api-params.yaml +++ b/specs/templates/2-api-params.yaml @@ -170,6 +170,16 @@ parameters: in: query required: false allowEmptyValue: true + _extended: + deprecated: false + name: _extended + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + schema: + type: boolean + example: "false" + in: query + required: false + allowEmptyValue: true _history: deprecated: false name: _history diff --git a/specs/templates/3-api-requestBodies.yaml b/specs/templates/3-api-requestBodies.yaml index 0b69563f..ab026160 100644 --- a/specs/templates/3-api-requestBodies.yaml +++ b/specs/templates/3-api-requestBodies.yaml @@ -35,6 +35,29 @@ requestBodies: _addresses: - ##payment_addresses1_rb## - ##payment_addresses2_rb## + payment_addresses_with_extended: + content: + application/json: + schema: + required: + - _addresses + type: object + properties: + _addresses: + format: text + type: array + items: + type: string + description: Array of Cardano payment address(es) in bech32 format + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + example: + _addresses: + - ##payment_addresses1_rb## + - ##payment_addresses2_rb## + _extended: true address_txs: content: application/json: @@ -107,6 +130,31 @@ requestBodies: _stake_addresses: - ##stake_addresses1_rb## - ##stake_addresses2_rb## + todo: add examples referencing all existing param + + stake_addresses_with_extended: + content: + application/json: + schema: + required: + - _stake_addresses + type: object + properties: + _stake_addresses: + format: text + type: array + items: + type: string + description: Array of Cardano stake address(es) in bech32 format + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + example: + _stake_addresses: + - ##stake_addresses1_rb## + - ##stake_addresses2_rb## + _extended: true stake_addresses: content: application/json: @@ -162,10 +210,15 @@ requestBodies: items: type: string description: Array of Cardano payment credential(s) in hex format + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call example: _payment_credentials: - ##credential_txs_payment_credentials1_rb## - ##credential_txs_payment_credentials2_rb## + _extended: true tx_ids: content: application/json: @@ -227,6 +280,22 @@ requestBodies: - ##pool_ids_pool_bech32_ids1_rb## - ##pool_ids_pool_bech32_ids2_rb## - ##pool_ids_pool_bech32_ids3_rb## + script_hashes: + content: + application/json: + schema: + type: object + properties: + _script_hashes: + format: text + type: array + items: + type: string + description: Array of Cardano script hashes + example: + _script_hashes: + - ##script_hashes1_rb## + - ##script_hashes2_rb## datum_hashes: content: application/json: @@ -263,3 +332,51 @@ requestBodies: _asset_list: - ##asset1_rb## - ##asset2_rb## + asset_list_with_extended: + content: + application/json: + schema: + required: + - _asset_list + type: object + properties: + _asset_list: + format: text + type: array + description: Array of array of policy ID and asset names (hex) + items: + type: array + items: + type: string + _extended: + format: boolean + type: boolean + description: Controls whether or not certain optional fields supported by a given endpoint are populated as a part of the call + example: + _asset_list: + - ##asset1_rb## + - ##asset2_rb## + _extended: true + utxo_refs_with_extended: + content: + application/json: + schema: + required: + - _utxo_refs + type: object + properties: + _utxo_refs: + format: text + type: array + items: + type: string + description: Array of Cardano utxo references in the form "hash#index" + _extended: + format: boolean + type: boolean + 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## + _extended: false \ No newline at end of file diff --git a/specs/templates/4-api-schemas.yaml b/specs/templates/4-api-schemas.yaml index af1067a8..9b6dbbaa 100644 --- a/specs/templates/4-api-schemas.yaml +++ b/specs/templates/4-api-schemas.yaml @@ -666,8 +666,8 @@ schemas: description: The hash of the first block where these parameters are valid example: f9dc2a2fc3a2db09a71af007a740261de585afc9e3022b8e30535592ff4dd9e5 cost_models: - type: string - description: The per language cost models + type: object + description: The per language cost model in JSON example: null nullable: true price_mem: @@ -857,17 +857,21 @@ schemas: properties: block_hash: $ref: "#/components/schemas/blocks/items/properties/hash" - tx_hashes: - type: array - items: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + tx_hash: + $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + epoch_no: + $ref: "#/components/schemas/blocks/items/properties/epoch_no" + block_height: + $ref: "#/components/schemas/blocks/items/properties/block_height" + block_time: + $ref: "#/components/schemas/blocks/items/properties/block_time" address_info: type: array items: type: object properties: address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" balance: type: string description: Sum of all UTxO values beloning to address @@ -886,9 +890,9 @@ schemas: type: object properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_index" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" block_height: $ref: "#/components/schemas/blocks/items/properties/block_height" block_time: @@ -902,7 +906,7 @@ schemas: reference_script: $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/reference_script" asset_list: - $ref: "#/components/schemas/account_assets/items/properties/asset_list" + $ref: "#/components/schemas/utxo_infos/items/properties/asset_list" address_txs: type: array items: @@ -922,22 +926,17 @@ schemas: type: object properties: address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" - asset_list: - $ref: "#/components/schemas/account_assets/items/properties/asset_list" - credential_txs: - $ref: "#/components/schemas/address_txs" - credential_utxos: - type: array - items: - type: object - properties: - tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_hash" - tx_index: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_index" - value: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/value" + $ref: "#/components/schemas/utxo_infos/items/properties/address" + policy_id: + $ref: "#/components/schemas/asset_info/items/properties/policy_id" + asset_name: + $ref: "#/components/schemas/asset_info/items/properties/asset_name" + fingerprint: + $ref: "#/components/schemas/asset_info/items/properties/fingerprint" + decimals: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + quantity: + $ref: "#/components/schemas/asset_addresses/items/properties/quantity" account_list: type: array items: @@ -958,7 +957,9 @@ schemas: enum: ["registered", "not registered"] example: registered delegated_pool: - $ref: "#/components/schemas/pool_list/items/properties/pool_id_bech32" + nullable: true + allOf: + - $ref: "#/components/schemas/pool_list/items/properties/pool_id_bech32" total_balance: type: string description: Total balance of the account including UTxO, rewards and MIRs (in lovelace) @@ -987,23 +988,66 @@ schemas: type: string description: Total treasury MIR value of the account example: "0" - account_utxos: + utxo_infos: type: array items: type: object properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_hash" + type: string + description: Hash identifier of the transaction + example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e tx_index: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/tx_index" + type: integer + description: Index of UTxO in the transaction + example: 0 address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + type: string + description: A Cardano payment/base address (bech32 encoded) + example: addr1qxkfe8s6m8qt5436lec3f0320hrmpppwqgs2gah4360krvyssntpwjcz303mx3h4avg7p29l3zd8u3jyglmewds9ezrqdc3cxp value: $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/value" + stake_address: + $ref: "#/components/schemas/account_history/items/properties/stake_address" + payment_cred: + type: string + description: Payment credential + example: de3c1c527e8826b9cd2030f88f75fc44cd4ce519b9ded9eb794b3794 + epoch_no: + $ref: "#/components/schemas/blocks/items/properties/epoch_no" block_height: $ref: "#/components/schemas/blocks/items/properties/block_height" block_time: $ref: "#/components/schemas/blocks/items/properties/block_time" + datum_hash: + $ref: "#/components/schemas/script_redeemers/items/properties/redeemers/items/properties/datum_hash" + inline_datum: + $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/inline_datum" + reference_script: + $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/reference_script" + asset_list: + type: array + nullable: true + description: An array of assets on the UTxO + items: + properties: + policy_id: + $ref: "#/components/schemas/asset_info/items/properties/policy_id" + asset_name: + $ref: "#/components/schemas/asset_info/items/properties/asset_name" + fingerprint: + $ref: "#/components/schemas/asset_info/items/properties/fingerprint" + decimals: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + quantity: + type: string + description: Quantity of assets on the UTxO + example: 1 + is_spent: + type: boolean + description: True if the UTXO has been spent + example: true + account_rewards: type: array items: @@ -1048,7 +1092,7 @@ schemas: enum: ["registration", "delegation", "withdrawal", "deregistration"] example: "registration" tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" epoch_no: $ref: "#/components/schemas/blocks/items/properties/epoch_no" epoch_slot: @@ -1067,7 +1111,7 @@ schemas: addresses: type: array items: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" account_assets: type: array items: @@ -1075,25 +1119,16 @@ schemas: properties: stake_address: $ref: "#/components/schemas/account_history/items/properties/stake_address" - asset_list: - type: array - items: - type: object - properties: - policy_id: - $ref: "#/components/schemas/asset_info/items/properties/policy_id" - asset_name: - $ref: "#/components/schemas/asset_info/items/properties/asset_name" - fingerprint: - $ref: "#/components/schemas/asset_info/items/properties/fingerprint" - decimals: - type: integer - description: Asset decimals - example: 6 - quantity: - type: string - description: Asset quantity owned by account - example: 990000 + policy_id: + $ref: "#/components/schemas/asset_info/items/properties/policy_id" + asset_name: + $ref: "#/components/schemas/asset_info/items/properties/asset_name" + fingerprint: + $ref: "#/components/schemas/asset_info/items/properties/fingerprint" + decimals: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + quantity: + $ref: "#/components/schemas/asset_addresses/items/properties/quantity" account_history: type: array items: @@ -1125,9 +1160,7 @@ schemas: type: object properties: tx_hash: - type: string - description: Hash identifier of the transaction - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" block_hash: $ref: "#/components/schemas/blocks/items/properties/hash" block_height: @@ -1194,9 +1227,7 @@ schemas: type: object properties: bech32: - type: string - description: A Cardano payment/base address (bech32 encoded) where funds were sent or change to be returned - example: addr1q80rc8zj06yzdwwdyqc03rm4l3zv6n89rxuaak0t099n09yssntpwjcz303mx3h4avg7p29l3zd8u3jyglmewds9ezrqad9mkw + $ref: "#/components/schemas/utxo_infos/items/properties/address" cred: type: string description: Payment credential @@ -1206,13 +1237,9 @@ schemas: allOf: - $ref: "#/components/schemas/account_history/items/properties/stake_address" tx_hash: - type: string - description: Hash of transaction for UTxO - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - type: integer - description: Index of UTxO in the transaction - example: 0 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" value: type: string description: Total sum of ADA on the UTxO @@ -1262,23 +1289,7 @@ schemas: description: Value (json) example: null asset_list: - type: array - nullable: true - description: An array of assets on the UTxO - items: - properties: - policy_id: - $ref: "#/components/schemas/asset_info/items/properties/policy_id" - asset_name: - $ref: "#/components/schemas/asset_info/items/properties/asset_name" - fingerprint: - $ref: "#/components/schemas/asset_info/items/properties/fingerprint" - decimals: - $ref: "#/components/schemas/account_assets/items/properties/asset_list/items/properties/decimals" - quantity: - type: string - description: Quantity of assets on the UTxO - example: 1 + $ref: "#/components/schemas/utxo_infos/items/properties/asset_list" withdrawals: type: array description: Array of withdrawals with-in a transaction @@ -1307,7 +1318,7 @@ schemas: fingerprint: $ref: "#/components/schemas/asset_info/items/properties/fingerprint" decimals: - $ref: "#/components/schemas/account_assets/items/properties/asset_list/items/properties/decimals" + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" quantity: type: string description: Quantity of minted assets (negative on burn) @@ -1345,7 +1356,7 @@ schemas: items: properties: script_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/script_hash" + $ref: "#/components/schemas/script_info/items/properties/script_hash" script_json: type: object description: JSON representation of the timelock script (null for other script types) @@ -1370,6 +1381,7 @@ schemas: } plutus_contracts: type: array + nullable: true description: Plutus contracts present in transaction (if any) items: properties: @@ -1379,15 +1391,11 @@ schemas: example: addr1w999n67e86jn6xal07pzxtrmqynspgx0fwmcmpua4wc6yzsxpljz3 nullable: true script_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/script_hash" + $ref: "#/components/schemas/script_info/items/properties/script_hash" bytecode: - type: string - description: CBOR-encoded Plutus script data - example: 5911ea010000332333222332233223322332232323332223233322232333333332222222232333222323333222232323322323332223233322232323322332232323333322222332233223322332233223322223223223232533530333330083333573466e1cd55cea8032400046460a000264646464646666ae68cdc39aab9d5004480008cccc8888cccc16c01000c008004dd71aba15004375c6ae85400cdd71aba15002375a6ae84d5d1280111a8279a982819ab9c491035054310005149926135744a00226ae8940044d55cf280089baa001357426aae79401c8d4124d4c128cd5ce2481035054310004b499263333573466e1d40112002205323333573466e1d40152000205523504a35304b335738921035054310004c49926498cccd5cd19b8735573aa004900011980599191919191919191919191999ab9a3370e6aae754029200023333333333019335027232323333573466e1cd55cea8012400046603e60746ae854008c0b0d5d09aba2500223505935305a3357389201035054310005b49926135573ca00226ea8004d5d0a80519a8138141aba150093335502e75ca05a6ae854020ccd540b9d728169aba1500733502704335742a00c66a04e66aa0a8098eb4d5d0a8029919191999ab9a3370e6aae754009200023350213232323333573466e1cd55cea80124000466a05266a084eb4d5d0a80118239aba135744a00446a0ba6a60bc66ae712401035054310005f49926135573ca00226ea8004d5d0a8011919191999ab9a3370e6aae7540092000233502733504275a6ae854008c11cd5d09aba2500223505d35305e3357389201035054310005f49926135573ca00226ea8004d5d09aba2500223505935305a3357389201035054310005b49926135573ca00226ea8004d5d0a80219a813bae35742a00666a04e66aa0a8eb88004d5d0a801181c9aba135744a00446a0aa6a60ac66ae71241035054310005749926135744a00226ae8940044d5d1280089aba25001135744a00226ae8940044d5d1280089aba25001135573ca00226ea8004d5d0a8011919191999ab9a3370ea00290031180f181d9aba135573ca00646666ae68cdc3a801240084603a608a6ae84d55cf280211999ab9a3370ea00690011180e98181aba135573ca00a46666ae68cdc3a80224000460406eb8d5d09aab9e50062350503530513357389201035054310005249926499264984d55cea80089baa001357426ae8940088d4124d4c128cd5ce249035054310004b49926104a1350483530493357389201035054350004a4984d55cf280089baa001135573a6ea80044dd50009109198008018011000911111111109199999999980080580500480400380300280200180110009109198008018011000891091980080180109000891091980080180109000891091980080180109000909111180200290911118018029091111801002909111180080290008919118011bac0013200135503b2233335573e0024a01c466a01a60086ae84008c00cd5d100101991919191999ab9a3370e6aae75400d200023330073232323333573466e1cd55cea8012400046601a60626ae854008cd404c0b4d5d09aba25002235036353037335738921035054310003849926135573ca00226ea8004d5d0a801999aa805bae500a35742a00466a01eeb8d5d09aba25002235032353033335738921035054310003449926135744a00226aae7940044dd50009110919980080200180110009109198008018011000899aa800bae75a224464460046eac004c8004d540d488c8cccd55cf80112804919a80419aa81898031aab9d5002300535573ca00460086ae8800c0b84d5d08008891001091091198008020018900089119191999ab9a3370ea002900011a80418029aba135573ca00646666ae68cdc3a801240044a01046a0526a605466ae712401035054310002b499264984d55cea80089baa001121223002003112200112001232323333573466e1cd55cea8012400046600c600e6ae854008dd69aba135744a00446a0466a604866ae71241035054310002549926135573ca00226ea80048848cc00400c00880048c8cccd5cd19b8735573aa002900011bae357426aae7940088d407cd4c080cd5ce24810350543100021499261375400224464646666ae68cdc3a800a40084a00e46666ae68cdc3a8012400446a014600c6ae84d55cf280211999ab9a3370ea00690001280511a8111a981199ab9c490103505431000244992649926135573aa00226ea8004484888c00c0104488800844888004480048c8cccd5cd19b8750014800880188cccd5cd19b8750024800080188d4068d4c06ccd5ce249035054310001c499264984d55ce9baa0011220021220012001232323232323333573466e1d4005200c200b23333573466e1d4009200a200d23333573466e1d400d200823300b375c6ae854014dd69aba135744a00a46666ae68cdc3a8022400c46601a6eb8d5d0a8039bae357426ae89401c8cccd5cd19b875005480108cc048c050d5d0a8049bae357426ae8940248cccd5cd19b875006480088c050c054d5d09aab9e500b23333573466e1d401d2000230133016357426aae7940308d407cd4c080cd5ce2481035054310002149926499264992649926135573aa00826aae79400c4d55cf280109aab9e500113754002424444444600e01044244444446600c012010424444444600a010244444440082444444400644244444446600401201044244444446600201201040024646464646666ae68cdc3a800a400446660106eb4d5d0a8021bad35742a0066eb4d5d09aba2500323333573466e1d400920002300a300b357426aae7940188d4040d4c044cd5ce2490350543100012499264984d55cea80189aba25001135573ca00226ea80048488c00800c888488ccc00401401000c80048c8c8cccd5cd19b875001480088c018dd71aba135573ca00646666ae68cdc3a80124000460106eb8d5d09aab9e500423500a35300b3357389201035054310000c499264984d55cea80089baa001212230020032122300100320011122232323333573466e1cd55cea80124000466aa016600c6ae854008c014d5d09aba25002235007353008335738921035054310000949926135573ca00226ea8004498480048004448848cc00400c008448004848c0040088004888848cccc00401401000c00880044880084880048004448c8c00400488cc00cc008008004c8ccc888c8c8cc88cc88ccc888c8c8c8c8cc88c8c8cc88c8cccc8888c8c8c8c8c8c8c8c8ccc888c8ccc888ccc888cccccccc88888888cc88ccccc88888cccc8888cc88cc88cc88ccc888cc88cc88cc88cc88cc88c8c8c8cc88c8c8c8c8c8c8cc88c8c8c8c8c8c8cc888c888c8c94cd4c1240104cc0352401297369676e617475726520646f6573206e6f74206d617463682063726561746f7220696e20646174756d0033223530200022222222222533535032333553068120015027253353079333573466e3c0300041ec1e84d40d4004540d000c841ec41e54008c04540144cc054cc03524012f65787065637465642063726561746f7220746f2067657420616c6c206f66207768617420736865206f72646572656400330153350133335500e305c12001504f350481223335501b2253353070333505006353353502a3235302900122335304c0022350300012502f300e00221001132635300b335738920117696e76616c6964207075626c6963206b657920686173680000c498c05540244cc010c0340080044004004c8d4c08400488888888880254010ccd41354138c1894014c04920c08db7013350133335500e305c12001504f350481223335501b22533530703005002133004335506500d30100020011001001300d5004333504d504e30625005333504d504e533535026301a00321300a300d0011630124830236dc04cc0352401276f6e6c79206d617463686573206f66207061697273206f66206f726465727320616c6c6f77656400533535063350481223335501b225335307030050021330040020011001001300d50041306a162215335350650011306c16221533535067001107222130701623253353502732353024001222001500121333504e223530280022235302a0032232335304e0052335304f004253353077333573466e3c0080041e41e05400c41e081e08cd4c13c01081e094cd4c1dcccd5cd19b8f002001079078150031078153353502e0032153353502f00221335304c0022335304d002233530510022335305200223306d002001207b23353052002207b23306d00200122207b222335304f004207b2225335307c333573466e1c01800c1f81f454cd4c1f0ccd5cd19b8700500207e07d1333573466e1c0100041f81f441f441f441d854cd4d40b8004841d841d8c03140094cd4d40a0c07001484cd54190034c03c0045841b84c0300044d4c068004880084d4c02800480044800480048d4c0680048880088d4c06400488800c8d4c05000488888888880288d4c05400488004894cd4c184004418c4cd5ce001031089119aa8011a82600090009091800801100091a982c0009111002119a82999aa82b245003350533355056489000015054505412233355304b120013500550032353550560012233355304e120013500850062353550590012233353550490012330614800000488cc1880080048cc184005200000133040002001133500400105a22533530590021001105a123350492233353500400322002002001353500200122001122123300100300212001112232001320013550582253353504e00110032213300600230040012353003001223530070022222222222533335302600b21501b21501b21501b2133355305012001500f2353015001225335306353353063333573466e3cd4c0bc00888008d4c0bc010880081941904ccd5cd19b8735302f0022200135302f00422001065064106413501f0031501e00b13350432253353500d002210031001500c2212330010030022001222222222212333333333300100b00a009008007006005004003002200122123300100300220012221233300100400300220012212330010030022001121223002003112200112001122123300100300212001122123300100300212001122123300100300212001121222300300411222002112220011200121222230040052122223003005212222300200521222230010052001221233001003002200121222222230070082212222222330060090082122222223005008122222220041222222200322122222223300200900822122222223300100900820012122300200322212233300100500400320012122300200321223001003200112335001501d501e1220021220012001120011200113002012133500b2233300301300200150162223355300e1200123535501a00122335501d002335530111200123535501d001223355020002333535500d00123300a4800000488cc02c0080048cc028005200000133004002001223355300c1200123535501800122335501b00233353550080012335530101200123535501c00122335501f00235500f001001223335550080150020012335530101200123535501c00122335501f00235500d0010013335550030100020011112223335530041200150153355300c1200123535501800122335501b00235500b0013335530041200122353550190022253353021333553011120013500d33500f22533530230021025100102223535501c001223300a0020050061003133501900400350160013355300c120012353550180012232335501c00330010053200135502322533535019001135500b0032213535501e00222533530263300c00200813355010007001130060030023200135501c221122253353501500110022213300500233355300712001005004001112122230030041122122233002005004112122230010041120011233500722333535004003220020020013535002001220011221233001003002120013200135501422112253353500c0011500e22133500f3004002335530061200100400132001355013221122253353500c00113535006003220012213335350080052200230040023335530071200100500400112212330010030021200122333573466e3c00800404404088cdc000100088911801000919991119a80319aa80480199a80319aa804801000a803a8039a980380091110019a980380091110011a98038009111000889100109109119800802001890008891091980080180108900091110919998008028020018011000900211199ab9a3371000400200800a244004244002400222464600200244660066004004003 + $ref: "#/components/schemas/script_info/items/properties/bytes" size: - type: integer - description: The size of the CBOR serialised script (in bytes) - example: 234895 + $ref: "#/components/schemas/script_info/items/properties/size" valid_contract: type: boolean description: True if the contract is valid or there is no contract @@ -1451,13 +1459,9 @@ schemas: allOf: - $ref: "#/components/schemas/account_history/items/properties/stake_address" tx_hash: - type: string - description: Hash of transaction for UTxO - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - type: integer - description: Index of UTxO in the transaction - example: 0 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" value: type: string description: Total sum of ADA on the UTxO @@ -1472,7 +1476,7 @@ schemas: items: properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" metadata: type: object nullable: true @@ -1493,7 +1497,7 @@ schemas: items: properties: tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" num_confirmations: type: integer description: Number of block confirmations @@ -1547,9 +1551,7 @@ schemas: items: properties: payment_address: - type: string - description: A Cardano payment/base address (bech32 encoded) for transaction's input UTxO - example: addr1qxkfe8s6m8qt5436lec3f0320hrmpppwqgs2gah4360krvyssntpwjcz303mx3h4avg7p29l3zd8u3jyglmewds9ezrqdc3cxp + $ref: "#/components/schemas/utxo_infos/items/properties/address" quantity: type: string description: Asset balance on the payment address @@ -1560,7 +1562,7 @@ schemas: items: properties: payment_address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" asset_summary: type: array items: @@ -1692,7 +1694,7 @@ schemas: asset_name: $ref: "#/components/schemas/asset_info/items/properties/asset_name" payment_address: - $ref: "#/components/schemas/asset_addresses/items/properties/payment_address" + $ref: "#/components/schemas/utxo_infos/items/properties/address" quantity: $ref: "#/components/schemas/asset_addresses/items/properties/quantity" policy_asset_info: @@ -1732,67 +1734,65 @@ schemas: total_supply: $ref: "#/components/schemas/asset_info/items/properties/total_supply" decimals: - $ref: "#/components/schemas/account_assets/items/properties/asset_list/items/properties/decimals" - asset_txs: - type: array - description: An array of Tx hashes that included the given asset (latest first) - items: - properties: - tx_hash: - $ref: "#/components/schemas/tx_info/items/properties/tx_hash" - epoch_no: - $ref: "#/components/schemas/blocks/items/properties/epoch_no" - block_height: - $ref: "#/components/schemas/blocks/items/properties/block_height" - block_time: - $ref: "#/components/schemas/blocks/items/properties/block_time" - native_script_list: + $ref: "#/components/schemas/asset_info/items/properties/token_registry_metadata/items/properties/decimals" + script_info: type: array items: properties: script_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/script_hash" + type: string + description: Hash of a script + example: bfa7ffa9b2e164873db6ac6d0528c82e212963bc62e10fd1d81da4af creation_tx_hash: - $ref: "#/components/schemas/plutus_script_list/items/properties/creation_tx_hash" + type: string + description: Hash of the script creation transaction + example: 255f061502ad83230351fbcf2d9fade1b5d118d332f92c9861075010a1fe3fbe type: type: string description: Type of the script - enum: ["timelock", "multisig"] - example: timelock - plutus_script_list: + enum: ["plutusV1","plutusV2","timelock","multisig"] + example: plutusV1 + value: + type: object + nullable: true + description: Data in JSON format + example: null + bytes: + type: string + description: Script bytes (cborSeq) + example: 5907f4010000332323232323232323233223232323232332232323232322223232533532533533355300712001323212330012233350052200200200100235001220011233001225335002101710010142325335333573466e3cd400488008d4020880080580544ccd5cd19b873500122001350082200101601510153500122002353500122002222222222200a101413357389201115554784f206e6f7420636f6e73756d6564000133333573466e1cd55cea8012400046644246600200600464646464646464646464646666ae68cdc39aab9d500a480008cccccccccc888888888848cccccccccc00402c02802402001c01801401000c008cd40508c8c8cccd5cd19b8735573aa0049000119910919800801801180f9aba150023019357426ae8940088c98d4cd5ce01581501481409aab9e5001137540026ae854028cd4050054d5d0a804999aa80bbae501635742a010666aa02eeb94058d5d0a80399a80a0109aba15006335014335502402275a6ae854014c8c8c8cccd5cd19b8735573aa00490001199109198008018011919191999ab9a3370e6aae754009200023322123300100300233502575a6ae854008c098d5d09aba2500223263533573805e05c05a05826aae7940044dd50009aba150023232323333573466e1cd55cea8012400046644246600200600466a04aeb4d5d0a80118131aba135744a004464c6a66ae700bc0b80b40b04d55cf280089baa001357426ae8940088c98d4cd5ce01581501481409aab9e5001137540026ae854010cd4051d71aba15003335014335502475c40026ae854008c070d5d09aba2500223263533573804e04c04a04826ae8940044d5d1280089aba25001135744a00226ae8940044d5d1280089aba25001135744a00226aae7940044dd50009aba150023232323333573466e1d400520062321222230040053019357426aae79400c8cccd5cd19b875002480108c848888c008014c06cd5d09aab9e500423333573466e1d400d20022321222230010053015357426aae7940148cccd5cd19b875004480008c848888c00c014dd71aba135573ca00c464c6a66ae7008808408007c0780740704d55cea80089baa001357426ae8940088c98d4cd5ce00d80d00c80c080c89931a99ab9c4910350543500019018135573ca00226ea8004c8004d5405888448894cd40044d400c88004884ccd401488008c010008ccd54c01c4800401401000448c88c008dd6000990009aa80b111999aab9f00125009233500830043574200460066ae880080548c8c8c8cccd5cd19b8735573aa00690001199911091998008020018011919191999ab9a3370e6aae7540092000233221233001003002301735742a00466a01c02c6ae84d5d1280111931a99ab9c01b01a019018135573ca00226ea8004d5d0a801999aa803bae500635742a00466a014eb8d5d09aba2500223263533573802e02c02a02826ae8940044d55cf280089baa0011335500175ceb44488c88c008dd5800990009aa80a11191999aab9f0022500823350073355017300635573aa004600a6aae794008c010d5d100180a09aba100111220021221223300100400312232323333573466e1d4005200023212230020033005357426aae79400c8cccd5cd19b8750024800884880048c98d4cd5ce00980900880800789aab9d500113754002464646666ae68cdc39aab9d5002480008cc8848cc00400c008c014d5d0a8011bad357426ae8940088c98d4cd5ce00800780700689aab9e5001137540024646666ae68cdc39aab9d5001480008dd71aba135573ca004464c6a66ae7003803403002c4dd500089119191999ab9a3370ea00290021091100091999ab9a3370ea00490011190911180180218031aba135573ca00846666ae68cdc3a801a400042444004464c6a66ae7004404003c0380340304d55cea80089baa0012323333573466e1d40052002200523333573466e1d40092000200523263533573801a01801601401226aae74dd5000891001091000919191919191999ab9a3370ea002900610911111100191999ab9a3370ea004900510911111100211999ab9a3370ea00690041199109111111198008048041bae35742a00a6eb4d5d09aba2500523333573466e1d40112006233221222222233002009008375c6ae85401cdd71aba135744a00e46666ae68cdc3a802a400846644244444446600c01201060186ae854024dd71aba135744a01246666ae68cdc3a8032400446424444444600e010601a6ae84d55cf280591999ab9a3370ea00e900011909111111180280418071aba135573ca018464c6a66ae7004c04804404003c03803403002c0284d55cea80209aab9e5003135573ca00426aae7940044dd50009191919191999ab9a3370ea002900111999110911998008028020019bad35742a0086eb4d5d0a8019bad357426ae89400c8cccd5cd19b875002480008c8488c00800cc020d5d09aab9e500623263533573801801601401201026aae75400c4d5d1280089aab9e500113754002464646666ae68cdc3a800a400446424460020066eb8d5d09aab9e500323333573466e1d400920002321223002003375c6ae84d55cf280211931a99ab9c009008007006005135573aa00226ea800444888c8c8cccd5cd19b8735573aa0049000119aa80518031aba150023005357426ae8940088c98d4cd5ce00480400380309aab9e5001137540029309000a490350543100112212330010030021123230010012233003300200200133512233002489209366f09fe40eaaeb17d3cb6b0b61e087d664174c39a48a986f86b2b0ba6e2a7b00480008848cc00400c0088005 + size: + type: integer + description: The size of the CBOR serialised script (in bytes) + example: 2039 + script_list: type: array items: properties: script_hash: - type: string - description: Hash of a script - example: d8480dc869b94b80e81ec91b0abe307279311fe0e7001a9488f61ff8 + $ref: "#/components/schemas/script_info/items/properties/script_hash" creation_tx_hash: - type: string - description: Hash of the script creation transaction - example: fda6c7697009237975ffc30f36666addf4c6e2a2c6f90411a24431b700baaab1 + $ref: "#/components/schemas/script_info/items/properties/creation_tx_hash" + type: + $ref: "#/components/schemas/script_info/items/properties/type" + size: + $ref: "#/components/schemas/script_info/items/properties/size" script_redeemers: type: array items: type: object properties: script_hash: - type: string - description: Hash of Transaction for which details are being shown - example: f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e + $ref: "#/components/schemas/script_info/items/properties/script_hash" redeemers: type: array items: type: object properties: tx_hash: - type: string - description: Hash of Transaction containing the redeemer - example: fda6c7697009237975ffc30f36666addf4c6e2a2c6f90411a24431b700baaab1 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_hash" tx_index: - type: integer - description: The index of the redeemer pointer in the transaction - example: 0 + $ref: "#/components/schemas/utxo_infos/items/properties/tx_index" unit_mem: description: The budget in Memory to run a script example: 520448 @@ -1824,17 +1824,17 @@ schemas: nullable: true example: 5a595ce795815e81d22a1a522cf3987d546dc5bb016de61b002edd63a5413ec4 datum_value: - type: object - description: The actual data in json format - example: { "bytes": "3c33" } + $ref: "#/components/schemas/script_info/items/properties/value" datum_info: type: array items: type: object properties: - hash: + datum_hash: $ref: "#/components/schemas/script_redeemers/items/properties/redeemers/items/properties/datum_hash" + creation_tx_hash: + $ref: "#/components/schemas/script_info/items/properties/creation_tx_hash" value: - $ref: "#/components/schemas/script_redeemers/items/properties/redeemers/items/properties/datum_value" + $ref: "#/components/schemas/script_info/items/properties/value" bytes: - $ref: "#/components/schemas/tx_info/items/properties/outputs/items/properties/inline_datum/properties/bytes" + $ref: "#/components/schemas/script_info/items/properties/bytes" \ No newline at end of file diff --git a/specs/templates/api-main.yaml b/specs/templates/api-main.yaml index 5897119f..80a6e38c 100644 --- a/specs/templates/api-main.yaml +++ b/specs/templates/api-main.yaml @@ -389,19 +389,41 @@ paths: $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 + post: + tags: + - Address + requestBody: + $ref: "#/components/requestBodies/payment_addresses_with_extended" + responses: + "200": + description: Array of address UTXOs + 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: Address UTXOs + description: Get UTxO set for given addresses /credential_utxos: #RPC post: tags: - Address requestBody: - $ref: "#/components/requestBodies/credential_utxos" + $ref: "#/components/requestBodies/utxo_infos" responses: "200": description: Array of UTxOs with balances content: application/json: schema: - $ref: "#/components/schemas/credential_utxos" + $ref: "#/components/schemas/utxo_infos" "400": $ref: "#/components/responses/BadRequest" "401": @@ -409,7 +431,8 @@ paths: "404": $ref: "#/components/responses/NotFound" summary: UTxOs from payment credentials - description: Get a list of UTxO against input payment credential array including their balances + description: Get UTxO details for requested payment credentials + /address_assets: #RPC post: tags: @@ -443,7 +466,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/credential_txs" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": @@ -492,27 +515,52 @@ paths: $ref: "#/components/responses/NotFound" summary: Account Information description: Get the account information for given stake addresses - /account_utxos: #RPC + + /account_txs: #RPC # todo - new get: tags: - Stake Account parameters: - $ref: "#/components/parameters/_stake_address" + - $ref: "#/components/parameters/_after_block_height" + responses: + "200": + description: Array of Txs associated with stake address (account) + content: + application/json: + schema: + $ref: "#/components/schemas/address_txs" + "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) + + /account_utxos: #RPC + post: + tags: + - Stake Account + requestBody: + $ref: "#/components/requestBodies/stake_addresses_with_extended" responses: "200": - description: Array of account UTxOs associated with stake address + description: Array of account UTxOs associated with given stake addresses content: application/json: schema: - $ref: "#/components/schemas/account_utxos" + $ref: "#/components/schemas/utxo_infos" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" - summary: Account UTxOs - description: Get a list of all UTxOs for a given stake address (account) + summary: UTxOs for stake addresses (accounts) + description: Get a list of all UTxOs for given stake addresses (account)s + /account_info_cached: #RPC post: tags: @@ -791,6 +839,29 @@ 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: + - Asset + requestBody: + $ref: "#/components/requestBodies/asset_list_with_extended" + responses: + "200": + description: Array of UTXOs for given asset list + 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: Asset UTXO Information (Bulk) + description: Get the UTXO information of a list of assets including + /asset_history: #RPC get: tags: @@ -933,11 +1004,11 @@ paths: - $ref: "#/components/parameters/_history" responses: "200": - description: Array of Tx hashes that included the given asset + description: An array of Tx hashes that included the given asset (latest first) content: application/json: schema: - $ref: "#/components/schemas/asset_txs" + $ref: "#/components/schemas/address_txs" "400": $ref: "#/components/responses/BadRequest" "401": @@ -964,7 +1035,7 @@ paths: "404": $ref: "#/components/responses/NotFound" summary: Pool List - description: A list of all currently registered/retiring (not retired) pools + description: List of brief info for all pools /pool_info: #RPC post: tags: @@ -1160,6 +1231,29 @@ paths: $ref: "#/components/responses/NotFound" summary: Pool Metadata description: Metadata (on & off-chain) for all pools + + /script_info: #RPC + post: + tags: + - Script + requestBody: + $ref: "#/components/requestBodies/script_hashes" + responses: + "200": + description: List of datum information for given datum hashes + content: + application/json: + schema: + $ref: "#/components/schemas/script_info" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Datum Information + description: List of datum information for given datum hashes + /native_script_list: #RPC get: tags: @@ -1170,7 +1264,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/native_script_list" + $ref: "#/components/schemas/script_list" "400": $ref: "#/components/responses/BadRequest" "401": @@ -1189,7 +1283,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/plutus_script_list" + $ref: "#/components/schemas/script_list" "400": $ref: "#/components/responses/BadRequest" "401": @@ -1219,6 +1313,30 @@ paths: $ref: "#/components/responses/NotFound" summary: Script Redeemers description: List of all redeemers for a given script hash + + /script_utxos: #RPC todo new + get: + tags: + - Script + parameters: + - $ref: "#/components/parameters/_script_hash" + - $ref: "#/components/parameters/_extended" + responses: + "200": + description: List of UTXOs for a given script hash + 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: Script UTXOs + description: List of all UTXOs for a given script hash + /datum_info: #RPC post: tags: @@ -1240,6 +1358,29 @@ paths: $ref: "#/components/responses/NotFound" 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!# diff --git a/specs/templates/example-map.json b/specs/templates/example-map.json index 07393754..dee62c17 100644 --- a/specs/templates/example-map.json +++ b/specs/templates/example-map.json @@ -182,6 +182,18 @@ "pv": "f1592b29b79ae85d753913dd25644c60925a4a0683979faa33832fead4b4bd9c", "pp": "d10133964da9e443b303917fd0b7644ae3d01c133deff85b4f59416c2d00f530" }, + "_utxo_ref1": { + "m": "fixme", + "g": "f82e568d42604fd71424d193c86ec00c97aead2b8f018e81c3139d9e3770c735#0", + "pv": "fixme", + "pp": "fixme" + }, + "_utxo_ref2": { + "m": "fixme", + "g": "88ae22495123c7ee37a0bbe865243757185a302ed5359d1eae9347030628290a#0", + "pv": "fixme", + "pp": "fixme" + }, "pool_ids_pool_bech32_ids1": { "m": "pool100wj94uzf54vup2hdzk0afng4dhjaqggt7j434mtgm8v2gfvfgp", "g": "pool19st4a2vvu78tjtyywjte2eml3kx6ynersgd2nyw0y4jvyhlfu0u", @@ -200,6 +212,18 @@ "pv": "pool1p835jxsj8py5n34lrgk6fvpgpxxvh585qm8dzvp7ups37vdet5a", "pp": "pool1ws42l6rawqjv58crs5l32v0eem3qnngpnjfd7epwd4lmjccc5cg" }, + "script_hashes1": { + "m": "818ee3db3bbbd04f9f2ce21778cac3ac605802a4fcb00c8b3a58ee2dafc17d46", + "g": "964af1ff2a66ce472d34ac39b47f356b6d971d62c794a89ec12825d5de30f3aa", + "pv": "6181b3dc623cd8812caf027a3507e9b3095388a7cf3db65983e1fddd3a84c88c", + "pp": "5571e2c3549f15934a38382d1318707a86751fb70827f4cbd29b104480f1be9b" + }, + "script_hashes2": { + "m": "45b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0", + "g": "17bdb9c96b77c7718d546be50193a80bc9d72081b7375e5e16891db196af14fc", + "pv": "f8ae55ff89e1f5366f23e16bcaf2073252337b96031a02d79e41d653b5f0a978", + "pp": "5f7212f546d7e7308ce99b925f05538db19981f4ea3084559c0b28a363245826" + }, "datum_hashes1": { "m": "818ee3db3bbbd04f9f2ce21778cac3ac605802a4fcb00c8b3a58ee2dafc17d46", "g": "964af1ff2a66ce472d34ac39b47f356b6d971d62c794a89ec12825d5de30f3aa",