openapi: 3.0.3
info:
  description: |-
    The Chia node and services come with a JSON RPC API server that allows you to access information and control the services.  These are accessible via HTTPS, WebSockets, or via client SDKs. The ports can be configured in `~/.chia/mainnet/config/config.yaml`.  The RPC ports should not be exposed to the internet. TLS certificates are used to secure the communication  [using mutualTLS](https://github.com/dkackman/chia-api/wiki/Mutual-TLS).
    The full node uses port 8555 by default.
  version: 2.0.0
  title: Chia RPC
  termsOfService: https://www.chia.net/assets/legal/Guidelines-for-Using-Chia-Network.pdf
  contact:
    name: Chia Network
    url: https://www.chia.net/
    email: hello@chia.net
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://localhost:8555
    description: Full Node RPC
security:
  - bearerAuth: []
tags:
  - name: Blocks
    description: Methods for managing blocks.
  - name: Coins
    description: Methods for managing coins.
  - name: Shared
    description: Methods shared by all services.
  - name: Full Node
    description: The full node RPC API is exposed, by default, on port 8555. This port must not be exposed publicly for security concerns.
  - name: Mempool
    description: Get information about the mempool.
  - name: Fees
    description: Get information about fees.
externalDocs:
  description: Find out more about chia
  url: https://chia.net
paths:
  /stop_node:
    post:
      tags:
        - Shared
      summary: Stop the node.
      description: Stop the node.
      operationId: stop_node
      requestBody:
        description: Empty request body
        required: true
        content: &ref_1
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: OK response without return values
          content: &ref_0
            application/json:
              schema:
                type: object
                description: Success indicator and optional error message included in all responses
                required: &ref_2
                  - success
                properties: &ref_3
                  success:
                    type: boolean
                    description: Success/failure indicator
                  error:
                    type: string
                    description: Only present when success is false
  /open_connection:
    post:
      tags:
        - Shared
      summary: Add a connection to another node.
      description: Add a connection to another node.
      operationId: open_connection
      requestBody:
        required: true
        description: the address of the connection
        content:
          application/json:
            schema:
              type: object
              required:
                - ip
                - port
              properties:
                ip:
                  type: string
                  format: ipaddress
                port:
                  type: integer
      responses:
        '200':
          description: OK response without return values
          content: *ref_0
  /close_connection:
    post:
      tags:
        - Shared
      summary: Removes a connection.
      description: Removes a connection.
      operationId: close_connection
      requestBody:
        required: true
        description: the node id of the connection
        content:
          application/json:
            schema:
              type: object
              required:
                - node_id
              properties:
                node_id:
                  type: string
      responses:
        '200':
          description: OK response without return values
          content: *ref_0
  /get_connections:
    post:
      tags:
        - Shared
      summary: Retrieve the list of connections.
      description: Retrieve the list of connections.
      operationId: get_connections
      requestBody:
        description: Empty request body
        required: true
        content: *ref_1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      connections:
                        type: array
                        items:
                          type: object
                          description: Chia's representation of a connection from node to node.
                          properties: &ref_22
                            bytes_read:
                              type: integer
                              format: uint32
                              nullable: true
                            bytes_written:
                              type: integer
                              format: uint32
                              nullable: true
                            creation_time:
                              type: number
                              format: double
                            last_message_time:
                              type: number
                              format: double
                            local_port:
                              type: integer
                              format: int32
                            node_id:
                              type: string
                            peak_hash:
                              type: string
                            peak_height:
                              type: integer
                              format: uint64
                              nullable: true
                            peak_weight:
                              type: integer
                              format: uint64
                              nullable: true
                            peer_host:
                              type: string
                            peer_port:
                              type: integer
                              format: int32
                            peer_server_port:
                              type: integer
                              format: int32
                            type:
                              type: integer
                              enum: &ref_25
                                - 1
                                - 2
                                - 3
                                - 4
                                - 5
                                - 6
                                - 7
                              description: |-
                                The type of node:
                                  * 1 FULL_NODE
                                  * 2 HARVESTER
                                  * 3 FARMER
                                  * 4 TIMELORD
                                  * 5 INTRODUCER
                                  * 6 WALLET
                                  * 7 DATA_LAYER
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /healthz:
    post:
      tags:
        - Shared
      summary: Heartbeat.
      description: Heartbeat.
      operationId: healthz
      requestBody:
        description: Empty request body
        required: true
        content: *ref_1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Success indicator and optional error message included in all responses
                required: *ref_2
                properties: *ref_3
  /get_routes:
    post:
      tags:
        - Shared
      summary: Retrieve the list of routes exposed by the service.
      description: Retrieve the list of routes/endpoints exposed by the service.
      operationId: get_routes
      requestBody:
        description: Empty request body
        required: true
        content: *ref_1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      routes:
                        type: array
                        items:
                          type: string
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_block_count_metrics:
    post:
      tags:
        - Blocks
      summary: Retrieves aggregate information about blocks.
      description: Retrieves aggregate information about blocks.
      operationId: get_block_count_metrics
      requestBody:
        description: Empty request body
        required: true
        content: *ref_1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      metrics:
                        type: object
                        properties:
                          compact_blocks:
                            type: integer
                          uncompact_blocks:
                            type: integer
                          hint_count:
                            type: integer
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_block_record:
    post:
      tags:
        - Blocks
      summary: Retrieves a block record by header hash.
      description: Retrieves a block record by header hash.
      operationId: get_block_record
      requestBody:
        required: true
        description: the block's header_hash
        content: &ref_5
          application/json:
            schema:
              type: object
              required:
                - header_hash
              properties:
                header_hash:
                  type: string
                  format: hex
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      block_record:
                        type: object
                        description: This class is not included or hashed into the blockchain, but it is kept in memory as a more efficient way to maintain data about the blockchain. This allows us to validate future blocks, difficulty adjustments, etc, without saving the whole header block in memory.
                        properties: &ref_4
                          challenge_block_info_hash:
                            type: string
                            example: '0x08dbc5c9f4676bad4cd2fad9b120afefdc107ffdd4066f73f14baf2a204f13df'
                            description: Hash of challenge chain data, used to validate end of slots in the future.
                          challenge_vdf_output:
                            type: object
                            description: This is the intermediary VDF output at ip_iters in challenge chain.
                            properties:
                              data:
                                type: string
                                example: '0x0000af33fa9862d4e257498e9ba0c3cda09c1389d1fde0facd72ea26f5371ba94deb18137d95bd83b1c7afefba6293feda91d744d014c747e132db0247839e9bd00d790c06f753a9d344c80c455a86ecd979c31687ece60748a5d62dca4723c3780d0906'
                          deficit:
                            type: integer
                            example: 9
                            format: uint8
                            description: A deficit of 16 is an overflow block after an infusion. Deficit of 15 is a challenge block.
                          farmer_puzzle_hash:
                            type: string
                            example: '0x8f5474dc460673a39c96bb0fdfea933f5d1269c138e47a67f07872c04803a4e7'
                          fees:
                            type: integer
                            example: 0
                            format: uint64
                            nullable: true
                            description: Transaction block (present iff is_transaction_block)
                          finished_challenge_slot_hashes:
                            type: string
                            example: null
                            format: nullable
                            description: Slot (present iff this is the first SB in sub slot)
                          finished_infused_challenge_slot_hashes:
                            type: string
                            example: null
                            format: nullable
                            description: Slot (present iff this is the first SB in sub slot)
                          finished_reward_slot_hashes:
                            type: string
                            example: null
                            format: nullable
                            description: Slot (present iff this is the first SB in sub slot)
                          header_hash:
                            type: string
                            example: '0x3723909a7374c4c88cf00ab9b15365f4988f5bdb2d51bac23f6af939fe40f56c'
                          height:
                            type: integer
                            example: 101
                            format: uint32
                          infused_challenge_vdf_output:
                            type: string
                            example: '{"data":"0x0300a4bc6790208e73245df6a85b3f7beac0d17e73972b414a7f94cf1e3c3e9bb4a400516d368cfa8b1814f3b5163fe5a54a1fe35781f58290673c8d9f56cd23b94c138b21207d6aa6f3049f8ad805eb99b28292e06e748117e78e13598cee9945670100"}'
                            format: nullable
                            description: This is the intermediary VDF output at ip_iters in infused cc, if deficit less than or equal to 3.
                          overflow:
                            type: boolean
                            example: false
                          pool_puzzle_hash:
                            type: string
                            example: '0x8f5474dc460673a39c96bb0fdfea933f5d1269c138e47a67f07872c04803a4e7'
                            description: Need to keep track of these because Coins are created in a future block.
                          prev_hash:
                            type: string
                            example: '0x9a6c8728021574c5f3242370831b9fde7a0421f4448b4848276fe1652580c6a7'
                            description: Header hash of the previous block. Transaction block (present iff is_transaction_block).
                          prev_transaction_block_hash:
                            type: string
                            example: '0x6c94307cb88f37ca002936769246579824ecadc77fe1e445d31165e6958288e8'
                            format: nullable
                            description: Header hash of the previous transaction block
                          prev_transaction_block_height:
                            type: integer
                            example: 97
                            format: int32
                          required_iters:
                            type: integer
                            example: 1045145
                            format: int32
                          reward_claims_incorporated:
                            type: string
                            example: '[{"amount":1750000000000,"parent_coin_info":"0xccd5bb71183532bff220ba46c268991a00000000000000000000000000000061","puzzle_hash":"0x8f3dff600992a0b77aefbe8eb81dd4f233b9126f3b67557594b5a927d6e6d588"},{"amount":250000000000,"parent_coin_info":"0x3ff07eb358e8255a65c30a2dce0e5fbb00000000000000000000000000000061","puzzle_hash":"0x8f3dff600992a0b77aefbe8eb81dd4f233b9126f3b67557594b5a927d6e6d588"}]'
                            format: nullable
                          reward_infusion_new_challenge:
                            type: string
                            example: '0x100b6fbe0778ae13e48e9bf71b7de4e31e5c1d73a0b041e0277f4a76b5338604'
                            description: The reward chain infusion output, input to next VDF
                          signage_point_index:
                            type: integer
                            example: 19
                            format: uint8
                          sub_epoch_summary_included:
                            type: string
                            example: null
                            format: nullable
                          sub_slot_iters:
                            type: integer
                            example: 134217728
                            format: uint64
                          timestamp:
                            type: integer
                            example: 1616164827
                            format: uint64
                            nullable: true
                          total_iters:
                            type: integer
                            example: 449835673
                            format: bigint
                            description: Total number of VDF iterations since genesis, including this block
                          weight:
                            type: integer
                            example: 714
                            format: bigint
                            description: Total cumulative difficulty of all ancestor blocks since genesis
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_block_records:
    post:
      tags:
        - Blocks
      summary: Retrieves block records in a range.
      description: Retrieves block records in a range
      operationId: get_block_records
      requestBody:
        required: true
        description: Start and end heights
        content: &ref_20
          application/json:
            schema:
              type: object
              required:
                - start
                - end
              properties:
                start:
                  type: integer
                  format: uint32
                end:
                  type: integer
                  format: uint32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      block_records:
                        type: array
                        items:
                          type: object
                          description: This class is not included or hashed into the blockchain, but it is kept in memory as a more efficient way to maintain data about the blockchain. This allows us to validate future blocks, difficulty adjustments, etc, without saving the whole header block in memory.
                          properties: *ref_4
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_block_record_by_height:
    post:
      tags:
        - Blocks
      summary: Retrieves a block record by height.
      description: Retrieves a block record by height (assuming the height <= peak height). Note that not all blocks will have all fields set here (depending on transaction block, finishing sub epoch, etc).
      operationId: get_block_record_by_height
      requestBody:
        required: true
        description: the block height
        content:
          application/json:
            schema:
              type: object
              required:
                - height
              properties:
                height:
                  type: integer
                  format: uint32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      block_record:
                        type: object
                        description: This class is not included or hashed into the blockchain, but it is kept in memory as a more efficient way to maintain data about the blockchain. This allows us to validate future blocks, difficulty adjustments, etc, without saving the whole header block in memory.
                        properties: *ref_4
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_block:
    post:
      tags:
        - Blocks
      summary: Retrieves a block by header hash.
      description: Retrieves a block by header hash.
      operationId: get_block
      requestBody:
        required: true
        description: the block's header_hash
        content: *ref_5
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      block:
                        type: object
                        properties: &ref_9
                          finished_sub_slots:
                            type: array
                            example: []
                            items:
                              type: object
                              properties: &ref_10
                                challenge_chain:
                                  type: object
                                  properties: &ref_29
                                    challenge_chain_end_of_slot_vdf:
                                      type: object
                                      description: Used to generate the discriminant (VDF group)
                                      properties: &ref_6
                                        challenge:
                                          type: string
                                          example: '0xeb8c4d20b322be8d9fddbf9412016bdffe9a2901d7edb0e364e94266d0e095f7'
                                        number_of_iterations:
                                          type: integer
                                          example: 1024
                                          format: uint64
                                        output:
                                          type: object
                                          description: Represents a classgroup element (a,b,c) where a, b, and c are 512 bit signed integers. However this is using a compressed representation. VDF outputs are a single classgroup element. VDF proofs can also be one classgroup element(or multiple).
                                          properties: &ref_28
                                            data:
                                              type: string
                                    infused_challenge_chain_sub_slot_hash:
                                      type: string
                                      example: null
                                    subepoch_summary_hash:
                                      type: string
                                      example: null
                                    new_sub_slot_iters:
                                      type: integer
                                      example: null
                                      format: uint64
                                      nullable: true
                                    new_difficulty:
                                      type: integer
                                      example: null
                                      format: uint64
                                      nullable: true
                                infused_challenge_chain:
                                  type: object
                                  properties: &ref_30
                                    infused_challenge_chain_end_of_slot_vdf:
                                      type: object
                                      description: Used to generate the discriminant (VDF group)
                                      properties: *ref_6
                                reward_chain:
                                  type: object
                                  properties: &ref_31
                                    end_of_slot_vdf:
                                      type: object
                                      description: Used to generate the discriminant (VDF group)
                                      properties: *ref_6
                                    challenge_chain_sub_slot_hash:
                                      type: string
                                      example: '0xe44e06ed13eb06c7c2f0218945b7c62e785d6482c27ebbe69aab499ae199258c'
                                    infused_challenge_chain_sub_slot_hash:
                                      type: string
                                      example: null
                                    deficit:
                                      type: integer
                                      example: 12
                                      format: uint8
                                proofs:
                                  type: object
                                  properties: &ref_32
                                    challenge_chain_slot_proof:
                                      type: object
                                      properties: &ref_7
                                        witness_type:
                                          type: integer
                                          example: 0
                                          format: uint8
                                        witness:
                                          type: string
                                          example: '0x02004c00010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
                                        normalized_to_identity:
                                          type: boolean
                                          example: false
                                    infused_challenge_chain_slot_proof:
                                      type: object
                                      properties: *ref_7
                                    reward_chain_slot_proof:
                                      type: object
                                      properties: *ref_7
                          reward_chain_block:
                            type: object
                            properties: &ref_34
                              weight:
                                type: integer
                                format: bigint
                              height:
                                type: integer
                                format: uint32
                              total_iters:
                                type: integer
                                example: 4212156346430
                                format: bigint
                              signage_point_index:
                                type: integer
                                example: 37
                                format: uint8
                              pos_ss_cc_challenge_hash:
                                type: string
                                example: '0x04b130f89a8fc37519eab0d835a43ef5547552b2b67c5129fa00f79a57ba8d7f'
                              proof_of_space:
                                type: object
                                properties: &ref_11
                                  challenge:
                                    type: string
                                    example: '0xad43c12b5c5a480ee93992697bd8c9153d536007b0ffac024341cd8ca853a9e3'
                                  public_pool_key:
                                    type: string
                                  pool_contract_puzzle_hash:
                                    type: string
                                    example: '0x71afdce401a0f2a6f03de6287902eacfa38502d6667b04da36e32c3930171ce4'
                                  plot_public_key:
                                    type: string
                                    example: '0x8b5f3cd22bf5073e12f285d2a0e9bbfb485fea8f3ede2f5573e44168fadbb91b71cef1dffc03758a5241c47b105df81a'
                                  size:
                                    type: integer
                                    description: Defines the size of a plot. 25 is used for testing only. https://github.com/Chia-Network/chia-blockchain/wiki/k-sizes
                                    default: 32
                                    enum: &ref_33
                                      - 25
                                      - 32
                                      - 33
                                      - 34
                                      - 35
                                  proof:
                                    type: string
                                    example: '0xa84606d3dba86cbc1c2f56d05175bbbcb970629380bec5c49ad46f0c5f067e4ba74101ac24f0e09fb73ce0ebc9249436c528b5fab689d94c4213072e2acfc1c3a6f17763b16304234002ce471da4ce7e888e2f5abadf4d7f48cd157294ce03cb28df0f45597ca5460cd66c772c7650f2d170d08a5898fe65623b33aac864f44d2a39bcf074e62866edccf9b424f9a8ca56c9a98e87d48fb02b933af951284d610ff1eb71e730a05c2f6c7be86fd4df7efb26e8fb2e573981d8ad866adc02a82ffb0d7ff106c9c78f9cea08f4a2de9db2607266edf6e807924edf9af0f36b8938d97865072126011b67646b4d0e206b706d3a3e67e8862cb0502520f1ad1b4341'
                              challenge_chain_sp_vdf:
                                type: object
                                description: Used to generate the discriminant (VDF group)
                                properties: *ref_6
                              challenge_chain_sp_signature:
                                type: string
                                example: '0xa6058eaa6e9cf8469e152e80b4ac4c3cfdca8660cbe44ca50d3771ab1bbf1d040cba842d1b9bf633756159859ecb2ebc05b5f994cef91d5915d4763284e340095a59fb87f2e50fc3f0b6658d1663aeb9d6732373203d7e45df56eb19baeff64c'
                              challenge_chain_ip_vdf:
                                type: object
                                description: Used to generate the discriminant (VDF group)
                                properties: *ref_6
                              reward_chain_sp_vdf:
                                type: object
                                description: Used to generate the discriminant (VDF group)
                                properties: *ref_6
                              reward_chain_sp_signature:
                                type: string
                                example: '0xa4fb8eb7afc74b945efe1f6b28453a708df7de1f0b56239c5fed50974b896b9bb1f559b49b5a6cf7f4351f1545918b5017e28e81f974bc7bdba88b61f2f9ca8492ab9b7d23371e579b30da9a1a5c7dc0a8fe5605a86165d34c3c552f509fdd7b'
                              reward_chain_ip_vdf:
                                type: object
                                description: Used to generate the discriminant (VDF group)
                                properties: *ref_6
                              infused_challenge_chain_ip_vdf:
                                type: object
                                description: Used to generate the discriminant (VDF group)
                                properties: *ref_6
                              is_transaction_block:
                                type: boolean
                          challenge_chain_sp_proof:
                            type: object
                            properties: *ref_7
                          challenge_chain_ip_proof:
                            type: object
                            properties: *ref_7
                          reward_chain_sp_proof:
                            type: object
                            properties: *ref_7
                          reward_chain_ip_proof:
                            type: object
                            properties: *ref_7
                          infused_challenge_chain_ip_proof:
                            type: object
                            properties: *ref_7
                          foliage:
                            type: object
                            properties: &ref_12
                              prev_block_hash:
                                type: string
                                example: '0x0b08b0ceca65b371729ad3731ba5982c0c63d487cd526874fb907c3e683eb185'
                              reward_block_hash:
                                type: string
                                example: '0xcc705bd601b6c9e3081bde85db2a917d312716136e077c37e7f5090c2685733f'
                              foliage_block_data:
                                type: object
                                properties: &ref_36
                                  unfinished_reward_block_hash:
                                    type: string
                                    example: '0xcc705bd601b6c9e3081bde85db2a917d312716136e077c37e7f5090c2685733f'
                                  pool_target:
                                    type: object
                                    properties: &ref_35
                                      puzzle_hash:
                                        type: string
                                        example: '0x77c08f1ae7c6ae4808c8c07f7d99363b0c00f0ad416c4a292b5341282e38dc35'
                                      max_height:
                                        type: integer
                                        example: 0
                                        format: uint32
                                  pool_signature:
                                    type: string
                                    example: '0xb39237cb5db187f1a3f210f5fff1bee0f7b66e466eb1bd393204768d982335f3ee5c7faec138e334110d80ce47e46704067db26f8a2c5267bbaefb74ea9ef144bd51a8fe388ba68727f3e246b8aefef427b2e2e299ed976d27ba2789bcf7cb7c'
                                  farmer_reward_puzzle_hash:
                                    type: string
                                    example: '0x77c08f1ae7c6ae4808c8c07f7d99363b0c00f0ad416c4a292b5341282e38dc35'
                                  extension_data:
                                    type: string
                                    example: '0x0000000000000000000000000000000000000000000000000000000003a2c7c9'
                              foliage_block_data_signature:
                                type: string
                                example: '0x838f98f281429094df95adbd023f7ac285ffe08d7e584e0e1c9d6def26b215f86753f52d781116eab02ac949beea9b9c009b6242ba97568f226aeafc2bf4fc83b791fffb2d636a8b0473727b5bee6a560b09df3dabf9d2b4ca707a35f22e5f38'
                              foliage_transaction_block_hash:
                                type: string
                                example: '0x813540921a72fdfcbe47858e087b9e848df5fe2d8213288a6df71acf22214cf2'
                              foliage_transaction_block_signature:
                                type: string
                                example: '0xb0db31ae6d773b3b27009cfdd9a232b54f840e00caf24a5a87e8c27e96933acd03d8e553ea62e9179ed4078ed86b9e471987e8803ff4311c9d0727d876490012af403094e3baa4f627785d846c60f770494c253ea7a09e7bc24a53ad683e4704'
                          foliage_transaction_block:
                            type: object
                            properties: &ref_13
                              prev_transaction_block_hash:
                                type: string
                                example: '0xf88a87d79c8e65ca559b7e74a9aca3a6f9fc90e6bb9dc6cb4602ed599610876e'
                              timestamp:
                                type: integer
                                example: 1636577488
                                format: uint64
                              filter_hash:
                                type: string
                                example: '0xea0d50f296d1bdaccc00be16e48a310dd4fa1fcf575065761add6366498b3fbf'
                              additions_root:
                                type: string
                                example: '0x2c04ae163cf5916b774e2591b075560b6dface2b242d10cbb9f40b134cdf2080'
                              removals_root:
                                type: string
                                example: '0x409433654e3b7a530da6cf55c93abde2c7a71a2ea9814883ceef956f8fed61ea'
                              transactions_info_hash:
                                type: string
                                example: '0x9f3d9cb990c560fb66d4e09a9da79844ce933a809bc754eb151775f3600b73ed'
                          transactions_info:
                            type: object
                            properties: &ref_37
                              generator_root:
                                type: string
                              generator_refs_root:
                                type: string
                              aggregated_signature:
                                type: string
                              fees:
                                type: integer
                                format: uint64
                              cost:
                                type: integer
                                format: uint64
                              reward_claims_incorporated:
                                type: array
                                items:
                                  type: object
                                  properties: &ref_8
                                    parent_coin_info:
                                      type: string
                                      example: '0xccd5bb71183532bff220ba46c268991a00000000000000000000000000004082'
                                    puzzle_hash:
                                      type: string
                                      example: '0x94c6db00186900418ef7c1f05e127ee1a647cbe6e514ec3bc57acb7bbe6dfb10'
                                    amount:
                                      type: integer
                                      example: 1750000000000
                                      format: uint64
                          transactions_generator:
                            type: string
                            example: null
                          transactions_generator_ref_list:
                            type: array
                            example: []
                            items:
                              type: integer
                              format: uint32
                          header_hash:
                            type: string
                            format: hex
                          is_transaction_block:
                            type: boolean
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_block_spends:
    post:
      tags:
        - Blocks
      summary: Retrieves the spends in the given block.
      description: Retrieves the spends in the given block.
      operationId: get_block_spends
      requestBody:
        required: true
        description: the block's header_hash
        content: *ref_5
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      block_spends:
                        type: array
                        items:
                          type: object
                          properties: &ref_15
                            coin:
                              type: object
                              properties: *ref_8
                            puzzle_reveal:
                              type: string
                              example: '0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0aec9c2e5984fe928406abca942d55ec6b56340af8315bfefa55889dbaade669b9fd3f330af2af44c2a0626d383e64757ff018080'
                            solution:
                              type: string
                              example: '0xff80ffff01ffff33ffa03fa549a708302b401c45cf387f8f03b4f76b7c9eabf567bea974f61dedf721e0ff840098968080ffff33ffa055b9fe4c9ce0cef8ad574bf5a9158dc0db7848b96be1a98ab2806d8f0a376a08ff860197738845808080ff8080'
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_blocks:
    post:
      tags:
        - Blocks
      summary: Get the blocks between a start and end height.
      description: Get the blocks between a start and end height
      operationId: get_blocks
      requestBody:
        required: true
        description: Start and end heights
        content:
          application/json:
            schema:
              type: object
              required:
                - start
                - end
              properties:
                start:
                  type: integer
                  format: uint32
                end:
                  type: integer
                  format: uint32
                exclude_header_hash:
                  type: boolean
                  default: false
                exclude_reorged:
                  type: boolean
                  default: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      blocks:
                        type: array
                        items:
                          type: object
                          properties: *ref_9
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_unfinished_block_headers:
    post:
      tags:
        - Blocks
      summary: Retrieves unfinished block headers.
      description: Retrieves unfinished block headers.
      operationId: get_unfinished_block_headers
      requestBody:
        description: Empty request body
        required: true
        content: *ref_1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      headers:
                        type: array
                        items:
                          type: object
                          properties: &ref_27
                            finished_sub_slots:
                              type: array
                              items:
                                type: object
                                properties: *ref_10
                            reward_chain_block:
                              type: object
                              properties: &ref_38
                                total_iters:
                                  type: integer
                                  example: 4212156346430
                                  format: bigint
                                signage_point_index:
                                  type: integer
                                  example: 37
                                  format: uint8
                                pos_ss_cc_challenge_hash:
                                  type: string
                                  example: '0x04b130f89a8fc37519eab0d835a43ef5547552b2b67c5129fa00f79a57ba8d7f'
                                proof_of_space:
                                  type: object
                                  properties: *ref_11
                                challenge_chain_sp_vdf:
                                  type: object
                                  description: Used to generate the discriminant (VDF group)
                                  properties: *ref_6
                                challenge_chain_sp_signature:
                                  type: string
                                  example: '0xa6058eaa6e9cf8469e152e80b4ac4c3cfdca8660cbe44ca50d3771ab1bbf1d040cba842d1b9bf633756159859ecb2ebc05b5f994cef91d5915d4763284e340095a59fb87f2e50fc3f0b6658d1663aeb9d6732373203d7e45df56eb19baeff64c'
                                reward_chain_sp_vdf:
                                  type: object
                                  description: Used to generate the discriminant (VDF group)
                                  properties: *ref_6
                                reward_chain_sp_signature:
                                  type: string
                                  example: '0xa4fb8eb7afc74b945efe1f6b28453a708df7de1f0b56239c5fed50974b896b9bb1f559b49b5a6cf7f4351f1545918b5017e28e81f974bc7bdba88b61f2f9ca8492ab9b7d23371e579b30da9a1a5c7dc0a8fe5605a86165d34c3c552f509fdd7b'
                            challenge_chain_sp_proof:
                              type: object
                              properties: *ref_7
                            reward_chain_sp_proof:
                              type: object
                              properties: *ref_7
                            foliage:
                              type: object
                              properties: *ref_12
                            foliage_transaction_block:
                              type: object
                              properties: *ref_13
                            transactions_filter:
                              type: string
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_additions_and_removals:
    post:
      tags:
        - Blocks
      summary: Retrieves the additions and removals for a certain block.
      description: Retrieves the additions and removals (state transitions) for a certain block. Returns coin records for each addition and removal.
      operationId: get_additions_and_removals
      requestBody:
        required: true
        description: the block's header_hash
        content: *ref_5
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      additions:
                        type: array
                        items:
                          type: object
                          properties: &ref_14
                            coin:
                              type: object
                              properties: *ref_8
                            confirmed_block_index:
                              type: integer
                              example: 922637
                              format: uint32
                            spent_block_index:
                              type: integer
                              example: 922641
                              format: uint32
                            spent:
                              type: boolean
                              example: true
                            coinbase:
                              type: boolean
                              example: false
                            timestamp:
                              type: integer
                              example: 1632832094
                              format: uint64
                      removals:
                        type: array
                        items:
                          type: object
                          properties: *ref_14
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_recent_signage_point_or_eos:
    post:
      tags:
        - Blocks
      summary: Retrieves a recent signage point or end of slot.
      description: Retrieves a recent signage point or end of slot.
      operationId: get_recent_signage_point_or_eos
      requestBody:
        required: true
        description: The signage point hash or challenge hash. If both are present sp_hash takes precedence.
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    sp_hash:
                      type: string
                      format: hex
                - type: object
                  properties:
                    challenge_hash:
                      type: string
                      format: hex
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    description: Type returned when a sp_hash is provided in the request
                    properties:
                      signage_point:
                        type: object
                        properties: &ref_26
                          cc_vdf:
                            type: object
                            description: Used to generate the discriminant (VDF group)
                            properties: *ref_6
                          cc_proof:
                            type: object
                            properties: *ref_7
                          rc_vdf:
                            type: object
                            description: Used to generate the discriminant (VDF group)
                            properties: *ref_6
                          rc_proof:
                            type: object
                            properties: *ref_7
                  - type: object
                    description: Type returned when a challenge_hash is provided in the request
                    properties:
                      eos:
                        type: object
                        properties: *ref_10
                allOf:
                  - type: object
                    properties:
                      time_received:
                        type: number
                        format: double
                      reverted:
                        type: boolean
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_blockchain_state:
    post:
      tags:
        - Full Node
      summary: Retrieves a summary of the current state of the blockchain and full node.
      description: Retrieves a summary of the current state of the blockchain and full node.
      operationId: get_blockchain_state
      requestBody:
        description: Empty request body
        required: true
        content: *ref_1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      blockchain_state:
                        type: object
                        description: The node's view of the blockchain.
                        properties: &ref_21
                          node_id:
                            type: string
                            format: hex
                          difficulty:
                            type: integer
                            example: 3008
                            format: uint64
                          genesis_challenge_initialized:
                            type: boolean
                            example: true
                          mempool_size:
                            type: integer
                            example: 0
                            format: uint32
                          mempool_cost:
                            type: integer
                            format: uint32
                          mempool_fees:
                            type: integer
                            format: uint64
                          mempool_min_fees:
                            type: object
                            properties:
                              cost_5000000:
                                type: number
                                format: double
                          mempool_max_total_cost:
                            type: integer
                            format: uint32
                          block_max_cost:
                            type: integer
                            format: uint32
                          peak:
                            nullable: true
                            type: object
                            description: This class is not included or hashed into the blockchain, but it is kept in memory as a more efficient way to maintain data about the blockchain. This allows us to validate future blocks, difficulty adjustments, etc, without saving the whole header block in memory.
                            properties: *ref_4
                          space:
                            type: integer
                            example: 40110198681182960000
                            format: bigint
                          sub_slot_iters:
                            type: integer
                            example: 136314880
                            format: uint64
                          average_block_time:
                            type: integer
                            example: 2
                            format: uint32
                          sync:
                            type: object
                            properties:
                              sync_mode:
                                type: boolean
                                example: false
                              sync_progress_height:
                                type: integer
                                example: 0
                                format: uint64
                              sync_tip_height:
                                type: integer
                                example: 0
                                format: uint64
                              synced:
                                type: boolean
                                example: false
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_network_info:
    post:
      tags:
        - Full Node
      description: Retrieves some information about the current network.
      summary: Retrieves some information about the current network.
      operationId: full_node_get_network_info
      requestBody:
        description: Empty request body
        required: true
        content: *ref_1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    description: Basic information about the current network.
                    required: &ref_23
                      - network_name
                      - network_prefix
                    properties: &ref_24
                      network_name:
                        type: string
                        example: mainnet
                      network_prefix:
                        type: string
                        example: xch
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_network_space:
    post:
      tags:
        - Full Node
      description: Retrieves an estimate of total space validating the chain between two block header hashes.
      summary: Retrieves an estimate of total space.
      operationId: get_network_space
      requestBody:
        required: true
        description: The block header hashes
        content:
          application/json:
            schema:
              type: object
              required:
                - newer_block_header_hash
                - older_block_header_hash
              properties:
                newer_block_header_hash:
                  type: string
                  format: hex
                older_block_header_hash:
                  type: string
                  format: hex
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      space:
                        type: integer
                        format: bigint
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_all_mempool_tx_ids:
    post:
      tags:
        - Mempool
      description: Returns a list of all transaction IDs (spend bundle hashes) in the mempool.
      summary: Returns a list of all transaction IDs in the mempool.
      operationId: get_all_mempool_tx_ids
      requestBody:
        description: Empty request body
        required: true
        content: *ref_1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      tx_ids:
                        type: array
                        items:
                          type: string
                          format: hex
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_all_mempool_items:
    post:
      tags:
        - Mempool
      description: Returns all items in the mempool.
      summary: Returns all items in the mempool.
      operationId: get_all_mempool_items
      requestBody:
        description: Empty request body
        required: true
        content: *ref_1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      mempool_items:
                        type: object
                        additionalProperties:
                          type: object
                          properties: &ref_16
                            spend_bundle:
                              type: object
                              properties: &ref_19
                                aggregated_signature:
                                  type: string
                                  example: '0xa5e5ea1f5ae2335a72fe0a7ed7ca39e8f142e2e1f6e37a348482290e88eb9cea2d973acf6145e34d0afeee7ba22f99850641e21a549b2c092bb49aa393acd938825bccca9413c1a268ba44367bc8433cd0fc0eb82e87bebe23817aa695bdb566'
                                coin_spends:
                                  type: array
                                  example:
                                    - coin:
                                        amount: 1750000000000
                                        parent_coin_info: '0xccd5bb71183532bff220ba46c268991a00000000000000000000000000004082'
                                        puzzle_hash: '0x94c6db00186900418ef7c1f05e127ee1a647cbe6e514ec3bc57acb7bbe6dfb10'
                                      puzzle_reveal: '0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0aec9c2e5984fe928406abca942d55ec6b56340af8315bfefa55889dbaade669b9fd3f330af2af44c2a0626d383e64757ff018080'
                                      solution: '0xff80ffff01ffff33ffa03fa549a708302b401c45cf387f8f03b4f76b7c9eabf567bea974f61dedf721e0ff840098968080ffff33ffa055b9fe4c9ce0cef8ad574bf5a9158dc0db7848b96be1a98ab2806d8f0a376a08ff860197738845808080ff8080'
                                  items:
                                    type: object
                                    properties: *ref_15
                            fee:
                              type: integer
                              example: 0
                              format: uint64
                            npc_result:
                              type: object
                              properties: &ref_42
                                error:
                                  type: integer
                                  example: null
                                  format: uint16
                                  nullable: true
                                npc_list:
                                  type: array
                                  example:
                                    - coin_name: '0xbf71e1d17630e3793321944b5825b5b573ac28c03113498baae997e0781f0278'
                                      conditions:
                                        - - '0x33'
                                          - - opcode: CREATE_COIN
                                              vars:
                                                - '0x3be9de8637a998987687d6e3f1df95b6bcde6a2cbc7ed96b40fbc9d76bb5033d'
                                                - '0x00ec8e78e9'
                                                - 0x
                                        - - '0x32'
                                          - - opcode: AGG_SIG_ME
                                              vars:
                                                - '0xb44f24f7dae4af24334870c3f291c8a8e4d370fb935f0c30b6d1fee734c229d351fed2a5a87c059049d205a8ec3c8124'
                                                - '0xcae8db944550d51ef9eb4bdc297ac7a2ddb759f2e202c13df629abb41cc69290'
                                      puzzle_hash: '0xdd259fada9e1fbfb1499df0755462222f31ec512404842b5c7dac26b9a5cb29a'
                                  items:
                                    type: object
                                    properties: &ref_41
                                      coin_name:
                                        type: string
                                        example: '0xbf71e1d17630e3793321944b5825b5b573ac28c03113498baae997e0781f0278'
                                      puzzle_hash:
                                        type: string
                                        example: '0xdd259fada9e1fbfb1499df0755462222f31ec512404842b5c7dac26b9a5cb29a'
                                      conditions:
                                        type: array
                                        example:
                                          - - '0x33'
                                            - - opcode: CREATE_COIN
                                                vars:
                                                  - '0x3be9de8637a998987687d6e3f1df95b6bcde6a2cbc7ed96b40fbc9d76bb5033d'
                                                  - '0x00ec8e78e9'
                                                  - 0x
                                          - - '0x32'
                                            - - opcode: AGG_SIG_ME
                                                vars:
                                                  - '0xb44f24f7dae4af24334870c3f291c8a8e4d370fb935f0c30b6d1fee734c229d351fed2a5a87c059049d205a8ec3c8124'
                                                  - '0xcae8db944550d51ef9eb4bdc297ac7a2ddb759f2e202c13df629abb41cc69290'
                                        items:
                                          type: object
                                          properties: &ref_40
                                            condition_opcode:
                                              type: string
                                            args:
                                              type: array
                                              items:
                                                type: object
                                                properties: &ref_39
                                                  opcode:
                                                    type: string
                                                    example: CREATE_COIN
                                                  vars:
                                                    type: array
                                                    example:
                                                      - '0x3be9de8637a998987687d6e3f1df95b6bcde6a2cbc7ed96b40fbc9d76bb5033d'
                                                      - '0x00ec8e78e9'
                                                      - 0x
                                                    items:
                                                      type: string
                                                      example: '0x3be9de8637a998987687d6e3f1df95b6bcde6a2cbc7ed96b40fbc9d76bb5033d'
                                clvm_cost:
                                  type: integer
                                  example: 416866
                                  format: uint64
                            cost:
                              type: integer
                              example: 10940866
                              format: uint64
                            spend_budndle_name:
                              type: string
                            additions:
                              type: array
                              example:
                                - amount: 3968760041
                                  parent_coin_info: '0xbf71e1d17630e3793321944b5825b5b573ac28c03113498baae997e0781f0278'
                                  puzzle_hash: '0x3be9de8637a998987687d6e3f1df95b6bcde6a2cbc7ed96b40fbc9d76bb5033d'
                              items:
                                type: object
                                properties: *ref_8
                            removals:
                              type: array
                              example:
                                - amount: 3981342052
                                  parent_coin_info: '0x0252418f0ad7a0009dc055a48a2aaff897f4ea6289b57f1ed9c0d8c7a5b5e6a8'
                                  puzzle_hash: '0xdd259fada9e1fbfb1499df0755462222f31ec512404842b5c7dac26b9a5cb29a'
                              items:
                                type: object
                                properties: *ref_8
                            program:
                              type: string
                              example: '0xff01ffffffa00252418f0ad7a0009dc055a48a2aaff897f4ea6289b57f1ed9c0d8c7a5b5e6a8ffff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0b44f24f7dae4af24334870c3f291c8a8e4d370fb935f0c30b6d1fee734c229d351fed2a5a87c059049d205a8ec3c8124ff018080ff8500ed4e7564ffff80ffff01ffff33ffa057b09fa466e876fed06a697b0b82e237ad81424fa809df8c7f41fbcfcc7fcc25ff8400bffc7b80ffff33ffa03be9de8637a998987687d6e3f1df95b6bcde6a2cbc7ed96b40fbc9d76bb5033dff8500ec8e78e980ffff3cffa029505509405ab0d47b986bb2456c288dc272b7fecad9a54943db25c26dc03de48080ff8080808080'
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_mempool_item_by_tx_id:
    post:
      tags:
        - Mempool
      description: Returns a specific item from the mempool.
      summary: Returns a specific item from the mempool.
      operationId: get_mempool_item_by_tx_id
      requestBody:
        required: true
        description: The tx id.
        content:
          application/json:
            schema:
              type: object
              required:
                - tx_id
              properties:
                tx_id:
                  type: string
                  format: hex
                include_pending:
                  type: boolean
                  default: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      mempool_item:
                        type: object
                        properties: *ref_16
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_coin_records_by_puzzle_hash:
    post:
      tags:
        - Coins
      description: Retrieves the coins for a given puzzlehash, by default returns unspent coins.
      summary: Retrieves the coins for a given puzzlehash.
      operationId: get_coin_records_by_puzzle_hash
      requestBody:
        required: true
        description: The puzzle hash.
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  required:
                    - puzzle_hash
                  properties:
                    puzzle_hash:
                      type: string
                      format: hex
                - type: object
                  properties: &ref_17
                    start_height:
                      type: integer
                      format: uint32
                    end_height:
                      type: integer
                      format: uint32
                    include_spent_coins:
                      type: boolean
      responses:
        '200':
          description: OK
          content: &ref_18
            application/json:
              schema:
                type: object
                properties:
                  coin_records:
                    type: array
                    items:
                      type: object
                      properties: *ref_14
                allOf:
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_coin_records_by_puzzle_hashes:
    post:
      tags:
        - Coins
      description: Retrieves the coins for a given puzzlehashes, by default returns unspent coins.
      summary: Retrieves the coins for a given puzzlehashes
      operationId: get_coin_records_by_puzzle_hashes
      requestBody:
        required: true
        description: The puzzle hashes.
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  required:
                    - puzzle_hashes
                  properties:
                    puzzle_hashes:
                      type: array
                      items:
                        type: string
                        format: hex
                - type: object
                  properties: *ref_17
      responses:
        '200':
          description: OK
          content: *ref_18
  /get_coin_records_by_hint:
    post:
      tags:
        - Coins
      description: Retrieves coins by hint, by default returns unspent coins.
      summary: Retrieves coins by hint.
      operationId: get_coin_records_by_hint
      requestBody:
        required: true
        description: The hint.
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  required:
                    - hint
                  properties:
                    hint:
                      type: string
                      format: hex
                - type: object
                  properties: *ref_17
      responses:
        '200':
          description: OK
          content: *ref_18
  /get_coin_record_by_name:
    post:
      tags:
        - Coins
      description: Retrieves a coin record by it's name.
      summary: Retrieves a coin record by it's name.
      operationId: get_coin_record_by_name
      requestBody:
        required: true
        description: The coin name.
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  format: hex
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      coin_record:
                        type: object
                        properties: *ref_14
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_coin_records_by_names:
    post:
      tags:
        - Coins
      description: Retrieves the coins for given coin IDs, by default returns unspent coins.
      summary: Retrieves the coins for given coin IDs.
      operationId: get_coin_records_by_names
      requestBody:
        required: true
        description: The coin names.
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  required:
                    - names
                  properties:
                    names:
                      type: array
                      items:
                        type: string
                        format: hex
                - type: object
                  properties: *ref_17
      responses:
        '200':
          description: OK
          content: *ref_18
  /get_coin_records_by_parent_ids:
    post:
      tags:
        - Coins
      description: Retrieves the coins for given parent coin IDs, by default returns unspent coins.
      summary: Retrieves the coins for given parent coin IDs.
      operationId: get_coin_records_by_parent_ids
      requestBody:
        required: true
        description: The parent ids.
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  required:
                    - parent_ids
                  properties:
                    parent_ids:
                      type: array
                      items:
                        type: string
                        format: hex
                - type: object
                  properties: *ref_17
      responses:
        '200':
          description: OK
          content: *ref_18
  /get_puzzle_and_solution:
    post:
      tags:
        - Coins
      description: Retrieves a coin solution.
      summary: Retrieves a coin solution.
      operationId: get_puzzle_and_solution
      requestBody:
        required: true
        description: The coin id and height
        content:
          application/json:
            schema:
              type: object
              required:
                - coin_id
                - height
              properties:
                coin_id:
                  type: string
                  format: hex
                height:
                  type: integer
                  format: uint32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      coin_solution:
                        type: object
                        properties: *ref_15
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /push_tx:
    post:
      tags:
        - Coins
      description: Pushes a transaction/spend bundle to the mempool and blockchain. Returns whether the spend bundle was successfully included into the mempool.
      summary: Pushes a transaction/spend bundle to the mempool and blockchain.
      operationId: push_tx
      requestBody:
        required: true
        description: The spend bundle
        content:
          application/json:
            schema:
              type: object
              required:
                - spend_bundle
              properties:
                spend_bundle:
                  type: object
                  properties: *ref_19
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      status:
                        type: string
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
  /get_fee_estimate:
    post:
      tags:
        - Fees
      description: Estimates the fee for a given spend_bundle.
      summary: Estimates the fee for a given spend_bundle.
      operationId: get_fee_estimate
      requestBody:
        required: true
        description: The spend bundle
        content:
          application/json:
            schema:
              type: object
              properties:
                spend_bundle:
                  type: object
                  properties: *ref_19
                cost:
                  type: integer
                  format: uint64
                target_times:
                  type: array
                  items:
                    type: integer
                spend_type:
                  type: integer
                  format: uint64
                spend_count:
                  type: integer
                  default: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      estimates:
                        type: array
                        items:
                          type: integer
                      target_times:
                        type: array
                        items:
                          type: integer
                      current_fee_rate:
                        type: integer
                        format: uint64
                      mempool_size:
                        type: integer
                        format: uint64
                      mempool_fees:
                        type: integer
                        format: uint64
                      mempool_max_size:
                        type: integer
                        format: uint64
                      num_spends:
                        type: integer
                        format: int32
                      full_node_synced:
                        type: boolean
                      peak_height:
                        type: integer
                        format: uint64
                      last_peak_timestamp:
                        type: integer
                        format: uint64
                      last_block_cost:
                        type: integer
                        format: uint64
                      fees_last_block:
                        type: integer
                        format: uint64
                      fee_rate_last_block:
                        type: number
                      last_tx_block_height:
                        type: integer
                        format: uint32
                      node_time_utc:
                        type: integer
                        format: in32
                  - type: object
                    description: Success indicator and optional error message included in all responses
                    required: *ref_2
                    properties: *ref_3
components:
  requestBodies:
    empty:
      description: Empty request body
      required: true
      content: *ref_1
    header_hash:
      required: true
      description: the block's header_hash
      content: *ref_5
    start_end:
      required: true
      description: Start and end heights
      content: *ref_20
  responses:
    empty:
      description: OK response without return values
      content: *ref_0
    coin_records:
      description: OK
      content: *ref_18
  schemas:
    proof_of_space:
      type: object
      properties: *ref_11
    blockchain_state:
      type: object
      description: The node's view of the blockchain.
      properties: *ref_21
    block_record:
      type: object
      description: This class is not included or hashed into the blockchain, but it is kept in memory as a more efficient way to maintain data about the blockchain. This allows us to validate future blocks, difficulty adjustments, etc, without saving the whole header block in memory.
      properties: *ref_4
    coin:
      type: object
      properties: *ref_8
    coin_record:
      type: object
      properties: *ref_14
    coin_search_options:
      type: object
      properties: *ref_17
    coin_spend:
      type: object
      properties: *ref_15
    connection_info:
      type: object
      description: Chia's representation of a connection from node to node.
      properties: *ref_22
    foliage:
      type: object
      properties: *ref_12
    foliage_transaction_block:
      type: object
      properties: *ref_13
    full_block:
      type: object
      properties: *ref_9
    end_of_sub_slot_bundle:
      type: object
      properties: *ref_10
    mempool_item:
      type: object
      properties: *ref_16
    network_info:
      type: object
      description: Basic information about the current network.
      required: *ref_23
      properties: *ref_24
    node_type:
      type: integer
      enum: *ref_25
      description: |-
        The type of node:
          * 1 FULL_NODE
          * 2 HARVESTER
          * 3 FARMER
          * 4 TIMELORD
          * 5 INTRODUCER
          * 6 WALLET
          * 7 DATA_LAYER
    signage_point:
      type: object
      properties: *ref_26
    spend_bundle:
      type: object
      properties: *ref_19
    unfinished_header_block:
      type: object
      properties: *ref_27
    apiResponse:
      type: object
      description: Success indicator and optional error message included in all responses
      required: *ref_2
      properties: *ref_3
    vdf_info:
      type: object
      description: Used to generate the discriminant (VDF group)
      properties: *ref_6
    vdf_proof:
      type: object
      properties: *ref_7
    classgroup_element:
      type: object
      description: Represents a classgroup element (a,b,c) where a, b, and c are 512 bit signed integers. However this is using a compressed representation. VDF outputs are a single classgroup element. VDF proofs can also be one classgroup element(or multiple).
      properties: *ref_28
    challenge_chain_sub_slot:
      type: object
      properties: *ref_29
    infused_challenge_chain_sub_slot:
      type: object
      properties: *ref_30
    reward_chain_sub_slot:
      type: object
      properties: *ref_31
    sub_slot_proofs:
      type: object
      properties: *ref_32
    k_size:
      type: integer
      description: Defines the size of a plot. 25 is used for testing only. https://github.com/Chia-Network/chia-blockchain/wiki/k-sizes
      default: 32
      enum: *ref_33
    reward_chain_block:
      type: object
      properties: *ref_34
    pool_target:
      type: object
      properties: *ref_35
    foliage_block_data:
      type: object
      properties: *ref_36
    transactions_info:
      type: object
      properties: *ref_37
    reward_chain_block_unfinished:
      type: object
      properties: *ref_38
    condition_with_args:
      type: object
      properties: *ref_39
    condition:
      type: object
      properties: *ref_40
    npc:
      type: object
      properties: *ref_41
    npc_result:
      type: object
      properties: *ref_42
  securitySchemes:
    bearerAuth:
      type: http
      scheme: mutual
      description: '-> Chia uses [mutualTLS bearerAuth](https://github.com/dkackman/chia-api/wiki/Mutual-TLS) where client and server share TLS keys.'
