Skip to content

Commit aa0982f

Browse files
dostrelith678rdlrt
andauthored
chore: specs for tx by metalabel rpc (#388)
## Description <!--- Describe your changes --> Missing specs for this endpoint. ## Which issue it fixes? <!--- Link to issue: Closes #issue-number --> #378 Co-authored-by: RdLrT <3169068+rdlrt@users.noreply.github.com>
1 parent 44bec63 commit aa0982f

File tree

7 files changed

+255
-0
lines changed

7 files changed

+255
-0
lines changed

specs/results/koiosapi-guild.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,29 @@ paths:
619619
summary: Transaction Metadata Labels
620620
description: Get a list of all transaction metalabels
621621
operationId: tx_metalabels
622+
/tx_by_metalabel: #RPC
623+
get:
624+
tags:
625+
- Transactions
626+
parameters:
627+
- $ref: "#/components/parameters/_metalabel"
628+
- $ref: "#/components/parameters/_after_block_height"
629+
responses:
630+
"200":
631+
description: Success!!
632+
content:
633+
application/json:
634+
schema:
635+
$ref: "#/components/schemas/tx_by_metalabel"
636+
"400":
637+
$ref: "#/components/responses/BadRequest"
638+
"401":
639+
$ref: "#/components/responses/Unauthorized"
640+
"404":
641+
$ref: "#/components/responses/NotFound"
642+
summary: Transactions by Metadata Label
643+
description: Get a list of all transactions that include a specific metadata label (key)
644+
operationId: tx_by_metalabel
622645
/submittx: #submit-api
623646
post:
624647
tags:
@@ -2624,6 +2647,16 @@ components:
26242647
in: query
26252648
required: true
26262649
allowEmptyValue: false
2650+
_metalabel:
2651+
deprecated: false
2652+
name: _metalabel
2653+
description: Metadata label (key) to filter transactions by
2654+
schema:
2655+
type: number
2656+
example: 721
2657+
in: query
2658+
required: true
2659+
allowEmptyValue: false
26272660
requestBodies:
26282661
block_hashes:
26292662
content:
@@ -5565,6 +5598,24 @@ components:
55655598
type: string
55665599
description: A distinct known metalabel
55675600
example: "721"
5601+
tx_by_metalabel:
5602+
description: Array of transactions containing the queried metadata label
5603+
type: array
5604+
items:
5605+
type: object
5606+
properties:
5607+
tx_hash:
5608+
$ref: "#/components/schemas/utxo_infos/items/properties/tx_hash"
5609+
block_hash:
5610+
$ref: "#/components/schemas/blocks/items/properties/hash"
5611+
block_height:
5612+
$ref: "#/components/schemas/blocks/items/properties/block_height"
5613+
epoch_no:
5614+
$ref: "#/components/schemas/blocks/items/properties/epoch_no"
5615+
absolute_slot:
5616+
$ref: "#/components/schemas/blocks/items/properties/abs_slot"
5617+
tx_timestamp:
5618+
$ref: "#/components/schemas/blocks/items/properties/block_time"
55685619
utxo_infos:
55695620
description: Array of complete UTxO information
55705621
type: array

specs/results/koiosapi-mainnet.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,29 @@ paths:
619619
summary: Transaction Metadata Labels
620620
description: Get a list of all transaction metalabels
621621
operationId: tx_metalabels
622+
/tx_by_metalabel: #RPC
623+
get:
624+
tags:
625+
- Transactions
626+
parameters:
627+
- $ref: "#/components/parameters/_metalabel"
628+
- $ref: "#/components/parameters/_after_block_height"
629+
responses:
630+
"200":
631+
description: Success!!
632+
content:
633+
application/json:
634+
schema:
635+
$ref: "#/components/schemas/tx_by_metalabel"
636+
"400":
637+
$ref: "#/components/responses/BadRequest"
638+
"401":
639+
$ref: "#/components/responses/Unauthorized"
640+
"404":
641+
$ref: "#/components/responses/NotFound"
642+
summary: Transactions by Metadata Label
643+
description: Get a list of all transactions that include a specific metadata label (key)
644+
operationId: tx_by_metalabel
622645
/submittx: #submit-api
623646
post:
624647
tags:
@@ -2624,6 +2647,16 @@ components:
26242647
in: query
26252648
required: true
26262649
allowEmptyValue: false
2650+
_metalabel:
2651+
deprecated: false
2652+
name: _metalabel
2653+
description: Metadata label (key) to filter transactions by
2654+
schema:
2655+
type: number
2656+
example: 721
2657+
in: query
2658+
required: true
2659+
allowEmptyValue: false
26272660
requestBodies:
26282661
block_hashes:
26292662
content:
@@ -5565,6 +5598,24 @@ components:
55655598
type: string
55665599
description: A distinct known metalabel
55675600
example: "721"
5601+
tx_by_metalabel:
5602+
description: Array of transactions containing the queried metadata label
5603+
type: array
5604+
items:
5605+
type: object
5606+
properties:
5607+
tx_hash:
5608+
$ref: "#/components/schemas/utxo_infos/items/properties/tx_hash"
5609+
block_hash:
5610+
$ref: "#/components/schemas/blocks/items/properties/hash"
5611+
block_height:
5612+
$ref: "#/components/schemas/blocks/items/properties/block_height"
5613+
epoch_no:
5614+
$ref: "#/components/schemas/blocks/items/properties/epoch_no"
5615+
absolute_slot:
5616+
$ref: "#/components/schemas/blocks/items/properties/abs_slot"
5617+
tx_timestamp:
5618+
$ref: "#/components/schemas/blocks/items/properties/block_time"
55685619
utxo_infos:
55695620
description: Array of complete UTxO information
55705621
type: array

specs/results/koiosapi-preprod.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,29 @@ paths:
619619
summary: Transaction Metadata Labels
620620
description: Get a list of all transaction metalabels
621621
operationId: tx_metalabels
622+
/tx_by_metalabel: #RPC
623+
get:
624+
tags:
625+
- Transactions
626+
parameters:
627+
- $ref: "#/components/parameters/_metalabel"
628+
- $ref: "#/components/parameters/_after_block_height"
629+
responses:
630+
"200":
631+
description: Success!!
632+
content:
633+
application/json:
634+
schema:
635+
$ref: "#/components/schemas/tx_by_metalabel"
636+
"400":
637+
$ref: "#/components/responses/BadRequest"
638+
"401":
639+
$ref: "#/components/responses/Unauthorized"
640+
"404":
641+
$ref: "#/components/responses/NotFound"
642+
summary: Transactions by Metadata Label
643+
description: Get a list of all transactions that include a specific metadata label (key)
644+
operationId: tx_by_metalabel
622645
/submittx: #submit-api
623646
post:
624647
tags:
@@ -2624,6 +2647,16 @@ components:
26242647
in: query
26252648
required: true
26262649
allowEmptyValue: false
2650+
_metalabel:
2651+
deprecated: false
2652+
name: _metalabel
2653+
description: Metadata label (key) to filter transactions by
2654+
schema:
2655+
type: number
2656+
example: 721
2657+
in: query
2658+
required: true
2659+
allowEmptyValue: false
26272660
requestBodies:
26282661
block_hashes:
26292662
content:
@@ -5565,6 +5598,24 @@ components:
55655598
type: string
55665599
description: A distinct known metalabel
55675600
example: "721"
5601+
tx_by_metalabel:
5602+
description: Array of transactions containing the queried metadata label
5603+
type: array
5604+
items:
5605+
type: object
5606+
properties:
5607+
tx_hash:
5608+
$ref: "#/components/schemas/utxo_infos/items/properties/tx_hash"
5609+
block_hash:
5610+
$ref: "#/components/schemas/blocks/items/properties/hash"
5611+
block_height:
5612+
$ref: "#/components/schemas/blocks/items/properties/block_height"
5613+
epoch_no:
5614+
$ref: "#/components/schemas/blocks/items/properties/epoch_no"
5615+
absolute_slot:
5616+
$ref: "#/components/schemas/blocks/items/properties/abs_slot"
5617+
tx_timestamp:
5618+
$ref: "#/components/schemas/blocks/items/properties/block_time"
55685619
utxo_infos:
55695620
description: Array of complete UTxO information
55705621
type: array

specs/results/koiosapi-preview.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,29 @@ paths:
619619
summary: Transaction Metadata Labels
620620
description: Get a list of all transaction metalabels
621621
operationId: tx_metalabels
622+
/tx_by_metalabel: #RPC
623+
get:
624+
tags:
625+
- Transactions
626+
parameters:
627+
- $ref: "#/components/parameters/_metalabel"
628+
- $ref: "#/components/parameters/_after_block_height"
629+
responses:
630+
"200":
631+
description: Success!!
632+
content:
633+
application/json:
634+
schema:
635+
$ref: "#/components/schemas/tx_by_metalabel"
636+
"400":
637+
$ref: "#/components/responses/BadRequest"
638+
"401":
639+
$ref: "#/components/responses/Unauthorized"
640+
"404":
641+
$ref: "#/components/responses/NotFound"
642+
summary: Transactions by Metadata Label
643+
description: Get a list of all transactions that include a specific metadata label (key)
644+
operationId: tx_by_metalabel
622645
/submittx: #submit-api
623646
post:
624647
tags:
@@ -2624,6 +2647,16 @@ components:
26242647
in: query
26252648
required: true
26262649
allowEmptyValue: false
2650+
_metalabel:
2651+
deprecated: false
2652+
name: _metalabel
2653+
description: Metadata label (key) to filter transactions by
2654+
schema:
2655+
type: number
2656+
example: 721
2657+
in: query
2658+
required: true
2659+
allowEmptyValue: false
26272660
requestBodies:
26282661
block_hashes:
26292662
content:
@@ -5565,6 +5598,24 @@ components:
55655598
type: string
55665599
description: A distinct known metalabel
55675600
example: "721"
5601+
tx_by_metalabel:
5602+
description: Array of transactions containing the queried metadata label
5603+
type: array
5604+
items:
5605+
type: object
5606+
properties:
5607+
tx_hash:
5608+
$ref: "#/components/schemas/utxo_infos/items/properties/tx_hash"
5609+
block_hash:
5610+
$ref: "#/components/schemas/blocks/items/properties/hash"
5611+
block_height:
5612+
$ref: "#/components/schemas/blocks/items/properties/block_height"
5613+
epoch_no:
5614+
$ref: "#/components/schemas/blocks/items/properties/epoch_no"
5615+
absolute_slot:
5616+
$ref: "#/components/schemas/blocks/items/properties/abs_slot"
5617+
tx_timestamp:
5618+
$ref: "#/components/schemas/blocks/items/properties/block_time"
55685619
utxo_infos:
55695620
description: Array of complete UTxO information
55705621
type: array

specs/templates/2-api-params.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,3 +209,13 @@ parameters:
209209
in: query
210210
required: true
211211
allowEmptyValue: false
212+
_metalabel:
213+
deprecated: false
214+
name: _metalabel
215+
description: Metadata label (key) to filter transactions by
216+
schema:
217+
type: number
218+
example: 721
219+
in: query
220+
required: true
221+
allowEmptyValue: false

specs/templates/4-api-schemas.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2304,6 +2304,24 @@ schemas:
23042304
type: string
23052305
description: A distinct known metalabel
23062306
example: "721"
2307+
tx_by_metalabel:
2308+
description: Array of transactions containing the queried metadata label
2309+
type: array
2310+
items:
2311+
type: object
2312+
properties:
2313+
tx_hash:
2314+
$ref: "#/components/schemas/utxo_infos/items/properties/tx_hash"
2315+
block_hash:
2316+
$ref: "#/components/schemas/blocks/items/properties/hash"
2317+
block_height:
2318+
$ref: "#/components/schemas/blocks/items/properties/block_height"
2319+
epoch_no:
2320+
$ref: "#/components/schemas/blocks/items/properties/epoch_no"
2321+
absolute_slot:
2322+
$ref: "#/components/schemas/blocks/items/properties/abs_slot"
2323+
tx_timestamp:
2324+
$ref: "#/components/schemas/blocks/items/properties/block_time"
23072325
utxo_infos:
23082326
description: Array of complete UTxO information
23092327
type: array

specs/templates/api-main.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,29 @@ paths:
474474
summary: Transaction Metadata Labels
475475
description: Get a list of all transaction metalabels
476476
operationId: tx_metalabels
477+
/tx_by_metalabel: #RPC
478+
get:
479+
tags:
480+
- Transactions
481+
parameters:
482+
- $ref: "#/components/parameters/_metalabel"
483+
- $ref: "#/components/parameters/_after_block_height"
484+
responses:
485+
"200":
486+
description: Success!!
487+
content:
488+
application/json:
489+
schema:
490+
$ref: "#/components/schemas/tx_by_metalabel"
491+
"400":
492+
$ref: "#/components/responses/BadRequest"
493+
"401":
494+
$ref: "#/components/responses/Unauthorized"
495+
"404":
496+
$ref: "#/components/responses/NotFound"
497+
summary: Transactions by Metadata Label
498+
description: Get a list of all transactions that include a specific metadata label (key)
499+
operationId: tx_by_metalabel
477500
/submittx: #submit-api
478501
post:
479502
tags:

0 commit comments

Comments
 (0)