Skip to content

Commit c7bb157

Browse files
author
Chris Rutherford
committed
cleaned up some schemas that did not match api responses.
1 parent 07cb724 commit c7bb157

File tree

2 files changed

+53
-76
lines changed

2 files changed

+53
-76
lines changed

doc/electrs-rest-btcd-1.0.0.yaml renamed to doc/electrs-rest-btc-1.0.0.yaml

Lines changed: 15 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,6 @@ paths:
255255
required: true
256256
schema:
257257
type: string
258-
- name: start_index
259-
in: query
260-
required: false
261-
schema:
262-
type: integer
263258
responses:
264259
'200':
265260
description: Transactions for a given block
@@ -561,24 +556,6 @@ paths:
561556
application/json:
562557
schema:
563558
$ref: '#/components/schemas/TxStatus'
564-
/tx/{txid}/hex:
565-
get:
566-
tags:
567-
- tx
568-
summary: Returns the raw transaction data in hexadecimal
569-
parameters:
570-
- name: txid
571-
in: path
572-
required: true
573-
schema:
574-
type: string
575-
responses:
576-
'200':
577-
description: Raw transaction data
578-
content:
579-
application/octet-stream:
580-
schema:
581-
type: string
582559
/tx/{txid}/raw:
583560
get:
584561
tags:
@@ -764,7 +741,7 @@ paths:
764741
schema:
765742
type: array
766743
items:
767-
$ref: '#/components/schemas/MempoolTx'
744+
$ref: '#/components/schemas/MempoolTransaction'
768745
/fee-estimates:
769746
get:
770747
summary: Returns an JSON object with key value pairs of Blocks to Fees for confirmation.
@@ -821,6 +798,7 @@ components:
821798
type: integer
822799
next_best:
823800
type: string
801+
nullable: true
824802
Transaction:
825803
type: object
826804
properties:
@@ -898,14 +876,12 @@ components:
898876
ScriptHash:
899877
type: object
900878
properties:
901-
address:
879+
scripthash:
902880
type: string
903881
chain_stats:
904882
$ref: '#/components/schemas/ChainStats'
905883
mempool_stats:
906884
$ref: '#/components/schemas/MempoolStats'
907-
scripthash:
908-
type: string
909885
Address:
910886
type: object
911887
properties:
@@ -941,6 +917,17 @@ components:
941917
type: integer
942918
tx_count:
943919
type: integer
920+
MempoolTransaction:
921+
type: object
922+
properties:
923+
txid:
924+
type: string
925+
fee:
926+
type: integer
927+
vsize:
928+
type: integer
929+
value:
930+
type: integer
944931
Utxo:
945932
type: object
946933
properties:
@@ -988,15 +975,4 @@ components:
988975
items:
989976
type: array
990977
items:
991-
type: number
992-
MempoolTx:
993-
type: object
994-
properties:
995-
txid:
996-
type: string
997-
fee:
998-
type: integer
999-
vsize:
1000-
type: integer
1001-
value:
1002-
type: integer
978+
type: number

doc/electrs-rest-liquid-1.0.0.yaml

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,6 @@ paths:
259259
required: true
260260
schema:
261261
type: string
262-
- name: start_index
263-
in: query
264-
required: false
265-
schema:
266-
type: integer
267262
responses:
268263
'200':
269264
description: Transactions for a given block
@@ -574,24 +569,6 @@ paths:
574569
application/json:
575570
schema:
576571
$ref: '#/components/schemas/TxStatus'
577-
/tx/{txid}/hex:
578-
get:
579-
tags:
580-
- tx
581-
summary: Returns the raw transaction data in hexadecimal
582-
parameters:
583-
- name: txid
584-
in: path
585-
required: true
586-
schema:
587-
type: string
588-
responses:
589-
'200':
590-
description: Raw transaction data
591-
content:
592-
application/octet-stream:
593-
schema:
594-
type: string
595572
/tx/{txid}/raw:
596573
get:
597574
tags:
@@ -777,7 +754,7 @@ paths:
777754
schema:
778755
type: array
779756
items:
780-
$ref: '#/components/schemas/MempoolTx'
757+
$ref: '#/components/schemas/MempoolTransaction'
781758
/fee-estimates:
782759
get:
783760
summary: Returns an JSON object with key value pairs of Blocks to Fees for confirmation.
@@ -1012,6 +989,8 @@ components:
1012989
type: number
1013990
proof:
1014991
type: string
992+
ext:
993+
$ref: '#/components/schemas/ElementsExt'
1015994
BlockStatus:
1016995
type: object
1017996
properties:
@@ -1021,6 +1000,7 @@ components:
10211000
type: integer
10221001
next_best:
10231002
type: string
1003+
nullable: true
10241004
Transaction:
10251005
type: object
10261006
properties:
@@ -1123,14 +1103,12 @@ components:
11231103
ScriptHash:
11241104
type: object
11251105
properties:
1126-
address:
1106+
scripthash:
11271107
type: string
11281108
chain_stats:
11291109
$ref: '#/components/schemas/ChainStats'
11301110
mempool_stats:
11311111
$ref: '#/components/schemas/MempoolStats'
1132-
scripthash:
1133-
type: string
11341112
Address:
11351113
type: object
11361114
properties:
@@ -1166,6 +1144,17 @@ components:
11661144
type: integer
11671145
tx_count:
11681146
type: integer
1147+
MempoolTransaction:
1148+
type: object
1149+
properties:
1150+
txid:
1151+
type: string
1152+
fee:
1153+
type: integer
1154+
vsize:
1155+
type: integer
1156+
value:
1157+
type: integer
11691158
Utxo:
11701159
type: object
11711160
properties:
@@ -1214,17 +1203,29 @@ components:
12141203
type: array
12151204
items:
12161205
type: number
1217-
MempoolTx:
1206+
ElementsExt:
12181207
type: object
1219-
properties:
1220-
txid:
1221-
type: string
1222-
fee:
1223-
type: integer
1224-
vsize:
1225-
type: integer
1226-
value:
1227-
type: integer
1208+
properties:
1209+
current:
1210+
type: object
1211+
properties:
1212+
signblockscript:
1213+
type: string
1214+
signblock_witness_limit:
1215+
type: integer
1216+
elided_root:
1217+
type: string
1218+
proposed:
1219+
type: object
1220+
nullable: true
1221+
additionalProperties: true
1222+
signblock_witness:
1223+
type: array
1224+
items:
1225+
type: array
1226+
items:
1227+
type: integer
1228+
nullable: true
12281229
Asset:
12291230
type: object
12301231
properties:

0 commit comments

Comments
 (0)