github.com/gravity-devs/liquidity@v1.5.3/client/docs/swagger_legacy.yaml (about)

     1  ---
     2  swagger: "2.0"
     3  info:
     4    version: "3.0"
     5    title: Gaia-Lite for Cosmos
     6    description: A REST interface for state queries, transaction generation and broadcasting.
     7  tags:
     8    - name: Transactions
     9      description: Search, encode, or broadcast transactions.
    10    - name: Tendermint RPC
    11      description: Tendermint APIs, such as query blocks, transactions and validatorset
    12    - name: Misc
    13      description: Query app version
    14  schemes:
    15    - https
    16  host: api.cosmos.network
    17  securityDefinitions:
    18    kms:
    19      type: basic
    20  paths:
    21    /node_info:
    22      get:
    23        description: Information about the connected node
    24        summary: The properties of the connected node
    25        tags:
    26          - Gaia REST
    27        produces:
    28          - application/json
    29        responses:
    30          200:
    31            description: Node status
    32            schema:
    33              type: object
    34              properties:
    35                application_version:
    36                  properties:
    37                    build_tags:
    38                      type: string
    39                    client_name:
    40                      type: string
    41                    commit:
    42                      type: string
    43                    go:
    44                      type: string
    45                    name:
    46                      type: string
    47                    server_name:
    48                      type: string
    49                    version:
    50                      type: string
    51                node_info:
    52                  properties:
    53                    id:
    54                      type: string
    55                    moniker:
    56                      type: string
    57                      example: validator-name
    58                    protocol_version:
    59                      properties:
    60                        p2p:
    61                          type: string
    62                          example: 7
    63                        block:
    64                          type: string
    65                          example: 10
    66                        app:
    67                          type: string
    68                          example: 0
    69                    network:
    70                      type: string
    71                      example: gaia-2
    72                    channels:
    73                      type: string
    74                    listen_addr:
    75                      type: string
    76                      example: 192.168.56.1:26656
    77                    version:
    78                      description: Tendermint version
    79                      type: string
    80                      example: 0.15.0
    81                    other:
    82                      description: more information on versions
    83                      type: object
    84                      properties:
    85                        tx_index:
    86                          type: string
    87                          example: on
    88                        rpc_address:
    89                          type: string
    90                          example: tcp://0.0.0.0:26657
    91          500:
    92            description: Failed to query node status
    93    /syncing:
    94      get:
    95        summary: Syncing state of node
    96        tags:
    97          - Tendermint RPC
    98        description: Get if the node is currently syning with other nodes
    99        produces:
   100          - application/json
   101        responses:
   102          200:
   103            description: Node syncing status
   104            schema:
   105              type: object
   106              properties:
   107                syncing:
   108                  type: boolean
   109          500:
   110            description: Server internal error
   111    /blocks/latest:
   112      get:
   113        summary: Get the latest block
   114        tags:
   115          - Tendermint RPC
   116        produces:
   117          - application/json
   118        responses:
   119          200:
   120            description: The latest block
   121            schema:
   122              $ref: "#/definitions/BlockQuery"
   123          500:
   124            description: Server internal error
   125    /blocks/{height}:
   126      get:
   127        summary: Get a block at a certain height
   128        tags:
   129          - Tendermint RPC
   130        produces:
   131          - application/json
   132        parameters:
   133          - in: path
   134            name: height
   135            description: Block height
   136            required: true
   137            type: number
   138            x-example: 1
   139        responses:
   140          200:
   141            description: The block at a specific height
   142            schema:
   143              $ref: "#/definitions/BlockQuery"
   144          404:
   145            description: Request block height doesn't
   146          400:
   147            description: Invalid height
   148          500:
   149            description: Server internal error
   150    /validatorsets/latest:
   151      get:
   152        summary: Get the latest validator set
   153        tags:
   154          - Tendermint RPC
   155        produces:
   156          - application/json
   157        responses:
   158          200:
   159            description: The validator set at the latest block height
   160            schema:
   161              type: object
   162              properties:
   163                block_height:
   164                  type: string
   165                validators:
   166                  type: array
   167                  items:
   168                    $ref: "#/definitions/TendermintValidator"
   169          500:
   170            description: Server internal error
   171    /validatorsets/{height}:
   172      get:
   173        summary: Get a validator set a certain height
   174        tags:
   175          - Tendermint RPC
   176        produces:
   177          - application/json
   178        parameters:
   179          - in: path
   180            name: height
   181            description: Block height
   182            required: true
   183            type: number
   184            x-example: 1
   185        responses:
   186          200:
   187            description: The validator set at a specific block height
   188            schema:
   189              type: object
   190              properties:
   191                block_height:
   192                  type: string
   193                validators:
   194                  type: array
   195                  items:
   196                    $ref: "#/definitions/TendermintValidator"
   197          404:
   198            description: Block at height not available
   199          400:
   200            description: Invalid height
   201          500:
   202            description: Server internal error
   203    /txs:
   204      post:
   205        tags:
   206          - Transactions
   207        summary: Broadcast a signed tx
   208        description: Broadcast a signed tx to a full node
   209        consumes:
   210          - application/json
   211        produces:
   212          - application/json
   213        parameters:
   214          - in: body
   215            name: txBroadcast
   216            description: >-
   217              The tx must be a signed StdTx. The supported broadcast modes include
   218              `"block"`(return after tx commit), `"sync"`(return afer CheckTx) and
   219              `"async"`(return right away).
   220            required: true
   221            schema:
   222              type: object
   223              properties:
   224                tx:
   225                  type: object
   226                  properties:
   227                    msg:
   228                      type: array
   229                      items:
   230                        type: string
   231                    fee:
   232                      type: object
   233                      properties:
   234                        gas:
   235                          type: string
   236                        amount:
   237                          type: array
   238                          items:
   239                            type: object
   240                            properties:
   241                              denom:
   242                                type: string
   243                                example: stake
   244                              amount:
   245                                type: string
   246                                example: '50'
   247                    memo:
   248                      type: string
   249                    signature:
   250                      type: object
   251                      properties:
   252                        signature:
   253                          type: string
   254                          example: >-
   255                            MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY=
   256                        pub_key:
   257                          type: object
   258                          properties:
   259                            type:
   260                              type: string
   261                              example: tendermint/PubKeySecp256k1
   262                            value:
   263                              type: string
   264                              example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
   265                        account_number:
   266                          type: string
   267                          example: '0'
   268                        sequence:
   269                          type: string
   270                          example: '0'
   271                mode:
   272                  type: string
   273                  example: block
   274        responses:
   275          '200':
   276            description: Tx broadcasting result
   277            schema:
   278              type: object
   279              properties:
   280                check_tx:
   281                  type: object
   282                  properties:
   283                    code:
   284                      type: integer
   285                    data:
   286                      type: string
   287                    gas_used:
   288                      type: integer
   289                    gas_wanted:
   290                      type: integer
   291                    info:
   292                      type: string
   293                    log:
   294                      type: string
   295                    tags:
   296                      type: array
   297                      items:
   298                        type: object
   299                        properties:
   300                          key:
   301                            type: string
   302                          value:
   303                            type: string
   304                  example:
   305                    code: 0
   306                    data: data
   307                    log: log
   308                    gas_used: 5000
   309                    gas_wanted: 10000
   310                    info: info
   311                    tags:
   312                      - ''
   313                      - ''
   314                deliver_tx:
   315                  type: object
   316                  properties:
   317                    code:
   318                      type: integer
   319                    data:
   320                      type: string
   321                    gas_used:
   322                      type: integer
   323                    gas_wanted:
   324                      type: integer
   325                    info:
   326                      type: string
   327                    log:
   328                      type: string
   329                    tags:
   330                      type: array
   331                      items:
   332                        type: object
   333                        properties:
   334                          key:
   335                            type: string
   336                          value:
   337                            type: string
   338                  example:
   339                    code: 5
   340                    data: data
   341                    log: log
   342                    gas_used: 5000
   343                    gas_wanted: 10000
   344                    info: info
   345                    tags:
   346                      - ''
   347                      - ''
   348                hash:
   349                  type: string
   350                  example: EE5F3404034C524501629B56E0DDC38FAD651F04
   351                height:
   352                  type: integer
   353          '500':
   354            description: Internal Server Error
   355  
   356  definitions:
   357    CheckTxResult:
   358      type: object
   359      properties:
   360        code:
   361          type: integer
   362        data:
   363          type: string
   364        gas_used:
   365          type: integer
   366        gas_wanted:
   367          type: integer
   368        info:
   369          type: string
   370        log:
   371          type: string
   372        tags:
   373          type: array
   374          items:
   375            $ref: "#/definitions/KVPair"
   376      example:
   377        code: 0
   378        data: data
   379        log: log
   380        gas_used: 5000
   381        gas_wanted: 10000
   382        info: info
   383        tags:
   384          - ""
   385          - ""
   386    DeliverTxResult:
   387      type: object
   388      properties:
   389        code:
   390          type: integer
   391        data:
   392          type: string
   393        gas_used:
   394          type: integer
   395        gas_wanted:
   396          type: integer
   397        info:
   398          type: string
   399        log:
   400          type: string
   401        tags:
   402          type: array
   403          items:
   404            $ref: "#/definitions/KVPair"
   405      example:
   406        code: 5
   407        data: data
   408        log: log
   409        gas_used: 5000
   410        gas_wanted: 10000
   411        info: info
   412        tags:
   413          - ""
   414          - ""
   415    BroadcastTxCommitResult:
   416      type: object
   417      properties:
   418        check_tx:
   419          $ref: "#/definitions/CheckTxResult"
   420        deliver_tx:
   421          $ref: "#/definitions/DeliverTxResult"
   422        hash:
   423          $ref: "#/definitions/Hash"
   424        height:
   425          type: integer
   426    KVPair:
   427      type: object
   428      properties:
   429        key:
   430          type: string
   431        value:
   432          type: string
   433    Msg:
   434      type: string
   435    Address:
   436      type: string
   437      description: bech32 encoded address
   438      example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27
   439    ValidatorAddress:
   440      type: string
   441      description: bech32 encoded address
   442      example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l
   443    Coin:
   444      type: object
   445      properties:
   446        denom:
   447          type: string
   448          example: stake
   449        amount:
   450          type: string
   451          example: "50"
   452    Hash:
   453      type: string
   454      example: EE5F3404034C524501629B56E0DDC38FAD651F04
   455    TxQuery:
   456      type: object
   457      properties:
   458        hash:
   459          type: string
   460          example: "D085138D913993919295FF4B0A9107F1F2CDE0D37A87CE0644E217CBF3B49656"
   461        height:
   462          type: number
   463          example: 368
   464        tx:
   465          $ref: "#/definitions/StdTx"
   466        result:
   467          type: object
   468          properties:
   469            log:
   470              type: string
   471            gas_wanted:
   472              type: string
   473              example: "200000"
   474            gas_used:
   475              type: string
   476              example: "26354"
   477            tags:
   478              type: array
   479              items:
   480                $ref: "#/definitions/KVPair"
   481    PaginatedQueryTxs:
   482      type: object
   483      properties:
   484        total_count:
   485          type: number
   486          example: 1
   487        count:
   488          type: number
   489          example: 1
   490        page_number:
   491          type: number
   492          example: 1
   493        page_total:
   494          type: number
   495          example: 1
   496        limit:
   497          type: number
   498          example: 30
   499        txs:
   500          type: array
   501          items:
   502            $ref: "#/definitions/TxQuery"
   503    StdTx:
   504      type: object
   505      properties:
   506        msg:
   507          type: array
   508          items:
   509            $ref: "#/definitions/Msg"
   510        fee:
   511          type: object
   512          properties:
   513            gas:
   514              type: string
   515            amount:
   516              type: array
   517              items:
   518                $ref: "#/definitions/Coin"
   519        memo:
   520          type: string
   521        signature:
   522          type: object
   523          properties:
   524            signature:
   525              type: string
   526              example: MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY=
   527            pub_key:
   528              type: object
   529              properties:
   530                type:
   531                  type: string
   532                  example: "tendermint/PubKeySecp256k1"
   533                value:
   534                  type: string
   535                  example: "Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH"
   536            account_number:
   537              type: string
   538              example: "0"
   539            sequence:
   540              type: string
   541              example: "0"
   542    BlockID:
   543      type: object
   544      properties:
   545        hash:
   546          $ref: "#/definitions/Hash"
   547        parts:
   548          type: object
   549          properties:
   550            total:
   551              type: number
   552              example: 0
   553            hash:
   554              $ref: "#/definitions/Hash"
   555    BlockHeader:
   556      type: object
   557      properties:
   558        chain_id:
   559          type: string
   560          example: cosmoshub-2
   561        height:
   562          type: number
   563          example: 1
   564        time:
   565          type: string
   566          example: "2017-12-30T05:53:09.287+01:00"
   567        num_txs:
   568          type: number
   569          example: 0
   570        last_block_id:
   571          $ref: "#/definitions/BlockID"
   572        total_txs:
   573          type: number
   574          example: 35
   575        last_commit_hash:
   576          $ref: "#/definitions/Hash"
   577        data_hash:
   578          $ref: "#/definitions/Hash"
   579        validators_hash:
   580          $ref: "#/definitions/Hash"
   581        next_validators_hash:
   582          $ref: "#/definitions/Hash"
   583        consensus_hash:
   584          $ref: "#/definitions/Hash"
   585        app_hash:
   586          $ref: "#/definitions/Hash"
   587        last_results_hash:
   588          $ref: "#/definitions/Hash"
   589        evidence_hash:
   590          $ref: "#/definitions/Hash"
   591        proposer_address:
   592          $ref: "#/definitions/Address"
   593        version:
   594          type: object
   595          properties:
   596            block:
   597              type: string
   598              example: 10
   599            app:
   600              type: string
   601              example: 0
   602    Block:
   603      type: object
   604      properties:
   605        header:
   606          $ref: "#/definitions/BlockHeader"
   607        txs:
   608          type: array
   609          items:
   610            type: string
   611        evidence:
   612          type: array
   613          items:
   614            type: string
   615        last_commit:
   616          type: object
   617          properties:
   618            block_id:
   619              $ref: "#/definitions/BlockID"
   620            precommits:
   621              type: array
   622              items:
   623                type: object
   624                properties:
   625                  validator_address:
   626                    type: string
   627                  validator_index:
   628                    type: string
   629                    example: "0"
   630                  height:
   631                    type: string
   632                    example: "0"
   633                  round:
   634                    type: string
   635                    example: "0"
   636                  timestamp:
   637                    type: string
   638                    example: "2017-12-30T05:53:09.287+01:00"
   639                  type:
   640                    type: number
   641                    example: 2
   642                  block_id:
   643                    $ref: "#/definitions/BlockID"
   644                  signature:
   645                    type: string
   646                    example: "7uTC74QlknqYWEwg7Vn6M8Om7FuZ0EO4bjvuj6rwH1mTUJrRuMMZvAAqT9VjNgP0RA/TDp6u/92AqrZfXJSpBQ=="
   647    BlockQuery:
   648      type: object
   649      properties:
   650        block_meta:
   651          type: object
   652          properties:
   653            header:
   654              $ref: "#/definitions/BlockHeader"
   655            block_id:
   656              $ref: "#/definitions/BlockID"
   657        block:
   658          $ref: "#/definitions/Block"
   659    tendermint.liquidity.BaseReq:
   660      type: object
   661      properties:
   662        from:
   663          type: string
   664          example: "cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc"
   665          description: Sender address or Keybase name to generate a transaction
   666        memo:
   667          type: string
   668        chain_id:
   669          type: string
   670        account_number:
   671          type: string
   672          format: uint64
   673        sequence:
   674          type: string
   675          format: uint64
   676        timeout_height:
   677          type: string
   678          format: uint64
   679        fees:
   680          type: array
   681          items:
   682            type: object
   683            properties:
   684              denom:
   685                type: string
   686              amount:
   687                type: string
   688            description: |-
   689              Coin defines a coin with a denomination and an amount.
   690  
   691              NOTE: The amount field is an Int which implements the custom method
   692              signatures required by gogoproto.
   693        gas_prices:
   694          type: array
   695          items:
   696            type: object
   697            properties:
   698              denom:
   699                type: string
   700              amount:
   701                type: string
   702            description: |-
   703              DecCoin defines a coin with a denomination and a decimal amount.
   704  
   705              NOTE: The amount field is an Dec which implements the custom method
   706              signatures required by gogoproto.
   707        gas:
   708          type: string
   709          format: uint64
   710        gas_adjustment:
   711          type: string
   712        simulate:
   713          type: boolean
   714    BaseReq:
   715      type: object
   716      properties:
   717        from:
   718          type: string
   719          example: "cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc"
   720          description: Sender address or Keybase name to generate a transaction
   721        memo:
   722          type: string
   723          example: "Sent via Cosmos Voyager 🚀"
   724        chain_id:
   725          type: string
   726          example: "Cosmos-Hub"
   727        account_number:
   728          type: string
   729          example: "0"
   730        sequence:
   731          type: string
   732          example: "1"
   733        gas:
   734          type: string
   735          example: "200000"
   736        gas_adjustment:
   737          type: string
   738          example: "1.2"
   739        fees:
   740          type: array
   741          items:
   742            $ref: "#/definitions/Coin"
   743        simulate:
   744          type: boolean
   745          example: false
   746          description: Estimate gas for a transaction (cannot be used in conjunction with generate_only)
   747    TendermintValidator:
   748      type: object
   749      properties:
   750        address:
   751          $ref: "#/definitions/ValidatorAddress"
   752        pub_key:
   753          type: string
   754          example: cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf
   755        voting_power:
   756          type: string
   757          example: "1000"
   758        proposer_priority:
   759          type: string
   760          example: "1000"