openapi: 3.2.0 info: description: API for Aeternity Middleware title: Aeternity Middleware Hyperchain API version: 1.108.2 servers: - url: https://mainnet.aeternity.io/mdw/v3 description: Mainnet middleware - url: https://testnet.aeternity.io/mdw/v3 description: Testnet middleware tags: - name: Hyperchain paths: /hyperchain/epochs: get: deprecated: false description: Get Epoch information operationId: GetEpochs parameters: - $ref: '#/components/parameters/DirectionParam' - $ref: '#/components/parameters/LimitParam' - $ref: '#/components/parameters/HyperchainScopeParam' responses: '200': description: Returns paginated list of information about Epochs content: application/json: schema: allOf: - type: object required: - data properties: data: type: array items: $ref: '#/components/schemas/EpochInfo' - $ref: '#/components/schemas/PaginatedResponse' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Hyperchain summary: Get epochs x-summary-source: derived /hyperchain/epochs/top: get: deprecated: false description: Get Top Epoch information operationId: GetEpochTop responses: '200': description: Returns information about the top epoch content: application/json: schema: $ref: '#/components/schemas/EpochInfo' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Hyperchain summary: Get epoch top x-summary-source: derived /hyperchain/schedule: get: deprecated: false description: Get Schedule information operationId: GetSchedules parameters: - $ref: '#/components/parameters/DirectionParam' - $ref: '#/components/parameters/LimitParam' - $ref: '#/components/parameters/HyperchainScopeParam' responses: '200': description: Returns schedule information content: application/json: schema: allOf: - type: object required: - data properties: data: type: array items: $ref: '#/components/schemas/Schedule' - $ref: '#/components/schemas/PaginatedResponse' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Hyperchain summary: Get schedules x-summary-source: derived /hyperchain/schedule/height/{height}: get: deprecated: false description: Get Schedule information operationId: GetSchedule parameters: - name: height in: path description: Schedule height required: true schema: type: integer responses: '200': description: Returns schedule information content: application/json: schema: $ref: '#/components/schemas/Schedule' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Hyperchain summary: Get schedule x-summary-source: derived /hyperchain/validators: get: deprecated: false description: Get Validators information operationId: GetValidators parameters: - $ref: '#/components/parameters/DirectionParam' - $ref: '#/components/parameters/LimitParam' - $ref: '#/components/parameters/HyperchainScopeParam' responses: '200': description: Returns validator information content: application/json: schema: allOf: - type: object required: - data properties: data: type: array items: $ref: '#/components/schemas/Validator' - $ref: '#/components/schemas/PaginatedResponse' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Hyperchain summary: Get validators x-summary-source: derived /hyperchain/validators/{validator}: get: deprecated: false description: Get Validator information operationId: GetValidator parameters: - name: validator in: path description: Validator address required: true schema: $ref: '#/components/schemas/AccountAddress' responses: '200': description: Returns validator information content: application/json: schema: $ref: '#/components/schemas/Validator' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Hyperchain summary: Get validator x-summary-source: derived /hyperchain/validators/{validator}/delegates: get: deprecated: false description: Get Delegates information for validator operationId: GetValidatorDelegates parameters: - name: validator in: path description: Validator address required: true schema: $ref: '#/components/schemas/AccountAddress' - $ref: '#/components/parameters/DirectionParam' - $ref: '#/components/parameters/LimitParam' - $ref: '#/components/parameters/HyperchainScopeParam' responses: '200': description: Returns delegates information content: application/json: schema: allOf: - type: object required: - data properties: data: type: array items: $ref: '#/components/schemas/Delegate' - $ref: '#/components/schemas/PaginatedResponse' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Hyperchain summary: Get validator delegates x-summary-source: derived /hyperchain/validators/{validator}/delegates/top: get: deprecated: false description: Get top Delegates information for validator operationId: GetTopValidatorDelegates parameters: - name: validator in: path description: Validator address required: true schema: $ref: '#/components/schemas/AccountAddress' - $ref: '#/components/parameters/DirectionParam' - $ref: '#/components/parameters/LimitParam' - $ref: '#/components/parameters/HyperchainScopeParam' responses: '200': description: Returns top validator delegates information content: application/json: schema: allOf: - type: object required: - data properties: data: type: array items: $ref: '#/components/schemas/Delegate' - $ref: '#/components/schemas/PaginatedResponse' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Hyperchain summary: Get top validator delegates x-summary-source: derived components: parameters: HyperchainScopeParam: in: query name: scope description: Scopes results in a hyperchain epoch range schema: type: string pattern: (epoch):\d+(-\d+)? DirectionParam: in: query name: direction description: Sorts results in forwards or backwards direction schema: type: string enum: - forward - backward LimitParam: in: query name: limit description: Limit paginated resources (max 100) schema: type: integer minimum: 1 maximum: 100 default: 10 schemas: Delegate: description: Delegate information type: object properties: epoch: type: integer example: 1 delegate: type: string example: ak_1111111111111111111111111111111111111111111111111 stake: type: integer example: 1000000000000000000 validator: type: string example: ak_1111111111111111111111111111111111111111111111111 required: - epoch - delegate - stake - validator PaginatedResponse: type: object properties: next: type: - string - 'null' example: /blocks?cursor=123 prev: type: - string - 'null' example: /blocks?cursor=234 required: - next - prev EpochInfo: description: Epoch information type: object properties: epoch: type: integer example: 1 first: type: integer example: 1 last: type: integer example: 10 length: type: integer example: 10 seed: type: string example: kh_1111111111111111111111111111111111111111111111111 last_pin_height: type: integer example: 10 parent_block_hash: type: string example: kh_1111111111111111111111111111111111111111111111111 last_leader: type: string example: ak_1111111111111111111111111111111111111111111111111 epoch_start_time: type: integer example: 1629820800000 validators: type: array items: type: object properties: validator: type: string example: ak_1111111111111111111111111111111111111111111111111 stake: type: integer example: 1000000000000000000 required: - epoch - first - last - length - seed - last_pin_height - parent_block_hash - last_leader - epoch_start_time - validators Validator: description: Validator information type: object properties: epoch: type: integer example: 1 validator: type: string example: ak_1111111111111111111111111111111111111111111111111 total_stakes: type: integer example: 1000000000000000000 delegates: type: integer example: 5 rewards_earned: type: integer example: 1000000000000000000 pinning_history: type: object additionalProperties: type: integer example: '1': 1000000000000000000 '2': 2000000000000000000 required: - epoch - validator - total_stakes - delegates - rewards_earned - pinning_history ErrorResponse: description: Error response from the API type: object example: error: 'invalid id: th_2Twp3pJeVuwQ7cMSdPQRfpAUWwdMiwx6coVMpRaNSuzFRnDZF' properties: error: description: The message of the error raised type: string required: - error title: Error response AccountAddress: description: Account address type: string example: ak_psy8tRXPzGxh6975H7K6XQcMFVsdrxJMt7YkzMY8oUTevutzw pattern: ^ak_\w{38,50}$ Schedule: description: Schedule information type: object properties: height: type: integer example: 1 leader: type: string example: ak_1111111111111111111111111111111111111111111111111 required: - height - leader