Skip to content

Commit 5041314

Browse files
committed
Specs
1 parent d2aba3c commit 5041314

File tree

8 files changed

+254
-98
lines changed

8 files changed

+254
-98
lines changed

files/grest/rpc/address/address_info.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,4 @@ BEGIN
118118
END;
119119
$$;
120120

121-
COMMENT ON FUNCTION grest.address_info IS 'Get bulk address info - balance, associated stake address (if any) and UTXO set'; -- noqa: LT01
121+
COMMENT ON FUNCTION grest.address_info IS 'Get bulk address info - balance, associated stake address (if any) and UTxO set'; -- noqa: LT01

files/grest/rpc/transactions/tx_utxos.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,4 @@ BEGIN
146146
END;
147147
$$;
148148

149-
COMMENT ON FUNCTION grest.tx_utxos IS 'Get UTXO set (inputs/outputs) of transactions.'; -- noqa: LT01
149+
COMMENT ON FUNCTION grest.tx_utxos IS 'Get UTxO set (inputs/outputs) of transactions.'; -- noqa: LT01

specs/results/koiosapi-guild.yaml

Lines changed: 53 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ paths:
742742
$ref: "#/components/responses/Unauthorized"
743743
"404":
744744
$ref: "#/components/responses/NotFound"
745-
summary: Address UTXOs
745+
summary: Address UTxOs
746746
description: Get UTxO set for given addresses
747747
operationId: address_utxos
748748
/address_outputs: #RPC
@@ -1259,8 +1259,8 @@ paths:
12591259
$ref: "#/components/responses/Unauthorized"
12601260
"404":
12611261
$ref: "#/components/responses/NotFound"
1262-
summary: Asset UTXOs
1263-
description: Get the UTXO information of a list of assets including
1262+
summary: Asset UTxOs
1263+
description: Get the UTxO information of a list of assets including
12641264
operationId: asset_utxos
12651265
/asset_history: #RPC
12661266
get:
@@ -2273,6 +2273,28 @@ paths:
22732273
summary: Script Redeemers
22742274
description: List of all redeemers for a given script hash
22752275
operationId: script_redeemers
2276+
/reference_script_utxos: #RPC
2277+
post:
2278+
tags:
2279+
- Script
2280+
requestBody:
2281+
$ref: "#/components/requestBodies/script_hashes"
2282+
responses:
2283+
"200":
2284+
description: Array of information for scripts requested
2285+
content:
2286+
application/json:
2287+
schema:
2288+
$ref: "#/components/schemas/script_utxos"
2289+
"400":
2290+
$ref: "#/components/responses/BadRequest"
2291+
"401":
2292+
$ref: "#/components/responses/Unauthorized"
2293+
"404":
2294+
$ref: "#/components/responses/NotFound"
2295+
summary: Reference Script UTxOs
2296+
description: List of all unspent UTxOs with a reference script matching given script hashes
2297+
operationId: reference_script_utxos
22762298
/script_utxos: #RPC
22772299
get:
22782300
tags:
@@ -2282,7 +2304,7 @@ paths:
22822304
- $ref: "#/components/parameters/_extended"
22832305
responses:
22842306
"200":
2285-
description: List of UTXOs for a given script hash
2307+
description: List of UTxOs for a given script hash
22862308
content:
22872309
application/json:
22882310
schema:
@@ -2293,8 +2315,8 @@ paths:
22932315
$ref: "#/components/responses/Unauthorized"
22942316
"404":
22952317
$ref: "#/components/responses/NotFound"
2296-
summary: Script UTXOs
2297-
description: List of all UTXOs for a given script hash
2318+
summary: Script UTxOs
2319+
description: List of all UTxOs for a given script hash
22982320
operationId: script_utxos
22992321
/datum_info: #RPC
23002322
post:
@@ -5483,7 +5505,7 @@ components:
54835505
example: "1"
54845506
is_spent:
54855507
type: boolean
5486-
description: True if the UTXO has been spent
5508+
description: True if the UTxO has been spent
54875509
example: true
54885510
tx_outs_epoch:
54895511
description: List of transaction outputs with basic details for requested epoch
@@ -5523,7 +5545,7 @@ components:
55235545
$ref: "#/components/schemas/script_redeemers/items/properties/redeemers/items/properties/datum_hash"
55245546
is_spent:
55255547
type: boolean
5526-
description: True if the UTXO has been spent
5548+
description: True if the UTxO has been spent
55275549
example: true
55285550
tx_treasury_donations_epoch:
55295551
description: List of treasury donation transactions for requested epoch (current if NULL)
@@ -6227,25 +6249,25 @@ components:
62276249
anyOf:
62286250
- type: number
62296251
- type: "null"
6230-
description: If not null, then this proposal has been ratified at the specfied epoch.
6252+
description: If not null, then this proposal has been ratified at the specified epoch.
62316253
example: 670
62326254
enacted_epoch:
62336255
anyOf:
62346256
- type: number
62356257
- type: "null"
6236-
description: If not null, then this proposal has been enacted at the specfied epoch.
6258+
description: If not null, then this proposal has been enacted at the specified epoch.
62376259
example: 675
62386260
dropped_epoch:
62396261
anyOf:
62406262
- type: number
62416263
- type: "null"
6242-
description: If not null, then this proposal has been dropped (expired/enacted) at the specfied epoch.
6264+
description: If not null, then this proposal has been dropped (expired/enacted) at the specified epoch.
62436265
example: 680
62446266
expired_epoch:
62456267
anyOf:
62466268
- type: number
62476269
- type: "null"
6248-
description: If not null, then this proposal has been expired at the specfied epoch.
6270+
description: If not null, then this proposal has been expired at the specified epoch.
62496271
example: 680
62506272
expiration:
62516273
anyOf:
@@ -6265,16 +6287,15 @@ components:
62656287
meta_is_valid:
62666288
$ref: "#/components/schemas/drep_metadata/items/properties/is_valid"
62676289
withdrawal:
6268-
anyOf:
6269-
- type: object
6270-
- type: "null"
6271-
description: If not null, the amount withdrawn from treasury into stake address by this this proposal
6272-
properties:
6273-
stake_address:
6274-
$ref: "#/components/schemas/account_history/items/properties/stake_address"
6275-
amount:
6276-
type: string
6277-
example: "31235800000"
6290+
type: array
6291+
description: The array of amounts withdrawn from treasury into specified stake addresses by this proposal
6292+
items:
6293+
properties:
6294+
stake_address:
6295+
$ref: "#/components/schemas/account_history/items/properties/stake_address"
6296+
amount:
6297+
type: string
6298+
example: "31235800000"
62786299
param_proposal:
62796300
description: If not null, the proposed new parameter set
62806301
anyOf:
@@ -6632,6 +6653,16 @@ components:
66326653
example: 5a595ce795815e81d22a1a522cf3987d546dc5bb016de61b002edd63a5413ec4
66336654
datum_value:
66346655
$ref: "#/components/schemas/script_info/items/properties/value"
6656+
script_utxos:
6657+
description: Array of all unspent utxos with a reference script matching given script hashes
6658+
type: array
6659+
items:
6660+
type: object
6661+
properties:
6662+
tx_hash:
6663+
$ref: "#/components/schemas/utxo_infos/items/properties/tx_hash"
6664+
tx_index:
6665+
$ref: "#/components/schemas/utxo_infos/items/properties/tx_index"
66356666
datum_info:
66366667
description: Array of datum information for given datum hashes
66376668
type: array

specs/results/koiosapi-mainnet.yaml

Lines changed: 53 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ paths:
742742
$ref: "#/components/responses/Unauthorized"
743743
"404":
744744
$ref: "#/components/responses/NotFound"
745-
summary: Address UTXOs
745+
summary: Address UTxOs
746746
description: Get UTxO set for given addresses
747747
operationId: address_utxos
748748
/address_outputs: #RPC
@@ -1259,8 +1259,8 @@ paths:
12591259
$ref: "#/components/responses/Unauthorized"
12601260
"404":
12611261
$ref: "#/components/responses/NotFound"
1262-
summary: Asset UTXOs
1263-
description: Get the UTXO information of a list of assets including
1262+
summary: Asset UTxOs
1263+
description: Get the UTxO information of a list of assets including
12641264
operationId: asset_utxos
12651265
/asset_history: #RPC
12661266
get:
@@ -2273,6 +2273,28 @@ paths:
22732273
summary: Script Redeemers
22742274
description: List of all redeemers for a given script hash
22752275
operationId: script_redeemers
2276+
/reference_script_utxos: #RPC
2277+
post:
2278+
tags:
2279+
- Script
2280+
requestBody:
2281+
$ref: "#/components/requestBodies/script_hashes"
2282+
responses:
2283+
"200":
2284+
description: Array of information for scripts requested
2285+
content:
2286+
application/json:
2287+
schema:
2288+
$ref: "#/components/schemas/script_utxos"
2289+
"400":
2290+
$ref: "#/components/responses/BadRequest"
2291+
"401":
2292+
$ref: "#/components/responses/Unauthorized"
2293+
"404":
2294+
$ref: "#/components/responses/NotFound"
2295+
summary: Reference Script UTxOs
2296+
description: List of all unspent UTxOs with a reference script matching given script hashes
2297+
operationId: reference_script_utxos
22762298
/script_utxos: #RPC
22772299
get:
22782300
tags:
@@ -2282,7 +2304,7 @@ paths:
22822304
- $ref: "#/components/parameters/_extended"
22832305
responses:
22842306
"200":
2285-
description: List of UTXOs for a given script hash
2307+
description: List of UTxOs for a given script hash
22862308
content:
22872309
application/json:
22882310
schema:
@@ -2293,8 +2315,8 @@ paths:
22932315
$ref: "#/components/responses/Unauthorized"
22942316
"404":
22952317
$ref: "#/components/responses/NotFound"
2296-
summary: Script UTXOs
2297-
description: List of all UTXOs for a given script hash
2318+
summary: Script UTxOs
2319+
description: List of all UTxOs for a given script hash
22982320
operationId: script_utxos
22992321
/datum_info: #RPC
23002322
post:
@@ -5483,7 +5505,7 @@ components:
54835505
example: "1"
54845506
is_spent:
54855507
type: boolean
5486-
description: True if the UTXO has been spent
5508+
description: True if the UTxO has been spent
54875509
example: true
54885510
tx_outs_epoch:
54895511
description: List of transaction outputs with basic details for requested epoch
@@ -5523,7 +5545,7 @@ components:
55235545
$ref: "#/components/schemas/script_redeemers/items/properties/redeemers/items/properties/datum_hash"
55245546
is_spent:
55255547
type: boolean
5526-
description: True if the UTXO has been spent
5548+
description: True if the UTxO has been spent
55275549
example: true
55285550
tx_treasury_donations_epoch:
55295551
description: List of treasury donation transactions for requested epoch (current if NULL)
@@ -6227,25 +6249,25 @@ components:
62276249
anyOf:
62286250
- type: number
62296251
- type: "null"
6230-
description: If not null, then this proposal has been ratified at the specfied epoch.
6252+
description: If not null, then this proposal has been ratified at the specified epoch.
62316253
example: 670
62326254
enacted_epoch:
62336255
anyOf:
62346256
- type: number
62356257
- type: "null"
6236-
description: If not null, then this proposal has been enacted at the specfied epoch.
6258+
description: If not null, then this proposal has been enacted at the specified epoch.
62376259
example: 675
62386260
dropped_epoch:
62396261
anyOf:
62406262
- type: number
62416263
- type: "null"
6242-
description: If not null, then this proposal has been dropped (expired/enacted) at the specfied epoch.
6264+
description: If not null, then this proposal has been dropped (expired/enacted) at the specified epoch.
62436265
example: 680
62446266
expired_epoch:
62456267
anyOf:
62466268
- type: number
62476269
- type: "null"
6248-
description: If not null, then this proposal has been expired at the specfied epoch.
6270+
description: If not null, then this proposal has been expired at the specified epoch.
62496271
example: 680
62506272
expiration:
62516273
anyOf:
@@ -6265,16 +6287,15 @@ components:
62656287
meta_is_valid:
62666288
$ref: "#/components/schemas/drep_metadata/items/properties/is_valid"
62676289
withdrawal:
6268-
anyOf:
6269-
- type: object
6270-
- type: "null"
6271-
description: If not null, the amount withdrawn from treasury into stake address by this this proposal
6272-
properties:
6273-
stake_address:
6274-
$ref: "#/components/schemas/account_history/items/properties/stake_address"
6275-
amount:
6276-
type: string
6277-
example: "31235800000"
6290+
type: array
6291+
description: The array of amounts withdrawn from treasury into specified stake addresses by this proposal
6292+
items:
6293+
properties:
6294+
stake_address:
6295+
$ref: "#/components/schemas/account_history/items/properties/stake_address"
6296+
amount:
6297+
type: string
6298+
example: "31235800000"
62786299
param_proposal:
62796300
description: If not null, the proposed new parameter set
62806301
anyOf:
@@ -6632,6 +6653,16 @@ components:
66326653
example: 5a595ce795815e81d22a1a522cf3987d546dc5bb016de61b002edd63a5413ec4
66336654
datum_value:
66346655
$ref: "#/components/schemas/script_info/items/properties/value"
6656+
script_utxos:
6657+
description: Array of all unspent utxos with a reference script matching given script hashes
6658+
type: array
6659+
items:
6660+
type: object
6661+
properties:
6662+
tx_hash:
6663+
$ref: "#/components/schemas/utxo_infos/items/properties/tx_hash"
6664+
tx_index:
6665+
$ref: "#/components/schemas/utxo_infos/items/properties/tx_index"
66356666
datum_info:
66366667
description: Array of datum information for given datum hashes
66376668
type: array

0 commit comments

Comments
 (0)