Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
hodlonaut authored Sep 6, 2023
1 parent 7c17dbf commit 1bfc3cc
Show file tree
Hide file tree
Showing 4 changed files with 249 additions and 7 deletions.
10 changes: 10 additions & 0 deletions specs/templates/2-api-params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
101 changes: 101 additions & 0 deletions specs/templates/3-api-requestBodies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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##
133 changes: 126 additions & 7 deletions specs/templates/api-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down Expand Up @@ -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:
Expand All @@ -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":
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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!#
Expand Down
12 changes: 12 additions & 0 deletions specs/templates/example-map.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 1bfc3cc

Please sign in to comment.