From 1bfc3ccf30ce4015f634d51048daae035c2c6722 Mon Sep 17 00:00:00 2001 From: KoT_B_KocMoce <49576827+hodlonaut@users.noreply.github.com> Date: Wed, 6 Sep 2023 21:57:10 +1000 Subject: [PATCH] Add files via upload --- specs/templates/2-api-params.yaml | 10 ++ specs/templates/3-api-requestBodies.yaml | 101 +++++++++++++++++ specs/templates/api-main.yaml | 133 +++++++++++++++++++++-- specs/templates/example-map.json | 12 ++ 4 files changed, 249 insertions(+), 7 deletions(-) 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..c2182bad 100644 --- a/specs/templates/3-api-requestBodies.yaml +++ b/specs/templates/3-api-requestBodies.yaml @@ -35,6 +35,30 @@ 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 +131,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 +211,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: @@ -263,3 +317,50 @@ 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 + _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## \ No newline at end of file diff --git a/specs/templates/api-main.yaml b/specs/templates/api-main.yaml index 5897119f..886d89e4 100644 --- a/specs/templates/api-main.yaml +++ b/specs/templates/api-main.yaml @@ -205,7 +205,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/block_txs" + $ref: "#/components/schemas/block_txs" todo "400": $ref: "#/components/responses/BadRequest" "401": @@ -389,6 +389,29 @@ 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 UTXO set information + description: Get UTxO set for given addresses + /credential_utxos: #RPC post: tags: @@ -401,7 +424,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/credential_utxos" + $ref: "#/components/schemas/utxo_infos" "400": $ref: "#/components/responses/BadRequest" "401": @@ -410,6 +433,7 @@ paths: $ref: "#/components/responses/NotFound" summary: UTxOs from payment credentials description: Get a list of UTxO against input payment credential array including their balances + /address_assets: #RPC post: tags: @@ -492,27 +516,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 account UTxOs associated with stake address + description: Array of Txs associated with stake address (account) content: application/json: schema: - $ref: "#/components/schemas/account_utxos" + $ref: "#/components/schemas/address_txs" "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: 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 given stake addresses + 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 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 +840,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 # todo new + 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: @@ -1219,6 +1291,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/account_utxos" + "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 +1336,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: UTXO set information for given references + description: Get UTxO set for given references + components: #!params!# #!requestBodies!# diff --git a/specs/templates/example-map.json b/specs/templates/example-map.json index 07393754..87538ac6 100644 --- a/specs/templates/example-map.json +++ b/specs/templates/example-map.json @@ -1,5 +1,17 @@ { "params": { + "_utxo_ref1": { + "m": "fixme", + "g": "f82e568d42604fd71424d193c86ec00c97aead2b8f018e81c3139d9e3770c735#0", + "pv": "fixme", + "pp": "fixme" + }, + "_utxo_ref2": { + "m": "fixme", + "g": "88ae22495123c7ee37a0bbe865243757185a302ed5359d1eae9347030628290a#0", + "pv": "fixme", + "pp": "fixme" + }, "_block_hash": { "m": "f6192a1aaa6d3d05b4703891a6b66cd757801c61ace86cbe5ab0d66e07f601ab", "g": "bddbbc6df0ad09567a513349bafd56d8ec5c8fcd9ee9db12173624b896350d57",