Cosmos · Schema

Cosmos SDK cosmos.tx.v1beta1 Schemas

JSON Schema definitions for the cosmos.tx.v1beta1 module of the Cosmos SDK gRPC-gateway REST API.

BlockchainCosmosIBCStakingGovernanceDeFiWeb3
View JSON Schema on GitHub

JSON Schema

cosmos-tx-v1beta1.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Cosmos SDK cosmos.tx.v1beta1 Schemas",
  "description": "JSON Schema definitions for the cosmos.tx.v1beta1 module of the Cosmos SDK gRPC-gateway REST API.",
  "definitions": {
    "cosmos.tx.v1beta1.AuthInfo": {
      "type": "object",
      "properties": {
        "signerInfos": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/cosmos.tx.v1beta1.SignerInfo"
          },
          "description": "signer_infos defines the signing modes for the required signers. The number\nand order of elements must match the required signers from TxBody's\nmessages. The first element is the primary signer and the one which pays\nthe fee."
        },
        "fee": {
          "description": "Fee is the fee and gas limit for the transaction. The first signer is the\nprimary signer and the one which pays the fee. The fee can be calculated\nbased on the cost of evaluating the body and doing signature verification\nof the signers. This can be estimated via simulation.",
          "type": "object",
          "properties": {
            "amount": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "denom": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "string"
                  }
                },
                "description": "Coin defines a token with a denomination and an amount.\n\nNOTE: The amount field is an Int which implements the custom method\nsignatures required by gogoproto."
              },
              "title": "amount is the amount of coins to be paid as a fee"
            },
            "gasLimit": {
              "type": "string",
              "format": "uint64",
              "title": "gas_limit is the maximum gas that can be used in transaction processing\nbefore an out of gas error occurs"
            },
            "payer": {
              "type": "string",
              "description": "if unset, the first signer is responsible for paying the fees. If set, the\nspecified account must pay the fees. the payer must be a tx signer (and\nthus have signed this field in AuthInfo). setting this field does *not*\nchange the ordering of required signers for the transaction."
            },
            "granter": {
              "type": "string",
              "title": "if set, the fee payer (either the first signer or the value of the payer\nfield) requests that a fee grant be used to pay fees instead of the fee\npayer's own balance. If an appropriate fee grant does not exist or the\nchain does not support fee grants, this will fail"
            }
          }
        },
        "tip": {
          "description": "Tip is the optional tip used for transactions fees paid in another denom.\n\nThis field is ignored if the chain didn't enable tips, i.e. didn't add the\n`TipDecorator` in its posthandler.",
          "type": "object",
          "properties": {
            "amount": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "denom": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "string"
                  }
                },
                "description": "Coin defines a token with a denomination and an amount.\n\nNOTE: The amount field is an Int which implements the custom method\nsignatures required by gogoproto."
              },
              "title": "amount is the amount of the tip"
            },
            "tipper": {
              "type": "string",
              "title": "tipper is the address of the account paying for the tip"
            }
          }
        }
      },
      "description": "AuthInfo describes the fee and signer modes that are used to sign a\ntransaction."
    },
    "cosmos.tx.v1beta1.BroadcastMode": {
      "type": "string",
      "enum": [
        "BROADCAST_MODE_UNSPECIFIED",
        "BROADCAST_MODE_BLOCK",
        "BROADCAST_MODE_SYNC",
        "BROADCAST_MODE_ASYNC"
      ],
      "default": "BROADCAST_MODE_UNSPECIFIED",
      "description": "BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC\nmethod.\n\n - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering\n - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead,\nBROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards.\n - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits\nfor a CheckTx execution response only.\n - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client\nreturns immediately."
    },
    "cosmos.tx.v1beta1.BroadcastTxRequest": {
      "type": "object",
      "properties": {
        "txBytes": {
          "type": "string",
          "format": "byte",
          "description": "tx_bytes is the raw transaction."
        },
        "mode": {
          "type": "string",
          "enum": [
            "BROADCAST_MODE_UNSPECIFIED",
            "BROADCAST_MODE_BLOCK",
            "BROADCAST_MODE_SYNC",
            "BROADCAST_MODE_ASYNC"
          ],
          "default": "BROADCAST_MODE_UNSPECIFIED",
          "description": "BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC\nmethod.\n\n - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering\n - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead,\nBROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards.\n - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits\nfor a CheckTx execution response only.\n - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client\nreturns immediately."
        }
      },
      "description": "BroadcastTxRequest is the request type for the Service.BroadcastTxRequest\nRPC method."
    },
    "cosmos.tx.v1beta1.BroadcastTxResponse": {
      "type": "object",
      "properties": {
        "txResponse": {
          "description": "tx_response is the queried TxResponses.",
          "type": "object",
          "properties": {
            "height": {
              "type": "string",
              "format": "int64",
              "title": "The block height"
            },
            "txhash": {
              "type": "string",
              "description": "The transaction hash."
            },
            "codespace": {
              "type": "string",
              "title": "Namespace for the Code"
            },
            "code": {
              "type": "integer",
              "format": "int64",
              "description": "Response code."
            },
            "data": {
              "type": "string",
              "description": "Result bytes, if any."
            },
            "rawLog": {
              "type": "string",
              "description": "The output of the application's logger (raw string). May be\nnon-deterministic."
            },
            "logs": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "msgIndex": {
                    "type": "integer",
                    "format": "int64"
                  },
                  "log": {
                    "type": "string"
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "attributes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              }
                            },
                            "description": "Attribute defines an attribute wrapper where the key and value are\nstrings instead of raw bytes."
                          }
                        }
                      },
                      "description": "StringEvent defines en Event object wrapper where all the attributes\ncontain key/value pairs that are strings instead of raw bytes."
                    },
                    "description": "Events contains a slice of Event objects that were emitted during some\nexecution."
                  }
                },
                "description": "ABCIMessageLog defines a structure containing an indexed tx ABCI message log."
              },
              "description": "The output of the application's logger (typed). May be non-deterministic."
            },
            "info": {
              "type": "string",
              "description": "Additional information. May be non-deterministic."
            },
            "gasWanted": {
              "type": "string",
              "format": "int64",
              "description": "Amount of gas requested for transaction."
            },
            "gasUsed": {
              "type": "string",
              "format": "int64",
              "description": "Amount of gas consumed by transaction."
            },
            "tx": {
              "description": "The request transaction bytes.",
              "type": "object",
              "properties": {
                "@type": {
                  "type": "string",
                  "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
                }
              },
              "additionalProperties": {}
            },
            "timestamp": {
              "type": "string",
              "description": "Time of the previous block. For heights > 1, it's the weighted median of\nthe timestamps of the valid votes in the block.LastCommit. For height == 1,\nit's genesis time."
            },
            "events": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "attributes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string"
                        },
                        "index": {
                          "type": "boolean",
                          "title": "nondeterministic"
                        }
                      },
                      "description": "EventAttribute is a single key-value pair, associated with an event."
                    }
                  }
                },
                "description": "Event allows application developers to attach additional information to\nResponseFinalizeBlock and ResponseCheckTx.\nLater, transactions may be queried using these events."
              },
              "description": "Events defines all the events emitted by processing a transaction. Note,\nthese events include those emitted by processing all the messages and those\nemitted from the ante. Whereas Logs contains the events, with\nadditional metadata, emitted only by processing the messages."
            }
          }
        }
      },
      "description": "BroadcastTxResponse is the response type for the\nService.BroadcastTx method."
    },
    "cosmos.tx.v1beta1.Fee": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "denom": {
                "type": "string"
              },
              "amount": {
                "type": "string"
              }
            },
            "description": "Coin defines a token with a denomination and an amount.\n\nNOTE: The amount field is an Int which implements the custom method\nsignatures required by gogoproto."
          },
          "title": "amount is the amount of coins to be paid as a fee"
        },
        "gasLimit": {
          "type": "string",
          "format": "uint64",
          "title": "gas_limit is the maximum gas that can be used in transaction processing\nbefore an out of gas error occurs"
        },
        "payer": {
          "type": "string",
          "description": "if unset, the first signer is responsible for paying the fees. If set, the\nspecified account must pay the fees. the payer must be a tx signer (and\nthus have signed this field in AuthInfo). setting this field does *not*\nchange the ordering of required signers for the transaction."
        },
        "granter": {
          "type": "string",
          "title": "if set, the fee payer (either the first signer or the value of the payer\nfield) requests that a fee grant be used to pay fees instead of the fee\npayer's own balance. If an appropriate fee grant does not exist or the\nchain does not support fee grants, this will fail"
        }
      },
      "description": "Fee includes the amount of coins paid in fees and the maximum\ngas to be used by the transaction. The ratio yields an effective \"gasprice\",\nwhich must be above some minimum to be accepted into the mempool."
    },
    "cosmos.tx.v1beta1.GetBlockWithTxsResponse": {
      "type": "object",
      "properties": {
        "txs": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/cosmos.tx.v1beta1.Tx"
          },
          "description": "txs are the transactions in the block."
        },
        "blockId": {
          "type": "object",
          "properties": {
            "hash": {
              "type": "string",
              "format": "byte"
            },
            "partSetHeader": {
              "type": "object",
              "properties": {
                "total": {
                  "type": "integer",
                  "format": "int64"
                },
                "hash": {
                  "type": "string",
                  "format": "byte"
                }
              },
              "title": "PartsetHeader"
            }
          },
          "title": "BlockID"
        },
        "block": {
          "type": "object",
          "properties": {
            "header": {
              "type": "object",
              "properties": {
                "version": {
                  "title": "basic block info",
                  "type": "object",
                  "properties": {
                    "block": {
                      "type": "string",
                      "format": "uint64"
                    },
                    "app": {
                      "type": "string",
                      "format": "uint64"
                    }
                  },
                  "description": "Consensus captures the consensus rules for processing a block in the blockchain,\nincluding all blockchain data structures and the rules of the application's\nstate transition machine."
                },
                "chainId": {
                  "type": "string"
                },
                "height": {
                  "type": "string",
                  "format": "int64"
                },
                "time": {
                  "type": "string",
                  "format": "date-time"
                },
                "lastBlockId": {
                  "type": "object",
                  "properties": {
                    "hash": {
                      "type": "string",
                      "format": "byte"
                    },
                    "partSetHeader": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "format": "int64"
                        },
                        "hash": {
                          "type": "string",
                          "format": "byte"
                        }
                      },
                      "title": "PartsetHeader"
                    }
                  },
                  "title": "BlockID"
                },
                "lastCommitHash": {
                  "type": "string",
                  "format": "byte",
                  "description": "commit from validators from the last block",
                  "title": "hashes of block data"
                },
                "dataHash": {
                  "type": "string",
                  "format": "byte",
                  "title": "transactions"
                },
                "validatorsHash": {
                  "type": "string",
                  "format": "byte",
                  "description": "validators for the current block",
                  "title": "hashes from the app output from the prev block"
                },
                "nextValidatorsHash": {
                  "type": "string",
                  "format": "byte",
                  "title": "validators for the next block"
                },
                "consensusHash": {
                  "type": "string",
                  "format": "byte",
                  "title": "consensus params for current block"
                },
                "appHash": {
                  "type": "string",
                  "format": "byte",
                  "title": "state after txs from the previous block"
                },
                "lastResultsHash": {
                  "type": "string",
                  "format": "byte",
                  "title": "root hash of all results from the txs from the previous block"
                },
                "evidenceHash": {
                  "type": "string",
                  "format": "byte",
                  "description": "evidence included in the block",
                  "title": "consensus info"
                },
                "proposerAddress": {
                  "type": "string",
                  "format": "byte",
                  "title": "original proposer of the block"
                }
              },
              "description": "Header defines the structure of a block header."
            },
            "data": {
              "type": "object",
              "properties": {
                "txs": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "byte"
                  },
                  "description": "Txs that will be applied by state @ block.Height+1.\nNOTE: not all txs here are valid.  We're just agreeing on the order first.\nThis means that block.AppHash does not include these txs."
                }
              },
              "title": "Data contains the set of transactions included in the block"
            },
            "evidence": {
              "type": "object",
              "properties": {
                "evidence": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "duplicateVoteEvidence": {
                        "type": "object",
                        "properties": {
                          "voteA": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "SIGNED_MSG_TYPE_UNKNOWN",
                                  "SIGNED_MSG_TYPE_PREVOTE",
                                  "SIGNED_MSG_TYPE_PRECOMMIT",
                                  "SIGNED_MSG_TYPE_PROPOSAL"
                                ],
                                "default": "SIGNED_MSG_TYPE_UNKNOWN",
                                "description": "SignedMsgType is a type of signed message in the consensus.\n\n - SIGNED_MSG_TYPE_PREVOTE: Votes\n - SIGNED_MSG_TYPE_PROPOSAL: Proposals"
                              },
                              "height": {
                                "type": "string",
                                "format": "int64"
                              },
                              "round": {
                                "type": "integer",
                                "format": "int32"
                              },
                              "blockId": {
                                "type": "object",
                                "properties": {
                                  "hash": {
                                    "type": "string",
                                    "format": "byte"
                                  },
                                  "partSetHeader": {
                                    "type": "object",
                                    "properties": {
                                      "total": {
                                        "type": "integer",
                                        "format": "int64"
                                      },
                                      "hash": {
                                        "type": "string",
                                        "format": "byte"
                                      }
                                    },
                                    "title": "PartsetHeader"
                                  }
                                },
                                "title": "BlockID",
                                "description": "zero if vote is nil."
                              },
                              "timestamp": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "validatorAddress": {
                                "type": "string",
                                "format": "byte"
                              },
                              "validatorIndex": {
                                "type": "integer",
                                "format": "int32"
                              },
                              "signature": {
                                "type": "string",
                                "format": "byte",
                                "description": "Vote signature by the validator if they participated in consensus for the\nassociated block."
                              },
                              "extension": {
                                "type": "string",
                                "format": "byte",
                                "description": "Vote extension provided by the application. Only valid for precommit\nmessages."
                              },
                              "extensionSignature": {
                                "type": "string",
                                "format": "byte",
                                "description": "Vote extension signature by the validator if they participated in\nconsensus for the associated block.\nOnly valid for precommit messages."
                              }
                            },
                            "description": "Vote represents a prevote or precommit vote from validators for\nconsensus."
                          },
                          "voteB": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "SIGNED_MSG_TYPE_UNKNOWN",
                                  "SIGNED_MSG_TYPE_PREVOTE",
                                  "SIGNED_MSG_TYPE_PRECOMMIT",
                                  "SIGNED_MSG_TYPE_PROPOSAL"
                                ],
                                "default": "SIGNED_MSG_TYPE_UNKNOWN",
                                "description": "SignedMsgType is a type of signed message in the consensus.\n\n - SIGNED_MSG_TYPE_PREVOTE: Votes\n - SIGNED_MSG_TYPE_PROPOSAL: Proposals"
                              },
                              "height": {
                                "type": "string",
                                "format": "int64"
                              },
                              "round": {
                                "type": "integer",
                                "format": "int32"
                              },
                              "blockId": {
                                "type": "object",
                                "properties": {
                                  "hash": {
                                    "type": "string",
                                    "format": "byte"
                                  },
                                  "partSetHeader": {
                                    "type": "object",
                                    "properties": {
                                      "total": {
                                        "type": "integer",
                                        "format": "int64"
                                      },
                                      "hash": {
                                        "type": "string",
                                        "format": "byte"
                                      }
                                    },
                                    "title": "PartsetHeader"
                                  }
                                },
                                "title": "BlockID",
                                "description": "zero if vote is nil."
                              },
                              "timestamp": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "validatorAddress": {
                                "type": "string",
                                "format": "byte"
                              },
                              "validatorIndex": {
                                "type": "integer",
                                "format": "int32"
                              },
                              "signature": {
                                "type": "string",
                                "format": "byte",
                                "description": "Vote signature by the validator if they participated in consensus for the\nassociated block."
                              },
                              "extension": {
                                "type": "string",
                                "format": "byte",
                                "description": "Vote extension provided by the application. Only valid for precommit\nmessages."
                              },
                              "extensionSignature": {
                                "type": "string",
                                "format": "byte",
                                "description": "Vote extension signature by the validator if they participated in\nconsensus for the associated block.\nOnly valid for precommit messages."
                              }
                            },
                            "description": "Vote represents a prevote or precommit vote from validators for\nconsensus."
                          },
                          "totalVotingPower": {
                            "type": "string",
                            "format": "int64"
                          },
                          "validatorPower": {
                            "type": "string",
                            "format": "int64"
                          },
                          "timestamp": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "description": "DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes."
                      },
                      "lightClientAttackEvidence": {
                        "type": "object",
                        "properties": {
                          "conflictingBlock": {
                            "type": "object",
                            "properties": {
                              "signedHeader": {
                                "type": "object",
                                "properties": {
                                  "header": {
                                    "type": "object",
                                    "properties": {
                                      "version": {
                                        "title": "basic block info",
                                        "type": "object",
                                        "properties": {
                                          "block": {
                                            "type": "string",
                                            "format": "uint64"
                                          },
                                          "app": {
                                            "type": "string",
                                            "format": "uint64"
                                          }
                                        },
                                        "description": "Consensus captures the consensus rules for processing a block in the blockchain,\nincluding all blockchain data structures and the rules of the application's\nstate transition machine."
                                      },
                                      "chainId": {
                                        "type": "string"
                                      },
                                      "height": {
                                        "type": "string",
                                        "format": "int64"
                                      },
                                      "time": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "lastBlockId": {
                                        "type": "object",
                                        "properties": {
                                          "hash": {
                                            "type": "string",
                                            "format": "byte"
                                          },
                                          "partSetHeader": {
                                            "type": "object",
                        

# --- truncated at 32 KB (116 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/cosmos/refs/heads/main/json-schema/cosmos-tx-v1beta1.json