Akash Network Distribution API

The Distribution API from Akash Network โ€” 8 operation(s) for distribution.

OpenAPI Specification

akash-distribution-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: AKASH - gRPC Gateway docs Addresses Distribution API
  description: A REST interface for state queries
  version: 1.0.0
tags:
- name: Distribution
paths:
  /distribution/delegators/{delegatorAddr}/rewards:
    parameters:
    - in: path
      name: delegatorAddr
      description: Bech32 AccAddress of Delegator
      required: true
      type: string
      x-example: cosmos167w96tdvmazakdwkw2u57227eduula2cy572lf
    get:
      deprecated: true
      summary: Get the total rewards balance from all delegations
      description: Get the sum of all the rewards earned by delegations by a single delegator
      produces:
      - application/json
      tags:
      - Distribution
      responses:
        '200':
          description: OK
          schema:
            type: object
            properties:
              rewards:
                type: array
                items:
                  type: object
                  properties:
                    validator_address:
                      type: string
                      description: bech32 encoded address
                      example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l
                    reward:
                      type: array
                      items:
                        type: object
                        properties:
                          denom:
                            type: string
                            example: stake
                          amount:
                            type: string
                            example: '50'
              total:
                type: array
                items:
                  type: object
                  properties:
                    denom:
                      type: string
                      example: stake
                    amount:
                      type: string
                      example: '50'
        '400':
          description: Invalid delegator address
        '500':
          description: Internal Server Error
    post:
      deprecated: true
      summary: Withdraw all the delegator's delegation rewards
      description: Withdraw all the delegator's delegation rewards
      tags:
      - Distribution
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - in: body
        name: Withdraw request body
        schema:
          properties:
            base_req:
              type: object
              properties:
                from:
                  type: string
                  example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc
                  description: Sender address or Keybase name to generate a transaction
                memo:
                  type: string
                  example: Sent via Cosmos Voyager ๐Ÿš€
                chain_id:
                  type: string
                  example: Cosmos-Hub
                account_number:
                  type: string
                  example: '0'
                sequence:
                  type: string
                  example: '1'
                gas:
                  type: string
                  example: '200000'
                gas_adjustment:
                  type: string
                  example: '1.2'
                fees:
                  type: array
                  items:
                    type: object
                    properties:
                      denom:
                        type: string
                        example: stake
                      amount:
                        type: string
                        example: '50'
                simulate:
                  type: boolean
                  example: false
                  description: Estimate gas for a transaction (cannot be used in conjunction with generate_only)
      responses:
        '200':
          description: OK
          schema:
            type: object
            properties:
              msg:
                type: array
                items:
                  type: string
              fee:
                type: object
                properties:
                  gas:
                    type: string
                  amount:
                    type: array
                    items:
                      type: object
                      properties:
                        denom:
                          type: string
                          example: stake
                        amount:
                          type: string
                          example: '50'
              memo:
                type: string
              signature:
                type: object
                properties:
                  signature:
                    type: string
                    example: MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY=
                  pub_key:
                    type: object
                    properties:
                      type:
                        type: string
                        example: tendermint/PubKeySecp256k1
                      value:
                        type: string
                        example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
                  account_number:
                    type: string
                    example: '0'
                  sequence:
                    type: string
                    example: '0'
        '400':
          description: Invalid delegator address
        '401':
          description: Key password is wrong
        '500':
          description: Internal Server Error
  /distribution/delegators/{delegatorAddr}/rewards/{validatorAddr}:
    parameters:
    - in: path
      name: delegatorAddr
      description: Bech32 AccAddress of Delegator
      required: true
      type: string
      x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv
    - in: path
      name: validatorAddr
      description: Bech32 OperatorAddress of validator
      required: true
      type: string
      x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l
    get:
      deprecated: true
      summary: Query a delegation reward
      description: Query a single delegation reward by a delegator
      tags:
      - Distribution
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            type: array
            items:
              type: object
              properties:
                denom:
                  type: string
                  example: stake
                amount:
                  type: string
                  example: '50'
        '400':
          description: Invalid delegator address
        '500':
          description: Internal Server Error
    post:
      deprecated: true
      summary: Withdraw a delegation reward
      description: Withdraw a delegator's delegation reward from a single validator
      tags:
      - Distribution
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - in: body
        name: Withdraw request body
        schema:
          properties:
            base_req:
              type: object
              properties:
                from:
                  type: string
                  example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc
                  description: Sender address or Keybase name to generate a transaction
                memo:
                  type: string
                  example: Sent via Cosmos Voyager ๐Ÿš€
                chain_id:
                  type: string
                  example: Cosmos-Hub
                account_number:
                  type: string
                  example: '0'
                sequence:
                  type: string
                  example: '1'
                gas:
                  type: string
                  example: '200000'
                gas_adjustment:
                  type: string
                  example: '1.2'
                fees:
                  type: array
                  items:
                    type: object
                    properties:
                      denom:
                        type: string
                        example: stake
                      amount:
                        type: string
                        example: '50'
                simulate:
                  type: boolean
                  example: false
                  description: Estimate gas for a transaction (cannot be used in conjunction with generate_only)
      responses:
        '200':
          description: OK
          schema:
            type: object
            properties:
              msg:
                type: array
                items:
                  type: string
              fee:
                type: object
                properties:
                  gas:
                    type: string
                  amount:
                    type: array
                    items:
                      type: object
                      properties:
                        denom:
                          type: string
                          example: stake
                        amount:
                          type: string
                          example: '50'
              memo:
                type: string
              signature:
                type: object
                properties:
                  signature:
                    type: string
                    example: MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY=
                  pub_key:
                    type: object
                    properties:
                      type:
                        type: string
                        example: tendermint/PubKeySecp256k1
                      value:
                        type: string
                        example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
                  account_number:
                    type: string
                    example: '0'
                  sequence:
                    type: string
                    example: '0'
        '400':
          description: Invalid delegator address or delegation body
        '401':
          description: Key password is wrong
        '500':
          description: Internal Server Error
  /distribution/delegators/{delegatorAddr}/withdraw_address:
    parameters:
    - in: path
      name: delegatorAddr
      description: Bech32 AccAddress of Delegator
      required: true
      type: string
      x-example: cosmos167w96tdvmazakdwkw2u57227eduula2cy572lf
    get:
      deprecated: true
      summary: Get the rewards withdrawal address
      description: Get the delegations' rewards withdrawal address. This is the address in which the user will receive the reward funds
      tags:
      - Distribution
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            type: string
            description: bech32 encoded address
            example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27
        '400':
          description: Invalid delegator address
        '500':
          description: Internal Server Error
    post:
      deprecated: true
      summary: Replace the rewards withdrawal address
      description: Replace the delegations' rewards withdrawal address for a new one.
      tags:
      - Distribution
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - in: body
        name: Withdraw request body
        schema:
          properties:
            base_req:
              type: object
              properties:
                from:
                  type: string
                  example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc
                  description: Sender address or Keybase name to generate a transaction
                memo:
                  type: string
                  example: Sent via Cosmos Voyager ๐Ÿš€
                chain_id:
                  type: string
                  example: Cosmos-Hub
                account_number:
                  type: string
                  example: '0'
                sequence:
                  type: string
                  example: '1'
                gas:
                  type: string
                  example: '200000'
                gas_adjustment:
                  type: string
                  example: '1.2'
                fees:
                  type: array
                  items:
                    type: object
                    properties:
                      denom:
                        type: string
                        example: stake
                      amount:
                        type: string
                        example: '50'
                simulate:
                  type: boolean
                  example: false
                  description: Estimate gas for a transaction (cannot be used in conjunction with generate_only)
            withdraw_address:
              type: string
              description: bech32 encoded address
              example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27
      responses:
        '200':
          description: OK
          schema:
            type: object
            properties:
              msg:
                type: array
                items:
                  type: string
              fee:
                type: object
                properties:
                  gas:
                    type: string
                  amount:
                    type: array
                    items:
                      type: object
                      properties:
                        denom:
                          type: string
                          example: stake
                        amount:
                          type: string
                          example: '50'
              memo:
                type: string
              signature:
                type: object
                properties:
                  signature:
                    type: string
                    example: MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY=
                  pub_key:
                    type: object
                    properties:
                      type:
                        type: string
                        example: tendermint/PubKeySecp256k1
                      value:
                        type: string
                        example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
                  account_number:
                    type: string
                    example: '0'
                  sequence:
                    type: string
                    example: '0'
        '400':
          description: Invalid delegator or withdraw address
        '401':
          description: Key password is wrong
        '500':
          description: Internal Server Error
  /distribution/validators/{validatorAddr}:
    parameters:
    - in: path
      name: validatorAddr
      description: Bech32 OperatorAddress of validator
      required: true
      type: string
      x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l
    get:
      deprecated: true
      summary: Validator distribution information
      description: Query the distribution information of a single validator
      tags:
      - Distribution
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            type: object
            properties:
              operator_address:
                type: string
                description: bech32 encoded address
                example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l
              self_bond_rewards:
                type: array
                items:
                  type: object
                  properties:
                    denom:
                      type: string
                      example: stake
                    amount:
                      type: string
                      example: '50'
              val_commission:
                type: array
                items:
                  type: object
                  properties:
                    denom:
                      type: string
                      example: stake
                    amount:
                      type: string
                      example: '50'
        '400':
          description: Invalid validator address
        '500':
          description: Internal Server Error
  /distribution/validators/{validatorAddr}/outstanding_rewards:
    parameters:
    - in: path
      name: validatorAddr
      description: Bech32 OperatorAddress of validator
      required: true
      type: string
      x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l
    get:
      deprecated: true
      summary: Fee distribution outstanding rewards of a single validator
      tags:
      - Distribution
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            type: array
            items:
              type: object
              properties:
                denom:
                  type: string
                  example: stake
                amount:
                  type: string
                  example: '50'
        '500':
          description: Internal Server Error
  /distribution/validators/{validatorAddr}/rewards:
    parameters:
    - in: path
      name: validatorAddr
      description: Bech32 OperatorAddress of validator
      required: true
      type: string
      x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l
    get:
      deprecated: true
      summary: Commission and self-delegation rewards of a single validator
      description: Query the commission and self-delegation rewards of validator.
      tags:
      - Distribution
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            type: array
            items:
              type: object
              properties:
                denom:
                  type: string
                  example: stake
                amount:
                  type: string
                  example: '50'
        '400':
          description: Invalid validator address
        '500':
          description: Internal Server Error
    post:
      deprecated: true
      summary: Withdraw the validator's rewards
      description: Withdraw the validator's self-delegation and commissions rewards
      tags:
      - Distribution
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - in: body
        name: Withdraw request body
        schema:
          properties:
            base_req:
              type: object
              properties:
                from:
                  type: string
                  example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc
                  description: Sender address or Keybase name to generate a transaction
                memo:
                  type: string
                  example: Sent via Cosmos Voyager ๐Ÿš€
                chain_id:
                  type: string
                  example: Cosmos-Hub
                account_number:
                  type: string
                  example: '0'
                sequence:
                  type: string
                  example: '1'
                gas:
                  type: string
                  example: '200000'
                gas_adjustment:
                  type: string
                  example: '1.2'
                fees:
                  type: array
                  items:
                    type: object
                    properties:
                      denom:
                        type: string
                        example: stake
                      amount:
                        type: string
                        example: '50'
                simulate:
                  type: boolean
                  example: false
                  description: Estimate gas for a transaction (cannot be used in conjunction with generate_only)
      responses:
        '200':
          description: OK
          schema:
            type: object
            properties:
              msg:
                type: array
                items:
                  type: string
              fee:
                type: object
                properties:
                  gas:
                    type: string
                  amount:
                    type: array
                    items:
                      type: object
                      properties:
                        denom:
                          type: string
                          example: stake
                        amount:
                          type: string
                          example: '50'
              memo:
                type: string
              signature:
                type: object
                properties:
                  signature:
                    type: string
                    example: MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY=
                  pub_key:
                    type: object
                    properties:
                      type:
                        type: string
                        example: tendermint/PubKeySecp256k1
                      value:
                        type: string
                        example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
                  account_number:
                    type: string
                    example: '0'
                  sequence:
                    type: string
                    example: '0'
        '400':
          description: Invalid validator address
        '401':
          description: Key password is wrong
        '500':
          description: Internal Server Error
  /distribution/community_pool:
    get:
      deprecated: true
      summary: Community pool parameters
      tags:
      - Distribution
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            type: array
            items:
              type: object
              properties:
                denom:
                  type: string
                  example: stake
                amount:
                  type: string
                  example: '50'
        '500':
          description: Internal Server Error
  /distribution/parameters:
    get:
      deprecated: true
      summary: Fee distribution parameters
      tags:
      - Distribution
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            properties:
              base_proposer_reward:
                type: string
              bonus_proposer_reward:
                type: string
              community_tax:
                type: string
        '500':
          description: Internal Server Error
securityDefinitions:
  kms:
    type: basic