Skip to content

Commit

Permalink
Add /txs/{hash}/required-signers endpoint
Browse files Browse the repository at this point in the history
Related to #325
  • Loading branch information
sorki committed Dec 18, 2023
1 parent a043e44 commit 107b717
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 0 deletions.
65 changes: 65 additions & 0 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2130,6 +2130,58 @@
}
}
},
"/txs/{hash}/required-signers": {
"get": {
"tags": [
"Cardano » Transactions"
],
"summary": "Transaction required signers",
"description": "Extra transaction witnesses",
"parameters": [
{
"in": "path",
"name": "hash",
"required": true,
"schema": {
"type": "string",
"format": "64-character case-sensitive hexadecimal string."
},
"description": "Hash of the transaction",
"example": "6e5f825c82c1c6d6b77f2a14092f3b78c8f1b66db6f4cf8caec1555b6f967b3b"
}
],
"responses": {
"200": {
"description": "Query required signers (extra transaction witnesses)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tx_content_required_signers"
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"403": {
"$ref": "#/components/responses/403"
},
"404": {
"$ref": "#/components/responses/404"
},
"418": {
"$ref": "#/components/responses/418"
},
"429": {
"$ref": "#/components/responses/429"
},
"500": {
"$ref": "#/components/responses/500"
}
}
}
},
"/tx/submit": {
"post": {
"tags": [
Expand Down Expand Up @@ -8617,6 +8669,19 @@
]
}
},
"tx_content_required_signers": {
"type": "array",
"items": {
"type": "string",
"description": "Hash of the witness"
},
"example": [
"d52e11f3e48436dd42dbec6d88c239732e503b8b7a32af58e5f87625",
"41b32682c413535dbca5178f92f3cee5dede31b995400b8c371e2469",
"d52e11f3e48436dd42dbec6d88c239732e503b8b7a32af58e5f87625",
"666414964a05b01cef36427b8a0fb0f621806c43e66e7a4d3cca3bfb"
]
},
"account_content": {
"type": "object",
"properties": {
Expand Down
44 changes: 44 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1652,6 +1652,40 @@ paths:
$ref: '#/components/responses/429'
'500':
$ref: '#/components/responses/500'
/txs/{hash}/required-signers:
get:
tags:
- Cardano » Transactions
summary: Transaction required signers
description: Extra transaction witnesses
parameters:
- in: path
name: hash
required: true
schema:
type: string
format: 64-character case-sensitive hexadecimal string.
description: Hash of the transaction
example: 6e5f825c82c1c6d6b77f2a14092f3b78c8f1b66db6f4cf8caec1555b6f967b3b
responses:
'200':
description: Query required signers (extra transaction witnesses)
content:
application/json:
schema:
$ref: '#/components/schemas/tx_content_required_signers'
'400':
$ref: '#/components/responses/400'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'418':
$ref: '#/components/responses/418'
'429':
$ref: '#/components/responses/429'
'500':
$ref: '#/components/responses/500'
/tx/submit:
post:
tags:
Expand Down Expand Up @@ -6380,6 +6414,16 @@ components:
- redeemer_data_hash
- datum_hash
- fee
tx_content_required_signers:
type: array
items:
type: string
description: Hash of the witness
example:
- d52e11f3e48436dd42dbec6d88c239732e503b8b7a32af58e5f87625
- 41b32682c413535dbca5178f92f3cee5dede31b995400b8c371e2469
- d52e11f3e48436dd42dbec6d88c239732e503b8b7a32af58e5f87625
- 666414964a05b01cef36427b8a0fb0f621806c43e66e7a4d3cca3bfb
account_content:
type: object
properties:
Expand Down
3 changes: 3 additions & 0 deletions src/definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,9 @@ paths:
/txs/{hash}/redeemers:
$ref: ./paths/api/txs/{hash}/redeemers.yaml

/txs/{hash}/required-signers:
$ref: ./paths/api/txs/{hash}/required-signers.yaml

/tx/submit:
$ref: ./paths/api/tx/submit.yaml

Expand Down
33 changes: 33 additions & 0 deletions src/paths/api/txs/{hash}/required-signers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
get:
tags:
- Cardano » Transactions
summary: Transaction required signers
description: Extra transaction witnesses
parameters:
- in: path
name: hash
required: true
schema:
type: string
format: 64-character case-sensitive hexadecimal string.
description: Hash of the transaction
example: "6e5f825c82c1c6d6b77f2a14092f3b78c8f1b66db6f4cf8caec1555b6f967b3b"
responses:
"200":
description: Query required signers (extra transaction witnesses)
content:
application/json:
schema:
$ref: ../../../../schemas/txs/tx_content_required_signers.yaml
"400":
$ref: ../../../../responses/errors/400.yaml
"403":
$ref: ../../../../responses/errors/403.yaml
"404":
$ref: ../../../../responses/errors/404.yaml
"429":
$ref: ../../../../responses/errors/429.yaml
"418":
$ref: ../../../../responses/errors/418.yaml
"500":
$ref: ../../../../responses/errors/500.yaml
9 changes: 9 additions & 0 deletions src/schemas/txs/tx_content_required_signers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
type: array
items:
type: string
description: Hash of the witness
example:
- "d52e11f3e48436dd42dbec6d88c239732e503b8b7a32af58e5f87625"
- "41b32682c413535dbca5178f92f3cee5dede31b995400b8c371e2469"
- "d52e11f3e48436dd42dbec6d88c239732e503b8b7a32af58e5f87625"
- "666414964a05b01cef36427b8a0fb0f621806c43e66e7a4d3cca3bfb"

0 comments on commit 107b717

Please sign in to comment.