From 19617d7187141f38d9260126dcb693f21611b185 Mon Sep 17 00:00:00 2001 From: Chris Rutherford Date: Fri, 18 Oct 2024 16:47:27 -0400 Subject: [PATCH] cleaned up some schemas that did not match api responses. --- doc/electrs-rest-btcd-1.0.0.yaml | 54 ++++++--------------- doc/electrs-rest-liquid-1.0.0.yaml | 75 +++++++++++++++--------------- 2 files changed, 53 insertions(+), 76 deletions(-) diff --git a/doc/electrs-rest-btcd-1.0.0.yaml b/doc/electrs-rest-btcd-1.0.0.yaml index f3c0b113a..281535743 100644 --- a/doc/electrs-rest-btcd-1.0.0.yaml +++ b/doc/electrs-rest-btcd-1.0.0.yaml @@ -255,11 +255,6 @@ paths: required: true schema: type: string - - name: start_index - in: query - required: false - schema: - type: integer responses: '200': description: Transactions for a given block @@ -561,24 +556,6 @@ paths: application/json: schema: $ref: '#/components/schemas/TxStatus' - /tx/{txid}/hex: - get: - tags: - - tx - summary: Returns the raw transaction data in hexadecimal - parameters: - - name: txid - in: path - required: true - schema: - type: string - responses: - '200': - description: Raw transaction data - content: - application/octet-stream: - schema: - type: string /tx/{txid}/raw: get: tags: @@ -764,7 +741,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MempoolTx' + $ref: '#/components/schemas/MempoolTransaction' /fee-estimates: get: summary: Returns an JSON object with key value pairs of Blocks to Fees for confirmation. @@ -821,6 +798,7 @@ components: type: integer next_best: type: string + nullable: true Transaction: type: object properties: @@ -898,14 +876,12 @@ components: ScriptHash: type: object properties: - address: + scripthash: type: string chain_stats: $ref: '#/components/schemas/ChainStats' mempool_stats: $ref: '#/components/schemas/MempoolStats' - scripthash: - type: string Address: type: object properties: @@ -941,6 +917,17 @@ components: type: integer tx_count: type: integer + MempoolTransaction: + type: object + properties: + txid: + type: string + fee: + type: integer + vsize: + type: integer + value: + type: integer Utxo: type: object properties: @@ -988,15 +975,4 @@ components: items: type: array items: - type: number - MempoolTx: - type: object - properties: - txid: - type: string - fee: - type: integer - vsize: - type: integer - value: - type: integer \ No newline at end of file + type: number \ No newline at end of file diff --git a/doc/electrs-rest-liquid-1.0.0.yaml b/doc/electrs-rest-liquid-1.0.0.yaml index b7a46e23b..d2b44c233 100644 --- a/doc/electrs-rest-liquid-1.0.0.yaml +++ b/doc/electrs-rest-liquid-1.0.0.yaml @@ -259,11 +259,6 @@ paths: required: true schema: type: string - - name: start_index - in: query - required: false - schema: - type: integer responses: '200': description: Transactions for a given block @@ -574,24 +569,6 @@ paths: application/json: schema: $ref: '#/components/schemas/TxStatus' - /tx/{txid}/hex: - get: - tags: - - tx - summary: Returns the raw transaction data in hexadecimal - parameters: - - name: txid - in: path - required: true - schema: - type: string - responses: - '200': - description: Raw transaction data - content: - application/octet-stream: - schema: - type: string /tx/{txid}/raw: get: tags: @@ -777,7 +754,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MempoolTx' + $ref: '#/components/schemas/MempoolTransaction' /fee-estimates: get: summary: Returns an JSON object with key value pairs of Blocks to Fees for confirmation. @@ -1012,6 +989,8 @@ components: type: number proof: type: string + ext: + $ref: '#/components/schemas/ElementsExt' BlockStatus: type: object properties: @@ -1021,6 +1000,7 @@ components: type: integer next_best: type: string + nullable: true Transaction: type: object properties: @@ -1123,14 +1103,12 @@ components: ScriptHash: type: object properties: - address: + scripthash: type: string chain_stats: $ref: '#/components/schemas/ChainStats' mempool_stats: $ref: '#/components/schemas/MempoolStats' - scripthash: - type: string Address: type: object properties: @@ -1166,6 +1144,17 @@ components: type: integer tx_count: type: integer + MempoolTransaction: + type: object + properties: + txid: + type: string + fee: + type: integer + vsize: + type: integer + value: + type: integer Utxo: type: object properties: @@ -1214,17 +1203,29 @@ components: type: array items: type: number - MempoolTx: + ElementsExt: type: object - properties: - txid: - type: string - fee: - type: integer - vsize: - type: integer - value: - type: integer + properties: + current: + type: object + properties: + signblockscript: + type: string + signblock_witness_limit: + type: integer + elided_root: + type: string + proposed: + type: object + nullable: true + additionalProperties: true + signblock_witness: + type: array + items: + type: array + items: + type: integer + nullable: true Asset: type: object properties: