diff --git a/docs/blockchain-cli/README.md b/docs/blockchain-cli/README.md new file mode 100644 index 000000000..795900f41 --- /dev/null +++ b/docs/blockchain-cli/README.md @@ -0,0 +1,226 @@ +# Blockchain Command-Line Interface + +> [!NOTE] +> Since Greenfield Command Line interface is derived from Cosmos, The majority of the content in this page is copied from the [Cosmos SDK](https://docs.cosmos.network/main/core/cli). + +There is no set way to create a CLI, but Greenfield typically use the [Cobra Library](https://github.com/spf13/cobra). +Building a CLI with Cobra entails defining commands, arguments, and flags. Commands understand the +actions users wish to take, such as `tx` for creating a transaction and `query` for querying the application. +Each command can also have nested subcommands, necessary for naming the specific transaction type. +Users also supply **Arguments**, such as account numbers to send coins to, and flags to modify various +aspects of the commands, such as gas prices or which node to broadcast to. + +### Transaction Command +Here is an example of a command a user might enter to interact with `gnfd` in order to send some tokens: + +```bash +gnfd tx bank send $MY_ADDRESS $RECIPIENT 1000BNB --gas auto +``` + +The first four strings specify the command: + +* The subcommand `tx`, which contains all commands that let users create transactions. +* The subcommand `bank` to indicate which module to route the command to `x/bank` module in this case. +* The type of transaction `send`. + +The next two strings are arguments: the `from_address` the user wishes to send from, the `to_address` of the recipient, +and the `amount` they want to send. Finally, the last few strings of the command are optional flags to indicate +how much the user is willing to pay in fees. + +### Transaction Data +Greenfield utilizes the EIP712 transaction format. To view the transaction data, you can use the `print-eip712-msg-type` flag. +Below is an example of how to display the transaction data of sending tokens. + +```shell +gnfd tx bank send $MY_ADDRESS $RECIPIENT 1000BNB --print-eip712-msg-type +``` + +From the output, we can obtain the following three fields: + +1. **EIP712MessageType**: This field represents the EIP712 messages format of the transaction. +```json +{ + "Coin": [ + { + "name": "amount", + "type": "uint256" + }, + { + "name": "denom", + "type": "string" + } + ], + "EIP712Domain": [ + { + "name": "chainId", + "type": "uint256" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "salt", + "type": "string" + }, + { + "name": "verifyingContract", + "type": "string" + }, + { + "name": "version", + "type": "string" + } + ], + "Fee": [ + { + "name": "amount", + "type": "Coin[]" + }, + { + "name": "gas_limit", + "type": "uint256" + }, + { + "name": "granter", + "type": "string" + }, + { + "name": "payer", + "type": "string" + } + ], + "Msg1": [ + { + "name": "amount", + "type": "TypeMsg1Amount[]" + }, + { + "name": "from_address", + "type": "string" + }, + { + "name": "to_address", + "type": "string" + }, + { + "name": "type", + "type": "string" + } + ], + "Tx": [ + { + "name": "account_number", + "type": "uint256" + }, + { + "name": "chain_id", + "type": "uint256" + }, + { + "name": "fee", + "type": "Fee" + }, + { + "name": "memo", + "type": "string" + }, + { + "name": "msg1", + "type": "Msg1" + }, + { + "name": "sequence", + "type": "uint256" + }, + { + "name": "timeout_height", + "type": "uint256" + } + ], + "TypeMsg1Amount": [ + { + "name": "amount", + "type": "string" + }, + { + "name": "denom", + "type": "string" + } + ] +} +``` + +2. **MessageData**: This field represents the messages data of the transaction, displayed in a readable format. +```json +{ + "msg1": { + "amount": [ + { + "amount": "1000", + "denom": "BNB" + } + ], + "from_address": "0x0aA5170C854AA093e1c32F15285dE4Bf7f6802Ce", + "to_address": "0x2123B607e1b9E8Ae65FbE12585C1bE6838Bb32C7", + "type": "/cosmos.bank.v1beta1.MsgSend" + } +} +``` + +3. **TxRawBytes**: This field represents the encoded byte array of the transaction. +```json +0a88010a85010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412650a2a307830614135313730433835344141303933653163333246313532383564453442663766363830324365122a3078323132334236303765316239453841653635466245313235383543316245363833384262333243371a0b0a03424e4212043130303012021200 +``` + +Once you have obtained these three fields of the transaction, you can use `gnfd-tx-sender` to send the transaction +instead of using a command. Here are the steps: + +1. Visit the [gnfd-tx-sender](https://gnfd-tx-sender.nodereal.io/) website. +2. Connect your wallet and switch to the correct network. +3. Navigate to the `Custom Tx` page and fill in the aforementioned three fields accordingly. +4. Click the `Submit` button and sign in the wallet when prompted. +5. Wait for confirmation. + +### Query Commands + +Queries are objects that allow users to retrieve information about the application's state. + +This `queryCommand` function adds all the queries available to end-users for the application. This typically includes: + +* **QueryTx** and/or other transaction query commands from the `auth` module which allow the user to search for a transaction by inputting its hash, a list of tags, or a block height. These queries allow users to see if transactions have been included in a block. +* **Account command** from the `auth` module, which displays the state (e.g. account balance) of an account given an address. +* **Validator command** from the Cosmos SDK rpc client tools, which displays the validator set of a given height. +* **Block command** from the Cosmos SDK rpc client tools, which displays the block data for a given height. +* **All module query commands the application is dependent on, + +Here is an example of a `queryCommand`: + +```shell +## query the metadata of BNB +gnfd q bank denom-metadata --node https://greenfield-chain.bnbchain.org:443 +``` + +## Environment variables + +Each flag is bound to its respective named environment variable. Then name of the environment variable consist of two parts +- capital case `basename` followed by flag name of the flag. `-` must be substituted with `_`. +- For example flag `--home` for application with basename `GNFD` is bound to `GNFD_HOME`. It allows reducing +the amount of flags typed for routine operations. For example instead of: + +```sh +gnfd --home=./ --node= --chain-id="greenfield_1017-1" tx ... --from= +``` + +this will be more convenient: + +```sh +# define env variables in .env, .envrc etc +GNFD_HOME= +GNFD_NODE= +GNFD_CHAIN_ID="greenfield_1017-1" +GNFD_KEYRING_BACKEND="file" + +# and later just use +gnfd tx ... --from= +``` diff --git a/docs/blockchain-cli/bank.md b/docs/blockchain-cli/bank.md new file mode 100644 index 000000000..4fdf9db62 --- /dev/null +++ b/docs/blockchain-cli/bank.md @@ -0,0 +1,167 @@ +# Account Balance + +## Abstract +The bank module is responsible for handling BNB transfers between +accounts and module accounts. + +In addition, the bank module tracks and provides query support for the total +supply of BNB in the application. + +## Quick Start + +### Query Balances + +To query the balances of an account, you can use the following command. + +```shell +gnfd q bank balances ${receiver} --node ${node} +``` + +You can specify any valid address you want to query via ${receiver}. + + +${node} is the rpc address of a Greenfield node. + +- Mainnet + + ```js + node = "https://greenfield-chain.bnbchain.org:443" + ``` + +- Testnet + + ```js + node = "https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org:443" + ``` + + +### Send + +To transfer some coins you can use `send` command. +```shell +gnfd tx bank send ${key} ${receiver} ${coins} --home ~/.gnfd --node ${node} -y +``` + +${key} is the name of local key. + +${coins} defines the coins you want to transfer, for example, `500000000000000000000BNB`. + +### Multi-send + +Sometimes, you may want to transfer tokens to multiple people. `multi-send` command can be used for the purpose. + +```shell +gnfd tx bank multi-send ${key} ${receiver1} ${receiver2} ${coins} --home ~/.gnfd --node ${node} -y +``` + +## Detailed CLI + +A user can query and interact with the `bank` module using the CLI. + +### Query + +The `query` commands allow users to query `bank` state. + +```sh +gnfd query bank --help +``` + +#### balances + +The `balances` command allows users to query account balances by address. + +```sh +gnfd query bank balances [address] [flags] +``` + +Example: + +```sh +gnfd query bank balances 0x73a4Cf67b46D7E4efbb95Fc6F59D64129299c2E3 +``` + +Example Output: + +```yml +balances: +- amount: "10000000000000000000000" + denom: BNB +pagination: + next_key: null + total: "0" +``` + +#### denom-metadata + +The `denom-metadata` command allows users to query metadata for coin denominations. A user can query metadata for a single denomination using the `--denom` flag or all denominations without it. + +```sh +gnfd query bank denom-metadata [flags] +``` + +Example: + +```sh +gnfd query bank denom-metadata --denom BNB +``` + +Example Output: + +```yml +metadata: + base: BNB + denom_units: + - aliases: + - wei + denom: BNB + exponent: 0 + description: The native staking token of the Greenfield. + display: BNB + name: "" + symbol: "" + uri: "" + uri_hash: "" +``` + +#### total + +The `total` command allows users to query the total supply of coins. A user can query the total supply for a single coin using the `--denom` flag or all coins without it. + +```sh +gnfd query bank total [flags] +``` + +Example: + +```sh +gnfd query bank total --denom BNB +``` + +Example Output: + +```yml +amount: "1000000000000000800000000000" +denom: BNB +``` + +### Transactions + +The `tx` commands allow users to interact with the `bank` module. + +```sh +gnfd tx bank --help +``` + +#### send + +The `send` command allows users to send funds from one account to another. + +```sh +gnfd tx bank send [from_key_or_address] [to_address] [amount] [flags] +``` + +Example: + +```sh +gnfd tx bank send addr1.. addr2.. 100000000000000000000BNB +``` \ No newline at end of file diff --git a/docs/blockchain-cli/bridge.md b/docs/blockchain-cli/bridge.md new file mode 100644 index 000000000..730dc0a93 --- /dev/null +++ b/docs/blockchain-cli/bridge.md @@ -0,0 +1,105 @@ +# Cross Chain Transfer + +## Abstract +The bridge module is responsible for handling the BNB transfers between Greenfield and BSC. + +Users can transfer BNB to BSC via gnfd command, and query the relayer fee for the cross-chain transfers. + +## Quick Start + +### Query Relayer Fee + +For cross-chain transaction, some amount of fee will be paid to cross-chain relayers. + +To query the fees, please use the following command. + +```shell +gnfd q bridge params --node ${node} +``` + +${node} is the rpc address of a Greenfield node. + +- Mainnet + + ```js + node = "https://greenfield-chain.bnbchain.org:443" + ``` + +- Testnet + + ```js + node = "https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org:443" + ``` + + + +### Transfer from Greenfield to BSC + +To transfer funds from Greenfield to BSC, you can use the following command: + +```shell +gnfd tx bridge transfer-out ${key} ${receiver} ${coins} --home ~/.gnfd --node ${node} -y +``` + +${key} is the name of local key. + +${coins} defines the coins you want to transfer, for example, `500000000000000000000BNB`. + +${receiver} defines the address on BSC, which will receive the funds. + + +## Detailed CLI + +A user can query and interact with the `bridge` module using the CLI. + +### Query + +The `query` commands allow users to query the params of the `bridge` module. + +```sh +gnfd query bridge --help +``` + +#### params + +The `params` command allows users to query the params of the `bridge` module. + +```sh +gnfd query bridge params [flags] +``` + +Example: + +```sh +gnfd query bridge params --node https://greenfield-chain.bnbchain.org:443 +``` + +Example Output: + +```yml +params: + transfer_out_ack_relayer_fee: "0" + transfer_out_relayer_fee: "1" +``` + +### Transactions + +The `tx` commands allow users to interact with the `bridge` module. + +```sh +gnfd tx bridge --help +``` + +#### transfer-out + +The `transfer-out` command allows users to send funds between accounts from Greenfield to BSC. + +```sh +gnfd tx bridge transfer-out [from_key_or_address] [to_address] [amount] [flags] +``` + +Example: + +```sh +gnfd tx bridge transfer-out alice 0x32Ff14Fa1547314b95991976DB432F9Aa648A423 500000000000000000000BNB --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 -y +``` \ No newline at end of file diff --git a/docs/blockchain-cli/challenge.md b/docs/blockchain-cli/challenge.md new file mode 100644 index 000000000..287ce8fa4 --- /dev/null +++ b/docs/blockchain-cli/challenge.md @@ -0,0 +1,187 @@ +# Challenge + +## Abstract +The challenge module is responsible for handling on-chain challenges that are either generated or submitted by users. + +Users can submit a challenge and query the latest attested challenges through cli commands. + +## Quick Start + +### Submit a Challenge + +When you find your stored object is tampered or missing, you can submit a challenge by the following command: + +```shell +gnfd tx challenge submit ${sp-operator-address} ${bucket-name} ${object-name} ${random-index} ${segment-index} --from ${key} --node ${node} -y +``` + +${key} is the name of local key. + +${bucket-name} and ${object-name} specify which object you want to submit challenge for. + +${random-index} ${segment-index} specify which segment of the object you want to submit challenge for. If you do not know the index, you can set ${random-index} to `true`. + +${node} is the rpc address of a Greenfield node. + +- Mainnet + + ```js + node = "https://greenfield-chain.bnbchain.org:443" + ``` + +- Testnet + + ```js + node = "https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org:443" + ``` + +## Detailed CLI + +A user can query and interact with the `challenge` module using the CLI. + +### Query + +The `query` commands allow users to query `challenge` state. + +```sh +gnfd query challenge --help +``` + +#### params + +The `params` command allows users to query the current settings for the `challenge` module. + +```sh +gnfd query challenge params [flags] +``` + +Example: + +```sh +gnfd query challenge params --node https://greenfield-chain.bnbchain.org:443 +``` + +Example Output: + +```yml +params: + attestation_inturn_interval: "600" + attestation_kept_count: "300" + challenge_count_per_block: "1" + challenge_keep_alive_period: "300" + heartbeat_interval: "200" + reward_submitter_ratio: "0.001000000000000000" + reward_submitter_threshold: "1000000000000000" + reward_validator_ratio: "0.900000000000000000" + slash_amount_max: "100000000000000000" + slash_amount_min: "10000000000000000" + slash_amount_size_rate: "0.008500000000000000" + slash_cooling_off_period: "300" + sp_slash_counting_window: "43200" + sp_slash_max_amount: "500000000000000000" +``` + +#### latest-attested-challenges + +The `latest-attested-challenges` command allows users to query the latest challenges that have been attested by validators. + +Be noted, only the latest `attestation_kept_count` challenges will be returned. + +```sh +gnfd query challenge latest-attested-challenges [flags] +``` + +Example: + +```sh +gnfd query challenge latest-attested-challenges --node https://greenfield-chain.bnbchain.org:443 +``` + +Example Output: + +```yml + - id: "400" + result: CHALLENGE_FAILED + - id: "461" + result: CHALLENGE_SUCCEED +``` + +#### attested-challenge + +The `attested-challenge` command allows users to query a specific challenge that have been attested by validators. + +Be noted, for the challenge results will be pruned, only the challenge within the latest `attestation_kept_count` +challenges will be used to serve this query. + +```sh +gnfd query challenge attested-challenge [id] [flags] +``` + +Example: + +```sh +gnfd query challenge attested-challenge 1 --node https://greenfield-chain.bnbchain.org:443 +``` + +Example Output: + +```yml + - id: "400" + result: CHALLENGE_FAILED +``` + +#### inturn-attestation-submitter + +The `inturn-attestation-submitter` command allows users to query the off-chain challenger service that is currently in charge of attesting. + +```sh +gnfd query challenge inturn-attestation-submitter [flags] +``` + +Example: + +```sh +gnfd query challenge inturn-attestation-submitter --node https://greenfield-chain.bnbchain.org:443 +``` + +Example Output: + +```yml +bls_pub_key: 828e81c5c39.. +submit_interval: + end: "1681960490" + start: "1681960480" +``` + +### Transactions + +The `tx` commands allow users to interact with the `challenge` module. + +```sh +gnfd tx challenge [command] --help +``` + +#### submit + +The `submit` command allows users to submit a challenge for an object stored by any storage provider. + +```sh +gnfd tx challenge submit [sp-operator-address] [bucket-name] [object-name] [random-index] [segment-index] [flags] +``` + +Example: + +```sh +gnfd tx challenge submit 0x950E2FBD285BC42E30EA69A8C1AB17EEDC70C447 ch69bd3t tq true 0 --node https://greenfield-chain.bnbchain.org:443 --from alice +``` + +After the tx submitted, you can find the challenge id in `greenfield.challenge.EventStartChallenge` event by accessing https://greenfield-chain.bnbchain.org:443/tx?hash=0x_prefixed_tx_hash. + +Usually the challenge will be handled within minutes, and the result of the challenge can be queried using the following command. +However, be noted, the result is not kept forever, and only the latest `attestation_kept_count` challenge results will be kept. + +```shell +gnfd query challenge latest-attested-challenges --node https://greenfield-chain.bnbchain.org:443 +``` + +The result of the challenge can be queried by the above query commands, or using the the `AttestedChallenge`, `LatestAttestedChallenges` methods through [GRPC swagger](https://greenfield-chain.bnbchain.org/openapi). diff --git a/docs/blockchain-cli/governance.md b/docs/blockchain-cli/governance.md new file mode 100644 index 000000000..080585b78 --- /dev/null +++ b/docs/blockchain-cli/governance.md @@ -0,0 +1,627 @@ +# On-chain Governance + +## Abstract + +In Greenfield, users can submit proposals for on-chain governance. +These proposals can include updates to blockchain parameters or cross-chain configurations, +or execution of some messages (e.g., create storage provider). +Once a proposal is submitted, it must be accompanied by a deposit that exceeds +the `Min Deposit` parameter (which is 1 BNB on the mainnet). +If the deposit is not met, the proposal will not be open for voting. +However, the submitter is not required to provide the deposit in its entirety. +Other users can contribute to the deposit, and if the total deposit exceeds the Min Deposit parameter, +the proposal will be open for voting. Then, the proposal will be voted on whether to accept or reject it. + +## Quick Start + +#### Query a Proposal + +With the id of a proposal, you can query the details of id by the following command: + +```shell +gnfd query gov proposal ${proposal_id} --node ${node} +``` + +${proposal_id} specifies the id of the proposal you want to query. + +${node} is the rpc address of a Greenfield node. + +- Mainnet + + ```js + node = "https://greenfield-chain.bnbchain.org:443" + ``` + +- Testnet + + ```js + node = "https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org:443" + ``` + +#### Submit a Proposal + +To submit a proposal, you can use: + +```shell +gnfd tx gov submit-proposal ${proposal_file} --from ${key} --home ~/.gnfd --node ${node} -y +``` + +The proposal you want to execute, e.g., a blockchain message, is defined by the content of ${proposal_file}. + +Please refer to [submit proposal](#submit-a-proposal) for some examples. + +#### Deposit + +Once the proposal is submitted, anyone can deposit to it before expiration. + +```shell +gnfd tx gov deposit ${proposal_id} ${coins} --from ${key} --node ${node} -y +``` + +${coins} defines the coins you want to deposit to the proposal, for example `100000BNB`. + +#### Vote + +To vote a proposal, the following command can be used: + +```shell +gnfd tx gov vote ${proposal_id} ${option} --from ${key} --home ~./gnfd --node ${node} -y +``` + +${option} defines whether you want to vote `yes`, `no`, `no_with_veto`, or `abstain`. + + +## Detailed CLI + +### Query + +The CLI `query` commands allow users to query `gov` state. + +```sh +gnfd query gov help +``` +#### deposit + +The `deposit` command allows users to query a deposit for a given proposal from a given depositor. + +```sh +$ gnfd query gov deposit [proposal-id] [depositer-addr] [flags] +``` + +Example: + +```bash +gnfd query gov deposit 4 0x50508768BD41e5CD4A82A0fBc38C14d3bEA45A78 +``` + +Example Output: + +```bash +amount: +- amount: "200" + denom: BNB +depositor: 0x50508768BD41e5CD4A82A0fBc38C14d3bEA45A78 +proposal_id: "4" +``` + +#### deposits + +The `deposits` command allows users to query all deposits for a given proposal. + +```bash +gnfd query gov deposits [proposal-id] [flags] +``` + +Example: + +```bash +gnfd query gov deposits 4 +``` + +Example Output: + +```bash +deposits: +- amount: + - amount: "200" + denom: BNB + depositor: 0x50508768BD41e5CD4A82A0fBc38C14d3bEA45A78 + proposal_id: "4" +pagination: + next_key: null + total: "0" +``` + +#### param + +The `param` command allows users to query a given parameter for the `gov` module. + +```bash +gnfd query gov param [param-type] [flags] +``` + +Example: + +```bash +gnfd query gov param deposit +``` + +Example Output: + +```bash +max_deposit_period: "300000000000" +min_deposit: +- amount: "1000000000000000000" + denom: BNB +``` + +#### params + +The `params` command allows users to query all parameters for the `gov` module. + +```bash +gnfd query gov params [flags] +``` + +Example: + +```bash +gnfd query gov params +``` + +Example Output: + +```bash +deposit_params: + max_deposit_period: "300000000000" + min_deposit: + - amount: "1000000000000000000" + denom: BNB +tally_params: + quorum: "0.334000000000000000" + threshold: "0.500000000000000000" + veto_threshold: "0.334000000000000000" +voting_params: + voting_period: "300000000000" +``` + +#### proposal + +The `proposal` command allows users to query a given proposal. + +```bash +gnfd query gov proposal [proposal-id] [flags] +``` + +Example: + +```bash +gnfd query gov proposal 6 +``` + +Example Output: + +```bash +deposit_end_time: "2023-02-21T11:30:01.519490Z" +final_tally_result: + abstain_count: "0" + no_count: "0" + no_with_veto_count: "0" + yes_count: "10000000000000000000000000" +id: "6" +messages: +- '@type': /cosmos.gov.v1.MsgExecLegacyContent + authority: 0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2 + content: + '@type': /cosmos.params.v1beta1.ParameterChangeProposal + changes: + - key: RelayerTimeout + subspace: oracle + value: '"100"' + description: change + title: test change params +metadata: "" +status: PROPOSAL_STATUS_PASSED +submit_time: "2023-02-21T11:25:01.519490Z" +total_deposit: +- amount: "1000000000000000200" + denom: BNB +voting_end_time: "2023-02-21T11:30:36.733936Z" +voting_start_time: "2023-02-21T11:25:36.733936Z" +``` + +#### proposals + +The `proposals` command allows users to query all proposals with optional filters. + +```bash +gnfd query gov proposals [flags] +``` + +Example: + +```bash +gnfd query gov proposals +``` + +Example Output: + +```bash +pagination: + next_key: null + total: "0" +proposals: +- deposit_end_time: "2023-02-21T10:43:28.710910Z" + final_tally_result: + abstain_count: "0" + no_count: "0" + no_with_veto_count: "0" + yes_count: "10000000000000000000000000" + id: "1" + messages: + - '@type': /bnbchain.greenfield.sp.MsgCreateStorageProvider + approval_address: 0x7aFEf7876FE8bf0b805d8dF9d6bE0dD1CD798E29 + creator: 0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2 + deposit: + amount: "10000000000000000000000" + denom: BNB + description: + details: "" + identity: "" + moniker: sp0 + security_contact: "" + website: "" + endpoint: sp0.greenfield.io + funding_address: 0x0ffF366CccF2FD21445ACe1f19d316951F4144CC + seal_address: 0x7Bc6Eb822b7B8419037cce5F4Cb50209Dfc7CDbD + sp_address: 0xba73b99Bfba6B3df6398c7c4C2c916A28c26d100 + metadata: 4pIMOgIGx1vZGU= + status: PROPOSAL_STATUS_PASSED + submit_time: "2023-02-21T10:38:28.710910Z" + total_deposit: + - amount: "2000000000000000000" + denom: BNB + voting_end_time: "2023-02-21T10:43:28.710910Z" + voting_start_time: "2023-02-21T10:38:28.710910Z" +- deposit_end_time: "2023-02-21T10:43:58.917763Z" + final_tally_result: + abstain_count: "0" + no_count: "0" + no_with_veto_count: "0" + yes_count: "10000000000000000000000000" + id: "2" + messages: + - '@type': /bnbchain.greenfield.sp.MsgCreateStorageProvider + approval_address: 0x3CE5E18B05Fd349801DBa9e98E0aB694E2B8C985 + creator: 0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2 + deposit: + amount: "10000000000000000000000" + denom: BNB + description: + details: "" + identity: "" + moniker: sp1 + security_contact: "" + website: "" + endpoint: sp1.greenfield.io + funding_address: 0xa2D705f57D4c50F5c7694590187A62171a149836 + seal_address: 0x53ADC854036F14E0bb989F4Ba3104d66A95FB7C4 + sp_address: 0x93B6cFf6EdB72Fd15ff32DAbC6cd6F9b17C51bd8 + metadata: 4pIMOgIGx1vZGU= + status: PROPOSAL_STATUS_PASSED + submit_time: "2023-02-21T10:38:58.917763Z" + total_deposit: + - amount: "2000000000000000000" + denom: BNB + voting_end_time: "2023-02-21T10:43:58.917763Z" + voting_start_time: "2023-02-21T10:38:58.917763Z" +- deposit_end_time: "2023-02-21T10:44:29.103061Z" + final_tally_result: + abstain_count: "0" + no_count: "0" + no_with_veto_count: "0" + yes_count: "10000000000000000000000000" + id: "3" + messages: + - '@type': /bnbchain.greenfield.sp.MsgCreateStorageProvider + approval_address: 0x8AFa83E423fb3C0D1ED30761730b742963897C8c + creator: 0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2 + deposit: + amount: "10000000000000000000000" + denom: BNB + description: + details: "" + identity: "" + moniker: sp2 + security_contact: "" + website: "" + endpoint: sp2.greenfield.io + funding_address: 0xf54B0622BbA7eE596E688A0a993267583078327f + seal_address: 0xb6eCa481Cb3C1861aD9f4D65F5a014aAcD0ebbc5 + sp_address: 0xc52E29c12a16f9CC37Ef1728C05b0129187564d2 + metadata: 4pIMOgIGx1vZGU= + status: PROPOSAL_STATUS_PASSED + submit_time: "2023-02-21T10:39:29.103061Z" + total_deposit: + - amount: "2000000000000000000" + denom: BNB + voting_end_time: "2023-02-21T10:44:29.103061Z" + voting_start_time: "2023-02-21T10:39:29.103061Z" +- deposit_end_time: "2023-02-21T11:30:01.519490Z" + final_tally_result: + abstain_count: "0" + no_count: "0" + no_with_veto_count: "0" + yes_count: "10000000000000000000000000" + id: "6" + messages: + - '@type': /cosmos.gov.v1.MsgExecLegacyContent + authority: 0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2 + content: + '@type': /cosmos.params.v1beta1.ParameterChangeProposal + changes: + - key: RelayerTimeout + subspace: oracle + value: '"100"' + description: change + title: test change params + metadata: "" + status: PROPOSAL_STATUS_PASSED + submit_time: "2023-02-21T11:25:01.519490Z" + total_deposit: + - amount: "1000000000000000200" + denom: BNB + voting_end_time: "2023-02-21T11:30:36.733936Z" + voting_start_time: "2023-02-21T11:25:36.733936Z" +``` + +#### proposer + +The `proposer` command allows users to query the proposer for a given proposal. + +```bash +gnfd query gov proposer [proposal-id] [flags] +``` + +Example: + +```bash +gnfd query gov proposer 1 +``` + +Example Output: + +```bash +proposal_id: "6" +proposer: 0x50508768BD41e5CD4A82A0fBc38C14d3bEA45A78 +``` + +#### tally + +The `tally` command allows users to query the tally of a given proposal vote. + +```bash +gnfd query gov tally [proposal-id] [flags] +``` + +Example: + +```bash +gnfd query gov tally 1 +``` + +Example Output: + +```bash +abstain_count: "0" +no_count: "0" +no_with_veto_count: "0" +yes_count: "10000000000000000000000000" +``` + +#### vote + +The `vote` command allows users to query a vote for a given proposal. + +```bash +gnfd query gov vote [proposal-id] [voter-addr] [flags] +``` + +Example: + +```bash +gnfd query gov vote 7 0x8313D43DdA0958e11Fb8840DC75540d0755859F3 +``` + +Example Output: + +```bash +metadata: "" +options: +- option: VOTE_OPTION_YES + weight: "1.000000000000000000" +proposal_id: "7" +voter: 0x8313D43DdA0958e11Fb8840DC75540d0755859F3 +``` + +#### votes + +The `votes` command allows users to query all votes for a given proposal. + +```bash +gnfd query gov votes [proposal-id] [flags] +``` + +Example: + +```bash +gnfd query gov votes 7 +``` + +Example Output: + +```bash +pagination: + next_key: null + total: "0" +votes: +- metadata: "" + options: + - option: VOTE_OPTION_YES + weight: "1.000000000000000000" + proposal_id: "7" + voter: 0x8313D43DdA0958e11Fb8840DC75540d0755859F3 +``` + +### Transactions + +The `tx` commands allow users to interact with the `gov` module. + +```bash +gnfd tx gov --help +``` + +#### deposit + +The `deposit` command allows users to deposit tokens for a given proposal. + +```bash +gnfd tx gov deposit [proposal-id] [deposit] [flags] +``` + +Example: + +```bash +gnfd tx gov deposit 1 1000000000000000000BNB --from 0x50508768BD41e5CD4A82A0fBc38C14d3bEA45A78 +``` + +#### draft-proposal + +The `draft-proposal` creates a draft for any type of proposal. + +```bash +gnfd tx gov draft-proposal +``` + +#### submit-proposal + +The `submit-proposal` submits a governance proposal along with messages and metadata defined in json file + +```bash +gnfd tx gov submit-proposal [path-to-proposal-json] [flags] +``` + +Example: + +##### Greenfield module parameter change proposal + +```bash +gnfd tx gov submit-proposal /path/to/proposal.json --from 0x2737dca53A25120358f4811c762f71712eF23aFE +``` + +```json + +{ + "messages": [ + { + "@type": "/cosmos.gov.v1.MsgExecLegacyContent", + "content": { + "@type": "/cosmos.params.v1beta1.ParameterChangeProposal", + "title": "Oracle params change", + "description": "Change", + "changes": [ + { + "subspace": "oracle", + "key": "RelayerTimeout", + "value": "\"100\"" + } + ] + }, + "authority": "0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2" + } + ], + "metadata": "4pIMOgIGx1vZGU=", + "deposit": "1000000000000000000BNB" +} +``` + +##### BSC smart contract parameter change proposal + +```json +{ + "messages": [ + { + "@type": "/cosmos.gov.v1.MsgExecLegacyContent", + "content": { + "@type": "/cosmos.params.v1beta1.ParameterChangeProposal", + "title": "BSC smart contract parameter change", + "description": "change contract parameter", + "changes": [ + { + "subspace": "BSC", + "key": "batchSizeForOracle", + "value": "0000000000000000000000000000000000000000000000000000000000000033" + } + ], + "cross_chain": true, + "addresses": ["0x6c615C766EE6b7e69275b0D070eF50acc93ab880"] + }, + "authority": "0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2" + } + ], + "metadata": "4pIMOgIGx1vZGU=", + "deposit": "1000000000000000000BNB" +} +``` + + +##### BSC smart contract upgrade proposal + +```json +{ + "messages": [ + { + "@type": "/cosmos.gov.v1.MsgExecLegacyContent", + "content": { + "@type": "/cosmos.params.v1beta1.ParameterChangeProposal", + "title": "upgrade GovHub and CrossChain", + "description": "upgrade GovHub and CrossChain", + "changes": [ + { + "subspace": "BSC", + "key": "upgrade", + "value": "0x8f86403A4DE0BB5791fa46B8e795C547942fE4Cf" + }, + { + "subspace": "BSC", + "key": "upgrade", + "value": "0x9d4454B023096f34B160D6B654540c56A1F81688" + } + ], + "cross_chain": true, + "addresses": [ + "0x6c615C766EE6b7e69275b0D070eF50acc93ab880", + "0x04ED4ad3cDe36FE8ba944E3D6CFC54f7Fe6c3C72" + ] + }, + "authority": "0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2" + } + ], + "metadata": "4pIMOgIGx1vZGU=", + "deposit": "1000000000000000000BNB" +} +``` + +#### vote + +The `vote` command allows users to submit a vote for a given proposal. + +```shell +gnfd tx gov vote [command] [flags] +``` + +Example: + +```shell +gnfd tx gov vote 1 yes --from 0x50508768BD41e5CD4A82A0fBc38C14d3bEA45A78 +``` \ No newline at end of file diff --git a/docs/blockchain-cli/key-management.md b/docs/blockchain-cli/key-management.md new file mode 100644 index 000000000..7d8862007 --- /dev/null +++ b/docs/blockchain-cli/key-management.md @@ -0,0 +1,240 @@ +# Key Management + +## Abstract + +The greenfield-cosmos-sdk comes with a built-in keyring module that helps manage private and public keypairs for secure interactions with a node. In this tutorial, we'll explore how to use the gnfd command to manage keys in the greenfield-cosmos-sdk. + +## Quick Start + +### Create a New Key + +You can use `add` to create a new key with the name you want to use. + +```sh +gnfd keys add ${name} +``` + +You can replace `${name}` with any name you choose. The command will prompt you to enter a passphrase to encrypt the key. + +### Show a Key +To show information about the key you just created, you can run: + +```sh +gnfd keys show ${name} +``` + +### List All Keys + +To list all existing keys, you can run: + +```sh +gnfd keys list +``` + +### Delete a Key + +To delete a key, you can use the following command: + +```sh +gnfd keys delete ${name} +``` + +## Detailed CLI + +The following section explains the different commands that can be used with the gnfd command to manage keys. + +#### add + +The `add` command allows users to add a new key with specified name, encrypt it, and save to ${name} file. + +```sh +gnfd keys add ${name} [flags] +``` + +Example: + +```sh +gnfd keys add temp +``` + +Example Output: + +```yml +- address: 0x48D54D...48b6d2 + name: temp + pubkey: '{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"AqAzVo.../rZgIu"}' + pubkey_hex: 02a03356...eb66022e + type: local + +**Important** write this mnemonic phrase in a safe place. +It is the only way to recover your account if you ever forget your password. + +position number holiday ... cause bounce mercy +``` + +#### delete + +The `delete` command allows users to delete given keys. + +```sh +gnfd keys delete ${name}... [flags] +``` + +Example: + +```sh +gnfd keys delete temp +``` + +Example Output: + +```yml +Key reference will be deleted. Continue? [y/N]: y +Key deleted forever (uh oh!) +``` + +#### export + +The `export` command allows users to export private keys. + +```sh +gnfd keys export ${name} [flags] +``` + +Example: + +```sh +gnfd keys export temp +``` + +Example Output: + +```yml +Enter passphrase to encrypt the exported key: + +-----BEGIN TENDERMINT PRIVATE KEY----- +type: eth_secp256k1 +kdf: bcrypt +salt: D4AEA1...36B597 + +3tvq8w39N...pTwLRdgVGI= +=Wfrn +-----END TENDERMINT PRIVATE KEY----- +``` + +#### import + +The `import` command allows users to import private keys. + +```sh +gnfd keys import ${name} [flags] +``` + +Example: + +```sh +gnfd keys import temp temp.info +``` + +#### list + +The `list` command allows users to list all existed keys. + +```sh +gnfd keys list [flags] +``` + +Example: + +```sh +gnfd keys list +``` + +Example Output: + +```yml +- address: 0xA627c3...B61dF7 + name: temp + pubkey: '{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"AhJl...0t8hJC"}' + pubkey_hex: 021265c6...2df21242 + type: local +``` + +#### migrate + +The `migrate` command can migrate keys from amino to proto serialization format. + +```sh +gnfd keys migrate [flags] +``` + +Example: + +```sh +gnfd keys migrate +``` + +#### mnemonic + +The `mnemonic` command can compute the bip39 mnemonic for some input entropy. + +```sh +gnfd keys mnemonic [flags] +``` + +Example: + +```sh +gnfd keys mnemonic +``` + +Example Output: + +```yml +bridge bleak zebra ... gym quick antique +``` + +#### rename + +The `rename` command allows users to rename an existed key. + +```sh +gnfd keys rename [flags] +``` + +Example: + +```sh +gnfd keys rename temp new_name +``` + +Example Output: + +```yml +Key reference will be renamed from temp to new_name. Continue? [y/N]: y +Key was successfully renamed from temp to new_name +``` + +#### show + +The `show` command allows users to retrieve key information by name or address. + +```sh +gnfd keys show [name_or_address [name_or_address...]] [flags] +``` + +Example: + +```sh +gnfd keys show temp +``` + +Example Output: + +```yml +- address: 0xA627c3...B61dF7 + name: temp + pubkey: '{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"AhJl...0t8hJC"}' + pubkey_hex: 021265c6...2df21242 + type: local +``` diff --git a/docs/blockchain-cli/payment.md b/docs/blockchain-cli/payment.md new file mode 100644 index 000000000..fc3166c5f --- /dev/null +++ b/docs/blockchain-cli/payment.md @@ -0,0 +1,314 @@ +# Payment + +## Abstract + +The payment module is responsible for the payment of the greenfield network. It is mainly used to manage the payment account of the user, and the payment account is used to pay the storage fee. The payment module also provides the function of automatic settlement of the user's payment account. + +You can refer to the [billing and payment section](../../guide/greenfield-blockchain/modules/billing-and-payment.md) for more details. + +## Quick Start + +### Create Payment Account + +To create a new payment account, `create-payment-account` can be used. + +```shell +gnfd tx payment create-payment-account --from ${key} --node ${node} -y +``` + +${key} is the name of local key. + +${node} is the rpc address of a Greenfield node. + +- Mainnet + + ```js + node = "https://greenfield-chain.bnbchain.org:443" + ``` + +- Testnet + + ```js + node = "https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org:443" + ``` + +### Query Payment Account + +After the payment account is created, you can query all your payment accounts via the following command: + +```shell +gnfd q payment get-payment-accounts-by-owner ${owner} --node ${node} +``` +${owner} is the owner address you want to query, usually it is the address derived from your key. + +To query the details of a payment account, the following command can be executed. + +```shell +gnfd q payment show-payment-account ${payment_account_addr} --node ${node} +``` +${payment_account_addr} is the address of the payment account you want to query. + +### Deposit to Payment Account + +To deposit to a payment amount, the amount should be provided as the following command. + +```shell +gnfd tx payment deposit ${payment_account_addr} ${amount} --from ${key} --node ${node} -y +``` + +${amount} defines the BNB amount you want to deposit, e.g., `1000000000000000000`. + +### Withdraw from Payment Account + +To withdraw from a payment amount, the following command can be used. + +```shell +gnfd tx payment withdraw ${payment_account_addr} ${amount} --from ${key} --node ${node} -y +``` + +${amount} defines the BNB amount you want to withdraw, e.g., `1000000000000000000`. + +### Disable Refundable + +After disabling withdrawal of payment account, which cannot be reverted, the owner cannot withdraw from the payment account. + +```shell +gnfd tx payment disable-refund ${payment_account_addr} --from ${key} -y +``` + +## Detailed CLI + +A user can query and interact with the `payment` module using the CLI. + +### Query + +The `query` commands allow users to query `payment` state. + +#### params + +The `params` command allows users to query the params of the `payment` module. + +```sh +gnfd query payment params [flags] +``` + +Example: + +```sh +gnfd query payment params --node https://greenfield-chain.bnbchain.org:443 +``` + +#### show-payment-account + +The `show-payment-account` get the payment account by its address. + +```shell +gnfd query payment show-payment-account [addr] [flags] +``` + +Example: + +```shell +$ gnfd q payment show-payment-account 0x169FFd6893aB4A0f8105BA749A0614cB69a18884 +payment_account: +addr: 0x169FFd6893aB4A0f8105BA749A0614cB69a18884 +owner: 0x71A3c4521B66da275fb514dd3156fa699B54A341 +refundable: true +``` + +#### show-payment-account-count + +The command `show-payment-account-count` returns the count of payment accounts of a user. + +```shell +gnfd query payment show-payment-account-count [owner] [flags] +``` + +Example: + +```shell +$ gnfd q payment show-payment-account-count 0x3bA598a3d809702dB4cA8610e14cBAF83908861d +payment_account_count: +count: "1" +owner: 0x3bA598a3d809702dB4cA8610e14cBAF83908861d +``` + +#### show-stream-record + +The command `show-stream-record` returns the status and balances of a payment account. + +```shell +gnfd query payment show-stream-record [account] [flags] +``` + +Example: + +```shell +$ gnfd q payment show-stream-record 0x0B14B50E07934d9360152CACbd3397fDf9A13be0 +stream_record: +account: 0x0B14B50E07934d9360152CACbd3397fDf9A13be0 +buffer_balance: "0" +crud_timestamp: "1680231986" +lock_balance: "4620383649780" +netflow_rate: "0" +out_flows: [] +settle_timestamp: "0" +static_balance: "0" +status: STREAM_ACCOUNT_STATUS_ACTIVE +``` + +#### get-payment-accounts-by-owner + +The command `get-payment-accounts-by-owner` returns all payment accounts of a user. + +```shell +gnfd query payment get-payment-accounts-by-owner [owner] [flags] +``` + +Example: + +```shell +$ gnfd q payment get-payment-accounts-by-owner 0x0Efc1c24294053a178531CA9EbCD12dC98708953 +paymentAccounts: +- 0x9B946d99F4AFB629D6c872CE9027f12Cb8cF0772 +``` + +#### dynamic-balance + +The command `dynamic-balance` shows the dynamic balance of a payment account. + +```shell +gnfd query payment dynamic-balance [account] [flags] +``` + +Example: + +```shell +$ gnfd query payment dynamic-balance 0xeb359a735eb2c5e50716bdc0ebdac3a901ffb5b8 +available_balance: "492302404780385092" +bank_balance: "492302404615058500" +change_rate: "-318" +current_timestamp: "1697011881" +dynamic_balance: "164544312" +locked_fee: "6675734620800" +stream_record: + account: 0xEb359A735eB2c5E50716bdC0EBdAC3A901ffB5b8 + buffer_balance: "192326400" + crud_timestamp: "1697009421" + frozen_netflow_rate: "0" + lock_balance: "6675542294400" + netflow_rate: "-318" + out_flow_count: "4" + settle_timestamp: "1698090915" + static_balance: "165326592" + status: STREAM_ACCOUNT_STATUS_ACTIVE +``` + +### Transactions + +The `tx` commands allow users to interact with the `payment` module. + +#### create-payment-account + +The `create-payment-account` command allows users to create a new payment account + +```shell +gnfd tx payment create-payment-account [flags] +``` + +Example: + +```shell +# create payment account +$ gnfd tx payment create-payment-account --from validator0 + +# check the created payment account +$ gnfd q payment get-payment-accounts-by-owner 0x0Efc1c24294053a178531CA9EbCD12dC98708953 +paymentAccounts: +- 0x9B946d99F4AFB629D6c872CE9027f12Cb8cF0772 +``` + +#### deposit + +The `deposit` command is used to deposit to a payment account. + +```shell +gnfd tx payment deposit [to] [amount] [flags] +``` + +Example: + +```shell +# deposit 100000000 BNB wei to the payment account +$ gnfd tx payment deposit 0x9B946d99F4AFB629D6c872CE9027f12Cb8cF0772 100000000 --from validator0 + +# check the payment account, the static_balance should be 100000000 +$ gnfd q payment show-stream-record 0x9B946d99F4AFB629D6c872CE9027f12Cb8cF0772 +stream_record: + account: 0x9B946d99F4AFB629D6c872CE9027f12Cb8cF0772 + buffer_balance: "0" + crud_timestamp: "1680497254" + lock_balance: "0" + netflow_rate: "0" + out_flows: [] + settle_timestamp: "0" + static_balance: "100000000" + status: STREAM_ACCOUNT_STATUS_ACTIVE +``` + +#### withdraw + +The `withdraw` command is used to deposit to a payment account. + +```shell +gnfd tx payment withdraw [from] [amount] [flags] +``` + +Example: + +```shell +# withdraw from the payment account +$ gnfd tx payment withdraw 0x9B946d99F4AFB629D6c872CE9027f12Cb8cF0772 100 --from validator0 + +# check the payment account, the static_balance should be 99999900 now +$ gnfd q payment show-stream-record 0x9B946d99F4AFB629D6c872CE9027f12Cb8cF0772 +stream_record: + account: 0x9B946d99F4AFB629D6c872CE9027f12Cb8cF0772 + buffer_balance: "0" + crud_timestamp: "1680497338" + lock_balance: "0" + netflow_rate: "0" + out_flows: [] + settle_timestamp: "0" + static_balance: "99999900" + status: STREAM_ACCOUNT_STATUS_ACTIVE +``` + +#### disable-refund + +The `disable-refund` command is used to disable withdraw of a payment account. + +```shell +gnfd tx payment disable-refund [addr] [flags] +``` + +Example: + +```shell +# check the payment account refundable status +$ gnfd q payment show-payment-account 0x9B946d99F4AFB629D6c872CE9027f12Cb8cF0772 +payment_account: + addr: 0x9B946d99F4AFB629D6c872CE9027f12Cb8cF0772 + owner: 0x0Efc1c24294053a178531CA9EbCD12dC98708953 + refundable: true + +# disable refund +$ gnfd tx payment disable-refund 0x9B946d99F4AFB629D6c872CE9027f12Cb8cF0772 --from validator0 + +# check the payment account refundable status again, it should be false now +$ gnfd q payment show-payment-account 0x9B946d99F4AFB629D6c872CE9027f12Cb8cF0772 +payment_account: + addr: 0x9B946d99F4AFB629D6c872CE9027f12Cb8cF0772 + owner: 0x0Efc1c24294053a178531CA9EbCD12dC98708953 + refundable: false +``` diff --git a/docs/blockchain-cli/storage-provider.md b/docs/blockchain-cli/storage-provider.md new file mode 100644 index 000000000..11df441cb --- /dev/null +++ b/docs/blockchain-cli/storage-provider.md @@ -0,0 +1,161 @@ +# Storage Provider + +## Abstract +The SP module is responsible for managing and maintaining all storage providers in the Greenfield network. It provides basic functions such as joining, depositing, editing, and etc. + +The RPC addresses for mainnet and Testnet are listed below. In this tutorial, we are going to use Mainnet RPC address. + +- Mainnet + + ```js + node = "https://greenfield-chain.bnbchain.org:443" + ``` + +- Testnet + + ```js + node = "https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org:443" + ``` + +## List Storage providers + +```shell +gnfd query sp storage-providers [flags] +``` + +Example: + +```sh +gnfd query sp storage-providers --node https://greenfield-chain.bnbchain.org:443 +``` + +## Query a Storage provider by id + +```shell +gnfd query sp storage-provider [sp-id] [flags] +``` + +Example: + +```sh +gnfd query sp storage-provider 1 --node https://greenfield-chain.bnbchain.org:443 +``` + +## Query a Storage Provider by address + +```shell +gnfd query sp storage-provider-by-operator-address [sp-address] [flags] +``` + +Example: + +```sh +gnfd query sp storage-provider-by-operator-address 0x.. --node https://greenfield-chain.bnbchain.org:443 +``` + +## Query a Storage Provider maintenance records + +```shell +gnfd query sp maintenance-records-by-operator-address [operator address] [flags] +``` + +Example: + +```sh +gnfd query sp maintenance-records-by-operator-address 0x.. --node https://greenfield-chain.bnbchain.org:443 +``` + +## Submit a proposal for creating Storage Provider + +```shell +gnfd tx sp create-storage-provider [path/to/create_storage_provider_proposal.json] [flags] +``` + +Example: + +```sh +gnfd tx sp create-storage-provider create_storage_provider_proposal.json --from your_funding_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` + +```json +{ + "messages": [ + { + "@type": "/greenfield.sp.MsgCreateStorageProvider", + "description": { + "moniker": "sp0", + "identity": "", + "website": "", + "security_contact": "", + "details": "" + }, + "sp_address": "0x012Eadb23D670db68Ba8e67e6F34DE6ACE55b547", + "funding_address": "0x84b3307313e253eF5787b55616BB1F6F7139C2c0", + "seal_address": "0xbBD6cD73Cd376c3Dda20de0c4CBD8Fb1Bca2410D", + "approval_address": "0xdCE01bfaBc7c9c0865bCCeF872493B4BE3b343E8", + "gc_address": "0x0a1C8982C619B93bA7100411Fc58382306ab431b", + "maintenance_address": "0xbE03316B1D7c3FCB69136e47e02442d6Fb3396dB", + "endpoint": "https://sp0.greenfield.io", + "deposit": { + "denom": "BNB", + "amount": "500000000000000000000" + }, + "read_price":"0.1469890427", + "store_price":"0.02183945725", + "free_read_quota": 1073741824, + "creator": "0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2", + "bls_key": "af8c586885a490a1775bcbef95e6162de1904777f3fb91e3bfd0ffd690fe0d477d0984f11852c64dc77d4583c99f34cb", + "bls_proof": "8bbce5330c5a46416ec41bfb93d938e8fb2e01d0a4035bd7b87efb98762e5e71faf00427d991003680325b7f97b362640f8e58e69bf774cd59e2267bdfe5a2e6578194b6834531893a39253c718edae2511977991895cdc8dd9e1136e43d721c" + } + ], + "title": "create sp", + "summary": "create sp", + "metadata": "4pIMOgIGx1vZGU=", + "deposit": "1000000000000000000BNB" +} +``` + +## Deposit + +SP stake token from its funding account into Greenfield. + +```shell +gnfd tx sp deposit [sp-address] [fund-address] [value] [flags] +``` + +Example: + +```sh +gnfd tx sp deposit 0x... 0x... 10000000000BNB --from funding_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` + +## EditStorageProvider + +```shell +gnfd tx sp edit-storage-provider [sp-address] [flags] +``` + +Example: + +```sh +gnfd tx sp edit-storage-provider 0x... --endpoint https://www.new-endpoint.com --new-moniker newmoniker --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` + +## UpdateStorageProviderStatus + +SP update status of itself, Currently status can be STATUS_IN_SERVICE and STATUS_IN_MAINTENANCE. +```shell +gnfd tx sp update-status [sp-address] [new-status] [flags] +``` + +Example: + +Update an SP to in service status. +```sh +gnfd tx sp update-status 0x... STATUS_IN_SERVICE --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` + +Update an SP to in maintenance status with request duration is 1200 seconds. +```sh +gnfd tx sp update-status 0x... STATUS_IN_MAINTENANCE --duration 1200 --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` diff --git a/docs/blockchain-cli/storage.md b/docs/blockchain-cli/storage.md new file mode 100644 index 000000000..c3f0b0bb1 --- /dev/null +++ b/docs/blockchain-cli/storage.md @@ -0,0 +1,251 @@ +# Storage + +## Abstract +The storage module is responsible for handling bucket, object related operations on Greenfield blockchain. Not all operations are listed +in this page, for those operations which involves interactions with the Storage Provider in order to +complete tasks such as obtaining authentication information and sending request data, for example, creating a bucket or object requires a storage +provider's approval signature, we recommend using the more powerful tool [greenfield commands](https://github.com/bnb-chain/greenfield-cmd) +to complete such transactions and queries. + +The RPC addresses for mainnet and Testnet are listed below. In this tutorial, we are going to use Mainnet RPC address. + +- Mainnet + + ```js + node = "https://greenfield-chain.bnbchain.org:443" + ``` + +- Testnet + + ```js + node = "https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org:443" + ``` + + +## HeadBucket + +```shell +gnfd query storage head-bucket [bucket-name] [flags] +``` + +Example: + +```sh +gnfd query storage head-bucket bucketname --node https://greenfield-chain.bnbchain.org:443 +``` + +## UpdateBucketInfo + +```shell +gnfd tx storage update-bucket-info [bucket-name] [charged-read-quota] [flags] +``` + +Example: + +```shell +gnfd tx storage update-bucket-info bucketname 1000000000 --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` + +## MirrorBucket + +```shell +gnfd tx storage mirror-bucket [flags] +``` + +Example: + +mirror a bucket to BSC by bucket name, `56` is the BSC Mainnet chain id. +```shell +gnfd tx storage mirror-bucket --bucket-name bucketname --dest-chain-id 56 --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` +mirror a bucket to BSC by bucket id, `56` is the BSC Mainnet chain id. +```shell +gnfd tx storage mirror-bucket --bucket-id 1 --dest-chain-id 56 --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` + +## HeadObject + +```shell +gnfd query storage head-object [bucket-name] [object-name] [flags] +``` + +Example: + +```sh +gnfd query storage head-object bukcetname objectname --node https://greenfield-chain.bnbchain.org:443 +``` + +## DeleteObject + +```shell +gnfd tx storage delete-object [bucket-name] [object-name] [flags] +``` + +Example: + +```shell +gnfd tx storage delete-object bucketname objectname --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` + +## CancelCreateObject + +```shell +gnfd tx storage cancel-create-object [bucket-name] [object-name] [flags] +``` + +Example: + +```shell +gnfd tx storage cancel-create-object bucketname objectname --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` + +## UpdateObjectInfo + +Currently only support update object's visibility +```shell +gnfd tx storage update-object-info [bucket-name] [object-name] [flags] +``` + +Example: + +```shell +gnfd tx storage update-object-info bucketname objectname --visibility VISIBILITY_TYPE_PRIVATE --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` + +## MirrorObject + +```shell +gnfd tx storage mirror-object [flags] +``` + +Example: + +mirror an object to BSC by bucket, object name, `56` is the BSC Mainnet chain id. +```shell +gnfd tx storage mirror-object --bucket-name bucketname --object-name objectname --dest-chain-id 56 --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` +mirror a bucket to BSC by bucket id, `56` is the BSC Mainnet chain id. +```shell +gnfd tx storage mirror-object --object-id 1 --dest-chain-id 56 --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` + +## CreateGroup + +Create a group without members within +```shell +gnfd tx storage create-group [group-name] [flags] +``` +Example: +```shell +gnfd tx storage create-group groupname --extra groupInfo --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` + +## DeleteGroup + +```shell +gnfd tx storage delete-group [group-name] [flags] +``` +Example: +```shell +gnfd tx storage delete-group groupname --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` + +## UpdateGroupMember + +```shell +gnfd tx storage update-group-member [group-name] [member-to-add] [member-expiration-to-add] [member-to-delete] +``` +Example: +Add a group member +```shell +gnfd tx storage update-group-member groupname 0x... 1697017398 "" --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` +Delete a group member +```shell +gnfd tx storage update-group-member groupname "" "" 0x... --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` + +## UpdateGroupExtra + +Update a group extra info. +```shell +gnfd tx storage update-group-extra [group-name] [extra] +``` + +Example: +```shell +gnfd tx storage update-group-extra groupname extraInfo --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` + +## RenewGroupMember +Renew a group member's expiration time. + +```shell +gnfd tx storage renew-group-member [group-name] [member] [member-expiration] +``` +Example: +```shell +gnfd tx storage renew-group-member groupname 0x... 123456678 --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` + +## HeadGroup + +```shell +gnfd query storage head-group [group-owner] [group-name] [flags] +``` + +Example: + +```sh +gnfd query storage head-group 0x... groupname --node https://greenfield-chain.bnbchain.org:443 +``` + +## ListGroups + +```shell +gnfd query storage list-groups [group-owner] [flags] +``` + +Example: + +```sh +gnfd query storage list-groups 0x... --node https://greenfield-chain.bnbchain.org:443 +``` + +## LeaveGroup + +```shell +gnfd tx storage leave-group [group-owner] [group-name] +``` +Example: +```shell +gnfd tx storage leave-group 0x... groupname --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` + +## MirrorGroup + +```shell +gnfd tx storage mirror-group [flags] +``` + +Example: + +mirror a group to BSC by group name, `56` is the BSC Mainnet chain id. +```shell +gnfd tx storage mirror-group --group-name groupname --dest-chain-id 56 --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` +mirror a group to BSC by group id, `56` is the BSC Mainnet chain id. +```shell +gnfd tx storage mirror-group --group-id 1 --dest-chain-id 56 --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` + +### SetBucketFlowRateLimit + +```shell +gnfd tx storage set-bucket-flow-rate-limit [bucket-name] [payment-account] [bucket-owner] [flow-rate-limit] +``` + +Example: +```shell +gnfd tx storage set-bucket-flow-rate-limit yourbucket 0x... 0x... 1000- --from your_key --home ~/.gnfd --node https://greenfield-chain.bnbchain.org:443 +``` \ No newline at end of file diff --git a/docs/blockchain-cli/validator-staking.md b/docs/blockchain-cli/validator-staking.md new file mode 100644 index 000000000..59d67e2f4 --- /dev/null +++ b/docs/blockchain-cli/validator-staking.md @@ -0,0 +1,616 @@ +# Validator Staking + +## Abstract + +The staking module is responsible for handling validator and delegator related operations. + +## Quick Start + +### Create a New Validator + +To become a validator, a `create-validator` proposal should be submitted and adopted by the majority of the current +validators. + +#### Grant delegate authorization + +The self delegator account of the new validator should grant the delegate authorization to the gov module account, make +sure the spend limit should be no less than the value for creating validator, and the allowed validator should be the +operator address of the new validator. The gov module account of Greenfield +is `0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2`. + +```sh +gnfd tx authz grant ${grantee} delegate --sepend-limit ${coins} --allowed-validators ${valAddr} --from ${key} --node ${node} +``` + +${key} is the name of the self delegator account's local key. + +${grantee} specifies the address of the grantee, which should be `0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2`. + +${coins} defines the coins you want to grant, for example, `10000000000000000000000BNB`. + +${valAddr} defines the address of the validator you want to create. + +${node} is the rpc address of a Greenfield node. + +- Mainnet + + ```js + node = "https://greenfield-chain.bnbchain.org:443" + ``` + +- Testnet + + ```js + node = "https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org:443" + ``` + + +Example: + +```sh +gnfd tx authz grant 0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2 delegate --sepend-limit 10000000000000000000000BNB --allowed-validators myvaladdr --from mykey +``` + +#### Submit create-validator proposal + +Use `gov submit-proposal` command to submit a create-validator proposal. + +```sh +gnfd tx gov submit-proposal create-validator.json --from ${key} --node ${node} +``` + +Example: + +The content of create-validator.json: + +```json +{ + "messages": [ + { + "@type": "/cosmos.staking.v1beta1.MsgCreateValidator", + "description": { + "moniker": "validator", + "identity": "", + "website": "", + "security_contact": "", + "details": "" + }, + "commission": { + "rate": "0.070000000000000000", + "max_rate": "1.000000000000000000", + "max_change_rate": "0.010000000000000000" + }, + "min_self_delegation": "1000000000000000000000", + "delegator_address": "0x6D967dc83b625603c963713eABd5B43A281E595e", + "validator_address": "0x6D967dc83b625603c963713eABd5B43A281E595e", + "pubkey": { + "@type": "/cosmos.crypto.ed25519.PubKey", + "key": "POIf1u/xC0RoHhD5c5qWszVLnjuhSVlgyrhoIriSjf0=" + }, + "value": { + "denom": "BNB", + "amount": "10000000000000000000000" + }, + "from": "0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2", + "relayer_address": "0xBefD69cb71403DF7BA20310FB216e1Fb7bAC6321", + "challenger_address": "0xc6C51ae1d83257B833Fe64413cf3d30F2F624ae7", + "bls_key": "ac1e598ae0ccbeeaafa31bc6faefa85c2ae3138699cac79169cd718f1a38445201454ec092a86f200e08a15266bdc600", + "bls_proof": "88faf4af49c73ff6647465e8791ad861e5da080157beadaab415a0b09bb431514810e30500ac0806fc7eefbf39b545e6161ef40f9e68a196382ed0b0f1bdde6507a94b03347b12f620feed99990d50c3c3e01b906b553c5cce79fb37cf09e4c6" + } + ], + "metadata": "4pIMOgIGx1vZGU=", + "deposit": "1000000000000000000BNB" +} +``` + +```sh +gnfd tx gov submit-proposal create-validator.json --from mykey --gas auto +``` + +#### Create a new validator in one step +You can also use the `create-validator` command to create a new validator in one step, this command will include the above two steps. + +```shell +gnfd tx staking create-validator create-validator.json --from ${self-delegator-key} --node ${node} +``` + +#### Vote on the proposal + +The current validators can use `gov vote` command to vote on the proposal. + +```sh +gnfd tx gov vote ${proposal_id} --from ${key} --node ${node} +``` + +${proposal_id} specifies the id of the proposal submitted. + +Example: + +```sh +gnfd tx gov vote 1 yes --from mykey +``` + +#### Tally and execute automatically + +Once the proposal's voting period is over, the votes for the create-validator proposal would be tallied. If the proposal +is passed, the create-validator message in the proposal would be executed automatically. + +### Impeach a Malicious Validator + +If a validator doesn't behave well, anyone can submit an impeach-validator proposal, if the proposal adopted by the +majority of the current validators, the malicious validator would be jailed forever. + +#### Submit an impeach-validator proposal + +Use `gov submit-proposal` command to submit an impeach-validator proposal. + +```sh +gnfd tx gov submit-proposal impeach-validator.json --from ${key} --node ${node} +``` + +Example: + +The content of impeach-validator.json: + +```json +{ + "messages": [ + { + "@type": "/cosmos.slashing.v1beta1.MsgImpeach", + "from": "0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2", + "validator_address": "0x6D967dc83b625603c963713eABd5B43A281E595e" + } + ], + "metadata": "4pIMOgIGx1vZGU=", + "deposit": "1000000000000000000BNB" +} +``` + +```sh +gnfd tx gov submit-proposal impeach-validator.json --from mykey --gas auto +``` + +#### Vote on the proposal + +The current validators can use `gov vote` command to vote on the proposal. + +```sh +gnfd tx gov vote ${proposal_id} --from ${key} --node ${node} +``` + +Example: + +```sh +gnfd tx gov vote 2 yes --from mykey +``` + +#### Tally and execute automatically + +Once the proposal's voting period is over, the votes for the impeach-validator proposal would be tallied. If the +proposal +is passed, the impeach-validator message in the proposal would be executed automatically. + +## Detailed CLI + +### Query + +The CLI `query` commands allow users to query `staking` state. + +```sh +gnfd query staking --help +``` + +#### delegation + +The `delegation` command allows users to query a delegation based on address and validator address. + +```sh +gnfd query staking delegation [delegator-addr] [validator-addr] [flags] +``` + +Example: + +```sh +gnfd query staking delegation 0x9fB29.. 0x91D7d.. +``` + +Example Output: + +```yml +balance: + amount: "10000000000000000000000000" + denom: BNB +delegation: + delegator_address: 0xCd6D1332a09c29A8a5Fe5Ea4b485F63881f26999 + shares: "10000000000000000000000000.000000000000000000" + validator_address: 0xCd6D1332a09c29A8a5Fe5Ea4b485F63881f26999 +``` + +#### historical-info + +The `historical-info` command allows users to query historical info at given height. + +```sh +gnfd query staking historical-info [height] [flags] +``` + +Example: + +```sh +gnfd query staking historical-info 1 +``` + +Example Output: + +```yml +header: + app_hash: 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + chain_id: greenfield_9000-121 + consensus_hash: BICRvH3cKD93v7+R1zxE2ljD34qcvIZ0Bdi389qtoi8= + data_hash: 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + evidence_hash: 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + height: "1" + last_block_id: + hash: null + part_set_header: + hash: null + total: 0 + last_commit_hash: 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + last_results_hash: 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + next_validators_hash: 66w0qjSBjRkSTh3S5gPNaCRR/E+RsbFhMNLHTNighoo= + proposer_address: TY90UCbGrdAHcfcwgh2TSHKisL4= + time: "2023-02-20T15:24:16.056235Z" + validators_hash: 66w0qjSBjRkSTh3S5gPNaCRR/E+RsbFhMNLHTNighoo= + version: + app: "0" + block: "11" +valset: + - commission: + commission_rates: + max_change_rate: "0.010000000000000000" + max_rate: "1.000000000000000000" + rate: "0.070000000000000000" + update_time: "2023-02-20T15:24:16.056235Z" + consensus_pubkey: + '@type': /cosmos.crypto.ed25519.PubKey + key: R/yEnaoqxfWcqns01j8w/U9PQ5DK2Vl6rkoJwh5CFn4= + delegator_shares: "10000000000000000000000000.000000000000000000" + description: + details: validator1 + identity: "" + moniker: validator1 + security_contact: "" + website: http://website + jailed: false + min_self_delegation: "1" + operator_address: 0x3D1c0E4aEdA87e0779E895307Eb3dFF6432a3cDa + relayer_address: 0xebd48ceed75B8e8174F6143394BD74fd2cf102d4 + relayer_bls_key: lBsWg+/1/3Q/mJFE97PDBkPSNF631enVSUin/u+DEeUmttGbArKHYyXdtvP20iOw + self_del_address: 0x3D1c0E4aEdA87e0779E895307Eb3dFF6432a3cDa + status: BOND_STATUS_BONDED + tokens: "10000000000000000000000000" + unbonding_height: "0" + unbonding_time: "1970-01-01T00:00:00Z" + - commission: + commission_rates: + max_change_rate: "0.010000000000000000" + max_rate: "1.000000000000000000" + rate: "0.070000000000000000" + update_time: "2023-02-20T15:24:16.056235Z" + consensus_pubkey: + '@type': /cosmos.crypto.ed25519.PubKey + key: gUtwmz/uuTGhoRhsZbwycyw9nfHyVpIdPMaNE4GMQ3Q= + delegator_shares: "10000000000000000000000000.000000000000000000" + description: + details: validator2 + identity: "" + moniker: validator2 + security_contact: "" + website: http://website + jailed: false + min_self_delegation: "1" + operator_address: 0xe7374890fc6c8811Ab6eac3A30D9e5391C1077D5 + relayer_address: 0x3D4da133bDb0443917Cf29b06E3Bd18a9Cd5dc73 + relayer_bls_key: t+wJJfvKxjgKDam3L+TgEWIaDpTZOOASwI0qC0lAgtQY4ow9RxJKjROFjxD9x9iR + self_del_address: 0xe7374890fc6c8811Ab6eac3A30D9e5391C1077D5 + status: BOND_STATUS_BONDED + tokens: "10000000000000000000000000" + unbonding_height: "0" + unbonding_time: "1970-01-01T00:00:00Z" + - commission: + commission_rates: + max_change_rate: "0.010000000000000000" + max_rate: "1.000000000000000000" + rate: "0.070000000000000000" + update_time: "2023-02-20T15:24:16.056235Z" + consensus_pubkey: + '@type': /cosmos.crypto.ed25519.PubKey + key: 4hGnslsUEWptUbeeFXx/44eUodKoFv61IFimxPB7qbc= + delegator_shares: "10000000000000000000000000.000000000000000000" + description: + details: validator0 + identity: "" + moniker: validator0 + security_contact: "" + website: http://website + jailed: false + min_self_delegation: "1" + operator_address: 0xCd6D1332a09c29A8a5Fe5Ea4b485F63881f26999 + relayer_address: 0xBefD69cb71403DF7BA20310FB216e1Fb7bAC6321 + relayer_bls_key: qt3VpcjybvsWdR8smO0eCoaD+4IkAczpl+mcBJOKnXQro2g3TUXWCZPU7VvI01KJ + self_del_address: 0xCd6D1332a09c29A8a5Fe5Ea4b485F63881f26999 + status: BOND_STATUS_BONDED + tokens: "10000000000000000000000000" + unbonding_height: "0" + unbonding_time: "1970-01-01T00:00:00Z" +``` + +#### params + +The `params` command allows users to query the current staking parameters information. + +```sh +gnfd query staking params [flags] +``` + +Example: + +```sh +gnfd query staking params +``` + +Example Output: + +```yml +bond_denom: BNB +historical_entries: 10000 +max_entries: 7 +max_validators: 100 +min_commission_rate: "0.000000000000000000" +min_self_delegation: "1" +unbonding_time: 1814400s +``` + +#### pool + +The `pool` command allows users to query the current staking pool values. + +```sh +gnfd query staking pool [flags] +``` + +Example: + +```sh +gnfd query staking pool +``` + +Example Output: + +```yml +bonded_tokens: "30000000000000000000000000" +not_bonded_tokens: "0" +``` + +#### unbonding-delegation + +The `unbonding-delegation` command allows users to query an unbonding-delegation record based on delegator and validator +address. + +```sh +gnfd query staking unbonding-delegation [delegator-addr] [validator-addr] [flags] +``` + +Example: + +```sh +gnfd query staking unbonding-delegation 0x9fB29.. 0x91D7d.. +``` + +Example Output: + +```yml +delegator_address: 0xCd6D1332a09c29A8a5Fe5Ea4b485F63881f26999 +entries: + - balance: "1000000000000000000" + completion_time: "2023-03-14T01:46:43.524923Z" + creation_height: "6736" + initial_balance: "1000000000000000000" +validator_address: 0xCd6D1332a09c29A8a5Fe5Ea4b485F63881f26999 +``` + +#### validator + +The `validator` command allows users to query a validator. + +```sh +gnfd query staking validator [validator-addr] [flags] +``` + +Example: + +```sh +gnfd query staking validator 0x91D7d.. +``` + +Example Output: + +```yml +commission: + commission_rates: + max_change_rate: "0.010000000000000000" + max_rate: "1.000000000000000000" + rate: "0.070000000000000000" + update_time: "2023-02-20T15:24:16.056235Z" +consensus_pubkey: + '@type': /cosmos.crypto.ed25519.PubKey + key: 4hGnslsUEWptUbeeFXx/44eUodKoFv61IFimxPB7qbc= +delegator_shares: "10000000000000000000000000.000000000000000000" +description: + details: validator0 + identity: "" + moniker: validator0 + security_contact: "" + website: http://website +jailed: false +min_self_delegation: "1" +operator_address: 0xCd6D1332a09c29A8a5Fe5Ea4b485F63881f26999 +relayer_address: 0xBefD69cb71403DF7BA20310FB216e1Fb7bAC6321 +relayer_bls_key: qt3VpcjybvsWdR8smO0eCoaD+4IkAczpl+mcBJOKnXQro2g3TUXWCZPU7VvI01KJ +self_del_address: 0xCd6D1332a09c29A8a5Fe5Ea4b485F63881f26999 +status: BOND_STATUS_BONDED +tokens: "10000000000000000000000000" +unbonding_height: "0" +unbonding_time: "1970-01-01T00:00:00Z" +``` + +#### validators + +The `validators` command allows users to query for all validators. + +```sh +gnfd query staking validators [flags] +``` + +Example: + +```sh +gnfd query staking validators +``` + +Example Output: + +```yml +pagination: + next_key: null + total: "0" +validators: + - commission: + commission_rates: + max_change_rate: "0.010000000000000000" + max_rate: "1.000000000000000000" + rate: "0.070000000000000000" + update_time: "2023-02-20T15:24:16.056235Z" + consensus_pubkey: + '@type': /cosmos.crypto.ed25519.PubKey + key: R/yEnaoqxfWcqns01j8w/U9PQ5DK2Vl6rkoJwh5CFn4= + delegator_shares: "10000000000000000000000000.000000000000000000" + description: + details: validator1 + identity: "" + moniker: validator1 + security_contact: "" + website: http://website + jailed: false + min_self_delegation: "1" + operator_address: 0x3D1c0E4aEdA87e0779E895307Eb3dFF6432a3cDa + relayer_address: 0xebd48ceed75B8e8174F6143394BD74fd2cf102d4 + relayer_bls_key: lBsWg+/1/3Q/mJFE97PDBkPSNF631enVSUin/u+DEeUmttGbArKHYyXdtvP20iOw + self_del_address: 0x3D1c0E4aEdA87e0779E895307Eb3dFF6432a3cDa + status: BOND_STATUS_BONDED + tokens: "10000000000000000000000000" + unbonding_height: "0" + unbonding_time: "1970-01-01T00:00:00Z" + - commission: + commission_rates: + max_change_rate: "0.010000000000000000" + max_rate: "1.000000000000000000" + rate: "0.070000000000000000" + update_time: "2023-02-20T15:24:16.056235Z" + consensus_pubkey: + '@type': /cosmos.crypto.ed25519.PubKey + key: 4hGnslsUEWptUbeeFXx/44eUodKoFv61IFimxPB7qbc= + delegator_shares: "10000000000000000000000000.000000000000000000" + description: + details: validator0 + identity: "" + moniker: validator0 + security_contact: "" + website: http://website + jailed: false + min_self_delegation: "1" + operator_address: 0xCd6D1332a09c29A8a5Fe5Ea4b485F63881f26999 + relayer_address: 0xBefD69cb71403DF7BA20310FB216e1Fb7bAC6321 + relayer_bls_key: qt3VpcjybvsWdR8smO0eCoaD+4IkAczpl+mcBJOKnXQro2g3TUXWCZPU7VvI01KJ + self_del_address: 0xCd6D1332a09c29A8a5Fe5Ea4b485F63881f26999 + status: BOND_STATUS_BONDED + tokens: "10000000000000000000000000" + unbonding_height: "0" + unbonding_time: "1970-01-01T00:00:00Z" + - commission: + commission_rates: + max_change_rate: "0.010000000000000000" + max_rate: "1.000000000000000000" + rate: "0.070000000000000000" + update_time: "2023-02-20T15:24:16.056235Z" + consensus_pubkey: + '@type': /cosmos.crypto.ed25519.PubKey + key: gUtwmz/uuTGhoRhsZbwycyw9nfHyVpIdPMaNE4GMQ3Q= + delegator_shares: "10000000000000000000000000.000000000000000000" + description: + details: validator2 + identity: "" + moniker: validator2 + security_contact: "" + website: http://website + jailed: false + min_self_delegation: "1" + operator_address: 0xe7374890fc6c8811Ab6eac3A30D9e5391C1077D5 + relayer_address: 0x3D4da133bDb0443917Cf29b06E3Bd18a9Cd5dc73 + relayer_bls_key: t+wJJfvKxjgKDam3L+TgEWIaDpTZOOASwI0qC0lAgtQY4ow9RxJKjROFjxD9x9iR + self_del_address: 0xe7374890fc6c8811Ab6eac3A30D9e5391C1077D5 + status: BOND_STATUS_BONDED + tokens: "10000000000000000000000000" + unbonding_height: "0" + unbonding_time: "1970-01-01T00:00:00Z" +``` + +### Transactions + +The CLI `tx` commands allow users to send `staking` related transactions. + +#### delegate + +The `delegate` command allows users to delegate liquid tokens to a validator, in the early stage, only self-delegate is +supported. + +```sh +gnfd tx staking delegate [validator-addr] [amount] [flags] +``` + +Example: + +```sh +gnfd tx staking delegate 0x91D7d.. 1000000000000000000000BNB --from mykey +``` + +#### edit-validator + +The `edit-validator` command allows the user to edit an existing validator account. + +```sh +gnfd tx staking edit-validator [flags] +``` + +Example: + +```sh +gnfd tx staking edit-validator --addr-relayer 0x91D7d.. --from mykey +``` + +#### unbond + +The `unbond` command allows the user to unbond shares from a validator. + +```sh +gnfd tx staking unbond [validator-addr] [amount] [flags] +``` + +After executing unbond command, it will take **7 days** to receive BNB back. + +Example: + +```sh +gnfd tx staking unbond 0x91D7d.. 100000000000000000000BNB --from mykey +``` + diff --git a/docs/greenfield-api/abci-query.api.mdx b/docs/greenfield-api/abci-query.api.mdx new file mode 100644 index 000000000..4ef22c44c --- /dev/null +++ b/docs/greenfield-api/abci-query.api.mdx @@ -0,0 +1,49 @@ +--- +id: abci-query +title: "ABCIQuery" +description: "ABCIQuery defines a query handler that supports ABCI queries" +sidebar_label: "ABCIQuery" +hide_title: true +hide_table_of_contents: true +api: {"description":"ABCIQuery defines a query handler that supports ABCI queries\ndirectly to the\n\napplication, bypassing Tendermint completely. The ABCI query must contain\n\na valid and supported path, including app, custom, p2p, and store.","operationId":"ABCIQuery","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"integer","format":"int64"},"log":{"type":"string"},"info":{"type":"string"},"index":{"type":"string","format":"int64"},"key":{"type":"string","format":"byte"},"value":{"type":"string","format":"byte"},"proof_ops":{"type":"object","properties":{"ops":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"key":{"type":"string","format":"byte"},"data":{"type":"string","format":"byte"}},"description":"ProofOp defines an operation used for calculating Merkle root. The data could\nbe arbitrary format, providing necessary data for example neighbouring node\nhash.\n\nNote: This type is a duplicate of the ProofOp proto type defined in Tendermint."}}},"description":"ProofOps is Merkle proof defined by the list of ProofOps.\n\nNote: This type is a duplicate of the ProofOps proto type defined in Tendermint."},"height":{"type":"string","format":"int64"},"codespace":{"type":"string"}},"description":"ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query.\n\nNote: This type is a duplicate of the ResponseQuery proto type defined in\nTendermint."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"data","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"path","in":"query","required":false,"schema":{"type":"string"}},{"name":"height","in":"query","required":false,"schema":{"type":"string","format":"int64"}},{"name":"prove","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["base"],"method":"get","path":"/cosmos/base/tendermint/v1beta1/abci_query","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"ABCIQuery","description":{"content":"ABCIQuery defines a query handler that supports ABCI queries\ndirectly to the\n\napplication, bypassing Tendermint completely. The ABCI query must contain\n\na valid and supported path, including app, custom, p2p, and store.","type":"text/plain"},"url":{"path":["cosmos","base","tendermint","v1beta1","abci_query"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"data","value":""},{"disabled":false,"key":"path","value":""},{"disabled":false,"key":"height","value":""},{"disabled":false,"key":"prove","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## ABCIQuery + + + +ABCIQuery defines a query handler that supports ABCI queries +directly to the + +application, bypassing Tendermint completely. The ABCI query must contain + +a valid and supported path, including app, custom, p2p, and store. + +
Query Parameters
+ +A successful response. + +
Schema
    proof_ops object
    + +ProofOps is Merkle proof defined by the list of ProofOps. + +Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. + +
    ops object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/account-address-by-id.api.mdx b/docs/greenfield-api/account-address-by-id.api.mdx new file mode 100644 index 000000000..71294ca84 --- /dev/null +++ b/docs/greenfield-api/account-address-by-id.api.mdx @@ -0,0 +1,38 @@ +--- +id: account-address-by-id +title: "AccountAddressByID" +description: "AccountAddressByID returns account address based on account number." +sidebar_label: "AccountAddressByID" +hide_title: true +hide_table_of_contents: true +api: {"description":"AccountAddressByID returns account address based on account number.","operationId":"AccountAddressByID","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"account_address":{"type":"string"}},"description":"Since: cosmos-sdk 0.46.2","title":"QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"id","description":"Deprecated, use account_id instead\n\nid is the account number of the address to be queried. This field\nshould have been an uint64 (like all account numbers), and will be\nupdated to uint64 in a future version of the auth query.","in":"path","required":true,"schema":{"type":"string","format":"int64"}},{"name":"account_id","description":"account_id is the account number of the address to be queried.\n\nSince: cosmos-sdk 0.47","in":"query","required":false,"schema":{"type":"string","format":"uint64"}}],"tags":["auth"],"method":"get","path":"/cosmos/auth/v1beta1/address_by_id/{id}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"AccountAddressByID","description":{"content":"AccountAddressByID returns account address based on account number.","type":"text/plain"},"url":{"path":["cosmos","auth","v1beta1","address_by_id",":id"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"account_id is the account number of the address to be queried.\n\nSince: cosmos-sdk 0.47","type":"text/plain"},"key":"account_id","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) Deprecated, use account_id instead\n\nid is the account number of the address to be queried. This field\nshould have been an uint64 (like all account numbers), and will be\nupdated to uint64 in a future version of the auth query.","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## AccountAddressByID + + + +AccountAddressByID returns account address based on account number. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/account-info.api.mdx b/docs/greenfield-api/account-info.api.mdx new file mode 100644 index 000000000..a4bdb20c0 --- /dev/null +++ b/docs/greenfield-api/account-info.api.mdx @@ -0,0 +1,130 @@ +--- +id: account-info +title: "AccountInfo" +description: "AccountInfo queries account info which is common to all account types." +sidebar_label: "AccountInfo" +hide_title: true +hide_table_of_contents: true +api: {"description":"AccountInfo queries account info which is common to all account types.","operationId":"AccountInfo","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"info":{"description":"info is the account info which is represented by BaseAccount.","type":"object","properties":{"address":{"type":"string"},"pub_key":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"account_number":{"type":"string","format":"uint64"},"sequence":{"type":"string","format":"uint64"}}}},"description":"QueryAccountInfoResponse is the Query/AccountInfo response type.\n\nSince: cosmos-sdk 0.47"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"address","description":"address is the account address string.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["auth"],"method":"get","path":"/cosmos/auth/v1beta1/account_info/{address}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"AccountInfo","description":{"content":"AccountInfo queries account info which is common to all account types.","type":"text/plain"},"url":{"path":["cosmos","auth","v1beta1","account_info",":address"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) address is the account address string.","type":"text/plain"},"type":"any","value":"","key":"address"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## AccountInfo + + + +AccountInfo queries account info which is common to all account types. + +
Path Parameters
+ +A successful response. + +
Schema
    info object
    + +info is the account info which is represented by BaseAccount. + +
    pub_key object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/account.api.mdx b/docs/greenfield-api/account.api.mdx new file mode 100644 index 000000000..6b209d347 --- /dev/null +++ b/docs/greenfield-api/account.api.mdx @@ -0,0 +1,126 @@ +--- +id: account +title: "Account" +description: "Account returns account details based on address." +sidebar_label: "Account" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"Account","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"account":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}},"description":"QueryAccountResponse is the response type for the Query/Account RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"address","description":"address defines the address to query for.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["auth"],"description":"Account returns account details based on address.","method":"get","path":"/cosmos/auth/v1beta1/accounts/{address}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"Account","description":{"content":"Account returns account details based on address.","type":"text/plain"},"url":{"path":["cosmos","auth","v1beta1","accounts",":address"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) address defines the address to query for.","type":"text/plain"},"type":"any","value":"","key":"address"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Account + + + +Account returns account details based on address. + +
Path Parameters
+ +A successful response. + +
Schema
    account object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/accounts.api.mdx b/docs/greenfield-api/accounts.api.mdx new file mode 100644 index 000000000..7bec2a2c0 --- /dev/null +++ b/docs/greenfield-api/accounts.api.mdx @@ -0,0 +1,42 @@ +--- +id: accounts +title: "Accounts" +description: "Accounts returns all the existing accounts." +sidebar_label: "Accounts" +hide_title: true +hide_table_of_contents: true +api: {"description":"Accounts returns all the existing accounts.","operationId":"Accounts","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"title":"accounts are the existing accounts"},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryAccountsResponse is the response type for the Query/Accounts RPC method.\n\nSince: cosmos-sdk 0.43"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["auth"],"method":"get","path":"/cosmos/auth/v1beta1/accounts","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"Accounts","description":{"content":"Accounts returns all the existing accounts.","type":"text/plain"},"url":{"path":["cosmos","auth","v1beta1","accounts"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Accounts + + + +Accounts returns all the existing accounts. + +
Query Parameters
+ +A successful response. + +
Schema
    accounts object[]
  • Array [
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/all-balances.api.mdx b/docs/greenfield-api/all-balances.api.mdx new file mode 100644 index 000000000..237c422bc --- /dev/null +++ b/docs/greenfield-api/all-balances.api.mdx @@ -0,0 +1,46 @@ +--- +id: all-balances +title: "AllBalances" +description: "AllBalances queries the balance of all coins for a single account." +sidebar_label: "AllBalances" +hide_title: true +hide_table_of_contents: true +api: {"description":"AllBalances queries the balance of all coins for a single account.","operationId":"AllBalances","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"balances":{"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."},"description":"balances is the balances of all the coins."},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryAllBalancesResponse is the response type for the Query/AllBalances RPC\nmethod."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"address","description":"address is the address to query balances for.","in":"path","required":true,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["bank"],"method":"get","path":"/cosmos/bank/v1beta1/balances/{address}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"AllBalances","description":{"content":"AllBalances queries the balance of all coins for a single account.","type":"text/plain"},"url":{"path":["cosmos","bank","v1beta1","balances",":address"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) address is the address to query balances for.","type":"text/plain"},"type":"any","value":"","key":"address"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## AllBalances + + + +AllBalances queries the balance of all coins for a single account. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    balances object[]
    + +balances is the balances of all the coins. + +
  • Array [
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/all-evidence.api.mdx b/docs/greenfield-api/all-evidence.api.mdx new file mode 100644 index 000000000..308389f22 --- /dev/null +++ b/docs/greenfield-api/all-evidence.api.mdx @@ -0,0 +1,46 @@ +--- +id: all-evidence +title: "AllEvidence" +description: "AllEvidence queries all evidence." +sidebar_label: "AllEvidence" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"AllEvidence","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"evidence":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"description":"evidence returns all evidences."},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC\nmethod."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["evidence"],"description":"AllEvidence queries all evidence.","method":"get","path":"/cosmos/evidence/v1beta1/evidence","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"AllEvidence","description":{"content":"AllEvidence queries all evidence.","type":"text/plain"},"url":{"path":["cosmos","evidence","v1beta1","evidence"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## AllEvidence + + + +AllEvidence queries all evidence. + +
Query Parameters
+ +A successful response. + +
Schema
    evidence object[]
    + +evidence returns all evidences. + +
  • Array [
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/allowance.api.mdx b/docs/greenfield-api/allowance.api.mdx new file mode 100644 index 000000000..c68bf8aee --- /dev/null +++ b/docs/greenfield-api/allowance.api.mdx @@ -0,0 +1,46 @@ +--- +id: allowance +title: "Allowance" +description: "Allowance returns fee granted to the grantee by the granter." +sidebar_label: "Allowance" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"Allowance","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"allowance":{"description":"allowance is a allowance granted for grantee by granter.","type":"object","properties":{"granter":{"type":"string","description":"granter is the address of the user granting an allowance of their funds."},"grantee":{"type":"string","description":"grantee is the address of the user being granted an allowance of another user's funds."},"allowance":{"description":"allowance can be any of basic, periodic, allowed fee allowance.","type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}}}},"title":"Grant is stored in the KVStore to record a grant with full context"}},"description":"QueryAllowanceResponse is the response type for the Query/Allowance RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"granter","description":"granter is the address of the user granting an allowance of their funds.","in":"path","required":true,"schema":{"type":"string"}},{"name":"grantee","description":"grantee is the address of the user being granted an allowance of another user's funds.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["feegrant"],"description":"Allowance returns fee granted to the grantee by the granter.","method":"get","path":"/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"Allowance","description":{"content":"Allowance returns fee granted to the grantee by the granter.","type":"text/plain"},"url":{"path":["cosmos","feegrant","v1beta1","allowance",":granter",":grantee"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) granter is the address of the user granting an allowance of their funds.","type":"text/plain"},"type":"any","value":"","key":"granter"},{"disabled":false,"description":{"content":"(Required) grantee is the address of the user being granted an allowance of another user's funds.","type":"text/plain"},"type":"any","value":"","key":"grantee"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Allowance + + + +Allowance returns fee granted to the grantee by the granter. + +
Path Parameters
+ +A successful response. + +
Schema
    allowance object
    + +allowance is a allowance granted for grantee by granter. + +
    allowance object
    + +allowance can be any of basic, periodic, allowed fee allowance. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/allowances-by-granter.api.mdx b/docs/greenfield-api/allowances-by-granter.api.mdx new file mode 100644 index 000000000..fab080f61 --- /dev/null +++ b/docs/greenfield-api/allowances-by-granter.api.mdx @@ -0,0 +1,50 @@ +--- +id: allowances-by-granter +title: "AllowancesByGranter" +description: "AllowancesByGranter returns all the grants given by an address" +sidebar_label: "AllowancesByGranter" +hide_title: true +hide_table_of_contents: true +api: {"description":"AllowancesByGranter returns all the grants given by an address","operationId":"AllowancesByGranter","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"allowances":{"type":"array","items":{"type":"object","properties":{"granter":{"type":"string","description":"granter is the address of the user granting an allowance of their funds."},"grantee":{"type":"string","description":"grantee is the address of the user being granted an allowance of another user's funds."},"allowance":{"description":"allowance can be any of basic, periodic, allowed fee allowance.","type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}}}},"title":"Grant is stored in the KVStore to record a grant with full context"},"description":"allowances that have been issued by the granter."},"pagination":{"description":"pagination defines an pagination for the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method.\n\nSince: cosmos-sdk 0.46"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"granter","in":"path","required":true,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["feegrant"],"method":"get","path":"/cosmos/feegrant/v1beta1/issued/{granter}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"AllowancesByGranter","description":{"content":"AllowancesByGranter returns all the grants given by an address","type":"text/plain"},"url":{"path":["cosmos","feegrant","v1beta1","issued",":granter"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"granter"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## AllowancesByGranter + + + +AllowancesByGranter returns all the grants given by an address + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    allowances object[]
    + +allowances that have been issued by the granter. + +
  • Array [
  • allowance object
    + +allowance can be any of basic, periodic, allowed fee allowance. + +
  • ]
  • pagination object
    + +pagination defines an pagination for the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/allowances.api.mdx b/docs/greenfield-api/allowances.api.mdx new file mode 100644 index 000000000..1db2cea3c --- /dev/null +++ b/docs/greenfield-api/allowances.api.mdx @@ -0,0 +1,50 @@ +--- +id: allowances +title: "Allowances" +description: "Allowances returns all the grants for address." +sidebar_label: "Allowances" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"Allowances","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"allowances":{"type":"array","items":{"type":"object","properties":{"granter":{"type":"string","description":"granter is the address of the user granting an allowance of their funds."},"grantee":{"type":"string","description":"grantee is the address of the user being granted an allowance of another user's funds."},"allowance":{"description":"allowance can be any of basic, periodic, allowed fee allowance.","type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}}}},"title":"Grant is stored in the KVStore to record a grant with full context"},"description":"allowances are allowance's granted for grantee by granter."},"pagination":{"description":"pagination defines an pagination for the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryAllowancesResponse is the response type for the Query/Allowances RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"grantee","in":"path","required":true,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["feegrant"],"description":"Allowances returns all the grants for address.","method":"get","path":"/cosmos/feegrant/v1beta1/allowances/{grantee}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"Allowances","description":{"content":"Allowances returns all the grants for address.","type":"text/plain"},"url":{"path":["cosmos","feegrant","v1beta1","allowances",":grantee"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"grantee"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Allowances + + + +Allowances returns all the grants for address. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    allowances object[]
    + +allowances are allowance's granted for grantee by granter. + +
  • Array [
  • allowance object
    + +allowance can be any of basic, periodic, allowed fee allowance. + +
  • ]
  • pagination object
    + +pagination defines an pagination for the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/annual-provisions.api.mdx b/docs/greenfield-api/annual-provisions.api.mdx new file mode 100644 index 000000000..4431baf20 --- /dev/null +++ b/docs/greenfield-api/annual-provisions.api.mdx @@ -0,0 +1,38 @@ +--- +id: annual-provisions +title: "AnnualProvisions" +description: "AnnualProvisions current minting annual provisions value." +sidebar_label: "AnnualProvisions" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"AnnualProvisions","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"annual_provisions":{"type":"string","format":"byte","description":"annual_provisions is the current minting annual provisions value."}},"description":"QueryAnnualProvisionsResponse is the response type for the\nQuery/AnnualProvisions RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["mint"],"description":"AnnualProvisions current minting annual provisions value.","method":"get","path":"/cosmos/mint/v1beta1/annual_provisions","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"AnnualProvisions","description":{"content":"AnnualProvisions current minting annual provisions value.","type":"text/plain"},"url":{"path":["cosmos","mint","v1beta1","annual_provisions"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## AnnualProvisions + + + +AnnualProvisions current minting annual provisions value. + +
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/applied-plan.api.mdx b/docs/greenfield-api/applied-plan.api.mdx new file mode 100644 index 000000000..fef988371 --- /dev/null +++ b/docs/greenfield-api/applied-plan.api.mdx @@ -0,0 +1,38 @@ +--- +id: applied-plan +title: "AppliedPlan" +description: "AppliedPlan queries a previously applied upgrade plan by its name." +sidebar_label: "AppliedPlan" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"AppliedPlan","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"height":{"type":"string","format":"int64","description":"height is the block height at which the plan was applied."}},"description":"QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC\nmethod."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"name","description":"name is the name of the applied plan to query for.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["upgrade"],"description":"AppliedPlan queries a previously applied upgrade plan by its name.","method":"get","path":"/cosmos/upgrade/v1beta1/applied_plan/{name}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"AppliedPlan","description":{"content":"AppliedPlan queries a previously applied upgrade plan by its name.","type":"text/plain"},"url":{"path":["cosmos","upgrade","v1beta1","applied_plan",":name"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) name is the name of the applied plan to query for.","type":"text/plain"},"type":"any","value":"","key":"name"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## AppliedPlan + + + +AppliedPlan queries a previously applied upgrade plan by its name. + +
Path Parameters
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/attested-challenge.api.mdx b/docs/greenfield-api/attested-challenge.api.mdx new file mode 100644 index 000000000..53f350c4b --- /dev/null +++ b/docs/greenfield-api/attested-challenge.api.mdx @@ -0,0 +1,42 @@ +--- +id: attested-challenge +title: "AttestedChallenge" +description: "Queries the attested challenge by challenge id." +sidebar_label: "AttestedChallenge" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"AttestedChallenge","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"challenge":{"type":"object","properties":{"id":{"type":"string","format":"uint64","description":"The id of the challenge."},"result":{"description":"The attestation result of the challenge.","type":"string","enum":["CHALLENGE_FAILED","CHALLENGE_SUCCEED"],"default":"CHALLENGE_FAILED"}},"description":"AttestedChallenge records the challenge which are attested."}},"description":"QueryAttestedChallengeResponse is response type for the Query/AttestedChallenge RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"challenge_id","description":"The id of the challenge.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}}],"tags":["challenge"],"description":"Queries the attested challenge by challenge id.","method":"get","path":"/greenfield/challenge/attested_challenge","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"AttestedChallenge","description":{"content":"Queries the attested challenge by challenge id.","type":"text/plain"},"url":{"path":["greenfield","challenge","attested_challenge"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"The id of the challenge.","type":"text/plain"},"key":"challenge_id","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## AttestedChallenge + + + +Queries the attested challenge by challenge id. + +
Query Parameters
+ +A successful response. + +
Schema
    challenge object
    + +AttestedChallenge records the challenge which are attested. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/auth-params.api.mdx b/docs/greenfield-api/auth-params.api.mdx new file mode 100644 index 000000000..a8a97f4d4 --- /dev/null +++ b/docs/greenfield-api/auth-params.api.mdx @@ -0,0 +1,42 @@ +--- +id: auth-params +title: "AuthParams" +description: "Params queries all parameters." +sidebar_label: "AuthParams" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"AuthParams","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"params":{"description":"params defines the parameters of the module.","type":"object","properties":{"max_memo_characters":{"type":"string","format":"uint64"},"tx_sig_limit":{"type":"string","format":"uint64"},"tx_size_cost_per_byte":{"type":"string","format":"uint64"},"sig_verify_cost_ed25519":{"type":"string","format":"uint64"},"sig_verify_cost_secp256k1":{"type":"string","format":"uint64"}}}},"description":"QueryParamsResponse is the response type for the Query/Params RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"tags":["auth"],"description":"Params queries all parameters.","method":"get","path":"/cosmos/auth/v1beta1/params","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"AuthParams","description":{"content":"Params queries all parameters.","type":"text/plain"},"url":{"path":["cosmos","auth","v1beta1","params"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## AuthParams + + + +Params queries all parameters. + +
+ +A successful response. + +
Schema
    params object
    + +params defines the parameters of the module. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/auto-settle-records.api.mdx b/docs/greenfield-api/auto-settle-records.api.mdx new file mode 100644 index 000000000..f5d3e0919 --- /dev/null +++ b/docs/greenfield-api/auto-settle-records.api.mdx @@ -0,0 +1,48 @@ +--- +id: auto-settle-records +title: "AutoSettleRecords" +description: "Queries all auto settle records." +sidebar_label: "AutoSettleRecords" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"AutoSettleRecords","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"auto_settle_records":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string","format":"int64","description":"timestamp is the unix timestamp when the stream account will be settled."},"addr":{"type":"string","title":"A stream account address"}},"description":"AutoSettleRecord is the record keeps the auto settle information.\nThe EndBlocker of payment module will scan the list of AutoSettleRecord\nand settle the stream account if the timestamp is less than the current time."}},"pagination":{"type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}},"description":"PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["payment"],"description":"Queries all auto settle records.","method":"get","path":"/greenfield/payment/auto_settle_records","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"AutoSettleRecords","description":{"content":"Queries all auto settle records.","type":"text/plain"},"url":{"path":["greenfield","payment","auto_settle_records"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## AutoSettleRecords + + + +Queries all auto settle records. + +
Query Parameters
+ +A successful response. + +
Schema
    auto_settle_records object[]
  • Array [
  • ]
  • pagination object
    + +PageResponse is to be embedded in gRPC response messages where the +corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/available-global-virtual-group-families.api.mdx b/docs/greenfield-api/available-global-virtual-group-families.api.mdx new file mode 100644 index 000000000..53cdd7c46 --- /dev/null +++ b/docs/greenfield-api/available-global-virtual-group-families.api.mdx @@ -0,0 +1,38 @@ +--- +id: available-global-virtual-group-families +title: "AvailableGlobalVirtualGroupFamilies" +description: "AvailableGlobalVirtualGroupFamilies filters a list of GlobalVirtualGroupFamilies ID which are qualified to create bucket on" +sidebar_label: "AvailableGlobalVirtualGroupFamilies" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"AvailableGlobalVirtualGroupFamilies","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"global_virtual_group_family_ids":{"type":"array","items":{"type":"integer","format":"int64"}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"global_virtual_group_family_ids","in":"query","required":false,"explode":true,"schema":{"type":"array","items":{"type":"integer","format":"int64"}}}],"tags":["virtualgroup"],"description":"AvailableGlobalVirtualGroupFamilies filters a list of GlobalVirtualGroupFamilies ID which are qualified to create bucket on","method":"get","path":"/greenfield/virtualgroup/available_global_virtual_group_families","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"AvailableGlobalVirtualGroupFamilies","description":{"content":"AvailableGlobalVirtualGroupFamilies filters a list of GlobalVirtualGroupFamilies ID which are qualified to create bucket on","type":"text/plain"},"url":{"path":["greenfield","virtualgroup","available_global_virtual_group_families"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"global_virtual_group_family_ids","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## AvailableGlobalVirtualGroupFamilies + + + +AvailableGlobalVirtualGroupFamilies filters a list of GlobalVirtualGroupFamilies ID which are qualified to create bucket on + +
Query Parameters
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/balance.api.mdx b/docs/greenfield-api/balance.api.mdx new file mode 100644 index 000000000..64bdc63da --- /dev/null +++ b/docs/greenfield-api/balance.api.mdx @@ -0,0 +1,45 @@ +--- +id: balance +title: "Balance" +description: "Balance queries the balance of a single coin for a single account." +sidebar_label: "Balance" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"Balance","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"balance":{"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."}},"description":"QueryBalanceResponse is the response type for the Query/Balance RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"address","description":"address is the address to query balances for.","in":"path","required":true,"schema":{"type":"string"}},{"name":"denom","description":"denom is the coin denom to query balances for.","in":"query","required":false,"schema":{"type":"string"}}],"tags":["bank"],"description":"Balance queries the balance of a single coin for a single account.","method":"get","path":"/cosmos/bank/v1beta1/balances/{address}/by_denom","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"Balance","description":{"content":"Balance queries the balance of a single coin for a single account.","type":"text/plain"},"url":{"path":["cosmos","bank","v1beta1","balances",":address","by_denom"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"denom is the coin denom to query balances for.","type":"text/plain"},"key":"denom","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) address is the address to query balances for.","type":"text/plain"},"type":"any","value":"","key":"address"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Balance + + + +Balance queries the balance of a single coin for a single account. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    balance object
    + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method +signatures required by gogoproto. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/bank-params.api.mdx b/docs/greenfield-api/bank-params.api.mdx new file mode 100644 index 000000000..198b51968 --- /dev/null +++ b/docs/greenfield-api/bank-params.api.mdx @@ -0,0 +1,50 @@ +--- +id: bank-params +title: "BankParams" +description: "Params queries the parameters of x/bank module." +sidebar_label: "BankParams" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"BankParams","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"params":{"type":"object","properties":{"send_enabled":{"type":"array","items":{"type":"object","properties":{"denom":{"type":"string"},"enabled":{"type":"boolean"}},"description":"SendEnabled maps coin denom to a send_enabled status (whether a denom is\nsendable)."},"description":"Deprecated: Use of SendEnabled in params is deprecated.\nFor genesis, use the newly added send_enabled field in the genesis object.\nStorage, lookup, and manipulation of this information is now in the keeper.\n\nAs of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files."},"default_send_enabled":{"type":"boolean"}},"description":"Params defines the parameters for the bank module."}},"description":"QueryParamsResponse defines the response type for querying x/bank parameters."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["bank"],"description":"Params queries the parameters of x/bank module.","method":"get","path":"/cosmos/bank/v1beta1/params","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"BankParams","description":{"content":"Params queries the parameters of x/bank module.","type":"text/plain"},"url":{"path":["cosmos","bank","v1beta1","params"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## BankParams + + + +Params queries the parameters of x/bank module. + +
+ +A successful response. + +
Schema
    params object
    + +Params defines the parameters for the bank module. + +
    send_enabled object[]
    + +Deprecated: Use of SendEnabled in params is deprecated. +For genesis, use the newly added send_enabled field in the genesis object. +Storage, lookup, and manipulation of this information is now in the keeper. + +As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files. + +
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/bridge-params.api.mdx b/docs/greenfield-api/bridge-params.api.mdx new file mode 100644 index 000000000..138387188 --- /dev/null +++ b/docs/greenfield-api/bridge-params.api.mdx @@ -0,0 +1,42 @@ +--- +id: bridge-params +title: "BridgeParams" +description: "Parameters queries the parameters of the module." +sidebar_label: "BridgeParams" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"BridgeParams","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","type":"object","properties":{"bsc_transfer_out_relayer_fee":{"type":"string","title":"Relayer fee for the cross chain transfer out tx to bsc"},"bsc_transfer_out_ack_relayer_fee":{"type":"string","title":"Relayer fee for the ACK or FAIL_ACK package of the cross chain transfer out tx to bsc"}}}},"description":"QueryParamsResponse is response type for the Query/Params RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["bridge"],"description":"Parameters queries the parameters of the module.","method":"get","path":"/greenfield/bridge/params","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"BridgeParams","description":{"content":"Parameters queries the parameters of the module.","type":"text/plain"},"url":{"path":["greenfield","bridge","params"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## BridgeParams + + + +Parameters queries the parameters of the module. + +
+ +A successful response. + +
Schema
    params object
    + +params holds all the parameters of this module. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/broadcast-tx.api.mdx b/docs/greenfield-api/broadcast-tx.api.mdx new file mode 100644 index 000000000..ef3502997 --- /dev/null +++ b/docs/greenfield-api/broadcast-tx.api.mdx @@ -0,0 +1,149 @@ +--- +id: broadcast-tx +title: "BroadcastTx" +description: "BroadcastTx broadcast transaction." +sidebar_label: "BroadcastTx" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"BroadcastTx","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"tx_response":{"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."},"raw_log":{"type":"string","description":"The output of the application's logger (raw string). May be\nnon-deterministic."},"logs":{"type":"array","items":{"type":"object","properties":{"msg_index":{"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."},"gas_wanted":{"type":"string","format":"int64","description":"Amount of gas requested for transaction."},"gas_used":{"type":"string","format":"int64","description":"Amount of gas consumed by transaction."},"tx":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"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"}},"description":"EventAttribute is a single key-value pair, associated with an event."}}},"description":"Event allows application developers to attach additional information to\nResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx.\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.\n\nSince: cosmos-sdk 0.42.11, 0.44.5, 0.45"}},"description":"TxResponse defines a structure containing relevant tx data and metadata. The\ntags are stringified and the log is JSON decoded."}},"description":"BroadcastTxResponse is the response type for the\nService.BroadcastTx method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tx_bytes":{"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 method.\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 for\na CheckTx execution response only.\n - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns\nimmediately."}},"description":"BroadcastTxRequest is the request type for the Service.BroadcastTxRequest\nRPC method."}}},"required":true},"tags":["tx"],"description":"BroadcastTx broadcast transaction.","method":"post","path":"/cosmos/tx/v1beta1/txs","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"jsonRequestBodyExample":{"tx_bytes":"string","mode":"BROADCAST_MODE_UNSPECIFIED"},"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"BroadcastTx","description":{"content":"BroadcastTx broadcast transaction.","type":"text/plain"},"url":{"path":["cosmos","tx","v1beta1","txs"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"*/*"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "post api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## BroadcastTx + + + +BroadcastTx broadcast transaction. + +
Request Body required
+ +A successful response. + +
Schema
    tx_response object
    + +TxResponse defines a structure containing relevant tx data and metadata. The +tags are stringified and the log is JSON decoded. + +
    logs object[]
    + +The output of the application's logger (typed). May be non-deterministic. + +
  • Array [
  • events object[]
    + +Events contains a slice of Event objects that were emitted during some +execution. + +
  • Array [
  • attributes object[]
  • Array [
  • ]
  • ]
  • ]
  • tx object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
    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 object[]
    + +Events defines all the events emitted by processing a transaction. Note, +these events include those emitted by processing all the messages and those +emitted from the ante. Whereas Logs contains the events, with +additional metadata, emitted only by processing the messages. + +Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + +
  • Array [
  • attributes object[]
  • Array [
  • ]
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/challenge-params.api.mdx b/docs/greenfield-api/challenge-params.api.mdx new file mode 100644 index 000000000..202020bd9 --- /dev/null +++ b/docs/greenfield-api/challenge-params.api.mdx @@ -0,0 +1,42 @@ +--- +id: challenge-params +title: "ChallengeParams" +description: "Parameters queries the parameters of the module." +sidebar_label: "ChallengeParams" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"ChallengeParams","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","type":"object","properties":{"challenge_count_per_block":{"type":"string","format":"uint64","description":"Challenges which will be emitted in each block, including user submitted or randomly triggered."},"challenge_keep_alive_period":{"type":"string","format":"uint64","description":"Challenges will be expired after the period, including user submitted or randomly triggered."},"slash_cooling_off_period":{"type":"string","format":"uint64","description":"The count of blocks to stand for the period in which the same storage and object info cannot be slashed again."},"slash_amount_size_rate":{"type":"string","description":"The slash coin amount will be calculated from the size of object info, and adjusted by this rate."},"slash_amount_min":{"type":"string","description":"The minimal slash amount."},"slash_amount_max":{"type":"string","description":"The maximum slash amount."},"reward_validator_ratio":{"type":"string","description":"The ratio of slash amount to reward all current validators."},"reward_submitter_ratio":{"type":"string","description":"The ratio of reward amount to reward attestation submitter."},"reward_submitter_threshold":{"type":"string","description":"The reward amount to submitter will be adjusted by the threshold."},"heartbeat_interval":{"type":"string","format":"uint64","description":"Heartbeat interval, based on challenge id, defines the frequency of heartbeat attestation."},"attestation_inturn_interval":{"type":"string","format":"uint64","description":"The time duration for each submitter to submit attestations in turn."},"attestation_kept_count":{"type":"string","format":"uint64","description":"The number of kept attested challenge ids, which can be queried by clients."},"sp_slash_max_amount":{"type":"string","description":"The max slash amount for a sp in a counting window."},"sp_slash_counting_window":{"type":"string","format":"uint64","description":"The number of blocks to count how much a sp had been slashed."}}}},"description":"QueryParamsResponse is response type for the Query/Params RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["challenge"],"description":"Parameters queries the parameters of the module.","method":"get","path":"/greenfield/challenge/params","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"ChallengeParams","description":{"content":"Parameters queries the parameters of the module.","type":"text/plain"},"url":{"path":["greenfield","challenge","params"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## ChallengeParams + + + +Parameters queries the parameters of the module. + +
+ +A successful response. + +
Schema
    params object
    + +params holds all the parameters of this module. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/community-pool.api.mdx b/docs/greenfield-api/community-pool.api.mdx new file mode 100644 index 000000000..d17541d2e --- /dev/null +++ b/docs/greenfield-api/community-pool.api.mdx @@ -0,0 +1,42 @@ +--- +id: community-pool +title: "CommunityPool" +description: "CommunityPool queries the community pool coins." +sidebar_label: "CommunityPool" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"CommunityPool","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"pool":{"type":"array","items":{"type":"object","properties":{"denom":{"type":"string"},"amount":{"type":"string"}},"description":"DecCoin defines a token with a denomination and a decimal amount.\n\nNOTE: The amount field is an Dec which implements the custom method\nsignatures required by gogoproto."},"description":"pool defines community pool's coins."}},"description":"QueryCommunityPoolResponse is the response type for the Query/CommunityPool\nRPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["distribution"],"description":"CommunityPool queries the community pool coins.","method":"get","path":"/cosmos/distribution/v1beta1/community_pool","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"CommunityPool","description":{"content":"CommunityPool queries the community pool coins.","type":"text/plain"},"url":{"path":["cosmos","distribution","v1beta1","community_pool"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## CommunityPool + + + +CommunityPool queries the community pool coins. + +
+ +A successful response. + +
Schema
    pool object[]
    + +pool defines community pool's coins. + +
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/cross-chain-package.api.mdx b/docs/greenfield-api/cross-chain-package.api.mdx new file mode 100644 index 000000000..37fe5844d --- /dev/null +++ b/docs/greenfield-api/cross-chain-package.api.mdx @@ -0,0 +1,38 @@ +--- +id: cross-chain-package +title: "CrossChainPackage" +description: "CrossChainPackage returns the specified cross chain package" +sidebar_label: "CrossChainPackage" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"CrossChainPackage","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"package":{"type":"string","format":"byte","title":"content of the cross chain package"}},"description":"QueryCrossChainPackageResponse is the response type for the Query/CrossChainPackage RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"dest_chain_id","description":"destination chain id.","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"channel_id","description":"channel id of the cross chain package.","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"sequence","description":"sequence of the cross chain package.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}}],"tags":["crosschain"],"description":"CrossChainPackage returns the specified cross chain package","method":"get","path":"/cosmos/crosschain/v1/cross_chain_package","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"CrossChainPackage","description":{"content":"CrossChainPackage returns the specified cross chain package","type":"text/plain"},"url":{"path":["cosmos","crosschain","v1","cross_chain_package"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"destination chain id.","type":"text/plain"},"key":"dest_chain_id","value":""},{"disabled":false,"description":{"content":"channel id of the cross chain package.","type":"text/plain"},"key":"channel_id","value":""},{"disabled":false,"description":{"content":"sequence of the cross chain package.","type":"text/plain"},"key":"sequence","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## CrossChainPackage + + + +CrossChainPackage returns the specified cross chain package + +
Query Parameters
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/crosschain-params.api.mdx b/docs/greenfield-api/crosschain-params.api.mdx new file mode 100644 index 000000000..53e8e2e27 --- /dev/null +++ b/docs/greenfield-api/crosschain-params.api.mdx @@ -0,0 +1,42 @@ +--- +id: crosschain-params +title: "CrosschainParams" +description: "Params returns the total set of cross chain parameters." +sidebar_label: "CrosschainParams" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"CrosschainParams","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"params":{"description":"params defines the parameters of the module.","type":"object","properties":{"init_module_balance":{"type":"string","title":"initial balance to mint for crosschain module when the chain starts"}}}},"description":"QueryParamsResponse is the response type for the Query/Params RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["crosschain"],"description":"Params returns the total set of cross chain parameters.","method":"get","path":"/cosmos/crosschain/v1/params","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"CrosschainParams","description":{"content":"Params returns the total set of cross chain parameters.","type":"text/plain"},"url":{"path":["cosmos","crosschain","v1","params"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## CrosschainParams + + + +Params returns the total set of cross chain parameters. + +
+ +A successful response. + +
Schema
    params object
    + +params defines the parameters of the module. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/current-plan.api.mdx b/docs/greenfield-api/current-plan.api.mdx new file mode 100644 index 000000000..e0c17f13c --- /dev/null +++ b/docs/greenfield-api/current-plan.api.mdx @@ -0,0 +1,42 @@ +--- +id: current-plan +title: "CurrentPlan" +description: "CurrentPlan queries the current upgrade plan." +sidebar_label: "CurrentPlan" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"CurrentPlan","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"plan":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Sets the name for the upgrade. This name will be used by the upgraded\nversion of the software to apply any special \"on-upgrade\" commands during\nthe first BeginBlock method after the upgrade is applied. It is also used\nto detect whether a software version can handle a given upgrade. If no\nupgrade handler with this name has been set in the software, it will be\nassumed that the software is out-of-date when the upgrade Time or Height is\nreached and the software will exit."},"height":{"type":"string","format":"int64","description":"The height at which the upgrade must be performed.\nOnly used if Time is not set."},"info":{"type":"string","title":"Any application specific upgrade info to be included on-chain\nsuch as a git commit that validators could automatically upgrade to"}},"description":"Plan specifies information about a planned upgrade and when it should occur."},"description":"plan is the current upgrade plan."}},"description":"QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC\nmethod."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["upgrade"],"description":"CurrentPlan queries the current upgrade plan.","method":"get","path":"/cosmos/upgrade/v1beta1/current_plan","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"CurrentPlan","description":{"content":"CurrentPlan queries the current upgrade plan.","type":"text/plain"},"url":{"path":["cosmos","upgrade","v1beta1","current_plan"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## CurrentPlan + + + +CurrentPlan queries the current upgrade plan. + +
+ +A successful response. + +
Schema
    plan object[]
    + +plan is the current upgrade plan. + +
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/delayed-withdrawal.api.mdx b/docs/greenfield-api/delayed-withdrawal.api.mdx new file mode 100644 index 000000000..6485f9da9 --- /dev/null +++ b/docs/greenfield-api/delayed-withdrawal.api.mdx @@ -0,0 +1,38 @@ +--- +id: delayed-withdrawal +title: "DelayedWithdrawal" +description: "Queries delayed withdrawal of a account." +sidebar_label: "DelayedWithdrawal" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"DelayedWithdrawal","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"delayed_withdrawal":{"type":"object","properties":{"addr":{"type":"string","title":"the withdrawal address"},"amount":{"type":"string","title":"the withdrawal amount"},"from":{"type":"string","title":"the withdrawal from payment account address"},"unlock_timestamp":{"type":"string","format":"int64","title":"unlock timestamp is the unix timestamp to unlock the withdrawal"}}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"account","in":"path","required":true,"schema":{"type":"string"}}],"tags":["payment"],"description":"Queries delayed withdrawal of a account.","method":"get","path":"/greenfield/payment/delayed_withdrawal/{account}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"DelayedWithdrawal","description":{"content":"Queries delayed withdrawal of a account.","type":"text/plain"},"url":{"path":["greenfield","payment","delayed_withdrawal",":account"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"account"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## DelayedWithdrawal + + + +Queries delayed withdrawal of a account. + +
Path Parameters
+ +A successful response. + +
Schema
    delayed_withdrawal object
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/delegation-rewards.api.mdx b/docs/greenfield-api/delegation-rewards.api.mdx new file mode 100644 index 000000000..64921e102 --- /dev/null +++ b/docs/greenfield-api/delegation-rewards.api.mdx @@ -0,0 +1,42 @@ +--- +id: delegation-rewards +title: "DelegationRewards" +description: "DelegationRewards queries the total rewards accrued by a delegation." +sidebar_label: "DelegationRewards" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"DelegationRewards","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"rewards":{"type":"array","items":{"type":"object","properties":{"denom":{"type":"string"},"amount":{"type":"string"}},"description":"DecCoin defines a token with a denomination and a decimal amount.\n\nNOTE: The amount field is an Dec which implements the custom method\nsignatures required by gogoproto."},"description":"rewards defines the rewards accrued by a delegation."}},"description":"QueryDelegationRewardsResponse is the response type for the\nQuery/DelegationRewards RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"delegator_address","description":"delegator_address defines the delegator address to query for.","in":"path","required":true,"schema":{"type":"string"}},{"name":"validator_address","description":"validator_address defines the validator address to query for.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["distribution"],"description":"DelegationRewards queries the total rewards accrued by a delegation.","method":"get","path":"/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"DelegationRewards","description":{"content":"DelegationRewards queries the total rewards accrued by a delegation.","type":"text/plain"},"url":{"path":["cosmos","distribution","v1beta1","delegators",":delegator_address","rewards",":validator_address"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) delegator_address defines the delegator address to query for.","type":"text/plain"},"type":"any","value":"","key":"delegator_address"},{"disabled":false,"description":{"content":"(Required) validator_address defines the validator address to query for.","type":"text/plain"},"type":"any","value":"","key":"validator_address"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## DelegationRewards + + + +DelegationRewards queries the total rewards accrued by a delegation. + +
Path Parameters
+ +A successful response. + +
Schema
    rewards object[]
    + +rewards defines the rewards accrued by a delegation. + +
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/delegation-total-rewards.api.mdx b/docs/greenfield-api/delegation-total-rewards.api.mdx new file mode 100644 index 000000000..dc291efba --- /dev/null +++ b/docs/greenfield-api/delegation-total-rewards.api.mdx @@ -0,0 +1,47 @@ +--- +id: delegation-total-rewards +title: "DelegationTotalRewards" +description: "DelegationTotalRewards queries the total rewards accrued by a each" +sidebar_label: "DelegationTotalRewards" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"DelegationTotalRewards","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"rewards":{"type":"array","items":{"type":"object","properties":{"validator_address":{"type":"string"},"reward":{"type":"array","items":{"type":"object","properties":{"denom":{"type":"string"},"amount":{"type":"string"}},"description":"DecCoin defines a token with a denomination and a decimal amount.\n\nNOTE: The amount field is an Dec which implements the custom method\nsignatures required by gogoproto."}}},"description":"DelegationDelegatorReward represents the properties\nof a delegator's delegation reward."},"description":"rewards defines all the rewards accrued by a delegator."},"total":{"type":"array","items":{"type":"object","properties":{"denom":{"type":"string"},"amount":{"type":"string"}},"description":"DecCoin defines a token with a denomination and a decimal amount.\n\nNOTE: The amount field is an Dec which implements the custom method\nsignatures required by gogoproto."},"description":"total defines the sum of all the rewards."}},"description":"QueryDelegationTotalRewardsResponse is the response type for the\nQuery/DelegationTotalRewards RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"delegator_address","description":"delegator_address defines the delegator address to query for.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["distribution"],"description":"DelegationTotalRewards queries the total rewards accrued by a each\nvalidator.","method":"get","path":"/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"DelegationTotalRewards","description":{"content":"DelegationTotalRewards queries the total rewards accrued by a each\nvalidator.","type":"text/plain"},"url":{"path":["cosmos","distribution","v1beta1","delegators",":delegator_address","rewards"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) delegator_address defines the delegator address to query for.","type":"text/plain"},"type":"any","value":"","key":"delegator_address"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## DelegationTotalRewards + + + +DelegationTotalRewards queries the total rewards accrued by a each +validator. + +
Path Parameters
+ +A successful response. + +
Schema
    rewards object[]
    + +rewards defines all the rewards accrued by a delegator. + +
  • Array [
  • reward object[]
  • Array [
  • ]
  • ]
  • total object[]
    + +total defines the sum of all the rewards. + +
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/delegation.api.mdx b/docs/greenfield-api/delegation.api.mdx new file mode 100644 index 000000000..d64a70814 --- /dev/null +++ b/docs/greenfield-api/delegation.api.mdx @@ -0,0 +1,56 @@ +--- +id: delegation +title: "Delegation" +description: "Delegation queries delegate info for given validator delegator pair." +sidebar_label: "Delegation" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"Delegation","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"delegation_response":{"type":"object","properties":{"delegation":{"type":"object","properties":{"delegator_address":{"type":"string","description":"delegator_address is the bech32-encoded address of the delegator."},"validator_address":{"type":"string","description":"validator_address is the bech32-encoded address of the validator."},"shares":{"type":"string","description":"shares define the delegation shares received."}},"description":"Delegation represents the bond with tokens held by an account. It is\nowned by one delegator, and is associated with the voting power of one\nvalidator."},"balance":{"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."}},"description":"DelegationResponse is equivalent to Delegation except that it contains a\nbalance in addition to shares which is more suitable for client responses."}},"description":"QueryDelegationResponse is response type for the Query/Delegation RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"validator_addr","description":"validator_addr defines the validator address to query for.","in":"path","required":true,"schema":{"type":"string"}},{"name":"delegator_addr","description":"delegator_addr defines the delegator address to query for.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["staking"],"description":"Delegation queries delegate info for given validator delegator pair.","method":"get","path":"/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"Delegation","description":{"content":"Delegation queries delegate info for given validator delegator pair.","type":"text/plain"},"url":{"path":["cosmos","staking","v1beta1","validators",":validator_addr","delegations",":delegator_addr"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) validator_addr defines the validator address to query for.","type":"text/plain"},"type":"any","value":"","key":"validator_addr"},{"disabled":false,"description":{"content":"(Required) delegator_addr defines the delegator address to query for.","type":"text/plain"},"type":"any","value":"","key":"delegator_addr"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Delegation + + + +Delegation queries delegate info for given validator delegator pair. + +
Path Parameters
+ +A successful response. + +
Schema
    delegation_response object
    + +DelegationResponse is equivalent to Delegation except that it contains a +balance in addition to shares which is more suitable for client responses. + +
    delegation object
    + +Delegation represents the bond with tokens held by an account. It is +owned by one delegator, and is associated with the voting power of one +validator. + +
    balance object
    + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method +signatures required by gogoproto. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/delegator-delegations.api.mdx b/docs/greenfield-api/delegator-delegations.api.mdx new file mode 100644 index 000000000..2aa05802f --- /dev/null +++ b/docs/greenfield-api/delegator-delegations.api.mdx @@ -0,0 +1,59 @@ +--- +id: delegator-delegations +title: "DelegatorDelegations" +description: "DelegatorDelegations queries all delegations of a given delegator address." +sidebar_label: "DelegatorDelegations" +hide_title: true +hide_table_of_contents: true +api: {"description":"DelegatorDelegations queries all delegations of a given delegator address.","operationId":"DelegatorDelegations","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"delegation_responses":{"type":"array","items":{"type":"object","properties":{"delegation":{"type":"object","properties":{"delegator_address":{"type":"string","description":"delegator_address is the bech32-encoded address of the delegator."},"validator_address":{"type":"string","description":"validator_address is the bech32-encoded address of the validator."},"shares":{"type":"string","description":"shares define the delegation shares received."}},"description":"Delegation represents the bond with tokens held by an account. It is\nowned by one delegator, and is associated with the voting power of one\nvalidator."},"balance":{"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."}},"description":"DelegationResponse is equivalent to Delegation except that it contains a\nbalance in addition to shares which is more suitable for client responses."},"description":"delegation_responses defines all the delegations' info of a delegator."},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryDelegatorDelegationsResponse is response type for the\nQuery/DelegatorDelegations RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"delegator_addr","description":"delegator_addr defines the delegator address to query for.","in":"path","required":true,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["staking"],"method":"get","path":"/cosmos/staking/v1beta1/delegations/{delegator_addr}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"DelegatorDelegations","description":{"content":"DelegatorDelegations queries all delegations of a given delegator address.","type":"text/plain"},"url":{"path":["cosmos","staking","v1beta1","delegations",":delegator_addr"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) delegator_addr defines the delegator address to query for.","type":"text/plain"},"type":"any","value":"","key":"delegator_addr"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## DelegatorDelegations + + + +DelegatorDelegations queries all delegations of a given delegator address. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    delegation_responses object[]
    + +delegation_responses defines all the delegations' info of a delegator. + +
  • Array [
  • delegation object
    + +Delegation represents the bond with tokens held by an account. It is +owned by one delegator, and is associated with the voting power of one +validator. + +
    balance object
    + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method +signatures required by gogoproto. + +
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/delegator-unbonding-delegations.api.mdx b/docs/greenfield-api/delegator-unbonding-delegations.api.mdx new file mode 100644 index 000000000..14ff60bfa --- /dev/null +++ b/docs/greenfield-api/delegator-unbonding-delegations.api.mdx @@ -0,0 +1,47 @@ +--- +id: delegator-unbonding-delegations +title: "DelegatorUnbondingDelegations" +description: "DelegatorUnbondingDelegations queries all unbonding delegations of a given" +sidebar_label: "DelegatorUnbondingDelegations" +hide_title: true +hide_table_of_contents: true +api: {"description":"DelegatorUnbondingDelegations queries all unbonding delegations of a given\ndelegator address.","operationId":"DelegatorUnbondingDelegations","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"unbonding_responses":{"type":"array","items":{"type":"object","properties":{"delegator_address":{"type":"string","description":"delegator_address is the bech32-encoded address of the delegator."},"validator_address":{"type":"string","description":"validator_address is the bech32-encoded address of the validator."},"entries":{"type":"array","items":{"type":"object","properties":{"creation_height":{"type":"string","format":"int64","description":"creation_height is the height which the unbonding took place."},"completion_time":{"type":"string","format":"date-time","description":"completion_time is the unix time for unbonding completion."},"initial_balance":{"type":"string","description":"initial_balance defines the tokens initially scheduled to receive at completion."},"balance":{"type":"string","description":"balance defines the tokens to receive at completion."},"unbonding_id":{"type":"string","format":"uint64","title":"Incrementing id that uniquely identifies this entry"},"unbonding_on_hold_ref_count":{"type":"string","format":"int64","title":"Strictly positive if this entry's unbonding has been stopped by external modules"}},"description":"UnbondingDelegationEntry defines an unbonding object with relevant metadata."},"description":"entries are the unbonding delegation entries."}},"description":"UnbondingDelegation stores all of a single delegator's unbonding bonds\nfor a single validator in an time-ordered list."}},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryUnbondingDelegatorDelegationsResponse is response type for the\nQuery/UnbondingDelegatorDelegations RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"delegator_addr","description":"delegator_addr defines the delegator address to query for.","in":"path","required":true,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["staking"],"method":"get","path":"/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"DelegatorUnbondingDelegations","description":{"content":"DelegatorUnbondingDelegations queries all unbonding delegations of a given\ndelegator address.","type":"text/plain"},"url":{"path":["cosmos","staking","v1beta1","delegators",":delegator_addr","unbonding_delegations"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) delegator_addr defines the delegator address to query for.","type":"text/plain"},"type":"any","value":"","key":"delegator_addr"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## DelegatorUnbondingDelegations + + + +DelegatorUnbondingDelegations queries all unbonding delegations of a given +delegator address. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    unbonding_responses object[]
  • Array [
  • entries object[]
    + +entries are the unbonding delegation entries. + +
  • Array [
  • ]
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/delegator-validator.api.mdx b/docs/greenfield-api/delegator-validator.api.mdx new file mode 100644 index 000000000..33b4afc36 --- /dev/null +++ b/docs/greenfield-api/delegator-validator.api.mdx @@ -0,0 +1,150 @@ +--- +id: delegator-validator +title: "DelegatorValidator" +description: "DelegatorValidator queries validator info for given delegator validator" +sidebar_label: "DelegatorValidator" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"DelegatorValidator","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"validator":{"type":"object","properties":{"operator_address":{"type":"string","description":"operator_address defines the address of the validator's operator; bech encoded in JSON."},"consensus_pubkey":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"jailed":{"type":"boolean","description":"jailed defined whether the validator has been jailed from bonded status or not."},"status":{"description":"status is the validator status (bonded/unbonding/unbonded).","type":"string","enum":["BOND_STATUS_UNSPECIFIED","BOND_STATUS_UNBONDED","BOND_STATUS_UNBONDING","BOND_STATUS_BONDED"],"default":"BOND_STATUS_UNSPECIFIED"},"tokens":{"type":"string","description":"tokens define the delegated tokens (incl. self-delegation)."},"delegator_shares":{"type":"string","description":"delegator_shares defines total shares issued to a validator's delegators."},"description":{"description":"description defines the description terms for the validator.","type":"object","properties":{"moniker":{"type":"string","description":"moniker defines a human-readable name for the validator."},"identity":{"type":"string","description":"identity defines an optional identity signature (ex. UPort or Keybase)."},"website":{"type":"string","description":"website defines an optional website link."},"security_contact":{"type":"string","description":"security_contact defines an optional email for security contact."},"details":{"type":"string","description":"details define other optional details."}}},"unbonding_height":{"type":"string","format":"int64","description":"unbonding_height defines, if unbonding, the height at which this validator has begun unbonding."},"unbonding_time":{"type":"string","format":"date-time","description":"unbonding_time defines, if unbonding, the min time for the validator to complete unbonding."},"commission":{"description":"commission defines the commission parameters.","type":"object","properties":{"commission_rates":{"description":"commission_rates defines the initial commission rates to be used for creating a validator.","type":"object","properties":{"rate":{"type":"string","description":"rate is the commission rate charged to delegators, as a fraction."},"max_rate":{"type":"string","description":"max_rate defines the maximum commission rate which validator can ever charge, as a fraction."},"max_change_rate":{"type":"string","description":"max_change_rate defines the maximum daily increase of the validator commission, as a fraction."}}},"update_time":{"type":"string","format":"date-time","description":"update_time is the last time the commission rate was changed."}}},"min_self_delegation":{"type":"string","description":"min_self_delegation is the validator's self declared minimum self delegation.\n\nSince: cosmos-sdk 0.46"},"unbonding_on_hold_ref_count":{"type":"string","format":"int64","title":"strictly positive if this validator's unbonding has been stopped by external modules"},"unbonding_ids":{"type":"array","items":{"type":"string","format":"uint64"},"title":"list of unbonding ids, each uniquely identifing an unbonding of this validator"},"self_del_address":{"type":"string","description":"self_del_address defines the address of the validator for self delegation."},"relayer_address":{"type":"string","description":"relayer_address defines the address of the validator's authorized relayer;."},"challenger_address":{"type":"string","description":"challenger_address defines the address of the validator's authorized challenger;."},"bls_key":{"type":"string","format":"byte","title":"bls_key defines the bls pubkey of the validator's authorized relayer/challenger/operator;"}},"description":"Validator defines a validator, together with the total amount of the\nValidator's bond shares and their exchange rate to coins. Slashing results in\na decrease in the exchange rate, allowing correct calculation of future\nundelegations without iterating over delegators. When coins are delegated to\nthis validator, the validator is credited with a delegation whose number of\nbond shares is based on the amount of coins delegated divided by the current\nexchange rate. Voting power can be calculated as total bonded shares\nmultiplied by exchange rate."}},"description":"QueryDelegatorValidatorResponse response type for the\nQuery/DelegatorValidator RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"delegator_addr","description":"delegator_addr defines the delegator address to query for.","in":"path","required":true,"schema":{"type":"string"}},{"name":"validator_addr","description":"validator_addr defines the validator address to query for.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["staking"],"description":"DelegatorValidator queries validator info for given delegator validator\npair.","method":"get","path":"/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"DelegatorValidator","description":{"content":"DelegatorValidator queries validator info for given delegator validator\npair.","type":"text/plain"},"url":{"path":["cosmos","staking","v1beta1","delegators",":delegator_addr","validators",":validator_addr"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) delegator_addr defines the delegator address to query for.","type":"text/plain"},"type":"any","value":"","key":"delegator_addr"},{"disabled":false,"description":{"content":"(Required) validator_addr defines the validator address to query for.","type":"text/plain"},"type":"any","value":"","key":"validator_addr"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## DelegatorValidator + + + +DelegatorValidator queries validator info for given delegator validator +pair. + +
Path Parameters
+ +A successful response. + +
Schema
    validator object
    + +Validator defines a validator, together with the total amount of the +Validator's bond shares and their exchange rate to coins. Slashing results in +a decrease in the exchange rate, allowing correct calculation of future +undelegations without iterating over delegators. When coins are delegated to +this validator, the validator is credited with a delegation whose number of +bond shares is based on the amount of coins delegated divided by the current +exchange rate. Voting power can be calculated as total bonded shares +multiplied by exchange rate. + +
    consensus_pubkey object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
    description object
    + +description defines the description terms for the validator. + +
    commission object
    + +commission defines the commission parameters. + +
    commission_rates object
    + +commission_rates defines the initial commission rates to be used for creating a validator. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/delegator-validators.api.mdx b/docs/greenfield-api/delegator-validators.api.mdx new file mode 100644 index 000000000..7b2809f12 --- /dev/null +++ b/docs/greenfield-api/delegator-validators.api.mdx @@ -0,0 +1,38 @@ +--- +id: delegator-validators +title: "DelegatorValidators" +description: "DelegatorValidators queries the validators of a delegator." +sidebar_label: "DelegatorValidators" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"DelegatorValidators","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"validators":{"type":"array","items":{"type":"string"},"description":"validators defines the validators a delegator is delegating for."}},"description":"QueryDelegatorValidatorsResponse is the response type for the\nQuery/DelegatorValidators RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"delegator_address","description":"delegator_address defines the delegator address to query for.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["distribution"],"description":"DelegatorValidators queries the validators of a delegator.","method":"get","path":"/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"DelegatorValidators","description":{"content":"DelegatorValidators queries the validators of a delegator.","type":"text/plain"},"url":{"path":["cosmos","distribution","v1beta1","delegators",":delegator_address","validators"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) delegator_address defines the delegator address to query for.","type":"text/plain"},"type":"any","value":"","key":"delegator_address"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## DelegatorValidators + + + +DelegatorValidators queries the validators of a delegator. + +
Path Parameters
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/delegator-withdraw-address.api.mdx b/docs/greenfield-api/delegator-withdraw-address.api.mdx new file mode 100644 index 000000000..55c10a535 --- /dev/null +++ b/docs/greenfield-api/delegator-withdraw-address.api.mdx @@ -0,0 +1,38 @@ +--- +id: delegator-withdraw-address +title: "DelegatorWithdrawAddress" +description: "DelegatorWithdrawAddress queries withdraw address of a delegator." +sidebar_label: "DelegatorWithdrawAddress" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"DelegatorWithdrawAddress","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"withdraw_address":{"type":"string","description":"withdraw_address defines the delegator address to query for."}},"description":"QueryDelegatorWithdrawAddressResponse is the response type for the\nQuery/DelegatorWithdrawAddress RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"delegator_address","description":"delegator_address defines the delegator address to query for.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["distribution"],"description":"DelegatorWithdrawAddress queries withdraw address of a delegator.","method":"get","path":"/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"DelegatorWithdrawAddress","description":{"content":"DelegatorWithdrawAddress queries withdraw address of a delegator.","type":"text/plain"},"url":{"path":["cosmos","distribution","v1beta1","delegators",":delegator_address","withdraw_address"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) delegator_address defines the delegator address to query for.","type":"text/plain"},"type":"any","value":"","key":"delegator_address"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## DelegatorWithdrawAddress + + + +DelegatorWithdrawAddress queries withdraw address of a delegator. + +
Path Parameters
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/denom-metadata.api.mdx b/docs/greenfield-api/denom-metadata.api.mdx new file mode 100644 index 000000000..4cd6c2ce9 --- /dev/null +++ b/docs/greenfield-api/denom-metadata.api.mdx @@ -0,0 +1,43 @@ +--- +id: denom-metadata +title: "DenomMetadata" +description: "DenomsMetadata queries the client metadata of a given coin denomination." +sidebar_label: "DenomMetadata" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"DenomMetadata","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"description":{"type":"string"},"denom_units":{"type":"array","items":{"type":"object","properties":{"denom":{"type":"string","description":"denom represents the string name of the given denom unit (e.g uatom)."},"exponent":{"type":"integer","format":"int64","description":"exponent represents power of 10 exponent that one must\nraise the base_denom to in order to equal the given DenomUnit's denom\n1 denom = 10^exponent base_denom\n(e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with\nexponent = 6, thus: 1 atom = 10^6 uatom)."},"aliases":{"type":"array","items":{"type":"string"},"title":"aliases is a list of string aliases for the given denom"}},"description":"DenomUnit represents a struct that describes a given\ndenomination unit of the basic token."},"title":"denom_units represents the list of DenomUnit's for a given coin"},"base":{"type":"string","description":"base represents the base denom (should be the DenomUnit with exponent = 0)."},"display":{"type":"string","description":"display indicates the suggested denom that should be\ndisplayed in clients."},"name":{"type":"string","description":"Since: cosmos-sdk 0.43","title":"name defines the name of the token (eg: Cosmos Atom)"},"symbol":{"type":"string","description":"symbol is the token symbol usually shown on exchanges (eg: ATOM). This can\nbe the same as the display.\n\nSince: cosmos-sdk 0.43"},"uri":{"type":"string","description":"URI to a document (on or off-chain) that contains additional information. Optional.\n\nSince: cosmos-sdk 0.46"},"uri_hash":{"type":"string","description":"URIHash is a sha256 hash of a document pointed by URI. It's used to verify that\nthe document didn't change. Optional.\n\nSince: cosmos-sdk 0.46"}},"description":"Metadata represents a struct that describes\na basic token."}},"description":"QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC\nmethod."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"denom","description":"denom is the coin denom to query the metadata for.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["bank"],"description":"DenomsMetadata queries the client metadata of a given coin denomination.","method":"get","path":"/cosmos/bank/v1beta1/denoms_metadata/{denom}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"DenomMetadata","description":{"content":"DenomsMetadata queries the client metadata of a given coin denomination.","type":"text/plain"},"url":{"path":["cosmos","bank","v1beta1","denoms_metadata",":denom"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) denom is the coin denom to query the metadata for.","type":"text/plain"},"type":"any","value":"","key":"denom"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## DenomMetadata + + + +DenomsMetadata queries the client metadata of a given coin denomination. + +
Path Parameters
+ +A successful response. + +
Schema
    metadata object
    + +Metadata represents a struct that describes +a basic token. + +
    denom_units object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/denom-owners.api.mdx b/docs/greenfield-api/denom-owners.api.mdx new file mode 100644 index 000000000..bf30840ee --- /dev/null +++ b/docs/greenfield-api/denom-owners.api.mdx @@ -0,0 +1,50 @@ +--- +id: denom-owners +title: "DenomOwners" +description: "DenomOwners queries for all account addresses that own a particular token" +sidebar_label: "DenomOwners" +hide_title: true +hide_table_of_contents: true +api: {"description":"DenomOwners queries for all account addresses that own a particular token\ndenomination.","operationId":"DenomOwners","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"denom_owners":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"address defines the address that owns a particular denomination."},"balance":{"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."}},"description":"DenomOwner defines structure representing an account that owns or holds a\nparticular denominated token. It contains the account address and account\nbalance of the denominated token.\n\nSince: cosmos-sdk 0.46"}},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query.\n\nSince: cosmos-sdk 0.46"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"denom","description":"denom defines the coin denomination to query all account holders for.","in":"path","required":true,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["bank"],"method":"get","path":"/cosmos/bank/v1beta1/denom_owners/{denom}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"DenomOwners","description":{"content":"DenomOwners queries for all account addresses that own a particular token\ndenomination.","type":"text/plain"},"url":{"path":["cosmos","bank","v1beta1","denom_owners",":denom"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) denom defines the coin denomination to query all account holders for.","type":"text/plain"},"type":"any","value":"","key":"denom"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## DenomOwners + + + +DenomOwners queries for all account addresses that own a particular token +denomination. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    denom_owners object[]
  • Array [
  • balance object
    + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method +signatures required by gogoproto. + +
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/denoms-metadata.api.mdx b/docs/greenfield-api/denoms-metadata.api.mdx new file mode 100644 index 000000000..0bae66509 --- /dev/null +++ b/docs/greenfield-api/denoms-metadata.api.mdx @@ -0,0 +1,47 @@ +--- +id: denoms-metadata +title: "DenomsMetadata" +description: "DenomsMetadata queries the client metadata for all registered coin" +sidebar_label: "DenomsMetadata" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"DenomsMetadata","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"metadatas":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"denom_units":{"type":"array","items":{"type":"object","properties":{"denom":{"type":"string","description":"denom represents the string name of the given denom unit (e.g uatom)."},"exponent":{"type":"integer","format":"int64","description":"exponent represents power of 10 exponent that one must\nraise the base_denom to in order to equal the given DenomUnit's denom\n1 denom = 10^exponent base_denom\n(e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with\nexponent = 6, thus: 1 atom = 10^6 uatom)."},"aliases":{"type":"array","items":{"type":"string"},"title":"aliases is a list of string aliases for the given denom"}},"description":"DenomUnit represents a struct that describes a given\ndenomination unit of the basic token."},"title":"denom_units represents the list of DenomUnit's for a given coin"},"base":{"type":"string","description":"base represents the base denom (should be the DenomUnit with exponent = 0)."},"display":{"type":"string","description":"display indicates the suggested denom that should be\ndisplayed in clients."},"name":{"type":"string","description":"Since: cosmos-sdk 0.43","title":"name defines the name of the token (eg: Cosmos Atom)"},"symbol":{"type":"string","description":"symbol is the token symbol usually shown on exchanges (eg: ATOM). This can\nbe the same as the display.\n\nSince: cosmos-sdk 0.43"},"uri":{"type":"string","description":"URI to a document (on or off-chain) that contains additional information. Optional.\n\nSince: cosmos-sdk 0.46"},"uri_hash":{"type":"string","description":"URIHash is a sha256 hash of a document pointed by URI. It's used to verify that\nthe document didn't change. Optional.\n\nSince: cosmos-sdk 0.46"}},"description":"Metadata represents a struct that describes\na basic token."},"description":"metadata provides the client information for all the registered tokens."},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC\nmethod."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["bank"],"description":"DenomsMetadata queries the client metadata for all registered coin\ndenominations.","method":"get","path":"/cosmos/bank/v1beta1/denoms_metadata","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"DenomsMetadata","description":{"content":"DenomsMetadata queries the client metadata for all registered coin\ndenominations.","type":"text/plain"},"url":{"path":["cosmos","bank","v1beta1","denoms_metadata"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## DenomsMetadata + + + +DenomsMetadata queries the client metadata for all registered coin +denominations. + +
Query Parameters
+ +A successful response. + +
Schema
    metadatas object[]
    + +metadata provides the client information for all the registered tokens. + +
  • Array [
  • denom_units object[]
  • Array [
  • ]
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/distribution-params.api.mdx b/docs/greenfield-api/distribution-params.api.mdx new file mode 100644 index 000000000..634805838 --- /dev/null +++ b/docs/greenfield-api/distribution-params.api.mdx @@ -0,0 +1,42 @@ +--- +id: distribution-params +title: "DistributionParams" +description: "Params queries params of the distribution module." +sidebar_label: "DistributionParams" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"DistributionParams","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"params":{"description":"params defines the parameters of the module.","type":"object","properties":{"community_tax":{"type":"string"},"base_proposer_reward":{"type":"string","description":"Deprecated: The base_proposer_reward field is deprecated and is no longer used\nin the x/distribution module's reward mechanism."},"bonus_proposer_reward":{"type":"string","description":"Deprecated: The bonus_proposer_reward field is deprecated and is no longer used\nin the x/distribution module's reward mechanism."},"withdraw_addr_enabled":{"type":"boolean"}}}},"description":"QueryParamsResponse is the response type for the Query/Params RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["distribution"],"description":"Params queries params of the distribution module.","method":"get","path":"/cosmos/distribution/v1beta1/params","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"DistributionParams","description":{"content":"Params queries params of the distribution module.","type":"text/plain"},"url":{"path":["cosmos","distribution","v1beta1","params"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## DistributionParams + + + +Params queries params of the distribution module. + +
+ +A successful response. + +
Schema
    params object
    + +params defines the parameters of the module. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/dynamic-balance.api.mdx b/docs/greenfield-api/dynamic-balance.api.mdx new file mode 100644 index 000000000..26df0bc69 --- /dev/null +++ b/docs/greenfield-api/dynamic-balance.api.mdx @@ -0,0 +1,38 @@ +--- +id: dynamic-balance +title: "DynamicBalance" +description: "Queries dynamic balance of a payment account." +sidebar_label: "DynamicBalance" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"DynamicBalance","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"dynamic_balance":{"type":"string","title":"dynamic balance is static balance + flowDelta"},"stream_record":{"title":"the stream record of the given account, if it does not exist, it will be default values","type":"object","properties":{"account":{"type":"string","title":"account address"},"crud_timestamp":{"type":"string","format":"int64","title":"latest update timestamp of the stream record"},"netflow_rate":{"type":"string","description":"The per-second rate that an account's balance is changing.\nIt is the sum of the account's inbound and outbound flow rates."},"static_balance":{"type":"string","description":"The balance of the stream account at the latest CRUD timestamp."},"buffer_balance":{"type":"string","title":"reserved balance of the stream account\nIf the netflow rate is negative, the reserved balance is `netflow_rate * reserve_time`"},"lock_balance":{"type":"string","title":"the locked balance of the stream account after it puts a new object and before the object is sealed"},"status":{"title":"the status of the stream account","type":"string","enum":["STREAM_ACCOUNT_STATUS_ACTIVE","STREAM_ACCOUNT_STATUS_FROZEN"],"default":"STREAM_ACCOUNT_STATUS_ACTIVE","description":"- STREAM_ACCOUNT_STATUS_ACTIVE: STREAM_ACCOUNT_STATUS_ACTIVE defines the active status of a stream account.\n - STREAM_ACCOUNT_STATUS_FROZEN: STREAM_ACCOUNT_STATUS_FROZEN defines the frozen status of a stream account.\nA frozen stream account cannot be used as payment address for buckets.\nIt can be unfrozen by depositing more BNB to the stream account."},"settle_timestamp":{"type":"string","format":"int64","title":"the unix timestamp when the stream account will be settled"},"out_flow_count":{"type":"string","format":"uint64","title":"the count of its out flows"},"frozen_netflow_rate":{"type":"string","title":"the frozen netflow rate, which is used when resuming stream account"}}},"current_timestamp":{"type":"string","format":"int64","title":"the timestamp of the current block"},"bank_balance":{"type":"string","title":"bank_balance is the BNB balance of the bank module"},"available_balance":{"type":"string","title":"available_balance is bank balance + static balance"},"locked_fee":{"type":"string","title":"locked_fee is buffer balance + locked balance"},"change_rate":{"type":"string","title":"change_rate is the netflow rate of the given account"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"account","in":"path","required":true,"schema":{"type":"string"}}],"tags":["payment"],"description":"Queries dynamic balance of a payment account.","method":"get","path":"/greenfield/payment/dynamic_balance/{account}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"DynamicBalance","description":{"content":"Queries dynamic balance of a payment account.","type":"text/plain"},"url":{"path":["greenfield","payment","dynamic_balance",":account"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"account"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## DynamicBalance + + + +Queries dynamic balance of a payment account. + +
Path Parameters
+ +A successful response. + +
Schema
    stream_record object
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/evidence.api.mdx b/docs/greenfield-api/evidence.api.mdx new file mode 100644 index 000000000..0ca0ee6f9 --- /dev/null +++ b/docs/greenfield-api/evidence.api.mdx @@ -0,0 +1,126 @@ +--- +id: evidence +title: "Evidence" +description: "Evidence queries evidence based on evidence hash." +sidebar_label: "Evidence" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"Evidence","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"evidence":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}},"description":"QueryEvidenceResponse is the response type for the Query/Evidence RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"hash","description":"hash defines the evidence hash of the requested evidence.\n\nSince: cosmos-sdk 0.47","in":"path","required":true,"schema":{"type":"string"}},{"name":"evidence_hash","description":"evidence_hash defines the hash of the requested evidence.\nDeprecated: Use hash, a HEX encoded string, instead.","in":"query","required":false,"schema":{"type":"string","format":"byte"}}],"tags":["evidence"],"description":"Evidence queries evidence based on evidence hash.","method":"get","path":"/cosmos/evidence/v1beta1/evidence/{hash}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"Evidence","description":{"content":"Evidence queries evidence based on evidence hash.","type":"text/plain"},"url":{"path":["cosmos","evidence","v1beta1","evidence",":hash"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"evidence_hash defines the hash of the requested evidence.\nDeprecated: Use hash, a HEX encoded string, instead.","type":"text/plain"},"key":"evidence_hash","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) hash defines the evidence hash of the requested evidence.\n\nSince: cosmos-sdk 0.47","type":"text/plain"},"type":"any","value":"","key":"hash"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Evidence + + + +Evidence queries evidence based on evidence hash. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    evidence object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/gashub-params.api.mdx b/docs/greenfield-api/gashub-params.api.mdx new file mode 100644 index 000000000..3e597b0eb --- /dev/null +++ b/docs/greenfield-api/gashub-params.api.mdx @@ -0,0 +1,42 @@ +--- +id: gashub-params +title: "GashubParams" +description: "Params queries the parameters of x/gashub module." +sidebar_label: "GashubParams" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GashubParams","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"params":{"type":"object","properties":{"max_tx_size":{"type":"string","format":"uint64","description":"max_tx_size is the maximum size of a transaction's bytes."},"min_gas_per_byte":{"type":"string","format":"uint64","title":"min_gas_per_byte is the minimum gas to be paid per byte of a transaction's"}},"description":"Params defines the parameters for the gashub module."}},"description":"QueryParamsResponse defines the response type for querying x/gashub parameters."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["gashub"],"description":"Params queries the parameters of x/gashub module.","method":"get","path":"/cosmos/gashub/v1beta1/params","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GashubParams","description":{"content":"Params queries the parameters of x/gashub module.","type":"text/plain"},"url":{"path":["cosmos","gashub","v1beta1","params"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GashubParams + + + +Params queries the parameters of x/gashub module. + +
+ +A successful response. + +
Schema
    params object
    + +Params defines the parameters for the gashub module. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/get-block-by-height.api.mdx b/docs/greenfield-api/get-block-by-height.api.mdx new file mode 100644 index 000000000..46b10241c --- /dev/null +++ b/docs/greenfield-api/get-block-by-height.api.mdx @@ -0,0 +1,135 @@ +--- +id: get-block-by-height +title: "GetBlockByHeight" +description: "GetBlockByHeight queries block for given height." +sidebar_label: "GetBlockByHeight" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GetBlockByHeight","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"block":{"title":"Deprecated: please use `sdk_block` instead","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."},"chain_id":{"type":"string"},"height":{"type":"string","format":"int64"},"time":{"type":"string","format":"date-time"},"last_block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"last_commit_hash":{"type":"string","format":"byte","title":"hashes of block data"},"data_hash":{"type":"string","format":"byte"},"validators_hash":{"type":"string","format":"byte","title":"hashes from the app output from the prev block"},"next_validators_hash":{"type":"string","format":"byte"},"consensus_hash":{"type":"string","format":"byte"},"app_hash":{"type":"string","format":"byte"},"last_results_hash":{"type":"string","format":"byte"},"evidence_hash":{"type":"string","format":"byte","title":"consensus info"},"proposer_address":{"type":"string","format":"byte"}},"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":{"duplicate_vote_evidence":{"type":"object","properties":{"vote_a":{"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"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"timestamp":{"type":"string","format":"date-time"},"validator_address":{"type":"string","format":"byte"},"validator_index":{"type":"integer","format":"int32"},"signature":{"type":"string","format":"byte"}},"description":"Vote represents a prevote, precommit, or commit vote from validators for\nconsensus."},"vote_b":{"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"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"timestamp":{"type":"string","format":"date-time"},"validator_address":{"type":"string","format":"byte"},"validator_index":{"type":"integer","format":"int32"},"signature":{"type":"string","format":"byte"}},"description":"Vote represents a prevote, precommit, or commit vote from validators for\nconsensus."},"total_voting_power":{"type":"string","format":"int64"},"validator_power":{"type":"string","format":"int64"},"timestamp":{"type":"string","format":"date-time"}},"description":"DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes."},"light_client_attack_evidence":{"type":"object","properties":{"conflicting_block":{"type":"object","properties":{"signed_header":{"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."},"chain_id":{"type":"string"},"height":{"type":"string","format":"int64"},"time":{"type":"string","format":"date-time"},"last_block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"last_commit_hash":{"type":"string","format":"byte","title":"hashes of block data"},"data_hash":{"type":"string","format":"byte"},"validators_hash":{"type":"string","format":"byte","title":"hashes from the app output from the prev block"},"next_validators_hash":{"type":"string","format":"byte"},"consensus_hash":{"type":"string","format":"byte"},"app_hash":{"type":"string","format":"byte"},"last_results_hash":{"type":"string","format":"byte"},"evidence_hash":{"type":"string","format":"byte","title":"consensus info"},"proposer_address":{"type":"string","format":"byte"}},"description":"Header defines the structure of a block header."},"commit":{"type":"object","properties":{"height":{"type":"string","format":"int64"},"round":{"type":"integer","format":"int32"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"signatures":{"type":"array","items":{"type":"object","properties":{"block_id_flag":{"type":"string","enum":["BLOCK_ID_FLAG_UNKNOWN","BLOCK_ID_FLAG_ABSENT","BLOCK_ID_FLAG_COMMIT","BLOCK_ID_FLAG_NIL"],"default":"BLOCK_ID_FLAG_UNKNOWN","title":"BlockIdFlag indicates which BlcokID the signature is for"},"validator_address":{"type":"string","format":"byte"},"timestamp":{"type":"string","format":"date-time"},"signature":{"type":"string","format":"byte"}},"description":"CommitSig is a part of the Vote included in a Commit."}}},"description":"Commit contains the evidence that a block was committed by a set of validators."}}},"validator_set":{"type":"object","properties":{"validators":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","format":"byte"},"pub_key":{"type":"object","properties":{"ed25519":{"type":"string","format":"byte"},"secp256k1":{"type":"string","format":"byte"}},"title":"PublicKey defines the keys available for use with Validators"},"voting_power":{"type":"string","format":"int64"},"proposer_priority":{"type":"string","format":"int64"}}}},"proposer":{"type":"object","properties":{"address":{"type":"string","format":"byte"},"pub_key":{"type":"object","properties":{"ed25519":{"type":"string","format":"byte"},"secp256k1":{"type":"string","format":"byte"}},"title":"PublicKey defines the keys available for use with Validators"},"voting_power":{"type":"string","format":"int64"},"proposer_priority":{"type":"string","format":"int64"}}},"total_voting_power":{"type":"string","format":"int64"}}}}},"common_height":{"type":"string","format":"int64"},"byzantine_validators":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","format":"byte"},"pub_key":{"type":"object","properties":{"ed25519":{"type":"string","format":"byte"},"secp256k1":{"type":"string","format":"byte"}},"title":"PublicKey defines the keys available for use with Validators"},"voting_power":{"type":"string","format":"int64"},"proposer_priority":{"type":"string","format":"int64"}}}},"total_voting_power":{"type":"string","format":"int64"},"timestamp":{"type":"string","format":"date-time"}},"description":"LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client."}}}}}},"last_commit":{"type":"object","properties":{"height":{"type":"string","format":"int64"},"round":{"type":"integer","format":"int32"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"signatures":{"type":"array","items":{"type":"object","properties":{"block_id_flag":{"type":"string","enum":["BLOCK_ID_FLAG_UNKNOWN","BLOCK_ID_FLAG_ABSENT","BLOCK_ID_FLAG_COMMIT","BLOCK_ID_FLAG_NIL"],"default":"BLOCK_ID_FLAG_UNKNOWN","title":"BlockIdFlag indicates which BlcokID the signature is for"},"validator_address":{"type":"string","format":"byte"},"timestamp":{"type":"string","format":"date-time"},"signature":{"type":"string","format":"byte"}},"description":"CommitSig is a part of the Vote included in a Commit."}}},"description":"Commit contains the evidence that a block was committed by a set of validators."}}},"sdk_block":{"title":"Since: cosmos-sdk 0.47","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."},"chain_id":{"type":"string"},"height":{"type":"string","format":"int64"},"time":{"type":"string","format":"date-time"},"last_block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"last_commit_hash":{"type":"string","format":"byte","title":"hashes of block data"},"data_hash":{"type":"string","format":"byte"},"validators_hash":{"type":"string","format":"byte","title":"hashes from the app output from the prev block"},"next_validators_hash":{"type":"string","format":"byte"},"consensus_hash":{"type":"string","format":"byte"},"app_hash":{"type":"string","format":"byte"},"last_results_hash":{"type":"string","format":"byte"},"evidence_hash":{"type":"string","format":"byte","title":"consensus info"},"proposer_address":{"type":"string","description":"proposer_address is the original block proposer address, formatted as a hex string.\nIn Tendermint, this type is `bytes`, but in the SDK, we convert it to a hex string\nfor better UX."}},"description":"Header defines the structure of a Tendermint 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":{"duplicate_vote_evidence":{"type":"object","properties":{"vote_a":{"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"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"timestamp":{"type":"string","format":"date-time"},"validator_address":{"type":"string","format":"byte"},"validator_index":{"type":"integer","format":"int32"},"signature":{"type":"string","format":"byte"}},"description":"Vote represents a prevote, precommit, or commit vote from validators for\nconsensus."},"vote_b":{"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"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"timestamp":{"type":"string","format":"date-time"},"validator_address":{"type":"string","format":"byte"},"validator_index":{"type":"integer","format":"int32"},"signature":{"type":"string","format":"byte"}},"description":"Vote represents a prevote, precommit, or commit vote from validators for\nconsensus."},"total_voting_power":{"type":"string","format":"int64"},"validator_power":{"type":"string","format":"int64"},"timestamp":{"type":"string","format":"date-time"}},"description":"DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes."},"light_client_attack_evidence":{"type":"object","properties":{"conflicting_block":{"type":"object","properties":{"signed_header":{"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."},"chain_id":{"type":"string"},"height":{"type":"string","format":"int64"},"time":{"type":"string","format":"date-time"},"last_block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"last_commit_hash":{"type":"string","format":"byte","title":"hashes of block data"},"data_hash":{"type":"string","format":"byte"},"validators_hash":{"type":"string","format":"byte","title":"hashes from the app output from the prev block"},"next_validators_hash":{"type":"string","format":"byte"},"consensus_hash":{"type":"string","format":"byte"},"app_hash":{"type":"string","format":"byte"},"last_results_hash":{"type":"string","format":"byte"},"evidence_hash":{"type":"string","format":"byte","title":"consensus info"},"proposer_address":{"type":"string","format":"byte"}},"description":"Header defines the structure of a block header."},"commit":{"type":"object","properties":{"height":{"type":"string","format":"int64"},"round":{"type":"integer","format":"int32"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"signatures":{"type":"array","items":{"type":"object","properties":{"block_id_flag":{"type":"string","enum":["BLOCK_ID_FLAG_UNKNOWN","BLOCK_ID_FLAG_ABSENT","BLOCK_ID_FLAG_COMMIT","BLOCK_ID_FLAG_NIL"],"default":"BLOCK_ID_FLAG_UNKNOWN","title":"BlockIdFlag indicates which BlcokID the signature is for"},"validator_address":{"type":"string","format":"byte"},"timestamp":{"type":"string","format":"date-time"},"signature":{"type":"string","format":"byte"}},"description":"CommitSig is a part of the Vote included in a Commit."}}},"description":"Commit contains the evidence that a block was committed by a set of validators."}}},"validator_set":{"type":"object","properties":{"validators":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","format":"byte"},"pub_key":{"type":"object","properties":{"ed25519":{"type":"string","format":"byte"},"secp256k1":{"type":"string","format":"byte"}},"title":"PublicKey defines the keys available for use with Validators"},"voting_power":{"type":"string","format":"int64"},"proposer_priority":{"type":"string","format":"int64"}}}},"proposer":{"type":"object","properties":{"address":{"type":"string","format":"byte"},"pub_key":{"type":"object","properties":{"ed25519":{"type":"string","format":"byte"},"secp256k1":{"type":"string","format":"byte"}},"title":"PublicKey defines the keys available for use with Validators"},"voting_power":{"type":"string","format":"int64"},"proposer_priority":{"type":"string","format":"int64"}}},"total_voting_power":{"type":"string","format":"int64"}}}}},"common_height":{"type":"string","format":"int64"},"byzantine_validators":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","format":"byte"},"pub_key":{"type":"object","properties":{"ed25519":{"type":"string","format":"byte"},"secp256k1":{"type":"string","format":"byte"}},"title":"PublicKey defines the keys available for use with Validators"},"voting_power":{"type":"string","format":"int64"},"proposer_priority":{"type":"string","format":"int64"}}}},"total_voting_power":{"type":"string","format":"int64"},"timestamp":{"type":"string","format":"date-time"}},"description":"LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client."}}}}}},"last_commit":{"type":"object","properties":{"height":{"type":"string","format":"int64"},"round":{"type":"integer","format":"int32"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"signatures":{"type":"array","items":{"type":"object","properties":{"block_id_flag":{"type":"string","enum":["BLOCK_ID_FLAG_UNKNOWN","BLOCK_ID_FLAG_ABSENT","BLOCK_ID_FLAG_COMMIT","BLOCK_ID_FLAG_NIL"],"default":"BLOCK_ID_FLAG_UNKNOWN","title":"BlockIdFlag indicates which BlcokID the signature is for"},"validator_address":{"type":"string","format":"byte"},"timestamp":{"type":"string","format":"date-time"},"signature":{"type":"string","format":"byte"}},"description":"CommitSig is a part of the Vote included in a Commit."}}},"description":"Commit contains the evidence that a block was committed by a set of validators."}},"description":"Block is tendermint type Block, with the Header proposer address\nfield converted to hex string."}},"description":"GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"height","in":"path","required":true,"schema":{"type":"string","format":"int64"}}],"tags":["base"],"description":"GetBlockByHeight queries block for given height.","method":"get","path":"/cosmos/base/tendermint/v1beta1/blocks/{height}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GetBlockByHeight","description":{"content":"GetBlockByHeight queries block for given height.","type":"text/plain"},"url":{"path":["cosmos","base","tendermint","v1beta1","blocks",":height"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"height"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GetBlockByHeight + + + +GetBlockByHeight queries block for given height. + +
Path Parameters
+ +A successful response. + +
Schema
    block_id object
    part_set_header object
    block object
    header object
    + +Header defines the structure of a block header. + +
    version object
    + +Consensus captures the consensus rules for processing a block in the blockchain, +including all blockchain data structures and the rules of the application's +state transition machine. + +
    last_block_id object
    part_set_header object
    data object
    evidence object
    evidence object[]
  • Array [
  • duplicate_vote_evidence object
    + +DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. + +
    vote_a object
    + +Vote represents a prevote, precommit, or commit vote from validators for +consensus. + +
    block_id object
    part_set_header object
    vote_b object
    + +Vote represents a prevote, precommit, or commit vote from validators for +consensus. + +
    block_id object
    part_set_header object
    light_client_attack_evidence object
    + +LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. + +
    conflicting_block object
    signed_header object
    header object
    + +Header defines the structure of a block header. + +
    version object
    + +Consensus captures the consensus rules for processing a block in the blockchain, +including all blockchain data structures and the rules of the application's +state transition machine. + +
    last_block_id object
    part_set_header object
    commit object
    + +Commit contains the evidence that a block was committed by a set of validators. + +
    block_id object
    part_set_header object
    signatures object[]
  • Array [
  • ]
  • validator_set object
    validators object[]
  • Array [
  • pub_key object
  • ]
  • proposer object
    pub_key object
    byzantine_validators object[]
  • Array [
  • pub_key object
  • ]
  • ]
  • last_commit object
    + +Commit contains the evidence that a block was committed by a set of validators. + +
    block_id object
    part_set_header object
    signatures object[]
  • Array [
  • ]
  • sdk_block object
    + +Block is tendermint type Block, with the Header proposer address +field converted to hex string. + +
    header object
    + +Header defines the structure of a Tendermint block header. + +
    version object
    + +Consensus captures the consensus rules for processing a block in the blockchain, +including all blockchain data structures and the rules of the application's +state transition machine. + +
    last_block_id object
    part_set_header object
    data object
    evidence object
    evidence object[]
  • Array [
  • duplicate_vote_evidence object
    + +DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. + +
    vote_a object
    + +Vote represents a prevote, precommit, or commit vote from validators for +consensus. + +
    block_id object
    part_set_header object
    vote_b object
    + +Vote represents a prevote, precommit, or commit vote from validators for +consensus. + +
    block_id object
    part_set_header object
    light_client_attack_evidence object
    + +LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. + +
    conflicting_block object
    signed_header object
    header object
    + +Header defines the structure of a block header. + +
    version object
    + +Consensus captures the consensus rules for processing a block in the blockchain, +including all blockchain data structures and the rules of the application's +state transition machine. + +
    last_block_id object
    part_set_header object
    commit object
    + +Commit contains the evidence that a block was committed by a set of validators. + +
    block_id object
    part_set_header object
    signatures object[]
  • Array [
  • ]
  • validator_set object
    validators object[]
  • Array [
  • pub_key object
  • ]
  • proposer object
    pub_key object
    byzantine_validators object[]
  • Array [
  • pub_key object
  • ]
  • ]
  • last_commit object
    + +Commit contains the evidence that a block was committed by a set of validators. + +
    block_id object
    part_set_header object
    signatures object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/get-block-with-txs.api.mdx b/docs/greenfield-api/get-block-with-txs.api.mdx new file mode 100644 index 000000000..7e0796051 --- /dev/null +++ b/docs/greenfield-api/get-block-with-txs.api.mdx @@ -0,0 +1,233 @@ +--- +id: get-block-with-txs +title: "GetBlockWithTxs" +description: "GetBlockWithTxs fetches a block with decoded txs." +sidebar_label: "GetBlockWithTxs" +hide_title: true +hide_table_of_contents: true +api: {"description":"GetBlockWithTxs fetches a block with decoded txs.","operationId":"GetBlockWithTxs","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"txs":{"type":"array","items":{"type":"object","properties":{"body":{"title":"body is the processable content of the transaction","type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"description":"messages is a list of messages to be executed. The required signers of\nthose messages define the number and order of elements in AuthInfo's\nsigner_infos and Tx's signatures. Each required signer address is added to\nthe list only the first time it occurs.\nBy convention, the first required signer (usually from the first message)\nis referred to as the primary signer and pays the fee for the whole\ntransaction."},"memo":{"type":"string","description":"memo is any arbitrary note/comment to be added to the transaction.\nWARNING: in clients, any publicly exposed text should not be called memo,\nbut should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122)."},"timeout_height":{"type":"string","format":"uint64","title":"timeout is the block height after which this transaction will not\nbe processed by the chain"},"extension_options":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"title":"extension_options are arbitrary options that can be added by chains\nwhen the default options are not sufficient. If any of these are present\nand can't be handled, the transaction will be rejected"},"non_critical_extension_options":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"title":"extension_options are arbitrary options that can be added by chains\nwhen the default options are not sufficient. If any of these are present\nand can't be handled, they will be ignored"}},"description":"TxBody is the body of a transaction that all signers sign over."},"auth_info":{"title":"auth_info is the authorization related content of the transaction,\nspecifically signers, signer modes and fee","type":"object","properties":{"signer_infos":{"type":"array","items":{"type":"object","properties":{"public_key":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"mode_info":{"title":"mode_info describes the signing mode of the signer and is a nested\nstructure to support nested multisig pubkey's","type":"object","properties":{"single":{"title":"single represents a single signer","type":"object","properties":{"mode":{"title":"mode is the signing mode of the single signer","type":"string","enum":["SIGN_MODE_UNSPECIFIED","SIGN_MODE_DIRECT","SIGN_MODE_TEXTUAL","SIGN_MODE_DIRECT_AUX","SIGN_MODE_LEGACY_AMINO_JSON","SIGN_MODE_EIP_191","SIGN_MODE_EIP_712"],"default":"SIGN_MODE_UNSPECIFIED","description":"SignMode represents a signing mode with its own security guarantees.\n\nThis enum should be considered a registry of all known sign modes\nin the Cosmos ecosystem. Apps are not expected to support all known\nsign modes. Apps that would like to support custom sign modes are\nencouraged to open a small PR against this file to add a new case\nto this SignMode enum describing their sign mode so that different\napps have a consistent version of this enum.\n\n - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be\nrejected.\n - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is\nverified with raw bytes from Tx.\n - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some\nhuman-readable textual representation on top of the binary representation\nfrom SIGN_MODE_DIRECT. It is currently not supported.\n - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses\nSignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not\nrequire signers signing over other signers' `signer_info`. It also allows\nfor adding Tips in transactions.\n\nSince: cosmos-sdk 0.46\n - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses\nAmino JSON and will be removed in the future.\n - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos\nSDK. Ref: https://eips.ethereum.org/EIPS/eip-191\n\nCurrently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant,\nbut is not implemented on the SDK by default. To enable EIP-191, you need\nto pass a custom `TxConfig` that has an implementation of\n`SignModeHandler` for EIP-191. The SDK may decide to fully support\nEIP-191 in the future.\n\nSince: cosmos-sdk 0.45.2\n - SIGN_MODE_EIP_712: SIGN_MODE_EIP_712 specifies the sign mode for EIP 712 signing on the Cosmos\nSDK. Ref: https://eips.ethereum.org/EIPS/eip-712"}}},"multi":{"title":"multi represents a nested multisig signer","type":"object","properties":{"bitarray":{"title":"bitarray specifies which keys within the multisig are signing","type":"object","properties":{"extra_bits_stored":{"type":"integer","format":"int64"},"elems":{"type":"string","format":"byte"}},"description":"CompactBitArray is an implementation of a space efficient bit array.\nThis is used to ensure that the encoded data takes up a minimal amount of\nspace after proto encoding.\nThis is not thread safe, and is not intended for concurrent usage."},"mode_infos":{"type":"array","items":{"type":"object","properties":"circular()","description":"ModeInfo describes the signing mode of a single or nested multisig signer."},"title":"mode_infos is the corresponding modes of the signers of the multisig\nwhich could include nested multisig public keys"}}}},"description":"ModeInfo describes the signing mode of a single or nested multisig signer."},"sequence":{"type":"string","format":"uint64","description":"sequence is the sequence of the account, which describes the\nnumber of committed transactions signed by a given address. It is used to\nprevent replay attacks."}},"description":"SignerInfo describes the public key and signing mode of a single top-level\nsigner."},"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"},"gas_limit":{"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 specified account must pay the fees.\nthe payer must be a tx signer (and thus have signed this field in AuthInfo).\nsetting this field does *not* change 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 field) requests that a fee grant be used\nto pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does\nnot 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.\n\nSince: cosmos-sdk 0.46","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."},"signatures":{"type":"array","items":{"type":"string","format":"byte"},"description":"signatures is a list of signatures that matches the length and order of\nAuthInfo's signer_infos to allow connecting signature meta information like\npublic key and signing mode by position."}},"description":"Tx is the standard type used for broadcasting transactions."},"description":"txs are the transactions in the block."},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"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."},"chain_id":{"type":"string"},"height":{"type":"string","format":"int64"},"time":{"type":"string","format":"date-time"},"last_block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"last_commit_hash":{"type":"string","format":"byte","title":"hashes of block data"},"data_hash":{"type":"string","format":"byte"},"validators_hash":{"type":"string","format":"byte","title":"hashes from the app output from the prev block"},"next_validators_hash":{"type":"string","format":"byte"},"consensus_hash":{"type":"string","format":"byte"},"app_hash":{"type":"string","format":"byte"},"last_results_hash":{"type":"string","format":"byte"},"evidence_hash":{"type":"string","format":"byte","title":"consensus info"},"proposer_address":{"type":"string","format":"byte"}},"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":{"duplicate_vote_evidence":{"type":"object","properties":{"vote_a":{"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"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"timestamp":{"type":"string","format":"date-time"},"validator_address":{"type":"string","format":"byte"},"validator_index":{"type":"integer","format":"int32"},"signature":{"type":"string","format":"byte"}},"description":"Vote represents a prevote, precommit, or commit vote from validators for\nconsensus."},"vote_b":{"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"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"timestamp":{"type":"string","format":"date-time"},"validator_address":{"type":"string","format":"byte"},"validator_index":{"type":"integer","format":"int32"},"signature":{"type":"string","format":"byte"}},"description":"Vote represents a prevote, precommit, or commit vote from validators for\nconsensus."},"total_voting_power":{"type":"string","format":"int64"},"validator_power":{"type":"string","format":"int64"},"timestamp":{"type":"string","format":"date-time"}},"description":"DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes."},"light_client_attack_evidence":{"type":"object","properties":{"conflicting_block":{"type":"object","properties":{"signed_header":{"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."},"chain_id":{"type":"string"},"height":{"type":"string","format":"int64"},"time":{"type":"string","format":"date-time"},"last_block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"last_commit_hash":{"type":"string","format":"byte","title":"hashes of block data"},"data_hash":{"type":"string","format":"byte"},"validators_hash":{"type":"string","format":"byte","title":"hashes from the app output from the prev block"},"next_validators_hash":{"type":"string","format":"byte"},"consensus_hash":{"type":"string","format":"byte"},"app_hash":{"type":"string","format":"byte"},"last_results_hash":{"type":"string","format":"byte"},"evidence_hash":{"type":"string","format":"byte","title":"consensus info"},"proposer_address":{"type":"string","format":"byte"}},"description":"Header defines the structure of a block header."},"commit":{"type":"object","properties":{"height":{"type":"string","format":"int64"},"round":{"type":"integer","format":"int32"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"signatures":{"type":"array","items":{"type":"object","properties":{"block_id_flag":{"type":"string","enum":["BLOCK_ID_FLAG_UNKNOWN","BLOCK_ID_FLAG_ABSENT","BLOCK_ID_FLAG_COMMIT","BLOCK_ID_FLAG_NIL"],"default":"BLOCK_ID_FLAG_UNKNOWN","title":"BlockIdFlag indicates which BlcokID the signature is for"},"validator_address":{"type":"string","format":"byte"},"timestamp":{"type":"string","format":"date-time"},"signature":{"type":"string","format":"byte"}},"description":"CommitSig is a part of the Vote included in a Commit."}}},"description":"Commit contains the evidence that a block was committed by a set of validators."}}},"validator_set":{"type":"object","properties":{"validators":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","format":"byte"},"pub_key":{"type":"object","properties":{"ed25519":{"type":"string","format":"byte"},"secp256k1":{"type":"string","format":"byte"}},"title":"PublicKey defines the keys available for use with Validators"},"voting_power":{"type":"string","format":"int64"},"proposer_priority":{"type":"string","format":"int64"}}}},"proposer":{"type":"object","properties":{"address":{"type":"string","format":"byte"},"pub_key":{"type":"object","properties":{"ed25519":{"type":"string","format":"byte"},"secp256k1":{"type":"string","format":"byte"}},"title":"PublicKey defines the keys available for use with Validators"},"voting_power":{"type":"string","format":"int64"},"proposer_priority":{"type":"string","format":"int64"}}},"total_voting_power":{"type":"string","format":"int64"}}}}},"common_height":{"type":"string","format":"int64"},"byzantine_validators":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","format":"byte"},"pub_key":{"type":"object","properties":{"ed25519":{"type":"string","format":"byte"},"secp256k1":{"type":"string","format":"byte"}},"title":"PublicKey defines the keys available for use with Validators"},"voting_power":{"type":"string","format":"int64"},"proposer_priority":{"type":"string","format":"int64"}}}},"total_voting_power":{"type":"string","format":"int64"},"timestamp":{"type":"string","format":"date-time"}},"description":"LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client."}}}}}},"last_commit":{"type":"object","properties":{"height":{"type":"string","format":"int64"},"round":{"type":"integer","format":"int32"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"signatures":{"type":"array","items":{"type":"object","properties":{"block_id_flag":{"type":"string","enum":["BLOCK_ID_FLAG_UNKNOWN","BLOCK_ID_FLAG_ABSENT","BLOCK_ID_FLAG_COMMIT","BLOCK_ID_FLAG_NIL"],"default":"BLOCK_ID_FLAG_UNKNOWN","title":"BlockIdFlag indicates which BlcokID the signature is for"},"validator_address":{"type":"string","format":"byte"},"timestamp":{"type":"string","format":"date-time"},"signature":{"type":"string","format":"byte"}},"description":"CommitSig is a part of the Vote included in a Commit."}}},"description":"Commit contains the evidence that a block was committed by a set of validators."}}},"pagination":{"description":"pagination defines a pagination for the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method.\n\nSince: cosmos-sdk 0.45.2"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"height","description":"height is the height of the block to query.","in":"path","required":true,"schema":{"type":"string","format":"int64"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["tx"],"method":"get","path":"/cosmos/tx/v1beta1/txs/block/{height}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GetBlockWithTxs","description":{"content":"GetBlockWithTxs fetches a block with decoded txs.","type":"text/plain"},"url":{"path":["cosmos","tx","v1beta1","txs","block",":height"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) height is the height of the block to query.","type":"text/plain"},"type":"any","value":"","key":"height"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GetBlockWithTxs + + + +GetBlockWithTxs fetches a block with decoded txs. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    txs object[]
    + +txs are the transactions in the block. + +
  • Array [
  • body object
    + +TxBody is the body of a transaction that all signers sign over. + +
    messages object[]
    + +messages is a list of messages to be executed. The required signers of +those messages define the number and order of elements in AuthInfo's +signer_infos and Tx's signatures. Each required signer address is added to +the list only the first time it occurs. +By convention, the first required signer (usually from the first message) +is referred to as the primary signer and pays the fee for the whole +transaction. + +
  • Array [
  • ]
  • extension_options object[]
  • Array [
  • ]
  • non_critical_extension_options object[]
  • Array [
  • ]
  • auth_info object
    + +AuthInfo describes the fee and signer modes that are used to sign a +transaction. + +
    signer_infos object[]
    + +signer_infos defines the signing modes for the required signers. The number +and order of elements must match the required signers from TxBody's +messages. The first element is the primary signer and the one which pays +the fee. + +
  • Array [
  • public_key object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
    mode_info object
    + +ModeInfo describes the signing mode of a single or nested multisig signer. + +
    single object
    multi object
    bitarray object
    + +CompactBitArray is an implementation of a space efficient bit array. +This is used to ensure that the encoded data takes up a minimal amount of +space after proto encoding. +This is not thread safe, and is not intended for concurrent usage. + +
    mode_infos object[]
  • Array [
  • ]
  • ]
  • fee object
    + +Fee is the fee and gas limit for the transaction. The first signer is the +primary signer and the one which pays the fee. The fee can be calculated +based on the cost of evaluating the body and doing signature verification +of the signers. This can be estimated via simulation. + +
    amount object[]
  • Array [
  • ]
  • tip object
    + +Tip is the optional tip used for transactions fees paid in another denom. + +This field is ignored if the chain didn't enable tips, i.e. didn't add the +`TipDecorator` in its posthandler. + +Since: cosmos-sdk 0.46 + +
    amount object[]
  • Array [
  • ]
  • ]
  • block_id object
    part_set_header object
    block object
    header object
    + +Header defines the structure of a block header. + +
    version object
    + +Consensus captures the consensus rules for processing a block in the blockchain, +including all blockchain data structures and the rules of the application's +state transition machine. + +
    last_block_id object
    part_set_header object
    data object
    evidence object
    evidence object[]
  • Array [
  • duplicate_vote_evidence object
    + +DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. + +
    vote_a object
    + +Vote represents a prevote, precommit, or commit vote from validators for +consensus. + +
    block_id object
    part_set_header object
    vote_b object
    + +Vote represents a prevote, precommit, or commit vote from validators for +consensus. + +
    block_id object
    part_set_header object
    light_client_attack_evidence object
    + +LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. + +
    conflicting_block object
    signed_header object
    header object
    + +Header defines the structure of a block header. + +
    version object
    + +Consensus captures the consensus rules for processing a block in the blockchain, +including all blockchain data structures and the rules of the application's +state transition machine. + +
    last_block_id object
    part_set_header object
    commit object
    + +Commit contains the evidence that a block was committed by a set of validators. + +
    block_id object
    part_set_header object
    signatures object[]
  • Array [
  • ]
  • validator_set object
    validators object[]
  • Array [
  • pub_key object
  • ]
  • proposer object
    pub_key object
    byzantine_validators object[]
  • Array [
  • pub_key object
  • ]
  • ]
  • last_commit object
    + +Commit contains the evidence that a block was committed by a set of validators. + +
    block_id object
    part_set_header object
    signatures object[]
  • Array [
  • ]
  • pagination object
    + +pagination defines a pagination for the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/get-latest-block.api.mdx b/docs/greenfield-api/get-latest-block.api.mdx new file mode 100644 index 000000000..17a2455cd --- /dev/null +++ b/docs/greenfield-api/get-latest-block.api.mdx @@ -0,0 +1,135 @@ +--- +id: get-latest-block +title: "GetLatestBlock" +description: "GetLatestBlock returns the latest block." +sidebar_label: "GetLatestBlock" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GetLatestBlock","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"block":{"title":"Deprecated: please use `sdk_block` instead","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."},"chain_id":{"type":"string"},"height":{"type":"string","format":"int64"},"time":{"type":"string","format":"date-time"},"last_block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"last_commit_hash":{"type":"string","format":"byte","title":"hashes of block data"},"data_hash":{"type":"string","format":"byte"},"validators_hash":{"type":"string","format":"byte","title":"hashes from the app output from the prev block"},"next_validators_hash":{"type":"string","format":"byte"},"consensus_hash":{"type":"string","format":"byte"},"app_hash":{"type":"string","format":"byte"},"last_results_hash":{"type":"string","format":"byte"},"evidence_hash":{"type":"string","format":"byte","title":"consensus info"},"proposer_address":{"type":"string","format":"byte"}},"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":{"duplicate_vote_evidence":{"type":"object","properties":{"vote_a":{"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"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"timestamp":{"type":"string","format":"date-time"},"validator_address":{"type":"string","format":"byte"},"validator_index":{"type":"integer","format":"int32"},"signature":{"type":"string","format":"byte"}},"description":"Vote represents a prevote, precommit, or commit vote from validators for\nconsensus."},"vote_b":{"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"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"timestamp":{"type":"string","format":"date-time"},"validator_address":{"type":"string","format":"byte"},"validator_index":{"type":"integer","format":"int32"},"signature":{"type":"string","format":"byte"}},"description":"Vote represents a prevote, precommit, or commit vote from validators for\nconsensus."},"total_voting_power":{"type":"string","format":"int64"},"validator_power":{"type":"string","format":"int64"},"timestamp":{"type":"string","format":"date-time"}},"description":"DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes."},"light_client_attack_evidence":{"type":"object","properties":{"conflicting_block":{"type":"object","properties":{"signed_header":{"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."},"chain_id":{"type":"string"},"height":{"type":"string","format":"int64"},"time":{"type":"string","format":"date-time"},"last_block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"last_commit_hash":{"type":"string","format":"byte","title":"hashes of block data"},"data_hash":{"type":"string","format":"byte"},"validators_hash":{"type":"string","format":"byte","title":"hashes from the app output from the prev block"},"next_validators_hash":{"type":"string","format":"byte"},"consensus_hash":{"type":"string","format":"byte"},"app_hash":{"type":"string","format":"byte"},"last_results_hash":{"type":"string","format":"byte"},"evidence_hash":{"type":"string","format":"byte","title":"consensus info"},"proposer_address":{"type":"string","format":"byte"}},"description":"Header defines the structure of a block header."},"commit":{"type":"object","properties":{"height":{"type":"string","format":"int64"},"round":{"type":"integer","format":"int32"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"signatures":{"type":"array","items":{"type":"object","properties":{"block_id_flag":{"type":"string","enum":["BLOCK_ID_FLAG_UNKNOWN","BLOCK_ID_FLAG_ABSENT","BLOCK_ID_FLAG_COMMIT","BLOCK_ID_FLAG_NIL"],"default":"BLOCK_ID_FLAG_UNKNOWN","title":"BlockIdFlag indicates which BlcokID the signature is for"},"validator_address":{"type":"string","format":"byte"},"timestamp":{"type":"string","format":"date-time"},"signature":{"type":"string","format":"byte"}},"description":"CommitSig is a part of the Vote included in a Commit."}}},"description":"Commit contains the evidence that a block was committed by a set of validators."}}},"validator_set":{"type":"object","properties":{"validators":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","format":"byte"},"pub_key":{"type":"object","properties":{"ed25519":{"type":"string","format":"byte"},"secp256k1":{"type":"string","format":"byte"}},"title":"PublicKey defines the keys available for use with Validators"},"voting_power":{"type":"string","format":"int64"},"proposer_priority":{"type":"string","format":"int64"}}}},"proposer":{"type":"object","properties":{"address":{"type":"string","format":"byte"},"pub_key":{"type":"object","properties":{"ed25519":{"type":"string","format":"byte"},"secp256k1":{"type":"string","format":"byte"}},"title":"PublicKey defines the keys available for use with Validators"},"voting_power":{"type":"string","format":"int64"},"proposer_priority":{"type":"string","format":"int64"}}},"total_voting_power":{"type":"string","format":"int64"}}}}},"common_height":{"type":"string","format":"int64"},"byzantine_validators":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","format":"byte"},"pub_key":{"type":"object","properties":{"ed25519":{"type":"string","format":"byte"},"secp256k1":{"type":"string","format":"byte"}},"title":"PublicKey defines the keys available for use with Validators"},"voting_power":{"type":"string","format":"int64"},"proposer_priority":{"type":"string","format":"int64"}}}},"total_voting_power":{"type":"string","format":"int64"},"timestamp":{"type":"string","format":"date-time"}},"description":"LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client."}}}}}},"last_commit":{"type":"object","properties":{"height":{"type":"string","format":"int64"},"round":{"type":"integer","format":"int32"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"signatures":{"type":"array","items":{"type":"object","properties":{"block_id_flag":{"type":"string","enum":["BLOCK_ID_FLAG_UNKNOWN","BLOCK_ID_FLAG_ABSENT","BLOCK_ID_FLAG_COMMIT","BLOCK_ID_FLAG_NIL"],"default":"BLOCK_ID_FLAG_UNKNOWN","title":"BlockIdFlag indicates which BlcokID the signature is for"},"validator_address":{"type":"string","format":"byte"},"timestamp":{"type":"string","format":"date-time"},"signature":{"type":"string","format":"byte"}},"description":"CommitSig is a part of the Vote included in a Commit."}}},"description":"Commit contains the evidence that a block was committed by a set of validators."}}},"sdk_block":{"title":"Since: cosmos-sdk 0.47","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."},"chain_id":{"type":"string"},"height":{"type":"string","format":"int64"},"time":{"type":"string","format":"date-time"},"last_block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"last_commit_hash":{"type":"string","format":"byte","title":"hashes of block data"},"data_hash":{"type":"string","format":"byte"},"validators_hash":{"type":"string","format":"byte","title":"hashes from the app output from the prev block"},"next_validators_hash":{"type":"string","format":"byte"},"consensus_hash":{"type":"string","format":"byte"},"app_hash":{"type":"string","format":"byte"},"last_results_hash":{"type":"string","format":"byte"},"evidence_hash":{"type":"string","format":"byte","title":"consensus info"},"proposer_address":{"type":"string","description":"proposer_address is the original block proposer address, formatted as a hex string.\nIn Tendermint, this type is `bytes`, but in the SDK, we convert it to a hex string\nfor better UX."}},"description":"Header defines the structure of a Tendermint 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":{"duplicate_vote_evidence":{"type":"object","properties":{"vote_a":{"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"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"timestamp":{"type":"string","format":"date-time"},"validator_address":{"type":"string","format":"byte"},"validator_index":{"type":"integer","format":"int32"},"signature":{"type":"string","format":"byte"}},"description":"Vote represents a prevote, precommit, or commit vote from validators for\nconsensus."},"vote_b":{"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"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"timestamp":{"type":"string","format":"date-time"},"validator_address":{"type":"string","format":"byte"},"validator_index":{"type":"integer","format":"int32"},"signature":{"type":"string","format":"byte"}},"description":"Vote represents a prevote, precommit, or commit vote from validators for\nconsensus."},"total_voting_power":{"type":"string","format":"int64"},"validator_power":{"type":"string","format":"int64"},"timestamp":{"type":"string","format":"date-time"}},"description":"DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes."},"light_client_attack_evidence":{"type":"object","properties":{"conflicting_block":{"type":"object","properties":{"signed_header":{"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."},"chain_id":{"type":"string"},"height":{"type":"string","format":"int64"},"time":{"type":"string","format":"date-time"},"last_block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"last_commit_hash":{"type":"string","format":"byte","title":"hashes of block data"},"data_hash":{"type":"string","format":"byte"},"validators_hash":{"type":"string","format":"byte","title":"hashes from the app output from the prev block"},"next_validators_hash":{"type":"string","format":"byte"},"consensus_hash":{"type":"string","format":"byte"},"app_hash":{"type":"string","format":"byte"},"last_results_hash":{"type":"string","format":"byte"},"evidence_hash":{"type":"string","format":"byte","title":"consensus info"},"proposer_address":{"type":"string","format":"byte"}},"description":"Header defines the structure of a block header."},"commit":{"type":"object","properties":{"height":{"type":"string","format":"int64"},"round":{"type":"integer","format":"int32"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"signatures":{"type":"array","items":{"type":"object","properties":{"block_id_flag":{"type":"string","enum":["BLOCK_ID_FLAG_UNKNOWN","BLOCK_ID_FLAG_ABSENT","BLOCK_ID_FLAG_COMMIT","BLOCK_ID_FLAG_NIL"],"default":"BLOCK_ID_FLAG_UNKNOWN","title":"BlockIdFlag indicates which BlcokID the signature is for"},"validator_address":{"type":"string","format":"byte"},"timestamp":{"type":"string","format":"date-time"},"signature":{"type":"string","format":"byte"}},"description":"CommitSig is a part of the Vote included in a Commit."}}},"description":"Commit contains the evidence that a block was committed by a set of validators."}}},"validator_set":{"type":"object","properties":{"validators":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","format":"byte"},"pub_key":{"type":"object","properties":{"ed25519":{"type":"string","format":"byte"},"secp256k1":{"type":"string","format":"byte"}},"title":"PublicKey defines the keys available for use with Validators"},"voting_power":{"type":"string","format":"int64"},"proposer_priority":{"type":"string","format":"int64"}}}},"proposer":{"type":"object","properties":{"address":{"type":"string","format":"byte"},"pub_key":{"type":"object","properties":{"ed25519":{"type":"string","format":"byte"},"secp256k1":{"type":"string","format":"byte"}},"title":"PublicKey defines the keys available for use with Validators"},"voting_power":{"type":"string","format":"int64"},"proposer_priority":{"type":"string","format":"int64"}}},"total_voting_power":{"type":"string","format":"int64"}}}}},"common_height":{"type":"string","format":"int64"},"byzantine_validators":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","format":"byte"},"pub_key":{"type":"object","properties":{"ed25519":{"type":"string","format":"byte"},"secp256k1":{"type":"string","format":"byte"}},"title":"PublicKey defines the keys available for use with Validators"},"voting_power":{"type":"string","format":"int64"},"proposer_priority":{"type":"string","format":"int64"}}}},"total_voting_power":{"type":"string","format":"int64"},"timestamp":{"type":"string","format":"date-time"}},"description":"LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client."}}}}}},"last_commit":{"type":"object","properties":{"height":{"type":"string","format":"int64"},"round":{"type":"integer","format":"int32"},"block_id":{"type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}},"title":"BlockID"},"signatures":{"type":"array","items":{"type":"object","properties":{"block_id_flag":{"type":"string","enum":["BLOCK_ID_FLAG_UNKNOWN","BLOCK_ID_FLAG_ABSENT","BLOCK_ID_FLAG_COMMIT","BLOCK_ID_FLAG_NIL"],"default":"BLOCK_ID_FLAG_UNKNOWN","title":"BlockIdFlag indicates which BlcokID the signature is for"},"validator_address":{"type":"string","format":"byte"},"timestamp":{"type":"string","format":"date-time"},"signature":{"type":"string","format":"byte"}},"description":"CommitSig is a part of the Vote included in a Commit."}}},"description":"Commit contains the evidence that a block was committed by a set of validators."}},"description":"Block is tendermint type Block, with the Header proposer address\nfield converted to hex string."}},"description":"GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"tags":["base"],"description":"GetLatestBlock returns the latest block.","method":"get","path":"/cosmos/base/tendermint/v1beta1/blocks/latest","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GetLatestBlock","description":{"content":"GetLatestBlock returns the latest block.","type":"text/plain"},"url":{"path":["cosmos","base","tendermint","v1beta1","blocks","latest"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GetLatestBlock + + + +GetLatestBlock returns the latest block. + +
+ +A successful response. + +
Schema
    block_id object
    part_set_header object
    block object
    header object
    + +Header defines the structure of a block header. + +
    version object
    + +Consensus captures the consensus rules for processing a block in the blockchain, +including all blockchain data structures and the rules of the application's +state transition machine. + +
    last_block_id object
    part_set_header object
    data object
    evidence object
    evidence object[]
  • Array [
  • duplicate_vote_evidence object
    + +DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. + +
    vote_a object
    + +Vote represents a prevote, precommit, or commit vote from validators for +consensus. + +
    block_id object
    part_set_header object
    vote_b object
    + +Vote represents a prevote, precommit, or commit vote from validators for +consensus. + +
    block_id object
    part_set_header object
    light_client_attack_evidence object
    + +LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. + +
    conflicting_block object
    signed_header object
    header object
    + +Header defines the structure of a block header. + +
    version object
    + +Consensus captures the consensus rules for processing a block in the blockchain, +including all blockchain data structures and the rules of the application's +state transition machine. + +
    last_block_id object
    part_set_header object
    commit object
    + +Commit contains the evidence that a block was committed by a set of validators. + +
    block_id object
    part_set_header object
    signatures object[]
  • Array [
  • ]
  • validator_set object
    validators object[]
  • Array [
  • pub_key object
  • ]
  • proposer object
    pub_key object
    byzantine_validators object[]
  • Array [
  • pub_key object
  • ]
  • ]
  • last_commit object
    + +Commit contains the evidence that a block was committed by a set of validators. + +
    block_id object
    part_set_header object
    signatures object[]
  • Array [
  • ]
  • sdk_block object
    + +Block is tendermint type Block, with the Header proposer address +field converted to hex string. + +
    header object
    + +Header defines the structure of a Tendermint block header. + +
    version object
    + +Consensus captures the consensus rules for processing a block in the blockchain, +including all blockchain data structures and the rules of the application's +state transition machine. + +
    last_block_id object
    part_set_header object
    data object
    evidence object
    evidence object[]
  • Array [
  • duplicate_vote_evidence object
    + +DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. + +
    vote_a object
    + +Vote represents a prevote, precommit, or commit vote from validators for +consensus. + +
    block_id object
    part_set_header object
    vote_b object
    + +Vote represents a prevote, precommit, or commit vote from validators for +consensus. + +
    block_id object
    part_set_header object
    light_client_attack_evidence object
    + +LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. + +
    conflicting_block object
    signed_header object
    header object
    + +Header defines the structure of a block header. + +
    version object
    + +Consensus captures the consensus rules for processing a block in the blockchain, +including all blockchain data structures and the rules of the application's +state transition machine. + +
    last_block_id object
    part_set_header object
    commit object
    + +Commit contains the evidence that a block was committed by a set of validators. + +
    block_id object
    part_set_header object
    signatures object[]
  • Array [
  • ]
  • validator_set object
    validators object[]
  • Array [
  • pub_key object
  • ]
  • proposer object
    pub_key object
    byzantine_validators object[]
  • Array [
  • pub_key object
  • ]
  • ]
  • last_commit object
    + +Commit contains the evidence that a block was committed by a set of validators. + +
    block_id object
    part_set_header object
    signatures object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/get-latest-validator-set.api.mdx b/docs/greenfield-api/get-latest-validator-set.api.mdx new file mode 100644 index 000000000..2509c74c9 --- /dev/null +++ b/docs/greenfield-api/get-latest-validator-set.api.mdx @@ -0,0 +1,130 @@ +--- +id: get-latest-validator-set +title: "GetLatestValidatorSet" +description: "GetLatestValidatorSet queries latest validator-set." +sidebar_label: "GetLatestValidatorSet" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GetLatestValidatorSet","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"block_height":{"type":"string","format":"int64"},"validators":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"pub_key":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"voting_power":{"type":"string","format":"int64"},"proposer_priority":{"type":"string","format":"int64"}},"description":"Validator is the type for the validator-set."}},"pagination":{"description":"pagination defines an pagination for the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["base"],"description":"GetLatestValidatorSet queries latest validator-set.","method":"get","path":"/cosmos/base/tendermint/v1beta1/validatorsets/latest","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GetLatestValidatorSet","description":{"content":"GetLatestValidatorSet queries latest validator-set.","type":"text/plain"},"url":{"path":["cosmos","base","tendermint","v1beta1","validatorsets","latest"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GetLatestValidatorSet + + + +GetLatestValidatorSet queries latest validator-set. + +
Query Parameters
+ +A successful response. + +
Schema
    validators object[]
  • Array [
  • pub_key object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
  • ]
  • pagination object
    + +pagination defines an pagination for the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/get-node-info.api.mdx b/docs/greenfield-api/get-node-info.api.mdx new file mode 100644 index 000000000..c9d67b8ed --- /dev/null +++ b/docs/greenfield-api/get-node-info.api.mdx @@ -0,0 +1,42 @@ +--- +id: get-node-info +title: "GetNodeInfo" +description: "GetNodeInfo queries the current node info." +sidebar_label: "GetNodeInfo" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GetNodeInfo","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"default_node_info":{"type":"object","properties":{"protocol_version":{"type":"object","properties":{"p2p":{"type":"string","format":"uint64"},"block":{"type":"string","format":"uint64"},"app":{"type":"string","format":"uint64"}}},"default_node_id":{"type":"string"},"listen_addr":{"type":"string"},"network":{"type":"string"},"version":{"type":"string"},"channels":{"type":"string","format":"byte"},"moniker":{"type":"string"},"other":{"type":"object","properties":{"tx_index":{"type":"string"},"rpc_address":{"type":"string"}}}}},"application_version":{"type":"object","properties":{"name":{"type":"string"},"app_name":{"type":"string"},"version":{"type":"string"},"git_commit":{"type":"string"},"build_tags":{"type":"string"},"go_version":{"type":"string"},"build_deps":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","title":"module path"},"version":{"type":"string","title":"module version"},"sum":{"type":"string","title":"checksum"}},"title":"Module is the type for VersionInfo"}},"cosmos_sdk_version":{"type":"string","title":"Since: cosmos-sdk 0.43"}},"description":"VersionInfo is the type for the GetNodeInfoResponse message."}},"description":"GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"tags":["base"],"description":"GetNodeInfo queries the current node info.","method":"get","path":"/cosmos/base/tendermint/v1beta1/node_info","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GetNodeInfo","description":{"content":"GetNodeInfo queries the current node info.","type":"text/plain"},"url":{"path":["cosmos","base","tendermint","v1beta1","node_info"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GetNodeInfo + + + +GetNodeInfo queries the current node info. + +
+ +A successful response. + +
Schema
    default_node_info object
    protocol_version object
    other object
    application_version object
    + +VersionInfo is the type for the GetNodeInfoResponse message. + +
    build_deps object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/get-syncing.api.mdx b/docs/greenfield-api/get-syncing.api.mdx new file mode 100644 index 000000000..2132eca3a --- /dev/null +++ b/docs/greenfield-api/get-syncing.api.mdx @@ -0,0 +1,38 @@ +--- +id: get-syncing +title: "GetSyncing" +description: "GetSyncing queries node syncing." +sidebar_label: "GetSyncing" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GetSyncing","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"syncing":{"type":"boolean"}},"description":"GetSyncingResponse is the response type for the Query/GetSyncing RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"tags":["base"],"description":"GetSyncing queries node syncing.","method":"get","path":"/cosmos/base/tendermint/v1beta1/syncing","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GetSyncing","description":{"content":"GetSyncing queries node syncing.","type":"text/plain"},"url":{"path":["cosmos","base","tendermint","v1beta1","syncing"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GetSyncing + + + +GetSyncing queries node syncing. + +
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/get-tx.api.mdx b/docs/greenfield-api/get-tx.api.mdx new file mode 100644 index 000000000..afde7bef9 --- /dev/null +++ b/docs/greenfield-api/get-tx.api.mdx @@ -0,0 +1,294 @@ +--- +id: get-tx +title: "GetTx" +description: "GetTx fetches a tx by hash." +sidebar_label: "GetTx" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GetTx","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"tx":{"type":"object","properties":{"body":{"title":"body is the processable content of the transaction","type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"description":"messages is a list of messages to be executed. The required signers of\nthose messages define the number and order of elements in AuthInfo's\nsigner_infos and Tx's signatures. Each required signer address is added to\nthe list only the first time it occurs.\nBy convention, the first required signer (usually from the first message)\nis referred to as the primary signer and pays the fee for the whole\ntransaction."},"memo":{"type":"string","description":"memo is any arbitrary note/comment to be added to the transaction.\nWARNING: in clients, any publicly exposed text should not be called memo,\nbut should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122)."},"timeout_height":{"type":"string","format":"uint64","title":"timeout is the block height after which this transaction will not\nbe processed by the chain"},"extension_options":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"title":"extension_options are arbitrary options that can be added by chains\nwhen the default options are not sufficient. If any of these are present\nand can't be handled, the transaction will be rejected"},"non_critical_extension_options":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"title":"extension_options are arbitrary options that can be added by chains\nwhen the default options are not sufficient. If any of these are present\nand can't be handled, they will be ignored"}},"description":"TxBody is the body of a transaction that all signers sign over."},"auth_info":{"title":"auth_info is the authorization related content of the transaction,\nspecifically signers, signer modes and fee","type":"object","properties":{"signer_infos":{"type":"array","items":{"type":"object","properties":{"public_key":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"mode_info":{"title":"mode_info describes the signing mode of the signer and is a nested\nstructure to support nested multisig pubkey's","type":"object","properties":{"single":{"title":"single represents a single signer","type":"object","properties":{"mode":{"title":"mode is the signing mode of the single signer","type":"string","enum":["SIGN_MODE_UNSPECIFIED","SIGN_MODE_DIRECT","SIGN_MODE_TEXTUAL","SIGN_MODE_DIRECT_AUX","SIGN_MODE_LEGACY_AMINO_JSON","SIGN_MODE_EIP_191","SIGN_MODE_EIP_712"],"default":"SIGN_MODE_UNSPECIFIED","description":"SignMode represents a signing mode with its own security guarantees.\n\nThis enum should be considered a registry of all known sign modes\nin the Cosmos ecosystem. Apps are not expected to support all known\nsign modes. Apps that would like to support custom sign modes are\nencouraged to open a small PR against this file to add a new case\nto this SignMode enum describing their sign mode so that different\napps have a consistent version of this enum.\n\n - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be\nrejected.\n - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is\nverified with raw bytes from Tx.\n - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some\nhuman-readable textual representation on top of the binary representation\nfrom SIGN_MODE_DIRECT. It is currently not supported.\n - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses\nSignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not\nrequire signers signing over other signers' `signer_info`. It also allows\nfor adding Tips in transactions.\n\nSince: cosmos-sdk 0.46\n - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses\nAmino JSON and will be removed in the future.\n - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos\nSDK. Ref: https://eips.ethereum.org/EIPS/eip-191\n\nCurrently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant,\nbut is not implemented on the SDK by default. To enable EIP-191, you need\nto pass a custom `TxConfig` that has an implementation of\n`SignModeHandler` for EIP-191. The SDK may decide to fully support\nEIP-191 in the future.\n\nSince: cosmos-sdk 0.45.2\n - SIGN_MODE_EIP_712: SIGN_MODE_EIP_712 specifies the sign mode for EIP 712 signing on the Cosmos\nSDK. Ref: https://eips.ethereum.org/EIPS/eip-712"}}},"multi":{"title":"multi represents a nested multisig signer","type":"object","properties":{"bitarray":{"title":"bitarray specifies which keys within the multisig are signing","type":"object","properties":{"extra_bits_stored":{"type":"integer","format":"int64"},"elems":{"type":"string","format":"byte"}},"description":"CompactBitArray is an implementation of a space efficient bit array.\nThis is used to ensure that the encoded data takes up a minimal amount of\nspace after proto encoding.\nThis is not thread safe, and is not intended for concurrent usage."},"mode_infos":{"type":"array","items":{"type":"object","properties":"circular()","description":"ModeInfo describes the signing mode of a single or nested multisig signer."},"title":"mode_infos is the corresponding modes of the signers of the multisig\nwhich could include nested multisig public keys"}}}},"description":"ModeInfo describes the signing mode of a single or nested multisig signer."},"sequence":{"type":"string","format":"uint64","description":"sequence is the sequence of the account, which describes the\nnumber of committed transactions signed by a given address. It is used to\nprevent replay attacks."}},"description":"SignerInfo describes the public key and signing mode of a single top-level\nsigner."},"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"},"gas_limit":{"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 specified account must pay the fees.\nthe payer must be a tx signer (and thus have signed this field in AuthInfo).\nsetting this field does *not* change 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 field) requests that a fee grant be used\nto pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does\nnot 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.\n\nSince: cosmos-sdk 0.46","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."},"signatures":{"type":"array","items":{"type":"string","format":"byte"},"description":"signatures is a list of signatures that matches the length and order of\nAuthInfo's signer_infos to allow connecting signature meta information like\npublic key and signing mode by position."}},"description":"Tx is the standard type used for broadcasting transactions."},"tx_response":{"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."},"raw_log":{"type":"string","description":"The output of the application's logger (raw string). May be\nnon-deterministic."},"logs":{"type":"array","items":{"type":"object","properties":{"msg_index":{"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."},"gas_wanted":{"type":"string","format":"int64","description":"Amount of gas requested for transaction."},"gas_used":{"type":"string","format":"int64","description":"Amount of gas consumed by transaction."},"tx":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"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"}},"description":"EventAttribute is a single key-value pair, associated with an event."}}},"description":"Event allows application developers to attach additional information to\nResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx.\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.\n\nSince: cosmos-sdk 0.42.11, 0.44.5, 0.45"}},"description":"TxResponse defines a structure containing relevant tx data and metadata. The\ntags are stringified and the log is JSON decoded."}},"description":"GetTxResponse is the response type for the Service.GetTx method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"hash","description":"hash is the tx hash to query, encoded as a hex string.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["tx"],"description":"GetTx fetches a tx by hash.","method":"get","path":"/cosmos/tx/v1beta1/txs/{hash}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GetTx","description":{"content":"GetTx fetches a tx by hash.","type":"text/plain"},"url":{"path":["cosmos","tx","v1beta1","txs",":hash"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) hash is the tx hash to query, encoded as a hex string.","type":"text/plain"},"type":"any","value":"","key":"hash"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GetTx + + + +GetTx fetches a tx by hash. + +
Path Parameters
+ +A successful response. + +
Schema
    tx object
    + +Tx is the standard type used for broadcasting transactions. + +
    body object
    + +TxBody is the body of a transaction that all signers sign over. + +
    messages object[]
    + +messages is a list of messages to be executed. The required signers of +those messages define the number and order of elements in AuthInfo's +signer_infos and Tx's signatures. Each required signer address is added to +the list only the first time it occurs. +By convention, the first required signer (usually from the first message) +is referred to as the primary signer and pays the fee for the whole +transaction. + +
  • Array [
  • ]
  • extension_options object[]
  • Array [
  • ]
  • non_critical_extension_options object[]
  • Array [
  • ]
  • auth_info object
    + +AuthInfo describes the fee and signer modes that are used to sign a +transaction. + +
    signer_infos object[]
    + +signer_infos defines the signing modes for the required signers. The number +and order of elements must match the required signers from TxBody's +messages. The first element is the primary signer and the one which pays +the fee. + +
  • Array [
  • public_key object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
    mode_info object
    + +ModeInfo describes the signing mode of a single or nested multisig signer. + +
    single object
    multi object
    bitarray object
    + +CompactBitArray is an implementation of a space efficient bit array. +This is used to ensure that the encoded data takes up a minimal amount of +space after proto encoding. +This is not thread safe, and is not intended for concurrent usage. + +
    mode_infos object[]
  • Array [
  • ]
  • ]
  • fee object
    + +Fee is the fee and gas limit for the transaction. The first signer is the +primary signer and the one which pays the fee. The fee can be calculated +based on the cost of evaluating the body and doing signature verification +of the signers. This can be estimated via simulation. + +
    amount object[]
  • Array [
  • ]
  • tip object
    + +Tip is the optional tip used for transactions fees paid in another denom. + +This field is ignored if the chain didn't enable tips, i.e. didn't add the +`TipDecorator` in its posthandler. + +Since: cosmos-sdk 0.46 + +
    amount object[]
  • Array [
  • ]
  • tx_response object
    + +TxResponse defines a structure containing relevant tx data and metadata. The +tags are stringified and the log is JSON decoded. + +
    logs object[]
    + +The output of the application's logger (typed). May be non-deterministic. + +
  • Array [
  • events object[]
    + +Events contains a slice of Event objects that were emitted during some +execution. + +
  • Array [
  • attributes object[]
  • Array [
  • ]
  • ]
  • ]
  • tx object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
    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 object[]
    + +Events defines all the events emitted by processing a transaction. Note, +these events include those emitted by processing all the messages and those +emitted from the ante. Whereas Logs contains the events, with +additional metadata, emitted only by processing the messages. + +Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + +
  • Array [
  • attributes object[]
  • Array [
  • ]
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/get-txs-event.api.mdx b/docs/greenfield-api/get-txs-event.api.mdx new file mode 100644 index 000000000..51ae29764 --- /dev/null +++ b/docs/greenfield-api/get-txs-event.api.mdx @@ -0,0 +1,298 @@ +--- +id: get-txs-event +title: "GetTxsEvent" +description: "GetTxsEvent fetches txs by event." +sidebar_label: "GetTxsEvent" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GetTxsEvent","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"txs":{"type":"array","items":{"type":"object","properties":{"body":{"title":"body is the processable content of the transaction","type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"description":"messages is a list of messages to be executed. The required signers of\nthose messages define the number and order of elements in AuthInfo's\nsigner_infos and Tx's signatures. Each required signer address is added to\nthe list only the first time it occurs.\nBy convention, the first required signer (usually from the first message)\nis referred to as the primary signer and pays the fee for the whole\ntransaction."},"memo":{"type":"string","description":"memo is any arbitrary note/comment to be added to the transaction.\nWARNING: in clients, any publicly exposed text should not be called memo,\nbut should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122)."},"timeout_height":{"type":"string","format":"uint64","title":"timeout is the block height after which this transaction will not\nbe processed by the chain"},"extension_options":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"title":"extension_options are arbitrary options that can be added by chains\nwhen the default options are not sufficient. If any of these are present\nand can't be handled, the transaction will be rejected"},"non_critical_extension_options":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"title":"extension_options are arbitrary options that can be added by chains\nwhen the default options are not sufficient. If any of these are present\nand can't be handled, they will be ignored"}},"description":"TxBody is the body of a transaction that all signers sign over."},"auth_info":{"title":"auth_info is the authorization related content of the transaction,\nspecifically signers, signer modes and fee","type":"object","properties":{"signer_infos":{"type":"array","items":{"type":"object","properties":{"public_key":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"mode_info":{"title":"mode_info describes the signing mode of the signer and is a nested\nstructure to support nested multisig pubkey's","type":"object","properties":{"single":{"title":"single represents a single signer","type":"object","properties":{"mode":{"title":"mode is the signing mode of the single signer","type":"string","enum":["SIGN_MODE_UNSPECIFIED","SIGN_MODE_DIRECT","SIGN_MODE_TEXTUAL","SIGN_MODE_DIRECT_AUX","SIGN_MODE_LEGACY_AMINO_JSON","SIGN_MODE_EIP_191","SIGN_MODE_EIP_712"],"default":"SIGN_MODE_UNSPECIFIED","description":"SignMode represents a signing mode with its own security guarantees.\n\nThis enum should be considered a registry of all known sign modes\nin the Cosmos ecosystem. Apps are not expected to support all known\nsign modes. Apps that would like to support custom sign modes are\nencouraged to open a small PR against this file to add a new case\nto this SignMode enum describing their sign mode so that different\napps have a consistent version of this enum.\n\n - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be\nrejected.\n - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is\nverified with raw bytes from Tx.\n - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some\nhuman-readable textual representation on top of the binary representation\nfrom SIGN_MODE_DIRECT. It is currently not supported.\n - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses\nSignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not\nrequire signers signing over other signers' `signer_info`. It also allows\nfor adding Tips in transactions.\n\nSince: cosmos-sdk 0.46\n - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses\nAmino JSON and will be removed in the future.\n - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos\nSDK. Ref: https://eips.ethereum.org/EIPS/eip-191\n\nCurrently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant,\nbut is not implemented on the SDK by default. To enable EIP-191, you need\nto pass a custom `TxConfig` that has an implementation of\n`SignModeHandler` for EIP-191. The SDK may decide to fully support\nEIP-191 in the future.\n\nSince: cosmos-sdk 0.45.2\n - SIGN_MODE_EIP_712: SIGN_MODE_EIP_712 specifies the sign mode for EIP 712 signing on the Cosmos\nSDK. Ref: https://eips.ethereum.org/EIPS/eip-712"}}},"multi":{"title":"multi represents a nested multisig signer","type":"object","properties":{"bitarray":{"title":"bitarray specifies which keys within the multisig are signing","type":"object","properties":{"extra_bits_stored":{"type":"integer","format":"int64"},"elems":{"type":"string","format":"byte"}},"description":"CompactBitArray is an implementation of a space efficient bit array.\nThis is used to ensure that the encoded data takes up a minimal amount of\nspace after proto encoding.\nThis is not thread safe, and is not intended for concurrent usage."},"mode_infos":{"type":"array","items":{"type":"object","properties":"circular()","description":"ModeInfo describes the signing mode of a single or nested multisig signer."},"title":"mode_infos is the corresponding modes of the signers of the multisig\nwhich could include nested multisig public keys"}}}},"description":"ModeInfo describes the signing mode of a single or nested multisig signer."},"sequence":{"type":"string","format":"uint64","description":"sequence is the sequence of the account, which describes the\nnumber of committed transactions signed by a given address. It is used to\nprevent replay attacks."}},"description":"SignerInfo describes the public key and signing mode of a single top-level\nsigner."},"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"},"gas_limit":{"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 specified account must pay the fees.\nthe payer must be a tx signer (and thus have signed this field in AuthInfo).\nsetting this field does *not* change 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 field) requests that a fee grant be used\nto pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does\nnot 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.\n\nSince: cosmos-sdk 0.46","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."},"signatures":{"type":"array","items":{"type":"string","format":"byte"},"description":"signatures is a list of signatures that matches the length and order of\nAuthInfo's signer_infos to allow connecting signature meta information like\npublic key and signing mode by position."}},"description":"Tx is the standard type used for broadcasting transactions."},"description":"txs is the list of queried transactions."},"tx_responses":{"type":"array","items":{"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."},"raw_log":{"type":"string","description":"The output of the application's logger (raw string). May be\nnon-deterministic."},"logs":{"type":"array","items":{"type":"object","properties":{"msg_index":{"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."},"gas_wanted":{"type":"string","format":"int64","description":"Amount of gas requested for transaction."},"gas_used":{"type":"string","format":"int64","description":"Amount of gas consumed by transaction."},"tx":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"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"}},"description":"EventAttribute is a single key-value pair, associated with an event."}}},"description":"Event allows application developers to attach additional information to\nResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx.\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.\n\nSince: cosmos-sdk 0.42.11, 0.44.5, 0.45"}},"description":"TxResponse defines a structure containing relevant tx data and metadata. The\ntags are stringified and the log is JSON decoded."},"description":"tx_responses is the list of queried TxResponses."},"pagination":{"description":"pagination defines a pagination for the response.\nDeprecated post v0.46.x: use total instead.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}},"total":{"type":"string","format":"uint64","title":"total is total number of results available"}},"description":"GetTxsEventResponse is the response type for the Service.TxsByEvents\nRPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"events","description":"events is the list of transaction event type.","in":"query","required":false,"explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"order_by","description":" - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case.\n - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order\n - ORDER_BY_DESC: ORDER_BY_DESC defines descending order","in":"query","required":false,"schema":{"type":"string","enum":["ORDER_BY_UNSPECIFIED","ORDER_BY_ASC","ORDER_BY_DESC"],"default":"ORDER_BY_UNSPECIFIED"}},{"name":"page","description":"page is the page number to query, starts at 1. If not provided, will default to first page.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}}],"tags":["tx"],"description":"GetTxsEvent fetches txs by event.","method":"get","path":"/cosmos/tx/v1beta1/txs","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GetTxsEvent","description":{"content":"GetTxsEvent fetches txs by event.","type":"text/plain"},"url":{"path":["cosmos","tx","v1beta1","txs"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"events is the list of transaction event type.","type":"text/plain"},"key":"events","value":""},{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""},{"disabled":false,"description":{"content":" - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case.\n - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order\n - ORDER_BY_DESC: ORDER_BY_DESC defines descending order","type":"text/plain"},"key":"order_by","value":""},{"disabled":false,"description":{"content":"page is the page number to query, starts at 1. If not provided, will default to first page.","type":"text/plain"},"key":"page","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"limit","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GetTxsEvent + + + +GetTxsEvent fetches txs by event. + +
Query Parameters
+ +A successful response. + +
Schema
    txs object[]
    + +txs is the list of queried transactions. + +
  • Array [
  • body object
    + +TxBody is the body of a transaction that all signers sign over. + +
    messages object[]
    + +messages is a list of messages to be executed. The required signers of +those messages define the number and order of elements in AuthInfo's +signer_infos and Tx's signatures. Each required signer address is added to +the list only the first time it occurs. +By convention, the first required signer (usually from the first message) +is referred to as the primary signer and pays the fee for the whole +transaction. + +
  • Array [
  • ]
  • extension_options object[]
  • Array [
  • ]
  • non_critical_extension_options object[]
  • Array [
  • ]
  • auth_info object
    + +AuthInfo describes the fee and signer modes that are used to sign a +transaction. + +
    signer_infos object[]
    + +signer_infos defines the signing modes for the required signers. The number +and order of elements must match the required signers from TxBody's +messages. The first element is the primary signer and the one which pays +the fee. + +
  • Array [
  • public_key object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
    mode_info object
    + +ModeInfo describes the signing mode of a single or nested multisig signer. + +
    single object
    multi object
    bitarray object
    + +CompactBitArray is an implementation of a space efficient bit array. +This is used to ensure that the encoded data takes up a minimal amount of +space after proto encoding. +This is not thread safe, and is not intended for concurrent usage. + +
    mode_infos object[]
  • Array [
  • ]
  • ]
  • fee object
    + +Fee is the fee and gas limit for the transaction. The first signer is the +primary signer and the one which pays the fee. The fee can be calculated +based on the cost of evaluating the body and doing signature verification +of the signers. This can be estimated via simulation. + +
    amount object[]
  • Array [
  • ]
  • tip object
    + +Tip is the optional tip used for transactions fees paid in another denom. + +This field is ignored if the chain didn't enable tips, i.e. didn't add the +`TipDecorator` in its posthandler. + +Since: cosmos-sdk 0.46 + +
    amount object[]
  • Array [
  • ]
  • ]
  • tx_responses object[]
    + +tx_responses is the list of queried TxResponses. + +
  • Array [
  • logs object[]
    + +The output of the application's logger (typed). May be non-deterministic. + +
  • Array [
  • events object[]
    + +Events contains a slice of Event objects that were emitted during some +execution. + +
  • Array [
  • attributes object[]
  • Array [
  • ]
  • ]
  • ]
  • tx object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
    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 object[]
    + +Events defines all the events emitted by processing a transaction. Note, +these events include those emitted by processing all the messages and those +emitted from the ante. Whereas Logs contains the events, with +additional metadata, emitted only by processing the messages. + +Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + +
  • Array [
  • attributes object[]
  • Array [
  • ]
  • ]
  • ]
  • pagination object
    + +pagination defines a pagination for the response. +Deprecated post v0.46.x: use total instead. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/get-validator-set-by-height.api.mdx b/docs/greenfield-api/get-validator-set-by-height.api.mdx new file mode 100644 index 000000000..039b65a00 --- /dev/null +++ b/docs/greenfield-api/get-validator-set-by-height.api.mdx @@ -0,0 +1,130 @@ +--- +id: get-validator-set-by-height +title: "GetValidatorSetByHeight" +description: "GetValidatorSetByHeight queries validator-set at a given height." +sidebar_label: "GetValidatorSetByHeight" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GetValidatorSetByHeight","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"block_height":{"type":"string","format":"int64"},"validators":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"pub_key":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"voting_power":{"type":"string","format":"int64"},"proposer_priority":{"type":"string","format":"int64"}},"description":"Validator is the type for the validator-set."}},"pagination":{"description":"pagination defines an pagination for the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"height","in":"path","required":true,"schema":{"type":"string","format":"int64"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["base"],"description":"GetValidatorSetByHeight queries validator-set at a given height.","method":"get","path":"/cosmos/base/tendermint/v1beta1/validatorsets/{height}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GetValidatorSetByHeight","description":{"content":"GetValidatorSetByHeight queries validator-set at a given height.","type":"text/plain"},"url":{"path":["cosmos","base","tendermint","v1beta1","validatorsets",":height"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"height"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GetValidatorSetByHeight + + + +GetValidatorSetByHeight queries validator-set at a given height. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    validators object[]
  • Array [
  • pub_key object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
  • ]
  • pagination object
    + +pagination defines an pagination for the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/global-virtual-group-by-family-id.api.mdx b/docs/greenfield-api/global-virtual-group-by-family-id.api.mdx new file mode 100644 index 000000000..2d996a681 --- /dev/null +++ b/docs/greenfield-api/global-virtual-group-by-family-id.api.mdx @@ -0,0 +1,38 @@ +--- +id: global-virtual-group-by-family-id +title: "GlobalVirtualGroupByFamilyID" +description: "Queries a list of global virtual groups by family id." +sidebar_label: "GlobalVirtualGroupByFamilyID" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GlobalVirtualGroupByFamilyID","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"global_virtual_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"ID represents the unique identifier of the global virtual group."},"family_id":{"type":"integer","format":"int64","description":"Family ID represents the identifier of the GVG family that the group belongs to."},"primary_sp_id":{"type":"integer","format":"int64","description":"Primary SP ID represents the unique identifier of the primary storage provider in the group."},"secondary_sp_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Secondary SP IDs represents the list of unique identifiers of the secondary storage providers in the group."},"stored_size":{"type":"string","format":"uint64","description":"Stored size represents the size of the stored objects within the group."},"virtual_payment_address":{"type":"string","description":"Virtual payment address represents the payment address associated with the group."},"total_deposit":{"type":"string","description":"Total deposit represents the number of tokens deposited by this storage provider for staking."}},"description":"A global virtual group consists of one primary SP (SP) and multiple secondary SP.\nEvery global virtual group must belong to a GVG family, and the objects of each\nbucket must be stored in a GVG within a group family."}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"global_virtual_group_family_id","in":"query","required":false,"schema":{"type":"integer","format":"int64"}}],"tags":["virtualgroup"],"description":"Queries a list of global virtual groups by family id.","method":"get","path":"/greenfield/virtualgroup/global_virtual_group_by_family_id","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GlobalVirtualGroupByFamilyID","description":{"content":"Queries a list of global virtual groups by family id.","type":"text/plain"},"url":{"path":["greenfield","virtualgroup","global_virtual_group_by_family_id"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"global_virtual_group_family_id","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GlobalVirtualGroupByFamilyID + + + +Queries a list of global virtual groups by family id. + +
Query Parameters
+ +A successful response. + +
Schema
    global_virtual_groups object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/global-virtual-group-families.api.mdx b/docs/greenfield-api/global-virtual-group-families.api.mdx new file mode 100644 index 000000000..eea96e1f1 --- /dev/null +++ b/docs/greenfield-api/global-virtual-group-families.api.mdx @@ -0,0 +1,48 @@ +--- +id: global-virtual-group-families +title: "GlobalVirtualGroupFamilies" +description: "Queries a list of GlobalVirtualGroupFamilies items." +sidebar_label: "GlobalVirtualGroupFamilies" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GlobalVirtualGroupFamilies","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"gvg_families":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"id is the identifier of the global virtual group family."},"primary_sp_id":{"type":"integer","format":"int64","title":"primary_sp_id"},"global_virtual_group_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"global_virtual_group_ids is a list of identifiers of the global virtual groups associated with the family."},"virtual_payment_address":{"type":"string","description":"virtual_payment_address is the payment address associated with the global virtual group family."}},"description":"Global virtual group family serve as a means of grouping global virtual groups.\nEach bucket must be associated with a unique global virtual group family and cannot cross families."}},"pagination":{"type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}},"description":"PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["virtualgroup"],"description":"Queries a list of GlobalVirtualGroupFamilies items.","method":"get","path":"/greenfield/virtualgroup/global_virtual_group_families","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GlobalVirtualGroupFamilies","description":{"content":"Queries a list of GlobalVirtualGroupFamilies items.","type":"text/plain"},"url":{"path":["greenfield","virtualgroup","global_virtual_group_families"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GlobalVirtualGroupFamilies + + + +Queries a list of GlobalVirtualGroupFamilies items. + +
Query Parameters
+ +A successful response. + +
Schema
    gvg_families object[]
  • Array [
  • ]
  • pagination object
    + +PageResponse is to be embedded in gRPC response messages where the +corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/global-virtual-group-family.api.mdx b/docs/greenfield-api/global-virtual-group-family.api.mdx new file mode 100644 index 000000000..26dba33a5 --- /dev/null +++ b/docs/greenfield-api/global-virtual-group-family.api.mdx @@ -0,0 +1,43 @@ +--- +id: global-virtual-group-family +title: "GlobalVirtualGroupFamily" +description: "Queries a global virtual group family by its id." +sidebar_label: "GlobalVirtualGroupFamily" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GlobalVirtualGroupFamily","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"global_virtual_group_family":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"id is the identifier of the global virtual group family."},"primary_sp_id":{"type":"integer","format":"int64","title":"primary_sp_id"},"global_virtual_group_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"global_virtual_group_ids is a list of identifiers of the global virtual groups associated with the family."},"virtual_payment_address":{"type":"string","description":"virtual_payment_address is the payment address associated with the global virtual group family."}},"description":"Global virtual group family serve as a means of grouping global virtual groups.\nEach bucket must be associated with a unique global virtual group family and cannot cross families."}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"family_id","in":"query","required":false,"schema":{"type":"integer","format":"int64"}}],"tags":["virtualgroup"],"description":"Queries a global virtual group family by its id.","method":"get","path":"/greenfield/virtualgroup/global_virtual_group_family","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GlobalVirtualGroupFamily","description":{"content":"Queries a global virtual group family by its id.","type":"text/plain"},"url":{"path":["greenfield","virtualgroup","global_virtual_group_family"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"family_id","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GlobalVirtualGroupFamily + + + +Queries a global virtual group family by its id. + +
Query Parameters
+ +A successful response. + +
Schema
    global_virtual_group_family object
    + +Global virtual group family serve as a means of grouping global virtual groups. +Each bucket must be associated with a unique global virtual group family and cannot cross families. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/global-virtual-group.api.mdx b/docs/greenfield-api/global-virtual-group.api.mdx new file mode 100644 index 000000000..db30323c0 --- /dev/null +++ b/docs/greenfield-api/global-virtual-group.api.mdx @@ -0,0 +1,44 @@ +--- +id: global-virtual-group +title: "GlobalVirtualGroup" +description: "Queries a global virtual group by its id." +sidebar_label: "GlobalVirtualGroup" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GlobalVirtualGroup","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"global_virtual_group":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"ID represents the unique identifier of the global virtual group."},"family_id":{"type":"integer","format":"int64","description":"Family ID represents the identifier of the GVG family that the group belongs to."},"primary_sp_id":{"type":"integer","format":"int64","description":"Primary SP ID represents the unique identifier of the primary storage provider in the group."},"secondary_sp_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Secondary SP IDs represents the list of unique identifiers of the secondary storage providers in the group."},"stored_size":{"type":"string","format":"uint64","description":"Stored size represents the size of the stored objects within the group."},"virtual_payment_address":{"type":"string","description":"Virtual payment address represents the payment address associated with the group."},"total_deposit":{"type":"string","description":"Total deposit represents the number of tokens deposited by this storage provider for staking."}},"description":"A global virtual group consists of one primary SP (SP) and multiple secondary SP.\nEvery global virtual group must belong to a GVG family, and the objects of each\nbucket must be stored in a GVG within a group family."}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"global_virtual_group_id","in":"query","required":false,"schema":{"type":"integer","format":"int64"}}],"tags":["virtualgroup"],"description":"Queries a global virtual group by its id.","method":"get","path":"/greenfield/virtualgroup/global_virtual_group","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GlobalVirtualGroup","description":{"content":"Queries a global virtual group by its id.","type":"text/plain"},"url":{"path":["greenfield","virtualgroup","global_virtual_group"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"global_virtual_group_id","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GlobalVirtualGroup + + + +Queries a global virtual group by its id. + +
Query Parameters
+ +A successful response. + +
Schema
    global_virtual_group object
    + +A global virtual group consists of one primary SP (SP) and multiple secondary SP. +Every global virtual group must belong to a GVG family, and the objects of each +bucket must be stored in a GVG within a group family. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/gov-v-1-deposit.api.mdx b/docs/greenfield-api/gov-v-1-deposit.api.mdx new file mode 100644 index 000000000..75cd3c1fe --- /dev/null +++ b/docs/greenfield-api/gov-v-1-deposit.api.mdx @@ -0,0 +1,50 @@ +--- +id: gov-v-1-deposit +title: "GovV1Deposit" +description: "Deposits queries all deposits of a single proposal." +sidebar_label: "GovV1Deposit" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GovV1Deposit","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"deposits":{"type":"array","items":{"type":"object","properties":{"proposal_id":{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal."},"depositor":{"type":"string","description":"depositor defines the deposit addresses from the proposals."},"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."},"description":"amount to be deposited by depositor."}},"description":"Deposit defines an amount deposited by an account address to an active\nproposal."},"description":"deposits defines the requested deposits."},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryDepositsResponse is the response type for the Query/Deposits RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"proposal_id","description":"proposal_id defines the unique id of the proposal.","in":"path","required":true,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["gov"],"description":"Deposits queries all deposits of a single proposal.","method":"get","path":"/cosmos/gov/v1/proposals/{proposal_id}/deposits","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GovV1Deposit","description":{"content":"Deposits queries all deposits of a single proposal.","type":"text/plain"},"url":{"path":["cosmos","gov","v1","proposals",":proposal_id","deposits"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) proposal_id defines the unique id of the proposal.","type":"text/plain"},"type":"any","value":"","key":"proposal_id"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GovV1Deposit + + + +Deposits queries all deposits of a single proposal. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    deposits object[]
    + +deposits defines the requested deposits. + +
  • Array [
  • amount object[]
    + +amount to be deposited by depositor. + +
  • Array [
  • ]
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/gov-v-1-params.api.mdx b/docs/greenfield-api/gov-v-1-params.api.mdx new file mode 100644 index 000000000..78c686666 --- /dev/null +++ b/docs/greenfield-api/gov-v-1-params.api.mdx @@ -0,0 +1,67 @@ +--- +id: gov-v-1-params +title: "GovV1Params" +description: "Params queries all parameters of the gov module." +sidebar_label: "GovV1Params" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GovV1Params","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"voting_params":{"description":"Deprecated: Prefer to use `params` instead.\nvoting_params defines the parameters related to voting.","type":"object","properties":{"voting_period":{"type":"string","description":"Duration of the voting period."}}},"deposit_params":{"description":"Deprecated: Prefer to use `params` instead.\ndeposit_params defines the parameters related to deposit.","type":"object","properties":{"min_deposit":{"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."},"description":"Minimum deposit for a proposal to enter voting period."},"max_deposit_period":{"type":"string","description":"Maximum period for Atom holders to deposit on a proposal. Initial value: 2\nmonths."}}},"tally_params":{"description":"Deprecated: Prefer to use `params` instead.\ntally_params defines the parameters related to tally.","type":"object","properties":{"quorum":{"type":"string","description":"Minimum percentage of total stake needed to vote for a result to be\nconsidered valid."},"threshold":{"type":"string","description":"Minimum proportion of Yes votes for proposal to pass. Default value: 0.5."},"veto_threshold":{"type":"string","description":"Minimum value of Veto votes to Total votes ratio for proposal to be\nvetoed. Default value: 1/3."}}},"params":{"description":"params defines all the paramaters of x/gov module.\n\nSince: cosmos-sdk 0.47","type":"object","properties":{"min_deposit":{"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."},"description":"Minimum deposit for a proposal to enter voting period."},"max_deposit_period":{"type":"string","description":"Maximum period for Atom holders to deposit on a proposal. Initial value: 2\nmonths."},"voting_period":{"type":"string","description":"Duration of the voting period."},"quorum":{"type":"string","description":"Minimum percentage of total stake needed to vote for a result to be\n considered valid."},"threshold":{"type":"string","description":"Minimum proportion of Yes votes for proposal to pass. Default value: 0.5."},"veto_threshold":{"type":"string","description":"Minimum value of Veto votes to Total votes ratio for proposal to be\n vetoed. Default value: 1/3."},"min_initial_deposit_ratio":{"type":"string","description":"The ratio representing the proportion of the deposit value that must be paid at proposal submission."},"burn_vote_quorum":{"type":"boolean","title":"burn deposits if a proposal does not meet quorum"},"burn_proposal_deposit_prevote":{"type":"boolean","title":"burn deposits if the proposal does not enter voting period"},"burn_vote_veto":{"type":"boolean","title":"burn deposits if quorum with vote type no_veto is met"}}}},"description":"QueryParamsResponse is the response type for the Query/Params RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"params_type","description":"params_type defines which parameters to query for, can be one of \"voting\",\n\"tallying\" or \"deposit\".","in":"path","required":true,"schema":{"type":"string"}}],"tags":["gov"],"description":"Params queries all parameters of the gov module.","method":"get","path":"/cosmos/gov/v1/params/{params_type}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GovV1Params","description":{"content":"Params queries all parameters of the gov module.","type":"text/plain"},"url":{"path":["cosmos","gov","v1","params",":params_type"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) params_type defines which parameters to query for, can be one of \"voting\",\n\"tallying\" or \"deposit\".","type":"text/plain"},"type":"any","value":"","key":"params_type"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GovV1Params + + + +Params queries all parameters of the gov module. + +
Path Parameters
+ +A successful response. + +
Schema
    voting_params object
    + +Deprecated: Prefer to use `params` instead. +voting_params defines the parameters related to voting. + +
    deposit_params object
    + +Deprecated: Prefer to use `params` instead. +deposit_params defines the parameters related to deposit. + +
    min_deposit object[]
    + +Minimum deposit for a proposal to enter voting period. + +
  • Array [
  • ]
  • tally_params object
    + +Deprecated: Prefer to use `params` instead. +tally_params defines the parameters related to tally. + +
    params object
    + +params defines all the paramaters of x/gov module. + +Since: cosmos-sdk 0.47 + +
    min_deposit object[]
    + +Minimum deposit for a proposal to enter voting period. + +
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/gov-v-1-proposal.api.mdx b/docs/greenfield-api/gov-v-1-proposal.api.mdx new file mode 100644 index 000000000..9c7a49211 --- /dev/null +++ b/docs/greenfield-api/gov-v-1-proposal.api.mdx @@ -0,0 +1,60 @@ +--- +id: gov-v-1-proposal +title: "GovV1Proposal" +description: "Proposals queries all proposals based on given status." +sidebar_label: "GovV1Proposal" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GovV1Proposal","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"proposals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uint64","description":"id defines the unique id of the proposal."},"messages":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"description":"messages are the arbitrary messages to be executed if the proposal passes."},"status":{"description":"status defines the proposal status.","type":"string","enum":["PROPOSAL_STATUS_UNSPECIFIED","PROPOSAL_STATUS_DEPOSIT_PERIOD","PROPOSAL_STATUS_VOTING_PERIOD","PROPOSAL_STATUS_PASSED","PROPOSAL_STATUS_REJECTED","PROPOSAL_STATUS_FAILED"],"default":"PROPOSAL_STATUS_UNSPECIFIED"},"final_tally_result":{"description":"final_tally_result is the final tally result of the proposal. When\nquerying a proposal via gRPC, this field is not populated until the\nproposal's voting period has ended.","type":"object","properties":{"yes_count":{"type":"string","description":"yes_count is the number of yes votes on a proposal."},"abstain_count":{"type":"string","description":"abstain_count is the number of abstain votes on a proposal."},"no_count":{"type":"string","description":"no_count is the number of no votes on a proposal."},"no_with_veto_count":{"type":"string","description":"no_with_veto_count is the number of no with veto votes on a proposal."}}},"submit_time":{"type":"string","format":"date-time","description":"submit_time is the time of proposal submission."},"deposit_end_time":{"type":"string","format":"date-time","description":"deposit_end_time is the end time for deposition."},"total_deposit":{"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."},"description":"total_deposit is the total deposit on the proposal."},"voting_start_time":{"type":"string","format":"date-time","description":"voting_start_time is the starting time to vote on a proposal."},"voting_end_time":{"type":"string","format":"date-time","description":"voting_end_time is the end time of voting on a proposal."},"metadata":{"type":"string","description":"metadata is any arbitrary metadata attached to the proposal."},"title":{"type":"string","description":"Since: cosmos-sdk 0.47","title":"title is the title of the proposal"},"summary":{"type":"string","description":"Since: cosmos-sdk 0.47","title":"summary is a short summary of the proposal"},"proposer":{"type":"string","description":"Since: cosmos-sdk 0.47","title":"Proposer is the address of the proposal sumbitter"},"failed_reason":{"type":"string","title":"The reason of the failure proposal"}},"description":"Proposal defines the core field members of a governance proposal."},"description":"proposals defines all the requested governance proposals."},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryProposalsResponse is the response type for the Query/Proposals RPC\nmethod."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"proposal_status","description":"proposal_status defines the status of the proposals.\n\n - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status.\n - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit\nperiod.\n - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting\nperiod.\n - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has\npassed.\n - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has\nbeen rejected.\n - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has\nfailed.","in":"query","required":false,"schema":{"type":"string","enum":["PROPOSAL_STATUS_UNSPECIFIED","PROPOSAL_STATUS_DEPOSIT_PERIOD","PROPOSAL_STATUS_VOTING_PERIOD","PROPOSAL_STATUS_PASSED","PROPOSAL_STATUS_REJECTED","PROPOSAL_STATUS_FAILED"],"default":"PROPOSAL_STATUS_UNSPECIFIED"}},{"name":"voter","description":"voter defines the voter address for the proposals.","in":"query","required":false,"schema":{"type":"string"}},{"name":"depositor","description":"depositor defines the deposit addresses from the proposals.","in":"query","required":false,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["gov"],"description":"Proposals queries all proposals based on given status.","method":"get","path":"/cosmos/gov/v1/proposals","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GovV1Proposal","description":{"content":"Proposals queries all proposals based on given status.","type":"text/plain"},"url":{"path":["cosmos","gov","v1","proposals"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"proposal_status defines the status of the proposals.\n\n - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status.\n - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit\nperiod.\n - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting\nperiod.\n - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has\npassed.\n - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has\nbeen rejected.\n - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has\nfailed.","type":"text/plain"},"key":"proposal_status","value":""},{"disabled":false,"description":{"content":"voter defines the voter address for the proposals.","type":"text/plain"},"key":"voter","value":""},{"disabled":false,"description":{"content":"depositor defines the deposit addresses from the proposals.","type":"text/plain"},"key":"depositor","value":""},{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GovV1Proposal + + + +Proposals queries all proposals based on given status. + +
Query Parameters
+ +A successful response. + +
Schema
    proposals object[]
    + +proposals defines all the requested governance proposals. + +
  • Array [
  • messages object[]
    + +messages are the arbitrary messages to be executed if the proposal passes. + +
  • Array [
  • ]
  • final_tally_result object
    + +final_tally_result is the final tally result of the proposal. When +querying a proposal via gRPC, this field is not populated until the +proposal's voting period has ended. + +
    total_deposit object[]
    + +total_deposit is the total deposit on the proposal. + +
  • Array [
  • ]
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/gov-v-1-tally-result.api.mdx b/docs/greenfield-api/gov-v-1-tally-result.api.mdx new file mode 100644 index 000000000..6fa4b134c --- /dev/null +++ b/docs/greenfield-api/gov-v-1-tally-result.api.mdx @@ -0,0 +1,42 @@ +--- +id: gov-v-1-tally-result +title: "GovV1TallyResult" +description: "TallyResult queries the tally of a proposal vote." +sidebar_label: "GovV1TallyResult" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GovV1TallyResult","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"tally":{"description":"tally defines the requested tally.","type":"object","properties":{"yes_count":{"type":"string","description":"yes_count is the number of yes votes on a proposal."},"abstain_count":{"type":"string","description":"abstain_count is the number of abstain votes on a proposal."},"no_count":{"type":"string","description":"no_count is the number of no votes on a proposal."},"no_with_veto_count":{"type":"string","description":"no_with_veto_count is the number of no with veto votes on a proposal."}}}},"description":"QueryTallyResultResponse is the response type for the Query/Tally RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"proposal_id","description":"proposal_id defines the unique id of the proposal.","in":"path","required":true,"schema":{"type":"string","format":"uint64"}}],"tags":["gov"],"description":"TallyResult queries the tally of a proposal vote.","method":"get","path":"/cosmos/gov/v1/proposals/{proposal_id}/tally","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GovV1TallyResult","description":{"content":"TallyResult queries the tally of a proposal vote.","type":"text/plain"},"url":{"path":["cosmos","gov","v1","proposals",":proposal_id","tally"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) proposal_id defines the unique id of the proposal.","type":"text/plain"},"type":"any","value":"","key":"proposal_id"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GovV1TallyResult + + + +TallyResult queries the tally of a proposal vote. + +
Path Parameters
+ +A successful response. + +
Schema
    tally object
    + +tally defines the requested tally. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/gov-v-1-vote.api.mdx b/docs/greenfield-api/gov-v-1-vote.api.mdx new file mode 100644 index 000000000..452b924f9 --- /dev/null +++ b/docs/greenfield-api/gov-v-1-vote.api.mdx @@ -0,0 +1,47 @@ +--- +id: gov-v-1-vote +title: "GovV1Vote" +description: "Vote queries voted information based on proposalID, voterAddr." +sidebar_label: "GovV1Vote" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GovV1Vote","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"vote":{"type":"object","properties":{"proposal_id":{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal."},"voter":{"type":"string","description":"voter is the voter address of the proposal."},"options":{"type":"array","items":{"type":"object","properties":{"option":{"description":"option defines the valid vote options, it must not contain duplicate vote options.","type":"string","enum":["VOTE_OPTION_UNSPECIFIED","VOTE_OPTION_YES","VOTE_OPTION_ABSTAIN","VOTE_OPTION_NO","VOTE_OPTION_NO_WITH_VETO"],"default":"VOTE_OPTION_UNSPECIFIED"},"weight":{"type":"string","description":"weight is the vote weight associated with the vote option."}},"description":"WeightedVoteOption defines a unit of vote for vote split."},"description":"options is the weighted vote options."},"metadata":{"type":"string","description":"metadata is any arbitrary metadata to attached to the vote."}},"description":"Vote defines a vote on a governance proposal.\nA Vote consists of a proposal ID, the voter, and the vote option."}},"description":"QueryVoteResponse is the response type for the Query/Vote RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"proposal_id","description":"proposal_id defines the unique id of the proposal.","in":"path","required":true,"schema":{"type":"string","format":"uint64"}},{"name":"voter","description":"voter defines the voter address for the proposals.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["gov"],"description":"Vote queries voted information based on proposalID, voterAddr.","method":"get","path":"/cosmos/gov/v1/proposals/{proposal_id}/votes/{voter}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GovV1Vote","description":{"content":"Vote queries voted information based on proposalID, voterAddr.","type":"text/plain"},"url":{"path":["cosmos","gov","v1","proposals",":proposal_id","votes",":voter"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) proposal_id defines the unique id of the proposal.","type":"text/plain"},"type":"any","value":"","key":"proposal_id"},{"disabled":false,"description":{"content":"(Required) voter defines the voter address for the proposals.","type":"text/plain"},"type":"any","value":"","key":"voter"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GovV1Vote + + + +Vote queries voted information based on proposalID, voterAddr. + +
Path Parameters
+ +A successful response. + +
Schema
    vote object
    + +Vote defines a vote on a governance proposal. +A Vote consists of a proposal ID, the voter, and the vote option. + +
    options object[]
    + +options is the weighted vote options. + +
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/gov-v-1-votes.api.mdx b/docs/greenfield-api/gov-v-1-votes.api.mdx new file mode 100644 index 000000000..03be7ac61 --- /dev/null +++ b/docs/greenfield-api/gov-v-1-votes.api.mdx @@ -0,0 +1,50 @@ +--- +id: gov-v-1-votes +title: "GovV1Votes" +description: "Votes queries votes of a given proposal." +sidebar_label: "GovV1Votes" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"GovV1Votes","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"votes":{"type":"array","items":{"type":"object","properties":{"proposal_id":{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal."},"voter":{"type":"string","description":"voter is the voter address of the proposal."},"options":{"type":"array","items":{"type":"object","properties":{"option":{"description":"option defines the valid vote options, it must not contain duplicate vote options.","type":"string","enum":["VOTE_OPTION_UNSPECIFIED","VOTE_OPTION_YES","VOTE_OPTION_ABSTAIN","VOTE_OPTION_NO","VOTE_OPTION_NO_WITH_VETO"],"default":"VOTE_OPTION_UNSPECIFIED"},"weight":{"type":"string","description":"weight is the vote weight associated with the vote option."}},"description":"WeightedVoteOption defines a unit of vote for vote split."},"description":"options is the weighted vote options."},"metadata":{"type":"string","description":"metadata is any arbitrary metadata to attached to the vote."}},"description":"Vote defines a vote on a governance proposal.\nA Vote consists of a proposal ID, the voter, and the vote option."},"description":"votes defines the queried votes."},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryVotesResponse is the response type for the Query/Votes RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"proposal_id","description":"proposal_id defines the unique id of the proposal.","in":"path","required":true,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["gov"],"description":"Votes queries votes of a given proposal.","method":"get","path":"/cosmos/gov/v1/proposals/{proposal_id}/votes","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GovV1Votes","description":{"content":"Votes queries votes of a given proposal.","type":"text/plain"},"url":{"path":["cosmos","gov","v1","proposals",":proposal_id","votes"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) proposal_id defines the unique id of the proposal.","type":"text/plain"},"type":"any","value":"","key":"proposal_id"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GovV1Votes + + + +Votes queries votes of a given proposal. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    votes object[]
    + +votes defines the queried votes. + +
  • Array [
  • options object[]
    + +options is the weighted vote options. + +
  • Array [
  • ]
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/grantee-grants.api.mdx b/docs/greenfield-api/grantee-grants.api.mdx new file mode 100644 index 000000000..58e161cc8 --- /dev/null +++ b/docs/greenfield-api/grantee-grants.api.mdx @@ -0,0 +1,134 @@ +--- +id: grantee-grants +title: "GranteeGrants" +description: "GranteeGrants returns a list of `GrantAuthorization` by grantee." +sidebar_label: "GranteeGrants" +hide_title: true +hide_table_of_contents: true +api: {"description":"GranteeGrants returns a list of `GrantAuthorization` by grantee.","operationId":"GranteeGrants","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"grants":{"type":"array","items":{"type":"object","properties":{"granter":{"type":"string"},"grantee":{"type":"string"},"authorization":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"expiration":{"type":"string","format":"date-time"}},"title":"GrantAuthorization extends a grant with both the addresses of the grantee and granter.\nIt is used in genesis.proto and query.proto"},"description":"grants is a list of grants granted to the grantee."},"pagination":{"description":"pagination defines an pagination for the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"grantee","in":"path","required":true,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["authz"],"method":"get","path":"/cosmos/authz/v1beta1/grants/grantee/{grantee}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GranteeGrants","description":{"content":"GranteeGrants returns a list of `GrantAuthorization` by grantee.","type":"text/plain"},"url":{"path":["cosmos","authz","v1beta1","grants","grantee",":grantee"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"grantee"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GranteeGrants + + + +GranteeGrants returns a list of `GrantAuthorization` by grantee. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    grants object[]
    + +grants is a list of grants granted to the grantee. + +
  • Array [
  • authorization object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
  • ]
  • pagination object
    + +pagination defines an pagination for the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/granter-grants.api.mdx b/docs/greenfield-api/granter-grants.api.mdx new file mode 100644 index 000000000..01ba22a01 --- /dev/null +++ b/docs/greenfield-api/granter-grants.api.mdx @@ -0,0 +1,134 @@ +--- +id: granter-grants +title: "GranterGrants" +description: "GranterGrants returns list of `GrantAuthorization`, granted by granter." +sidebar_label: "GranterGrants" +hide_title: true +hide_table_of_contents: true +api: {"description":"GranterGrants returns list of `GrantAuthorization`, granted by granter.","operationId":"GranterGrants","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"grants":{"type":"array","items":{"type":"object","properties":{"granter":{"type":"string"},"grantee":{"type":"string"},"authorization":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"expiration":{"type":"string","format":"date-time"}},"title":"GrantAuthorization extends a grant with both the addresses of the grantee and granter.\nIt is used in genesis.proto and query.proto"},"description":"grants is a list of grants granted by the granter."},"pagination":{"description":"pagination defines an pagination for the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"granter","in":"path","required":true,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["authz"],"method":"get","path":"/cosmos/authz/v1beta1/grants/granter/{granter}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"GranterGrants","description":{"content":"GranterGrants returns list of `GrantAuthorization`, granted by granter.","type":"text/plain"},"url":{"path":["cosmos","authz","v1beta1","grants","granter",":granter"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"granter"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## GranterGrants + + + +GranterGrants returns list of `GrantAuthorization`, granted by granter. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    grants object[]
    + +grants is a list of grants granted by the granter. + +
  • Array [
  • authorization object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
  • ]
  • pagination object
    + +pagination defines an pagination for the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/grants.api.mdx b/docs/greenfield-api/grants.api.mdx new file mode 100644 index 000000000..5f24ad769 --- /dev/null +++ b/docs/greenfield-api/grants.api.mdx @@ -0,0 +1,134 @@ +--- +id: grants +title: "Grants" +description: "Returns list of `Authorization`, granted to the grantee by the granter." +sidebar_label: "Grants" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"Grants","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"grants":{"type":"array","items":{"type":"object","properties":{"authorization":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"expiration":{"type":"string","format":"date-time","title":"time when the grant will expire and will be pruned. If null, then the grant\ndoesn't have a time expiration (other conditions in `authorization`\nmay apply to invalidate the grant)"}},"description":"Grant gives permissions to execute\nthe provide method with expiration time."},"description":"authorizations is a list of grants granted for grantee by granter."},"pagination":{"description":"pagination defines an pagination for the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryGrantsResponse is the response type for the Query/Authorizations RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"granter","in":"query","required":false,"schema":{"type":"string"}},{"name":"grantee","in":"query","required":false,"schema":{"type":"string"}},{"name":"msg_type_url","description":"Optional, msg_type_url, when set, will query only grants matching given msg type.","in":"query","required":false,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["authz"],"description":"Returns list of `Authorization`, granted to the grantee by the granter.","method":"get","path":"/cosmos/authz/v1beta1/grants","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"Grants","description":{"content":"Returns list of `Authorization`, granted to the grantee by the granter.","type":"text/plain"},"url":{"path":["cosmos","authz","v1beta1","grants"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"granter","value":""},{"disabled":false,"key":"grantee","value":""},{"disabled":false,"description":{"content":"Optional, msg_type_url, when set, will query only grants matching given msg type.","type":"text/plain"},"key":"msg_type_url","value":""},{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Grants + + + +Returns list of `Authorization`, granted to the grantee by the granter. + +
Query Parameters
+ +A successful response. + +
Schema
    grants object[]
    + +authorizations is a list of grants granted for grantee by granter. + +
  • Array [
  • authorization object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
  • ]
  • pagination object
    + +pagination defines an pagination for the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/greenfield-grpc-gateway-docs.info.mdx b/docs/greenfield-api/greenfield-grpc-gateway-docs.info.mdx new file mode 100644 index 000000000..8d28d1294 --- /dev/null +++ b/docs/greenfield-api/greenfield-grpc-gateway-docs.info.mdx @@ -0,0 +1,27 @@ +--- +id: greenfield-grpc-gateway-docs +title: "Greenfield - gRPC Gateway docs" +description: "A REST interface for state queries" +sidebar_label: Introduction +sidebar_position: 0 +hide_title: true +custom_edit_url: null +--- + +import ApiLogo from "@theme/ApiLogo"; +import SchemaTabs from "@theme/SchemaTabs"; +import TabItem from "@theme/TabItem"; +import Export from "@theme/ApiDemoPanel/Export"; + +Version: 1.0.0 + + + +# Greenfield - gRPC Gateway docs + + + +A REST interface for state queries + + + \ No newline at end of file diff --git a/docs/greenfield-api/head-bucket-by-id.api.mdx b/docs/greenfield-api/head-bucket-by-id.api.mdx new file mode 100644 index 000000000..80c64c289 --- /dev/null +++ b/docs/greenfield-api/head-bucket-by-id.api.mdx @@ -0,0 +1,38 @@ +--- +id: head-bucket-by-id +title: "HeadBucketById" +description: "Queries a bucket by id" +sidebar_label: "HeadBucketById" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"HeadBucketById","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"bucket_info":{"type":"object","properties":{"owner":{"type":"string","description":"owner is the account address of bucket creator, it is also the bucket owner."},"bucket_name":{"type":"string","title":"bucket_name is a globally unique name of bucket"},"visibility":{"description":"visibility defines the highest permissions for bucket. When a bucket is public, everyone can get storage objects in it.","type":"string","enum":["VISIBILITY_TYPE_UNSPECIFIED","VISIBILITY_TYPE_PUBLIC_READ","VISIBILITY_TYPE_PRIVATE","VISIBILITY_TYPE_INHERIT"],"default":"VISIBILITY_TYPE_UNSPECIFIED"},"id":{"type":"string","description":"id is the unique identification for bucket."},"source_type":{"title":"source_type defines which chain the user should send the bucket management transactions to","type":"string","enum":["SOURCE_TYPE_ORIGIN","SOURCE_TYPE_MIRROR_PENDING","SOURCE_TYPE_BSC_CROSS_CHAIN","SOURCE_TYPE_OP_CROSS_CHAIN"],"default":"SOURCE_TYPE_ORIGIN"},"create_at":{"type":"string","format":"int64","description":"create_at define the block timestamp when the bucket created."},"payment_address":{"type":"string","title":"payment_address is the address of the payment account"},"global_virtual_group_family_id":{"type":"integer","format":"int64","title":"global_virtual_group_family_id defines the unique id of gvg family"},"charged_read_quota":{"type":"string","format":"uint64","description":"charged_read_quota defines the traffic quota for read in bytes per month.\nThe available read data for each user is the sum of the free read data provided by SP and\nthe ChargeReadQuota specified here."},"bucket_status":{"description":"bucket_status define the status of the bucket.","type":"string","enum":["BUCKET_STATUS_CREATED","BUCKET_STATUS_DISCONTINUED","BUCKET_STATUS_MIGRATING"],"default":"BUCKET_STATUS_CREATED"},"tags":{"title":"tags defines a list of tags the bucket has","type":"object","properties":{"tags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}},"title":"tags defines a list of tags the resource has"}}}}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"bucket_id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["storage"],"description":"Queries a bucket by id","method":"get","path":"/greenfield/storage/head_bucket_by_id/{bucket_id}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"HeadBucketById","description":{"content":"Queries a bucket by id","type":"text/plain"},"url":{"path":["greenfield","storage","head_bucket_by_id",":bucket_id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"bucket_id"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## HeadBucketById + + + +Queries a bucket by id + +
Path Parameters
+ +A successful response. + +
Schema
    bucket_info object
    tags object
    tags object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/head-bucket-extra.api.mdx b/docs/greenfield-api/head-bucket-extra.api.mdx new file mode 100644 index 000000000..2d8aa9a5b --- /dev/null +++ b/docs/greenfield-api/head-bucket-extra.api.mdx @@ -0,0 +1,42 @@ +--- +id: head-bucket-extra +title: "HeadBucketExtra" +description: "Queries a bucket extra info (with gvg bindings and price time) with specify name." +sidebar_label: "HeadBucketExtra" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"HeadBucketExtra","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"extra_info":{"type":"object","properties":{"price_time":{"type":"string","format":"int64","title":"the time of the payment price, used to calculate the charge rate of the bucket"},"total_charge_size":{"type":"string","format":"uint64","title":"the total size of the objects in the bucket, used to calculate the charge rate of the bucket"},"local_virtual_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"id is the identifier of the local virtual group."},"global_virtual_group_id":{"type":"integer","format":"int64","description":"global_virtual_group_id is the identifier of the global virtual group."},"stored_size":{"type":"string","format":"uint64","description":"stored_size is the size of the stored data in the local virtual group."},"total_charge_size":{"type":"string","format":"uint64","title":"total_charge_size is the total charged size of the objects in the LVG.\nNotice that the minimum unit of charge is 128K"}},"description":"Local virtual group(LVG) uniquely associated with a global virtual group.\nEach bucket maintains a mapping from local virtual group to global virtual group\nEach local virtual group is associated with a unique virtual payment account,\nwhere all object fees are streamed to."},"description":"local_virtual_groups contains all the lvg of this bucket."},"next_local_virtual_group_id":{"type":"integer","format":"int64","title":"next_local_virtual_group_id store the next id used by local virtual group"}}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"bucket_name","in":"path","required":true,"schema":{"type":"string"}}],"tags":["storage"],"description":"Queries a bucket extra info (with gvg bindings and price time) with specify name.","method":"get","path":"/greenfield/storage/head_bucket_extra/{bucket_name}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"HeadBucketExtra","description":{"content":"Queries a bucket extra info (with gvg bindings and price time) with specify name.","type":"text/plain"},"url":{"path":["greenfield","storage","head_bucket_extra",":bucket_name"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"bucket_name"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## HeadBucketExtra + + + +Queries a bucket extra info (with gvg bindings and price time) with specify name. + +
Path Parameters
+ +A successful response. + +
Schema
    extra_info object
    local_virtual_groups object[]
    + +local_virtual_groups contains all the lvg of this bucket. + +
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/head-bucket-nft.api.mdx b/docs/greenfield-api/head-bucket-nft.api.mdx new file mode 100644 index 000000000..872a24ed8 --- /dev/null +++ b/docs/greenfield-api/head-bucket-nft.api.mdx @@ -0,0 +1,38 @@ +--- +id: head-bucket-nft +title: "HeadBucketNFT" +description: "Queries a bucket with EIP712 standard metadata info" +sidebar_label: "HeadBucketNFT" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"HeadBucketNFT","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"meta_data":{"type":"object","properties":{"description":{"type":"string","title":"description"},"external_url":{"type":"string","title":"externalUrl a link to external site to view NFT"},"bucket_name":{"type":"string","title":"name of bucket NFT"},"image":{"type":"string","title":"image is the link to image"},"attributes":{"type":"array","items":{"type":"object","properties":{"trait_type":{"type":"string"},"value":{"type":"string"}}},"title":"attributes"}}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["storage"],"description":"Queries a bucket with EIP712 standard metadata info","method":"get","path":"/greenfield/storage/head_bucket_nft/{token_id}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"HeadBucketNFT","description":{"content":"Queries a bucket with EIP712 standard metadata info","type":"text/plain"},"url":{"path":["greenfield","storage","head_bucket_nft",":token_id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"token_id"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## HeadBucketNFT + + + +Queries a bucket with EIP712 standard metadata info + +
Path Parameters
+ +A successful response. + +
Schema
    meta_data object
    attributes object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/head-bucket.api.mdx b/docs/greenfield-api/head-bucket.api.mdx new file mode 100644 index 000000000..9bfd55a7a --- /dev/null +++ b/docs/greenfield-api/head-bucket.api.mdx @@ -0,0 +1,38 @@ +--- +id: head-bucket +title: "HeadBucket" +description: "Queries a bucket with specify name." +sidebar_label: "HeadBucket" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"HeadBucket","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"bucket_info":{"type":"object","properties":{"owner":{"type":"string","description":"owner is the account address of bucket creator, it is also the bucket owner."},"bucket_name":{"type":"string","title":"bucket_name is a globally unique name of bucket"},"visibility":{"description":"visibility defines the highest permissions for bucket. When a bucket is public, everyone can get storage objects in it.","type":"string","enum":["VISIBILITY_TYPE_UNSPECIFIED","VISIBILITY_TYPE_PUBLIC_READ","VISIBILITY_TYPE_PRIVATE","VISIBILITY_TYPE_INHERIT"],"default":"VISIBILITY_TYPE_UNSPECIFIED"},"id":{"type":"string","description":"id is the unique identification for bucket."},"source_type":{"title":"source_type defines which chain the user should send the bucket management transactions to","type":"string","enum":["SOURCE_TYPE_ORIGIN","SOURCE_TYPE_MIRROR_PENDING","SOURCE_TYPE_BSC_CROSS_CHAIN","SOURCE_TYPE_OP_CROSS_CHAIN"],"default":"SOURCE_TYPE_ORIGIN"},"create_at":{"type":"string","format":"int64","description":"create_at define the block timestamp when the bucket created."},"payment_address":{"type":"string","title":"payment_address is the address of the payment account"},"global_virtual_group_family_id":{"type":"integer","format":"int64","title":"global_virtual_group_family_id defines the unique id of gvg family"},"charged_read_quota":{"type":"string","format":"uint64","description":"charged_read_quota defines the traffic quota for read in bytes per month.\nThe available read data for each user is the sum of the free read data provided by SP and\nthe ChargeReadQuota specified here."},"bucket_status":{"description":"bucket_status define the status of the bucket.","type":"string","enum":["BUCKET_STATUS_CREATED","BUCKET_STATUS_DISCONTINUED","BUCKET_STATUS_MIGRATING"],"default":"BUCKET_STATUS_CREATED"},"tags":{"title":"tags defines a list of tags the bucket has","type":"object","properties":{"tags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}},"title":"tags defines a list of tags the resource has"}}}}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"bucket_name","in":"path","required":true,"schema":{"type":"string"}}],"tags":["storage"],"description":"Queries a bucket with specify name.","method":"get","path":"/greenfield/storage/head_bucket/{bucket_name}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"HeadBucket","description":{"content":"Queries a bucket with specify name.","type":"text/plain"},"url":{"path":["greenfield","storage","head_bucket",":bucket_name"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"bucket_name"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## HeadBucket + + + +Queries a bucket with specify name. + +
Path Parameters
+ +A successful response. + +
Schema
    bucket_info object
    tags object
    tags object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/head-group-member.api.mdx b/docs/greenfield-api/head-group-member.api.mdx new file mode 100644 index 000000000..c1e322ad7 --- /dev/null +++ b/docs/greenfield-api/head-group-member.api.mdx @@ -0,0 +1,38 @@ +--- +id: head-group-member +title: "HeadGroupMember" +description: "Queries a list of HeadGroupMember items." +sidebar_label: "HeadGroupMember" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"HeadGroupMember","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"group_member":{"type":"object","properties":{"id":{"type":"string","title":"id is an unique u256 sequence for each group member. It also be used as NFT tokenID"},"group_id":{"type":"string","title":"group_id is the unique id of the group"},"member":{"type":"string","title":"member is the account address of the member"},"expiration_time":{"type":"string","format":"date-time","title":"expiration_time defines the expiration time of the group member"}}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"member","in":"query","required":false,"schema":{"type":"string"}},{"name":"group_owner","in":"query","required":false,"schema":{"type":"string"}},{"name":"group_name","in":"query","required":false,"schema":{"type":"string"}}],"tags":["storage"],"description":"Queries a list of HeadGroupMember items.","method":"get","path":"/greenfield/storage/head_group_member","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"HeadGroupMember","description":{"content":"Queries a list of HeadGroupMember items.","type":"text/plain"},"url":{"path":["greenfield","storage","head_group_member"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"member","value":""},{"disabled":false,"key":"group_owner","value":""},{"disabled":false,"key":"group_name","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## HeadGroupMember + + + +Queries a list of HeadGroupMember items. + +
Query Parameters
+ +A successful response. + +
Schema
    group_member object
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/head-group-nft.api.mdx b/docs/greenfield-api/head-group-nft.api.mdx new file mode 100644 index 000000000..e93f83a07 --- /dev/null +++ b/docs/greenfield-api/head-group-nft.api.mdx @@ -0,0 +1,38 @@ +--- +id: head-group-nft +title: "HeadGroupNFT" +description: "Queries a group with EIP712 standard metadata info" +sidebar_label: "HeadGroupNFT" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"HeadGroupNFT","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"meta_data":{"type":"object","properties":{"description":{"type":"string","title":"description"},"external_url":{"type":"string","title":"externalUrl a link to external site to view NFT"},"group_name":{"type":"string","title":"name of group NFT"},"image":{"type":"string","title":"image is the link to image"},"attributes":{"type":"array","items":{"type":"object","properties":{"trait_type":{"type":"string"},"value":{"type":"string"}}},"title":"attributes"}}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["storage"],"description":"Queries a group with EIP712 standard metadata info","method":"get","path":"/greenfield/storage/head_group_nft/{token_id}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"HeadGroupNFT","description":{"content":"Queries a group with EIP712 standard metadata info","type":"text/plain"},"url":{"path":["greenfield","storage","head_group_nft",":token_id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"token_id"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## HeadGroupNFT + + + +Queries a group with EIP712 standard metadata info + +
Path Parameters
+ +A successful response. + +
Schema
    meta_data object
    attributes object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/head-group.api.mdx b/docs/greenfield-api/head-group.api.mdx new file mode 100644 index 000000000..27be94c9c --- /dev/null +++ b/docs/greenfield-api/head-group.api.mdx @@ -0,0 +1,38 @@ +--- +id: head-group +title: "HeadGroup" +description: "Queries a group with specify owner and name ." +sidebar_label: "HeadGroup" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"HeadGroup","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"group_info":{"type":"object","properties":{"owner":{"type":"string","description":"owner is the owner of the group. It can not changed once it created."},"group_name":{"type":"string","description":"group_name is the name of group which is unique under an account."},"source_type":{"title":"source_type","type":"string","enum":["SOURCE_TYPE_ORIGIN","SOURCE_TYPE_MIRROR_PENDING","SOURCE_TYPE_BSC_CROSS_CHAIN","SOURCE_TYPE_OP_CROSS_CHAIN"],"default":"SOURCE_TYPE_ORIGIN"},"id":{"type":"string","title":"id is the unique identifier of group"},"extra":{"type":"string","title":"extra is used to store extra info for the group"},"tags":{"title":"tags defines a list of tags the group has","type":"object","properties":{"tags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}},"title":"tags defines a list of tags the resource has"}}}}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"group_owner","in":"path","required":true,"schema":{"type":"string"}},{"name":"group_name","in":"path","required":true,"schema":{"type":"string"}}],"tags":["storage"],"description":"Queries a group with specify owner and name .","method":"get","path":"/greenfield/storage/head_group/{group_owner}/{group_name}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"HeadGroup","description":{"content":"Queries a group with specify owner and name .","type":"text/plain"},"url":{"path":["greenfield","storage","head_group",":group_owner",":group_name"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"group_owner"},{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"group_name"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## HeadGroup + + + +Queries a group with specify owner and name . + +
Path Parameters
+ +A successful response. + +
Schema
    group_info object
    tags object
    tags object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/head-object-by-id.api.mdx b/docs/greenfield-api/head-object-by-id.api.mdx new file mode 100644 index 000000000..40ded6d62 --- /dev/null +++ b/docs/greenfield-api/head-object-by-id.api.mdx @@ -0,0 +1,44 @@ +--- +id: head-object-by-id +title: "HeadObjectById" +description: "Queries an object by id" +sidebar_label: "HeadObjectById" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"HeadObjectById","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"object_info":{"type":"object","properties":{"owner":{"type":"string","title":"owner is the object owner"},"creator":{"type":"string","title":"creator is the address of the uploader, it always be same as owner address"},"bucket_name":{"type":"string","title":"bucket_name is the name of the bucket"},"object_name":{"type":"string","title":"object_name is the name of object"},"id":{"type":"string","title":"id is the unique identifier of object"},"local_virtual_group_id":{"type":"integer","format":"int64"},"payload_size":{"type":"string","format":"uint64","title":"payloadSize is the total size of the object payload"},"visibility":{"description":"visibility defines the highest permissions for object. When an object is public, everyone can access it.","type":"string","enum":["VISIBILITY_TYPE_UNSPECIFIED","VISIBILITY_TYPE_PUBLIC_READ","VISIBILITY_TYPE_PRIVATE","VISIBILITY_TYPE_INHERIT"],"default":"VISIBILITY_TYPE_UNSPECIFIED"},"content_type":{"type":"string","description":"content_type define the format of the object which should be a standard MIME type."},"create_at":{"type":"string","format":"int64","title":"create_at define the block timestamp when the object is created"},"object_status":{"description":"object_status define the upload status of the object.","type":"string","enum":["OBJECT_STATUS_CREATED","OBJECT_STATUS_SEALED","OBJECT_STATUS_DISCONTINUED"],"default":"OBJECT_STATUS_CREATED"},"redundancy_type":{"description":"redundancy_type define the type of the redundancy which can be multi-replication or EC.","type":"string","enum":["REDUNDANCY_EC_TYPE","REDUNDANCY_REPLICA_TYPE"],"default":"REDUNDANCY_EC_TYPE"},"source_type":{"description":"source_type define the source of the object.","type":"string","enum":["SOURCE_TYPE_ORIGIN","SOURCE_TYPE_MIRROR_PENDING","SOURCE_TYPE_BSC_CROSS_CHAIN","SOURCE_TYPE_OP_CROSS_CHAIN"],"default":"SOURCE_TYPE_ORIGIN","title":"SourceType represents the source of resource creation, which can\nfrom Greenfield native or from a cross-chain transfer from BSC"},"checksums":{"type":"array","items":{"type":"string","format":"byte"},"title":"checksums define the root hash of the pieces which stored in a SP.\nadd omit tag to omit the field when converting to NFT metadata"},"tags":{"title":"tags defines a list of tags the object has","type":"object","properties":{"tags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}},"title":"tags defines a list of tags the resource has"}}}}},"global_virtual_group":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"ID represents the unique identifier of the global virtual group."},"family_id":{"type":"integer","format":"int64","description":"Family ID represents the identifier of the GVG family that the group belongs to."},"primary_sp_id":{"type":"integer","format":"int64","description":"Primary SP ID represents the unique identifier of the primary storage provider in the group."},"secondary_sp_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Secondary SP IDs represents the list of unique identifiers of the secondary storage providers in the group."},"stored_size":{"type":"string","format":"uint64","description":"Stored size represents the size of the stored objects within the group."},"virtual_payment_address":{"type":"string","description":"Virtual payment address represents the payment address associated with the group."},"total_deposit":{"type":"string","description":"Total deposit represents the number of tokens deposited by this storage provider for staking."}},"description":"A global virtual group consists of one primary SP (SP) and multiple secondary SP.\nEvery global virtual group must belong to a GVG family, and the objects of each\nbucket must be stored in a GVG within a group family."}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["storage"],"description":"Queries an object by id","method":"get","path":"/greenfield/storage/head_object_by_id/{object_id}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"HeadObjectById","description":{"content":"Queries an object by id","type":"text/plain"},"url":{"path":["greenfield","storage","head_object_by_id",":object_id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"object_id"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## HeadObjectById + + + +Queries an object by id + +
Path Parameters
+ +A successful response. + +
Schema
    object_info object
    tags object
    tags object[]
  • Array [
  • ]
  • global_virtual_group object
    + +A global virtual group consists of one primary SP (SP) and multiple secondary SP. +Every global virtual group must belong to a GVG family, and the objects of each +bucket must be stored in a GVG within a group family. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/head-object-nft.api.mdx b/docs/greenfield-api/head-object-nft.api.mdx new file mode 100644 index 000000000..4189fef57 --- /dev/null +++ b/docs/greenfield-api/head-object-nft.api.mdx @@ -0,0 +1,38 @@ +--- +id: head-object-nft +title: "HeadObjectNFT" +description: "Queries a object with EIP712 standard metadata info" +sidebar_label: "HeadObjectNFT" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"HeadObjectNFT","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"meta_data":{"type":"object","properties":{"description":{"type":"string","title":"description"},"external_url":{"type":"string","title":"externalUrl a link to external site to view NFT"},"object_name":{"type":"string","title":"name of object NFT"},"image":{"type":"string","title":"image is the link to image"},"attributes":{"type":"array","items":{"type":"object","properties":{"trait_type":{"type":"string"},"value":{"type":"string"}}},"title":"attributes"}}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["storage"],"description":"Queries a object with EIP712 standard metadata info","method":"get","path":"/greenfield/storage/head_object_nft/{token_id}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"HeadObjectNFT","description":{"content":"Queries a object with EIP712 standard metadata info","type":"text/plain"},"url":{"path":["greenfield","storage","head_object_nft",":token_id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"token_id"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## HeadObjectNFT + + + +Queries a object with EIP712 standard metadata info + +
Path Parameters
+ +A successful response. + +
Schema
    meta_data object
    attributes object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/head-object.api.mdx b/docs/greenfield-api/head-object.api.mdx new file mode 100644 index 000000000..ab1690b20 --- /dev/null +++ b/docs/greenfield-api/head-object.api.mdx @@ -0,0 +1,44 @@ +--- +id: head-object +title: "HeadObject" +description: "Queries a object with specify name." +sidebar_label: "HeadObject" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"HeadObject","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"object_info":{"type":"object","properties":{"owner":{"type":"string","title":"owner is the object owner"},"creator":{"type":"string","title":"creator is the address of the uploader, it always be same as owner address"},"bucket_name":{"type":"string","title":"bucket_name is the name of the bucket"},"object_name":{"type":"string","title":"object_name is the name of object"},"id":{"type":"string","title":"id is the unique identifier of object"},"local_virtual_group_id":{"type":"integer","format":"int64"},"payload_size":{"type":"string","format":"uint64","title":"payloadSize is the total size of the object payload"},"visibility":{"description":"visibility defines the highest permissions for object. When an object is public, everyone can access it.","type":"string","enum":["VISIBILITY_TYPE_UNSPECIFIED","VISIBILITY_TYPE_PUBLIC_READ","VISIBILITY_TYPE_PRIVATE","VISIBILITY_TYPE_INHERIT"],"default":"VISIBILITY_TYPE_UNSPECIFIED"},"content_type":{"type":"string","description":"content_type define the format of the object which should be a standard MIME type."},"create_at":{"type":"string","format":"int64","title":"create_at define the block timestamp when the object is created"},"object_status":{"description":"object_status define the upload status of the object.","type":"string","enum":["OBJECT_STATUS_CREATED","OBJECT_STATUS_SEALED","OBJECT_STATUS_DISCONTINUED"],"default":"OBJECT_STATUS_CREATED"},"redundancy_type":{"description":"redundancy_type define the type of the redundancy which can be multi-replication or EC.","type":"string","enum":["REDUNDANCY_EC_TYPE","REDUNDANCY_REPLICA_TYPE"],"default":"REDUNDANCY_EC_TYPE"},"source_type":{"description":"source_type define the source of the object.","type":"string","enum":["SOURCE_TYPE_ORIGIN","SOURCE_TYPE_MIRROR_PENDING","SOURCE_TYPE_BSC_CROSS_CHAIN","SOURCE_TYPE_OP_CROSS_CHAIN"],"default":"SOURCE_TYPE_ORIGIN","title":"SourceType represents the source of resource creation, which can\nfrom Greenfield native or from a cross-chain transfer from BSC"},"checksums":{"type":"array","items":{"type":"string","format":"byte"},"title":"checksums define the root hash of the pieces which stored in a SP.\nadd omit tag to omit the field when converting to NFT metadata"},"tags":{"title":"tags defines a list of tags the object has","type":"object","properties":{"tags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}},"title":"tags defines a list of tags the resource has"}}}}},"global_virtual_group":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"ID represents the unique identifier of the global virtual group."},"family_id":{"type":"integer","format":"int64","description":"Family ID represents the identifier of the GVG family that the group belongs to."},"primary_sp_id":{"type":"integer","format":"int64","description":"Primary SP ID represents the unique identifier of the primary storage provider in the group."},"secondary_sp_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Secondary SP IDs represents the list of unique identifiers of the secondary storage providers in the group."},"stored_size":{"type":"string","format":"uint64","description":"Stored size represents the size of the stored objects within the group."},"virtual_payment_address":{"type":"string","description":"Virtual payment address represents the payment address associated with the group."},"total_deposit":{"type":"string","description":"Total deposit represents the number of tokens deposited by this storage provider for staking."}},"description":"A global virtual group consists of one primary SP (SP) and multiple secondary SP.\nEvery global virtual group must belong to a GVG family, and the objects of each\nbucket must be stored in a GVG within a group family."}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"bucket_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_name","in":"path","required":true,"schema":{"type":"string"}}],"tags":["storage"],"description":"Queries a object with specify name.","method":"get","path":"/greenfield/storage/head_object/{bucket_name}/{object_name}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"HeadObject","description":{"content":"Queries a object with specify name.","type":"text/plain"},"url":{"path":["greenfield","storage","head_object",":bucket_name",":object_name"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"bucket_name"},{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"object_name"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## HeadObject + + + +Queries a object with specify name. + +
Path Parameters
+ +A successful response. + +
Schema
    object_info object
    tags object
    tags object[]
  • Array [
  • ]
  • global_virtual_group object
    + +A global virtual group consists of one primary SP (SP) and multiple secondary SP. +Every global virtual group must belong to a GVG family, and the objects of each +bucket must be stored in a GVG within a group family. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/historical-info.api.mdx b/docs/greenfield-api/historical-info.api.mdx new file mode 100644 index 000000000..fe563e0ed --- /dev/null +++ b/docs/greenfield-api/historical-info.api.mdx @@ -0,0 +1,152 @@ +--- +id: historical-info +title: "HistoricalInfo" +description: "HistoricalInfo queries the historical info for given height." +sidebar_label: "HistoricalInfo" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"HistoricalInfo","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"hist":{"description":"hist defines the historical info at the given height.","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."},"chain_id":{"type":"string"},"height":{"type":"string","format":"int64"},"time":{"type":"string","format":"date-time"},"last_block_id":{"title":"prev block info","type":"object","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"hash":{"type":"string","format":"byte"}},"title":"PartsetHeader"}}},"last_commit_hash":{"type":"string","format":"byte","title":"hashes of block data"},"data_hash":{"type":"string","format":"byte"},"validators_hash":{"type":"string","format":"byte","title":"hashes from the app output from the prev block"},"next_validators_hash":{"type":"string","format":"byte"},"consensus_hash":{"type":"string","format":"byte"},"app_hash":{"type":"string","format":"byte"},"last_results_hash":{"type":"string","format":"byte"},"evidence_hash":{"type":"string","format":"byte","title":"consensus info"},"proposer_address":{"type":"string","format":"byte"}},"description":"Header defines the structure of a block header."},"valset":{"type":"array","items":{"type":"object","properties":{"operator_address":{"type":"string","description":"operator_address defines the address of the validator's operator; bech encoded in JSON."},"consensus_pubkey":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"jailed":{"type":"boolean","description":"jailed defined whether the validator has been jailed from bonded status or not."},"status":{"description":"status is the validator status (bonded/unbonding/unbonded).","type":"string","enum":["BOND_STATUS_UNSPECIFIED","BOND_STATUS_UNBONDED","BOND_STATUS_UNBONDING","BOND_STATUS_BONDED"],"default":"BOND_STATUS_UNSPECIFIED"},"tokens":{"type":"string","description":"tokens define the delegated tokens (incl. self-delegation)."},"delegator_shares":{"type":"string","description":"delegator_shares defines total shares issued to a validator's delegators."},"description":{"description":"description defines the description terms for the validator.","type":"object","properties":{"moniker":{"type":"string","description":"moniker defines a human-readable name for the validator."},"identity":{"type":"string","description":"identity defines an optional identity signature (ex. UPort or Keybase)."},"website":{"type":"string","description":"website defines an optional website link."},"security_contact":{"type":"string","description":"security_contact defines an optional email for security contact."},"details":{"type":"string","description":"details define other optional details."}}},"unbonding_height":{"type":"string","format":"int64","description":"unbonding_height defines, if unbonding, the height at which this validator has begun unbonding."},"unbonding_time":{"type":"string","format":"date-time","description":"unbonding_time defines, if unbonding, the min time for the validator to complete unbonding."},"commission":{"description":"commission defines the commission parameters.","type":"object","properties":{"commission_rates":{"description":"commission_rates defines the initial commission rates to be used for creating a validator.","type":"object","properties":{"rate":{"type":"string","description":"rate is the commission rate charged to delegators, as a fraction."},"max_rate":{"type":"string","description":"max_rate defines the maximum commission rate which validator can ever charge, as a fraction."},"max_change_rate":{"type":"string","description":"max_change_rate defines the maximum daily increase of the validator commission, as a fraction."}}},"update_time":{"type":"string","format":"date-time","description":"update_time is the last time the commission rate was changed."}}},"min_self_delegation":{"type":"string","description":"min_self_delegation is the validator's self declared minimum self delegation.\n\nSince: cosmos-sdk 0.46"},"unbonding_on_hold_ref_count":{"type":"string","format":"int64","title":"strictly positive if this validator's unbonding has been stopped by external modules"},"unbonding_ids":{"type":"array","items":{"type":"string","format":"uint64"},"title":"list of unbonding ids, each uniquely identifing an unbonding of this validator"},"self_del_address":{"type":"string","description":"self_del_address defines the address of the validator for self delegation."},"relayer_address":{"type":"string","description":"relayer_address defines the address of the validator's authorized relayer;."},"challenger_address":{"type":"string","description":"challenger_address defines the address of the validator's authorized challenger;."},"bls_key":{"type":"string","format":"byte","title":"bls_key defines the bls pubkey of the validator's authorized relayer/challenger/operator;"}},"description":"Validator defines a validator, together with the total amount of the\nValidator's bond shares and their exchange rate to coins. Slashing results in\na decrease in the exchange rate, allowing correct calculation of future\nundelegations without iterating over delegators. When coins are delegated to\nthis validator, the validator is credited with a delegation whose number of\nbond shares is based on the amount of coins delegated divided by the current\nexchange rate. Voting power can be calculated as total bonded shares\nmultiplied by exchange rate."}}}}},"description":"QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC\nmethod."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"height","description":"height defines at which height to query the historical info.","in":"path","required":true,"schema":{"type":"string","format":"int64"}}],"tags":["staking"],"description":"HistoricalInfo queries the historical info for given height.","method":"get","path":"/cosmos/staking/v1beta1/historical_info/{height}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"HistoricalInfo","description":{"content":"HistoricalInfo queries the historical info for given height.","type":"text/plain"},"url":{"path":["cosmos","staking","v1beta1","historical_info",":height"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) height defines at which height to query the historical info.","type":"text/plain"},"type":"any","value":"","key":"height"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## HistoricalInfo + + + +HistoricalInfo queries the historical info for given height. + +
Path Parameters
+ +A successful response. + +
Schema
    hist object
    + +hist defines the historical info at the given height. + +
    header object
    + +Header defines the structure of a block header. + +
    version object
    + +Consensus captures the consensus rules for processing a block in the blockchain, +including all blockchain data structures and the rules of the application's +state transition machine. + +
    last_block_id object
    part_set_header object
    valset object[]
  • Array [
  • consensus_pubkey object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
    description object
    + +description defines the description terms for the validator. + +
    commission object
    + +commission defines the commission parameters. + +
    commission_rates object
    + +commission_rates defines the initial commission rates to be used for creating a validator. + +
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/inflation.api.mdx b/docs/greenfield-api/inflation.api.mdx new file mode 100644 index 000000000..fde74a38e --- /dev/null +++ b/docs/greenfield-api/inflation.api.mdx @@ -0,0 +1,38 @@ +--- +id: inflation +title: "Inflation" +description: "Inflation returns the current minting inflation value." +sidebar_label: "Inflation" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"Inflation","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"inflation":{"type":"string","format":"byte","description":"inflation is the current minting inflation value."}},"description":"QueryInflationResponse is the response type for the Query/Inflation RPC\nmethod."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["mint"],"description":"Inflation returns the current minting inflation value.","method":"get","path":"/cosmos/mint/v1beta1/inflation","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"Inflation","description":{"content":"Inflation returns the current minting inflation value.","type":"text/plain"},"url":{"path":["cosmos","mint","v1beta1","inflation"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Inflation + + + +Inflation returns the current minting inflation value. + +
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/inturn-attestation-submitter.api.mdx b/docs/greenfield-api/inturn-attestation-submitter.api.mdx new file mode 100644 index 000000000..ace054cb9 --- /dev/null +++ b/docs/greenfield-api/inturn-attestation-submitter.api.mdx @@ -0,0 +1,34 @@ +--- +id: inturn-attestation-submitter +title: "InturnAttestationSubmitter" +description: "Queries the inturn challenger." +sidebar_label: "InturnAttestationSubmitter" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"InturnAttestationSubmitter","responses":{"200":{"description":"","content":{"*/*":{"schema":{"type":"object","properties":{"bls_pub_key":{"type":"string"},"submit_interval":{"type":"object","properties":{"start":{"type":"string","format":"uint64"},"end":{"type":"string","format":"uint64"}}}},"description":"QueryInturnAttestationSubmitterResponse is response type for the Query/InturnAttestationSubmitter RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["challenge"],"description":"Queries the inturn challenger.","method":"get","path":"/greenfield/challenge/inturn_attestation_submitter","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"InturnAttestationSubmitter","description":{"content":"Queries the inturn challenger.","type":"text/plain"},"url":{"path":["greenfield","challenge","inturn_attestation_submitter"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## InturnAttestationSubmitter + + + +Queries the inturn challenger. + +
Schema
    submit_interval object
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/inturn-relayer.api.mdx b/docs/greenfield-api/inturn-relayer.api.mdx new file mode 100644 index 000000000..92601f8b7 --- /dev/null +++ b/docs/greenfield-api/inturn-relayer.api.mdx @@ -0,0 +1,38 @@ +--- +id: inturn-relayer +title: "InturnRelayer" +description: "InturnRelayer returns the inturn relayer bls pub key and its relay interval" +sidebar_label: "InturnRelayer" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"InturnRelayer","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"bls_pub_key":{"type":"string"},"relay_interval":{"type":"object","properties":{"start":{"type":"string","format":"uint64"},"end":{"type":"string","format":"uint64"}},"title":"RelayInterval holds start and end(exclusive) time of in-turn relayer, [start, end)"}},"description":"QueryInturnRelayerResponse is the response type for the Query In-turn relayer RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"claim_src_chain","description":"ClaimSrcChain defines the src chain of a claim.\n\n - CLAIM_SRC_CHAIN_UNSPECIFIED: CLAIM_SRC_CHAIN_UNSPECIFIED\n - CLAIM_SRC_CHAIN_BSC: CLAIM_SRC_CHAIN_BSC defines BSC source chain\n - CLAIM_SRC_CHAIN_OP_BNB: CLAIM_SRC_CHAIN_OP_BNB defines OPBNB source chain","in":"query","required":false,"schema":{"type":"string","enum":["CLAIM_SRC_CHAIN_UNSPECIFIED","CLAIM_SRC_CHAIN_BSC","CLAIM_SRC_CHAIN_OP_BNB"],"default":"CLAIM_SRC_CHAIN_UNSPECIFIED"}}],"tags":["oracle"],"description":"InturnRelayer returns the inturn relayer bls pub key and its relay interval","method":"get","path":"/cosmos/oracle/v1/inturn_relayer","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"InturnRelayer","description":{"content":"InturnRelayer returns the inturn relayer bls pub key and its relay interval","type":"text/plain"},"url":{"path":["cosmos","oracle","v1","inturn_relayer"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"ClaimSrcChain defines the src chain of a claim.\n\n - CLAIM_SRC_CHAIN_UNSPECIFIED: CLAIM_SRC_CHAIN_UNSPECIFIED\n - CLAIM_SRC_CHAIN_BSC: CLAIM_SRC_CHAIN_BSC defines BSC source chain\n - CLAIM_SRC_CHAIN_OP_BNB: CLAIM_SRC_CHAIN_OP_BNB defines OPBNB source chain","type":"text/plain"},"key":"claim_src_chain","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## InturnRelayer + + + +InturnRelayer returns the inturn relayer bls pub key and its relay interval + +
Query Parameters
+ +A successful response. + +
Schema
    relay_interval object
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/latest-attested-challenges.api.mdx b/docs/greenfield-api/latest-attested-challenges.api.mdx new file mode 100644 index 000000000..ae02f46f6 --- /dev/null +++ b/docs/greenfield-api/latest-attested-challenges.api.mdx @@ -0,0 +1,38 @@ +--- +id: latest-attested-challenges +title: "LatestAttestedChallenges" +description: "Queries the latest attested challenges." +sidebar_label: "LatestAttestedChallenges" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"LatestAttestedChallenges","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"challenges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uint64","description":"The id of the challenge."},"result":{"description":"The attestation result of the challenge.","type":"string","enum":["CHALLENGE_FAILED","CHALLENGE_SUCCEED"],"default":"CHALLENGE_FAILED"}},"description":"AttestedChallenge records the challenge which are attested."}}},"description":"QueryLatestAttestedChallengesResponse is response type for the Query/LatestAttestedChallenges RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["challenge"],"description":"Queries the latest attested challenges.","method":"get","path":"/greenfield/challenge/latest_attested_challenges","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"LatestAttestedChallenges","description":{"content":"Queries the latest attested challenges.","type":"text/plain"},"url":{"path":["greenfield","challenge","latest_attested_challenges"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## LatestAttestedChallenges + + + +Queries the latest attested challenges. + +
+ +A successful response. + +
Schema
    challenges object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/list-buckets.api.mdx b/docs/greenfield-api/list-buckets.api.mdx new file mode 100644 index 000000000..989cd139d --- /dev/null +++ b/docs/greenfield-api/list-buckets.api.mdx @@ -0,0 +1,48 @@ +--- +id: list-buckets +title: "ListBuckets" +description: "Queries a list of bucket items." +sidebar_label: "ListBuckets" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"ListBuckets","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"bucket_infos":{"type":"array","items":{"type":"object","properties":{"owner":{"type":"string","description":"owner is the account address of bucket creator, it is also the bucket owner."},"bucket_name":{"type":"string","title":"bucket_name is a globally unique name of bucket"},"visibility":{"description":"visibility defines the highest permissions for bucket. When a bucket is public, everyone can get storage objects in it.","type":"string","enum":["VISIBILITY_TYPE_UNSPECIFIED","VISIBILITY_TYPE_PUBLIC_READ","VISIBILITY_TYPE_PRIVATE","VISIBILITY_TYPE_INHERIT"],"default":"VISIBILITY_TYPE_UNSPECIFIED"},"id":{"type":"string","description":"id is the unique identification for bucket."},"source_type":{"title":"source_type defines which chain the user should send the bucket management transactions to","type":"string","enum":["SOURCE_TYPE_ORIGIN","SOURCE_TYPE_MIRROR_PENDING","SOURCE_TYPE_BSC_CROSS_CHAIN","SOURCE_TYPE_OP_CROSS_CHAIN"],"default":"SOURCE_TYPE_ORIGIN"},"create_at":{"type":"string","format":"int64","description":"create_at define the block timestamp when the bucket created."},"payment_address":{"type":"string","title":"payment_address is the address of the payment account"},"global_virtual_group_family_id":{"type":"integer","format":"int64","title":"global_virtual_group_family_id defines the unique id of gvg family"},"charged_read_quota":{"type":"string","format":"uint64","description":"charged_read_quota defines the traffic quota for read in bytes per month.\nThe available read data for each user is the sum of the free read data provided by SP and\nthe ChargeReadQuota specified here."},"bucket_status":{"description":"bucket_status define the status of the bucket.","type":"string","enum":["BUCKET_STATUS_CREATED","BUCKET_STATUS_DISCONTINUED","BUCKET_STATUS_MIGRATING"],"default":"BUCKET_STATUS_CREATED"},"tags":{"title":"tags defines a list of tags the bucket has","type":"object","properties":{"tags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}},"title":"tags defines a list of tags the resource has"}}}}}},"pagination":{"type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}},"description":"PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["storage"],"description":"Queries a list of bucket items.","method":"get","path":"/greenfield/storage/list_buckets","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"ListBuckets","description":{"content":"Queries a list of bucket items.","type":"text/plain"},"url":{"path":["greenfield","storage","list_buckets"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## ListBuckets + + + +Queries a list of bucket items. + +
Query Parameters
+ +A successful response. + +
Schema
    bucket_infos object[]
  • Array [
  • tags object
    tags object[]
  • Array [
  • ]
  • ]
  • pagination object
    + +PageResponse is to be embedded in gRPC response messages where the +corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/list-groups.api.mdx b/docs/greenfield-api/list-groups.api.mdx new file mode 100644 index 000000000..6837e64ff --- /dev/null +++ b/docs/greenfield-api/list-groups.api.mdx @@ -0,0 +1,48 @@ +--- +id: list-groups +title: "ListGroups" +description: "Queries a list of ListGroup items." +sidebar_label: "ListGroups" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"ListGroups","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"pagination":{"type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}},"description":"PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }"},"group_infos":{"type":"array","items":{"type":"object","properties":{"owner":{"type":"string","description":"owner is the owner of the group. It can not changed once it created."},"group_name":{"type":"string","description":"group_name is the name of group which is unique under an account."},"source_type":{"title":"source_type","type":"string","enum":["SOURCE_TYPE_ORIGIN","SOURCE_TYPE_MIRROR_PENDING","SOURCE_TYPE_BSC_CROSS_CHAIN","SOURCE_TYPE_OP_CROSS_CHAIN"],"default":"SOURCE_TYPE_ORIGIN"},"id":{"type":"string","title":"id is the unique identifier of group"},"extra":{"type":"string","title":"extra is used to store extra info for the group"},"tags":{"title":"tags defines a list of tags the group has","type":"object","properties":{"tags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}},"title":"tags defines a list of tags the resource has"}}}}}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"group_owner","in":"path","required":true,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["storage"],"description":"Queries a list of ListGroup items.","method":"get","path":"/greenfield/storage/list_groups/{group_owner}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"ListGroups","description":{"content":"Queries a list of ListGroup items.","type":"text/plain"},"url":{"path":["greenfield","storage","list_groups",":group_owner"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"group_owner"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## ListGroups + + + +Queries a list of ListGroup items. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    pagination object
    + +PageResponse is to be embedded in gRPC response messages where the +corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + +
    group_infos object[]
  • Array [
  • tags object
    tags object[]
  • Array [
  • ]
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/list-objects-by-bucket-id.api.mdx b/docs/greenfield-api/list-objects-by-bucket-id.api.mdx new file mode 100644 index 000000000..82510e300 --- /dev/null +++ b/docs/greenfield-api/list-objects-by-bucket-id.api.mdx @@ -0,0 +1,48 @@ +--- +id: list-objects-by-bucket-id +title: "ListObjectsByBucketId" +description: "Queries a list of object items under the bucket." +sidebar_label: "ListObjectsByBucketId" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"ListObjectsByBucketId","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"object_infos":{"type":"array","items":{"type":"object","properties":{"owner":{"type":"string","title":"owner is the object owner"},"creator":{"type":"string","title":"creator is the address of the uploader, it always be same as owner address"},"bucket_name":{"type":"string","title":"bucket_name is the name of the bucket"},"object_name":{"type":"string","title":"object_name is the name of object"},"id":{"type":"string","title":"id is the unique identifier of object"},"local_virtual_group_id":{"type":"integer","format":"int64"},"payload_size":{"type":"string","format":"uint64","title":"payloadSize is the total size of the object payload"},"visibility":{"description":"visibility defines the highest permissions for object. When an object is public, everyone can access it.","type":"string","enum":["VISIBILITY_TYPE_UNSPECIFIED","VISIBILITY_TYPE_PUBLIC_READ","VISIBILITY_TYPE_PRIVATE","VISIBILITY_TYPE_INHERIT"],"default":"VISIBILITY_TYPE_UNSPECIFIED"},"content_type":{"type":"string","description":"content_type define the format of the object which should be a standard MIME type."},"create_at":{"type":"string","format":"int64","title":"create_at define the block timestamp when the object is created"},"object_status":{"description":"object_status define the upload status of the object.","type":"string","enum":["OBJECT_STATUS_CREATED","OBJECT_STATUS_SEALED","OBJECT_STATUS_DISCONTINUED"],"default":"OBJECT_STATUS_CREATED"},"redundancy_type":{"description":"redundancy_type define the type of the redundancy which can be multi-replication or EC.","type":"string","enum":["REDUNDANCY_EC_TYPE","REDUNDANCY_REPLICA_TYPE"],"default":"REDUNDANCY_EC_TYPE"},"source_type":{"description":"source_type define the source of the object.","type":"string","enum":["SOURCE_TYPE_ORIGIN","SOURCE_TYPE_MIRROR_PENDING","SOURCE_TYPE_BSC_CROSS_CHAIN","SOURCE_TYPE_OP_CROSS_CHAIN"],"default":"SOURCE_TYPE_ORIGIN","title":"SourceType represents the source of resource creation, which can\nfrom Greenfield native or from a cross-chain transfer from BSC"},"checksums":{"type":"array","items":{"type":"string","format":"byte"},"title":"checksums define the root hash of the pieces which stored in a SP.\nadd omit tag to omit the field when converting to NFT metadata"},"tags":{"title":"tags defines a list of tags the object has","type":"object","properties":{"tags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}},"title":"tags defines a list of tags the resource has"}}}}}},"pagination":{"type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}},"description":"PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"bucket_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["storage"],"description":"Queries a list of object items under the bucket.","method":"get","path":"/greenfield/storage/list_objects_by_bucket_id/{bucket_id}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"ListObjectsByBucketId","description":{"content":"Queries a list of object items under the bucket.","type":"text/plain"},"url":{"path":["greenfield","storage","list_objects_by_bucket_id",":bucket_id"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"bucket_id"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## ListObjectsByBucketId + + + +Queries a list of object items under the bucket. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    object_infos object[]
  • Array [
  • tags object
    tags object[]
  • Array [
  • ]
  • ]
  • pagination object
    + +PageResponse is to be embedded in gRPC response messages where the +corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/list-objects.api.mdx b/docs/greenfield-api/list-objects.api.mdx new file mode 100644 index 000000000..4cb6bdcd5 --- /dev/null +++ b/docs/greenfield-api/list-objects.api.mdx @@ -0,0 +1,48 @@ +--- +id: list-objects +title: "ListObjects" +description: "Queries a list of object items under the bucket." +sidebar_label: "ListObjects" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"ListObjects","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"object_infos":{"type":"array","items":{"type":"object","properties":{"owner":{"type":"string","title":"owner is the object owner"},"creator":{"type":"string","title":"creator is the address of the uploader, it always be same as owner address"},"bucket_name":{"type":"string","title":"bucket_name is the name of the bucket"},"object_name":{"type":"string","title":"object_name is the name of object"},"id":{"type":"string","title":"id is the unique identifier of object"},"local_virtual_group_id":{"type":"integer","format":"int64"},"payload_size":{"type":"string","format":"uint64","title":"payloadSize is the total size of the object payload"},"visibility":{"description":"visibility defines the highest permissions for object. When an object is public, everyone can access it.","type":"string","enum":["VISIBILITY_TYPE_UNSPECIFIED","VISIBILITY_TYPE_PUBLIC_READ","VISIBILITY_TYPE_PRIVATE","VISIBILITY_TYPE_INHERIT"],"default":"VISIBILITY_TYPE_UNSPECIFIED"},"content_type":{"type":"string","description":"content_type define the format of the object which should be a standard MIME type."},"create_at":{"type":"string","format":"int64","title":"create_at define the block timestamp when the object is created"},"object_status":{"description":"object_status define the upload status of the object.","type":"string","enum":["OBJECT_STATUS_CREATED","OBJECT_STATUS_SEALED","OBJECT_STATUS_DISCONTINUED"],"default":"OBJECT_STATUS_CREATED"},"redundancy_type":{"description":"redundancy_type define the type of the redundancy which can be multi-replication or EC.","type":"string","enum":["REDUNDANCY_EC_TYPE","REDUNDANCY_REPLICA_TYPE"],"default":"REDUNDANCY_EC_TYPE"},"source_type":{"description":"source_type define the source of the object.","type":"string","enum":["SOURCE_TYPE_ORIGIN","SOURCE_TYPE_MIRROR_PENDING","SOURCE_TYPE_BSC_CROSS_CHAIN","SOURCE_TYPE_OP_CROSS_CHAIN"],"default":"SOURCE_TYPE_ORIGIN","title":"SourceType represents the source of resource creation, which can\nfrom Greenfield native or from a cross-chain transfer from BSC"},"checksums":{"type":"array","items":{"type":"string","format":"byte"},"title":"checksums define the root hash of the pieces which stored in a SP.\nadd omit tag to omit the field when converting to NFT metadata"},"tags":{"title":"tags defines a list of tags the object has","type":"object","properties":{"tags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}},"title":"tags defines a list of tags the resource has"}}}}}},"pagination":{"type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}},"description":"PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"bucket_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["storage"],"description":"Queries a list of object items under the bucket.","method":"get","path":"/greenfield/storage/list_objects/{bucket_name}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"ListObjects","description":{"content":"Queries a list of object items under the bucket.","type":"text/plain"},"url":{"path":["greenfield","storage","list_objects",":bucket_name"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"bucket_name"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## ListObjects + + + +Queries a list of object items under the bucket. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    object_infos object[]
  • Array [
  • tags object
    tags object[]
  • Array [
  • ]
  • ]
  • pagination object
    + +PageResponse is to be embedded in gRPC response messages where the +corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/mint-params.api.mdx b/docs/greenfield-api/mint-params.api.mdx new file mode 100644 index 000000000..98c50365f --- /dev/null +++ b/docs/greenfield-api/mint-params.api.mdx @@ -0,0 +1,42 @@ +--- +id: mint-params +title: "MintParams" +description: "Params returns the total set of minting parameters." +sidebar_label: "MintParams" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"MintParams","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"params":{"description":"params defines the parameters of the module.","type":"object","properties":{"mint_denom":{"type":"string","title":"type of coin to mint"},"inflation_rate_change":{"type":"string","title":"maximum annual change in inflation rate"},"inflation_max":{"type":"string","title":"maximum inflation rate"},"inflation_min":{"type":"string","title":"minimum inflation rate"},"goal_bonded":{"type":"string","title":"goal of percent bonded atoms"},"blocks_per_year":{"type":"string","format":"uint64","title":"expected blocks per year"}}}},"description":"QueryParamsResponse is the response type for the Query/Params RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["mint"],"description":"Params returns the total set of minting parameters.","method":"get","path":"/cosmos/mint/v1beta1/params","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"MintParams","description":{"content":"Params returns the total set of minting parameters.","type":"text/plain"},"url":{"path":["cosmos","mint","v1beta1","params"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## MintParams + + + +Params returns the total set of minting parameters. + +
+ +A successful response. + +
Schema
    params object
    + +params defines the parameters of the module. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/module-account-by-name.api.mdx b/docs/greenfield-api/module-account-by-name.api.mdx new file mode 100644 index 000000000..b76b199c1 --- /dev/null +++ b/docs/greenfield-api/module-account-by-name.api.mdx @@ -0,0 +1,126 @@ +--- +id: module-account-by-name +title: "ModuleAccountByName" +description: "ModuleAccountByName returns the module account info by module name" +sidebar_label: "ModuleAccountByName" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"ModuleAccountByName","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"account":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}},"description":"QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"tags":["auth"],"description":"ModuleAccountByName returns the module account info by module name","method":"get","path":"/cosmos/auth/v1beta1/module_accounts/{name}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"ModuleAccountByName","description":{"content":"ModuleAccountByName returns the module account info by module name","type":"text/plain"},"url":{"path":["cosmos","auth","v1beta1","module_accounts",":name"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"name"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## ModuleAccountByName + + + +ModuleAccountByName returns the module account info by module name + +
Path Parameters
+ +A successful response. + +
Schema
    account object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/module-accounts.api.mdx b/docs/greenfield-api/module-accounts.api.mdx new file mode 100644 index 000000000..33bf01cd5 --- /dev/null +++ b/docs/greenfield-api/module-accounts.api.mdx @@ -0,0 +1,38 @@ +--- +id: module-accounts +title: "ModuleAccounts" +description: "ModuleAccounts returns all the existing module accounts." +sidebar_label: "ModuleAccounts" +hide_title: true +hide_table_of_contents: true +api: {"description":"ModuleAccounts returns all the existing module accounts.","operationId":"ModuleAccounts","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}},"description":"QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method.\n\nSince: cosmos-sdk 0.46"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"tags":["auth"],"method":"get","path":"/cosmos/auth/v1beta1/module_accounts","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"ModuleAccounts","description":{"content":"ModuleAccounts returns all the existing module accounts.","type":"text/plain"},"url":{"path":["cosmos","auth","v1beta1","module_accounts"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## ModuleAccounts + + + +ModuleAccounts returns all the existing module accounts. + +
+ +A successful response. + +
Schema
    accounts object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/module-versions.api.mdx b/docs/greenfield-api/module-versions.api.mdx new file mode 100644 index 000000000..69db8efb7 --- /dev/null +++ b/docs/greenfield-api/module-versions.api.mdx @@ -0,0 +1,42 @@ +--- +id: module-versions +title: "ModuleVersions" +description: "ModuleVersions queries the list of module versions from state." +sidebar_label: "ModuleVersions" +hide_title: true +hide_table_of_contents: true +api: {"description":"ModuleVersions queries the list of module versions from state.","operationId":"ModuleVersions","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"module_versions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","title":"name of the app module"},"version":{"type":"string","format":"uint64","title":"consensus version of the app module"}},"description":"ModuleVersion specifies a module and its consensus version.\n\nSince: cosmos-sdk 0.43"},"description":"module_versions is a list of module names with their consensus versions."}},"description":"QueryModuleVersionsResponse is the response type for the Query/ModuleVersions\nRPC method.\n\nSince: cosmos-sdk 0.43"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"module_name","description":"module_name is a field to query a specific module\nconsensus version from state. Leaving this empty will\nfetch the full list of module versions from state.","in":"query","required":false,"schema":{"type":"string"}}],"tags":["upgrade"],"method":"get","path":"/cosmos/upgrade/v1beta1/module_versions","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"ModuleVersions","description":{"content":"ModuleVersions queries the list of module versions from state.","type":"text/plain"},"url":{"path":["cosmos","upgrade","v1beta1","module_versions"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"module_name is a field to query a specific module\nconsensus version from state. Leaving this empty will\nfetch the full list of module versions from state.","type":"text/plain"},"key":"module_name","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## ModuleVersions + + + +ModuleVersions queries the list of module versions from state. + +
Query Parameters
+ +A successful response. + +
Schema
    module_versions object[]
    + +module_versions is a list of module names with their consensus versions. + +
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/msg-gas-params.api.mdx b/docs/greenfield-api/msg-gas-params.api.mdx new file mode 100644 index 000000000..732bf4c7e --- /dev/null +++ b/docs/greenfield-api/msg-gas-params.api.mdx @@ -0,0 +1,59 @@ +--- +id: msg-gas-params +title: "MsgGasParams" +description: "MsgGasParams queries for MsgGasParams entries." +sidebar_label: "MsgGasParams" +hide_title: true +hide_table_of_contents: true +api: {"description":"MsgGasParams queries for MsgGasParams entries.","operationId":"MsgGasParams","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"msg_gas_params":{"type":"array","items":{"type":"object","properties":{"msg_type_url":{"type":"string"},"fixed_type":{"description":"fixed_type specifies fixed type gas params.","type":"object","properties":{"fixed_gas":{"type":"string","format":"uint64","title":"fixed_gas is the gas cost for a fixed type msg"}}},"grant_type":{"description":"grant_type specifies dynamic type gas params for msg/grant.","type":"object","properties":{"fixed_gas":{"type":"string","format":"uint64","title":"fixed_gas is the base gas cost for a dynamic type msg"},"gas_per_item":{"type":"string","format":"uint64","title":"gas_per_item is the gas cost for a dynamic type msg per item"}}},"multi_send_type":{"description":"grant_type specifies dynamic type gas params for msg/multiSend.","type":"object","properties":{"fixed_gas":{"type":"string","format":"uint64","title":"fixed_gas is the base gas cost for a dynamic type msg"},"gas_per_item":{"type":"string","format":"uint64","title":"gas_per_item is the gas cost for a dynamic type msg per item"}}},"grant_allowance_type":{"description":"grant_type specifies dynamic type gas params for msg/grantAllowance.","type":"object","properties":{"fixed_gas":{"type":"string","format":"uint64","title":"fixed_gas is the base gas cost for a dynamic type msg"},"gas_per_item":{"type":"string","format":"uint64","title":"gas_per_item is the gas cost for a dynamic type msg per item"}}}},"title":"MsgGasParams defines gas consumption for a msg type"}},"pagination":{"description":"pagination defines the pagination in the response. This field is only\npopulated if the msg_type_urls field in the request is empty.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryMsgGasParamsResponse defines the RPC response of a MsgGasParams query."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"msg_type_urls","description":"msg_type_urls is the specific type urls you want look up. Leave empty to get all entries.","in":"query","required":false,"explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["gashub"],"method":"get","path":"/cosmos/gashub/v1beta1/msg_gas_params","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"MsgGasParams","description":{"content":"MsgGasParams queries for MsgGasParams entries.","type":"text/plain"},"url":{"path":["cosmos","gashub","v1beta1","msg_gas_params"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"msg_type_urls is the specific type urls you want look up. Leave empty to get all entries.","type":"text/plain"},"key":"msg_type_urls","value":""},{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## MsgGasParams + + + +MsgGasParams queries for MsgGasParams entries. + +
Query Parameters
+ +A successful response. + +
Schema
    msg_gas_params object[]
  • Array [
  • fixed_type object
    + +fixed_type specifies fixed type gas params. + +
    grant_type object
    + +grant_type specifies dynamic type gas params for msg/grant. + +
    multi_send_type object
    + +grant_type specifies dynamic type gas params for msg/multiSend. + +
    grant_allowance_type object
    + +grant_type specifies dynamic type gas params for msg/grantAllowance. + +
  • ]
  • pagination object
    + +pagination defines the pagination in the response. This field is only +populated if the msg_type_urls field in the request is empty. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/oracle-params.api.mdx b/docs/greenfield-api/oracle-params.api.mdx new file mode 100644 index 000000000..91aea9765 --- /dev/null +++ b/docs/greenfield-api/oracle-params.api.mdx @@ -0,0 +1,42 @@ +--- +id: oracle-params +title: "OracleParams" +description: "Params returns the total set of cross chain parameters." +sidebar_label: "OracleParams" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"OracleParams","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"params":{"description":"params defines the parameters of the module.","type":"object","properties":{"relayer_timeout":{"type":"string","format":"uint64","title":"Timeout for the in turn relayer in seconds"},"relayer_interval":{"type":"string","format":"uint64","title":"RelayInterval is for in-turn relayer in seconds"},"relayer_reward_share":{"type":"integer","format":"int64","description":"Reward share for the relayer sends the claim message,\nthe other relayers signed the bls message will share the reward evenly."}}}},"description":"QueryParamsResponse is the response type for the Query/Params RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["oracle"],"description":"Params returns the total set of cross chain parameters.","method":"get","path":"/cosmos/oracle/v1/params","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"OracleParams","description":{"content":"Params returns the total set of cross chain parameters.","type":"text/plain"},"url":{"path":["cosmos","oracle","v1","params"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## OracleParams + + + +Params returns the total set of cross chain parameters. + +
+ +A successful response. + +
Schema
    params object
    + +params defines the parameters of the module. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/out-flows.api.mdx b/docs/greenfield-api/out-flows.api.mdx new file mode 100644 index 000000000..6d577d200 --- /dev/null +++ b/docs/greenfield-api/out-flows.api.mdx @@ -0,0 +1,38 @@ +--- +id: out-flows +title: "OutFlows" +description: "Queries our flows by account." +sidebar_label: "OutFlows" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"OutFlows","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"out_flows":{"type":"array","items":{"type":"object","properties":{"to_address":{"type":"string","title":"stream account address who receives the flow, usually SP(service provider)"},"rate":{"type":"string","title":"flow rate"},"status":{"title":"status","type":"string","enum":["OUT_FLOW_STATUS_ACTIVE","OUT_FLOW_STATUS_FROZEN"],"default":"OUT_FLOW_STATUS_ACTIVE","description":"- OUT_FLOW_STATUS_ACTIVE: OUT_FLOW_STATUS_ACTIVE defines the active status of a out flow.\n - OUT_FLOW_STATUS_FROZEN: OUT_FLOW_STATUS_FROZEN defines the frozen status of a out flow."}},"title":"OutFlow defines the accumulative outflow stream rate in BNB\nfrom a stream account to a Storage Provider"}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"account","in":"path","required":true,"schema":{"type":"string"}}],"tags":["payment"],"description":"Queries our flows by account.","method":"get","path":"/greenfield/payment/out_flows/{account}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"OutFlows","description":{"content":"Queries our flows by account.","type":"text/plain"},"url":{"path":["greenfield","payment","out_flows",":account"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"account"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## OutFlows + + + +Queries our flows by account. + +
Path Parameters
+ +A successful response. + +
Schema
    out_flows object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/params-by-timestamp.api.mdx b/docs/greenfield-api/params-by-timestamp.api.mdx new file mode 100644 index 000000000..5cf928ff1 --- /dev/null +++ b/docs/greenfield-api/params-by-timestamp.api.mdx @@ -0,0 +1,46 @@ +--- +id: params-by-timestamp +title: "ParamsByTimestamp" +description: "ParamsByTimestamp queries the parameter of the module by timestamp." +sidebar_label: "ParamsByTimestamp" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"ParamsByTimestamp","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","type":"object","properties":{"versioned_params":{"type":"object","properties":{"reserve_time":{"type":"string","format":"uint64","title":"Time duration which the buffer balance need to be reserved for NetOutFlow e.g. 6 month"},"validator_tax_rate":{"type":"string","title":"The tax rate to pay for validators in storage payment. The default value is 1%(0.01)"}},"description":"VersionedParams defines the parameters with multiple versions, each version is stored with different timestamp."},"payment_account_count_limit":{"type":"string","format":"uint64","title":"The maximum number of payment accounts that can be created by one user"},"forced_settle_time":{"type":"string","format":"uint64","description":"Time duration threshold of forced settlement.\nIf dynamic balance is less than NetOutFlowRate * forcedSettleTime, the account can be forced settled."},"max_auto_settle_flow_count":{"type":"string","format":"uint64","title":"the maximum number of flows that will be auto forced settled in one block"},"max_auto_resume_flow_count":{"type":"string","format":"uint64","title":"the maximum number of flows that will be auto resumed in one block"},"fee_denom":{"type":"string","title":"The denom of fee charged in payment module"},"withdraw_time_lock_threshold":{"type":"string","title":"The withdrawal amount threshold to trigger time lock"},"withdraw_time_lock_duration":{"type":"string","format":"uint64","title":"The duration of the time lock for a big amount withdrawal"}}}},"description":"QueryParamsByTimestampResponse is response type for the Query/ParamsByTimestamp RPC method with timestamp."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"timestamp","description":"the timestamp of the block time you want to query","in":"path","required":true,"schema":{"type":"string","format":"int64"}}],"tags":["payment"],"description":"ParamsByTimestamp queries the parameter of the module by timestamp.","method":"get","path":"/greenfield/payment/params/{timestamp}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"ParamsByTimestamp","description":{"content":"ParamsByTimestamp queries the parameter of the module by timestamp.","type":"text/plain"},"url":{"path":["greenfield","payment","params",":timestamp"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) the timestamp of the block time you want to query","type":"text/plain"},"type":"any","value":"","key":"timestamp"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## ParamsByTimestamp + + + +ParamsByTimestamp queries the parameter of the module by timestamp. + +
Path Parameters
+ +A successful response. + +
Schema
    params object
    + +params holds all the parameters of this module. + +
    versioned_params object
    + +VersionedParams defines the parameters with multiple versions, each version is stored with different timestamp. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/payment-account-count.api.mdx b/docs/greenfield-api/payment-account-count.api.mdx new file mode 100644 index 000000000..e61dd4c99 --- /dev/null +++ b/docs/greenfield-api/payment-account-count.api.mdx @@ -0,0 +1,38 @@ +--- +id: payment-account-count +title: "PaymentAccountCount" +description: "Queries the count of payment account by owner." +sidebar_label: "PaymentAccountCount" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"PaymentAccountCount","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"payment_account_count":{"type":"object","properties":{"owner":{"type":"string","title":"owner is the account address"},"count":{"type":"string","format":"uint64","title":"count is the number of payment accounts for the account"}},"title":"PaymentAccountCount defines the state struct which stores the number of payment accounts for an account"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"}}],"tags":["payment"],"description":"Queries the count of payment account by owner.","method":"get","path":"/greenfield/payment/payment_account_count/{owner}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"PaymentAccountCount","description":{"content":"Queries the count of payment account by owner.","type":"text/plain"},"url":{"path":["greenfield","payment","payment_account_count",":owner"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"owner"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## PaymentAccountCount + + + +Queries the count of payment account by owner. + +
Path Parameters
+ +A successful response. + +
Schema
    payment_account_count object
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/payment-account-counts.api.mdx b/docs/greenfield-api/payment-account-counts.api.mdx new file mode 100644 index 000000000..0a0347da7 --- /dev/null +++ b/docs/greenfield-api/payment-account-counts.api.mdx @@ -0,0 +1,48 @@ +--- +id: payment-account-counts +title: "PaymentAccountCounts" +description: "Queries all counts of payment account for all owners." +sidebar_label: "PaymentAccountCounts" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"PaymentAccountCounts","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"payment_account_counts":{"type":"array","items":{"type":"object","properties":{"owner":{"type":"string","title":"owner is the account address"},"count":{"type":"string","format":"uint64","title":"count is the number of payment accounts for the account"}},"title":"PaymentAccountCount defines the state struct which stores the number of payment accounts for an account"}},"pagination":{"type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}},"description":"PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["payment"],"description":"Queries all counts of payment account for all owners.","method":"get","path":"/greenfield/payment/payment_account_counts","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"PaymentAccountCounts","description":{"content":"Queries all counts of payment account for all owners.","type":"text/plain"},"url":{"path":["greenfield","payment","payment_account_counts"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## PaymentAccountCounts + + + +Queries all counts of payment account for all owners. + +
Query Parameters
+ +A successful response. + +
Schema
    payment_account_counts object[]
  • Array [
  • ]
  • pagination object
    + +PageResponse is to be embedded in gRPC response messages where the +corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/payment-account.api.mdx b/docs/greenfield-api/payment-account.api.mdx new file mode 100644 index 000000000..1b1c069e4 --- /dev/null +++ b/docs/greenfield-api/payment-account.api.mdx @@ -0,0 +1,38 @@ +--- +id: payment-account +title: "PaymentAccount" +description: "Queries a payment account by payment account address." +sidebar_label: "PaymentAccount" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"PaymentAccount","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"payment_account":{"type":"object","properties":{"addr":{"type":"string","title":"the address of the payment account"},"owner":{"type":"string","title":"the owner address of the payment account"},"refundable":{"type":"boolean","title":"whether the payment account is refundable"}},"title":"PaymentAccount defines a payment account"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"addr","in":"path","required":true,"schema":{"type":"string"}}],"tags":["payment"],"description":"Queries a payment account by payment account address.","method":"get","path":"/greenfield/payment/payment_account/{addr}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"PaymentAccount","description":{"content":"Queries a payment account by payment account address.","type":"text/plain"},"url":{"path":["greenfield","payment","payment_account",":addr"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"addr"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## PaymentAccount + + + +Queries a payment account by payment account address. + +
Path Parameters
+ +A successful response. + +
Schema
    payment_account object
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/payment-accounts-by-owner.api.mdx b/docs/greenfield-api/payment-accounts-by-owner.api.mdx new file mode 100644 index 000000000..a0eb040e3 --- /dev/null +++ b/docs/greenfield-api/payment-accounts-by-owner.api.mdx @@ -0,0 +1,38 @@ +--- +id: payment-accounts-by-owner +title: "PaymentAccountsByOwner" +description: "Queries all payment accounts by a owner." +sidebar_label: "PaymentAccountsByOwner" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"PaymentAccountsByOwner","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"paymentAccounts":{"type":"array","items":{"type":"string"}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"}}],"tags":["payment"],"description":"Queries all payment accounts by a owner.","method":"get","path":"/greenfield/payment/payment_accounts_by_owner/{owner}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"PaymentAccountsByOwner","description":{"content":"Queries all payment accounts by a owner.","type":"text/plain"},"url":{"path":["greenfield","payment","payment_accounts_by_owner",":owner"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"owner"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## PaymentAccountsByOwner + + + +Queries all payment accounts by a owner. + +
Path Parameters
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/payment-accounts.api.mdx b/docs/greenfield-api/payment-accounts.api.mdx new file mode 100644 index 000000000..2dc556b44 --- /dev/null +++ b/docs/greenfield-api/payment-accounts.api.mdx @@ -0,0 +1,48 @@ +--- +id: payment-accounts +title: "PaymentAccounts" +description: "Queries all payment accounts." +sidebar_label: "PaymentAccounts" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"PaymentAccounts","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"payment_accounts":{"type":"array","items":{"type":"object","properties":{"addr":{"type":"string","title":"the address of the payment account"},"owner":{"type":"string","title":"the owner address of the payment account"},"refundable":{"type":"boolean","title":"whether the payment account is refundable"}},"title":"PaymentAccount defines a payment account"}},"pagination":{"type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}},"description":"PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["payment"],"description":"Queries all payment accounts.","method":"get","path":"/greenfield/payment/payment_accounts","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"PaymentAccounts","description":{"content":"Queries all payment accounts.","type":"text/plain"},"url":{"path":["greenfield","payment","payment_accounts"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## PaymentAccounts + + + +Queries all payment accounts. + +
Query Parameters
+ +A successful response. + +
Schema
    payment_accounts object[]
  • Array [
  • ]
  • pagination object
    + +PageResponse is to be embedded in gRPC response messages where the +corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/payment-params.api.mdx b/docs/greenfield-api/payment-params.api.mdx new file mode 100644 index 000000000..5941e236b --- /dev/null +++ b/docs/greenfield-api/payment-params.api.mdx @@ -0,0 +1,46 @@ +--- +id: payment-params +title: "PaymentParams" +description: "Parameters queries the parameters of the module." +sidebar_label: "PaymentParams" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"PaymentParams","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","type":"object","properties":{"versioned_params":{"type":"object","properties":{"reserve_time":{"type":"string","format":"uint64","title":"Time duration which the buffer balance need to be reserved for NetOutFlow e.g. 6 month"},"validator_tax_rate":{"type":"string","title":"The tax rate to pay for validators in storage payment. The default value is 1%(0.01)"}},"description":"VersionedParams defines the parameters with multiple versions, each version is stored with different timestamp."},"payment_account_count_limit":{"type":"string","format":"uint64","title":"The maximum number of payment accounts that can be created by one user"},"forced_settle_time":{"type":"string","format":"uint64","description":"Time duration threshold of forced settlement.\nIf dynamic balance is less than NetOutFlowRate * forcedSettleTime, the account can be forced settled."},"max_auto_settle_flow_count":{"type":"string","format":"uint64","title":"the maximum number of flows that will be auto forced settled in one block"},"max_auto_resume_flow_count":{"type":"string","format":"uint64","title":"the maximum number of flows that will be auto resumed in one block"},"fee_denom":{"type":"string","title":"The denom of fee charged in payment module"},"withdraw_time_lock_threshold":{"type":"string","title":"The withdrawal amount threshold to trigger time lock"},"withdraw_time_lock_duration":{"type":"string","format":"uint64","title":"The duration of the time lock for a big amount withdrawal"}}}},"description":"QueryParamsResponse is response type for the Query/Params RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["payment"],"description":"Parameters queries the parameters of the module.","method":"get","path":"/greenfield/payment/params","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"PaymentParams","description":{"content":"Parameters queries the parameters of the module.","type":"text/plain"},"url":{"path":["greenfield","payment","params"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## PaymentParams + + + +Parameters queries the parameters of the module. + +
+ +A successful response. + +
Schema
    params object
    + +params holds all the parameters of this module. + +
    versioned_params object
    + +VersionedParams defines the parameters with multiple versions, each version is stored with different timestamp. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/pool.api.mdx b/docs/greenfield-api/pool.api.mdx new file mode 100644 index 000000000..fb565b70a --- /dev/null +++ b/docs/greenfield-api/pool.api.mdx @@ -0,0 +1,42 @@ +--- +id: pool +title: "Pool" +description: "Pool queries the pool info." +sidebar_label: "Pool" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"Pool","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"pool":{"description":"pool defines the pool info.","type":"object","properties":{"not_bonded_tokens":{"type":"string"},"bonded_tokens":{"type":"string"}}}},"description":"QueryPoolResponse is response type for the Query/Pool RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"tags":["staking"],"description":"Pool queries the pool info.","method":"get","path":"/cosmos/staking/v1beta1/pool","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"Pool","description":{"content":"Pool queries the pool info.","type":"text/plain"},"url":{"path":["cosmos","staking","v1beta1","pool"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Pool + + + +Pool queries the pool info. + +
+ +A successful response. + +
Schema
    pool object
    + +pool defines the pool info. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/query-global-sp-store-price-by-time.api.mdx b/docs/greenfield-api/query-global-sp-store-price-by-time.api.mdx new file mode 100644 index 000000000..5eb2f2a79 --- /dev/null +++ b/docs/greenfield-api/query-global-sp-store-price-by-time.api.mdx @@ -0,0 +1,38 @@ +--- +id: query-global-sp-store-price-by-time +title: "QueryGlobalSpStorePriceByTime" +description: "get global store price by time" +sidebar_label: "QueryGlobalSpStorePriceByTime" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"QueryGlobalSpStorePriceByTime","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"global_sp_store_price":{"type":"object","properties":{"update_time_sec":{"type":"string","format":"int64","title":"update time, unix timestamp in seconds"},"read_price":{"type":"string","title":"read price, in bnb wei per charge byte"},"primary_store_price":{"type":"string","title":"primary store price, in bnb wei per charge byte"},"secondary_store_price":{"type":"string","title":"secondary store price, in bnb wei per charge byte"}},"title":"global sp store price, the price for all sps"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"timestamp","description":"unix timestamp in seconds. If it's 0, it will return the latest price.","in":"path","required":true,"schema":{"type":"string","format":"int64"}}],"tags":["sp"],"description":"get global store price by time","method":"get","path":"/greenfield/sp/global_sp_store_price_by_time/{timestamp}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"QueryGlobalSpStorePriceByTime","description":{"content":"get global store price by time","type":"text/plain"},"url":{"path":["greenfield","sp","global_sp_store_price_by_time",":timestamp"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) unix timestamp in seconds. If it's 0, it will return the latest price.","type":"text/plain"},"type":"any","value":"","key":"timestamp"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## QueryGlobalSpStorePriceByTime + + + +get global store price by time + +
Path Parameters
+ +A successful response. + +
Schema
    global_sp_store_price object
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/query-group-members-exist.api.mdx b/docs/greenfield-api/query-group-members-exist.api.mdx new file mode 100644 index 000000000..a3edf2eb9 --- /dev/null +++ b/docs/greenfield-api/query-group-members-exist.api.mdx @@ -0,0 +1,38 @@ +--- +id: query-group-members-exist +title: "QueryGroupMembersExist" +description: "Queries whether some members are in the group." +sidebar_label: "QueryGroupMembersExist" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"QueryGroupMembersExist","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"exists":{"type":"object","additionalProperties":{"type":"boolean"}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"members","in":"path","required":true,"style":"simple","schema":{"type":"array","items":{"type":"string"},"minItems":1}}],"tags":["storage"],"description":"Queries whether some members are in the group.","method":"get","path":"/greenfield/storage/group_members_exist/{group_id}/{members}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"QueryGroupMembersExist","description":{"content":"Queries whether some members are in the group.","type":"text/plain"},"url":{"path":["greenfield","storage","group_members_exist",":group_id",":members"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"group_id"},{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"members"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## QueryGroupMembersExist + + + +Queries whether some members are in the group. + +
Path Parameters
+ +A successful response. + +
Schema
    exists object
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/query-groups-exist-by-id.api.mdx b/docs/greenfield-api/query-groups-exist-by-id.api.mdx new file mode 100644 index 000000000..098067376 --- /dev/null +++ b/docs/greenfield-api/query-groups-exist-by-id.api.mdx @@ -0,0 +1,38 @@ +--- +id: query-groups-exist-by-id +title: "QueryGroupsExistById" +description: "Queries whether some groups are exist by id." +sidebar_label: "QueryGroupsExistById" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"QueryGroupsExistById","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"exists":{"type":"object","additionalProperties":{"type":"boolean"}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"group_ids","in":"path","required":true,"style":"simple","schema":{"type":"array","items":{"type":"string"},"minItems":1}}],"tags":["storage"],"description":"Queries whether some groups are exist by id.","method":"get","path":"/greenfield/storage/groups_exist_by_id/{group_ids}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"QueryGroupsExistById","description":{"content":"Queries whether some groups are exist by id.","type":"text/plain"},"url":{"path":["greenfield","storage","groups_exist_by_id",":group_ids"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"group_ids"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## QueryGroupsExistById + + + +Queries whether some groups are exist by id. + +
Path Parameters
+ +A successful response. + +
Schema
    exists object
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/query-groups-exist.api.mdx b/docs/greenfield-api/query-groups-exist.api.mdx new file mode 100644 index 000000000..da143581c --- /dev/null +++ b/docs/greenfield-api/query-groups-exist.api.mdx @@ -0,0 +1,38 @@ +--- +id: query-groups-exist +title: "QueryGroupsExist" +description: "Queries whether some groups are exist." +sidebar_label: "QueryGroupsExist" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"QueryGroupsExist","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"exists":{"type":"object","additionalProperties":{"type":"boolean"}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"group_owner","in":"path","required":true,"schema":{"type":"string"}},{"name":"group_names","in":"path","required":true,"style":"simple","schema":{"type":"array","items":{"type":"string"},"minItems":1}}],"tags":["storage"],"description":"Queries whether some groups are exist.","method":"get","path":"/greenfield/storage/groups_exist/{group_owner}/{group_names}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"QueryGroupsExist","description":{"content":"Queries whether some groups are exist.","type":"text/plain"},"url":{"path":["greenfield","storage","groups_exist",":group_owner",":group_names"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"group_owner"},{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"group_names"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## QueryGroupsExist + + + +Queries whether some groups are exist. + +
Path Parameters
+ +A successful response. + +
Schema
    exists object
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/query-is-price-changed.api.mdx b/docs/greenfield-api/query-is-price-changed.api.mdx new file mode 100644 index 000000000..a323fe862 --- /dev/null +++ b/docs/greenfield-api/query-is-price-changed.api.mdx @@ -0,0 +1,38 @@ +--- +id: query-is-price-changed +title: "QueryIsPriceChanged" +description: "Queries whether read and storage prices changed for the bucket." +sidebar_label: "QueryIsPriceChanged" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"QueryIsPriceChanged","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"changed":{"type":"boolean"},"current_read_price":{"type":"string"},"current_primary_store_price":{"type":"string"},"current_secondary_store_price":{"type":"string"},"current_validator_tax_rate":{"type":"string"},"new_read_price":{"type":"string"},"new_primary_store_price":{"type":"string"},"new_secondary_store_price":{"type":"string"},"new_validator_tax_rate":{"type":"string"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"bucket_name","in":"path","required":true,"schema":{"type":"string"}}],"tags":["storage"],"description":"Queries whether read and storage prices changed for the bucket.","method":"get","path":"/greenfield/storage/is_price_changed/{bucket_name}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"QueryIsPriceChanged","description":{"content":"Queries whether read and storage prices changed for the bucket.","type":"text/plain"},"url":{"path":["greenfield","storage","is_price_changed",":bucket_name"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"bucket_name"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## QueryIsPriceChanged + + + +Queries whether read and storage prices changed for the bucket. + +
Path Parameters
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/query-lock-fee.api.mdx b/docs/greenfield-api/query-lock-fee.api.mdx new file mode 100644 index 000000000..8656e5290 --- /dev/null +++ b/docs/greenfield-api/query-lock-fee.api.mdx @@ -0,0 +1,38 @@ +--- +id: query-lock-fee +title: "QueryLockFee" +description: "Queries lock fee for storing an object" +sidebar_label: "QueryLockFee" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"QueryLockFee","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"amount":{"type":"string"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"primary_sp_address","description":"primary_sp_address is the address of the primary sp.","in":"query","required":false,"schema":{"type":"string"}},{"name":"create_at","description":"create_at define the block timestamp when the object created.","in":"query","required":false,"schema":{"type":"string","format":"int64"}},{"name":"payload_size","description":"payloadSize is the total size of the object payload.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}}],"tags":["storage"],"description":"Queries lock fee for storing an object","method":"get","path":"/greenfield/storage/lock_fee","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"QueryLockFee","description":{"content":"Queries lock fee for storing an object","type":"text/plain"},"url":{"path":["greenfield","storage","lock_fee"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"primary_sp_address is the address of the primary sp.","type":"text/plain"},"key":"primary_sp_address","value":""},{"disabled":false,"description":{"content":"create_at define the block timestamp when the object created.","type":"text/plain"},"key":"create_at","value":""},{"disabled":false,"description":{"content":"payloadSize is the total size of the object payload.","type":"text/plain"},"key":"payload_size","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## QueryLockFee + + + +Queries lock fee for storing an object + +
Query Parameters
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/query-params-by-timestamp.api.mdx b/docs/greenfield-api/query-params-by-timestamp.api.mdx new file mode 100644 index 000000000..6c1d6c645 --- /dev/null +++ b/docs/greenfield-api/query-params-by-timestamp.api.mdx @@ -0,0 +1,46 @@ +--- +id: query-params-by-timestamp +title: "QueryParamsByTimestamp" +description: "Parameters queries the parameters of the module." +sidebar_label: "QueryParamsByTimestamp" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"QueryParamsByTimestamp","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","type":"object","properties":{"versioned_params":{"type":"object","properties":{"max_segment_size":{"type":"string","format":"uint64","title":"max_segment_size is the maximum size of a segment. default: 16M"},"redundant_data_chunk_num":{"type":"integer","format":"int64","title":"redundant_data_check_num is the num of data chunks of EC redundancy algorithm"},"redundant_parity_chunk_num":{"type":"integer","format":"int64","title":"redundant_data_check_num is the num of parity chunks of EC redundancy algorithm"},"min_charge_size":{"type":"string","format":"uint64","title":"min_charge_size is the minimum charge size of the payload, objects smaller than this size will be charged as this size"}},"description":"VersionedParams defines the parameters for the storage module with multi version, each version store with different timestamp."},"max_payload_size":{"type":"string","format":"uint64","title":"max_payload_size is the maximum size of the payload, default: 2G"},"bsc_mirror_bucket_relayer_fee":{"type":"string","title":"relayer fee for the mirror bucket tx to bsc"},"bsc_mirror_bucket_ack_relayer_fee":{"type":"string","title":"relayer fee for the ACK or FAIL_ACK package of the mirror bucket tx to bsc"},"bsc_mirror_object_relayer_fee":{"type":"string","title":"relayer fee for the mirror object tx to bsc"},"bsc_mirror_object_ack_relayer_fee":{"type":"string","title":"Relayer fee for the ACK or FAIL_ACK package of the mirror object tx to bsc"},"bsc_mirror_group_relayer_fee":{"type":"string","title":"relayer fee for the mirror object tx to bsc"},"bsc_mirror_group_ack_relayer_fee":{"type":"string","title":"Relayer fee for the ACK or FAIL_ACK package of the mirror object tx to bsc"},"max_buckets_per_account":{"type":"integer","format":"int64","title":"The maximum number of buckets that can be created per account"},"discontinue_counting_window":{"type":"string","format":"uint64","title":"The window to count the discontinued objects or buckets"},"discontinue_object_max":{"type":"string","format":"uint64","title":"The max objects can be requested in a window"},"discontinue_bucket_max":{"type":"string","format":"uint64","title":"The max buckets can be requested in a window"},"discontinue_confirm_period":{"type":"string","format":"int64","title":"The object will be deleted after the confirm period in seconds"},"discontinue_deletion_max":{"type":"string","format":"uint64","title":"The max delete objects in each end block"},"stale_policy_cleanup_max":{"type":"string","format":"uint64","title":"The max number for deleting policy in each end block"},"min_quota_update_interval":{"type":"string","format":"uint64","title":"The min interval for making quota smaller in seconds"},"max_local_virtual_group_num_per_bucket":{"type":"integer","format":"int64","title":"the max number of local virtual group per bucket"},"op_mirror_bucket_relayer_fee":{"type":"string","title":"relayer fee for the mirror bucket tx to op chain"},"op_mirror_bucket_ack_relayer_fee":{"type":"string","title":"relayer fee for the ACK or FAIL_ACK package of the mirror bucket tx to op chain"},"op_mirror_object_relayer_fee":{"type":"string","title":"relayer fee for the mirror object tx to op chain"},"op_mirror_object_ack_relayer_fee":{"type":"string","title":"Relayer fee for the ACK or FAIL_ACK package of the mirror object tx to op chain"},"op_mirror_group_relayer_fee":{"type":"string","title":"relayer fee for the mirror object tx to op chain"},"op_mirror_group_ack_relayer_fee":{"type":"string","title":"Relayer fee for the ACK or FAIL_ACK package of the mirror object tx to op chain"}}}},"description":"QueryVersionedParamsResponse is response type for the Query/Params RPC method with timestamp."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"timestamp","description":"the timestamp of the block time you want to query","in":"path","required":true,"schema":{"type":"string","format":"int64"}}],"tags":["storage"],"description":"Parameters queries the parameters of the module.","method":"get","path":"/greenfield/storage/params/{timestamp}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"QueryParamsByTimestamp","description":{"content":"Parameters queries the parameters of the module.","type":"text/plain"},"url":{"path":["greenfield","storage","params",":timestamp"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) the timestamp of the block time you want to query","type":"text/plain"},"type":"any","value":"","key":"timestamp"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## QueryParamsByTimestamp + + + +Parameters queries the parameters of the module. + +
Path Parameters
+ +A successful response. + +
Schema
    params object
    + +params holds all the parameters of this module. + +
    versioned_params object
    + +VersionedParams defines the parameters for the storage module with multi version, each version store with different timestamp. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/query-policy-by-id.api.mdx b/docs/greenfield-api/query-policy-by-id.api.mdx new file mode 100644 index 000000000..fd4f25789 --- /dev/null +++ b/docs/greenfield-api/query-policy-by-id.api.mdx @@ -0,0 +1,46 @@ +--- +id: query-policy-by-id +title: "QueryPolicyById" +description: "Queries a policy by policy id" +sidebar_label: "QueryPolicyById" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"QueryPolicyById","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"policy":{"type":"object","properties":{"id":{"type":"string","title":"id is an unique u256 sequence for each policy. It also be used as NFT tokenID"},"principal":{"title":"principal defines the accounts/group which the permission grants to","type":"object","properties":{"type":{"type":"string","enum":["PRINCIPAL_TYPE_UNSPECIFIED","PRINCIPAL_TYPE_GNFD_ACCOUNT","PRINCIPAL_TYPE_GNFD_GROUP"],"default":"PRINCIPAL_TYPE_UNSPECIFIED","description":"PrincipalType refers to the identity type of system users or entities.\nIn Greenfield, it usually refers to accounts or groups."},"value":{"type":"string","title":"When the type is an account, its value is sdk.AccAddress().String();\nwhen the type is a group, its value is math.Uint().String()"}},"description":"Principal define the roles that can be grant permissions to. Currently, it can be account or group."},"resource_type":{"title":"resource_type defines the type of resource that grants permission for","type":"string","enum":["RESOURCE_TYPE_UNSPECIFIED","RESOURCE_TYPE_BUCKET","RESOURCE_TYPE_OBJECT","RESOURCE_TYPE_GROUP"],"default":"RESOURCE_TYPE_UNSPECIFIED"},"resource_id":{"type":"string","title":"resource_id defines the bucket/object/group id of the resource that grants permission for"},"statements":{"type":"array","items":{"type":"object","properties":{"effect":{"title":"effect define the impact of permissions, which can be Allow/Deny","type":"string","enum":["EFFECT_UNSPECIFIED","EFFECT_ALLOW","EFFECT_DENY"],"default":"EFFECT_UNSPECIFIED"},"actions":{"type":"array","items":{"type":"string","enum":["ACTION_UNSPECIFIED","ACTION_UPDATE_BUCKET_INFO","ACTION_DELETE_BUCKET","ACTION_CREATE_OBJECT","ACTION_DELETE_OBJECT","ACTION_COPY_OBJECT","ACTION_GET_OBJECT","ACTION_EXECUTE_OBJECT","ACTION_LIST_OBJECT","ACTION_UPDATE_GROUP_MEMBER","ACTION_DELETE_GROUP","ACTION_UPDATE_OBJECT_INFO","ACTION_UPDATE_GROUP_EXTRA","ACTION_TYPE_ALL"],"default":"ACTION_UNSPECIFIED","title":"ActionType defines the operations you can execute in greenfield storage network"},"description":"action_type define the operation type you can act. greenfield defines a set of permission\nthat you can specify in a permissionInfo. see ActionType enum for detail."},"resources":{"type":"array","items":{"type":"string"},"description":"CAN ONLY USED IN bucket level. Support fuzzy match and limit to 5.\nThe sub-resource name must comply with the standard specified in the greenfield/types/grn.go file for Greenfield resource names.\nIf the sub-resources include 'grn:o:{bucket_name}/*' in the statement, it indicates that specific permissions is granted to all objects within the specified bucket.\nIf the sub-resources include 'grn:o:{bucket_name}/test_*' in the statement, it indicates that specific permissions is granted to all objects with the `test_` prefix within the specified bucket.\nIf the sub-resources is empty, when you need to operate(excluding CreateObject) a specified subresource, it will be denied because it cannot match any subresource."},"expiration_time":{"type":"string","format":"date-time","description":"expiration_time defines how long the permission is valid. If not explicitly specified, it means it will not expire."},"limit_size":{"description":"limit_size defines the total data size that is allowed to operate. If not explicitly specified, it means it will not limit.","type":"object","properties":{"value":{"type":"string","format":"uint64","description":"The uint64 value."}}}}},"title":"statements defines the details content of the permission, including effect/actions/sub-resources"},"expiration_time":{"type":"string","format":"date-time","title":"expiration_time defines the whole expiration time of all the statements.\nNotices: Its priority is higher than the expiration time inside the Statement"}}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["storage"],"description":"Queries a policy by policy id","method":"get","path":"/greenfield/storage/policy_by_id/{policy_id}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"QueryPolicyById","description":{"content":"Queries a policy by policy id","type":"text/plain"},"url":{"path":["greenfield","storage","policy_by_id",":policy_id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"policy_id"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## QueryPolicyById + + + +Queries a policy by policy id + +
Path Parameters
+ +A successful response. + +
Schema
    policy object
    principal object
    + +Principal define the roles that can be grant permissions to. Currently, it can be account or group. + +
    statements object[]
  • Array [
  • limit_size object
    + +limit_size defines the total data size that is allowed to operate. If not explicitly specified, it means it will not limit. + +
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/query-policy-for-account.api.mdx b/docs/greenfield-api/query-policy-for-account.api.mdx new file mode 100644 index 000000000..268665a27 --- /dev/null +++ b/docs/greenfield-api/query-policy-for-account.api.mdx @@ -0,0 +1,46 @@ +--- +id: query-policy-for-account +title: "QueryPolicyForAccount" +description: "Queries a policy which grants permission to account" +sidebar_label: "QueryPolicyForAccount" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"QueryPolicyForAccount","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"policy":{"type":"object","properties":{"id":{"type":"string","title":"id is an unique u256 sequence for each policy. It also be used as NFT tokenID"},"principal":{"title":"principal defines the accounts/group which the permission grants to","type":"object","properties":{"type":{"type":"string","enum":["PRINCIPAL_TYPE_UNSPECIFIED","PRINCIPAL_TYPE_GNFD_ACCOUNT","PRINCIPAL_TYPE_GNFD_GROUP"],"default":"PRINCIPAL_TYPE_UNSPECIFIED","description":"PrincipalType refers to the identity type of system users or entities.\nIn Greenfield, it usually refers to accounts or groups."},"value":{"type":"string","title":"When the type is an account, its value is sdk.AccAddress().String();\nwhen the type is a group, its value is math.Uint().String()"}},"description":"Principal define the roles that can be grant permissions to. Currently, it can be account or group."},"resource_type":{"title":"resource_type defines the type of resource that grants permission for","type":"string","enum":["RESOURCE_TYPE_UNSPECIFIED","RESOURCE_TYPE_BUCKET","RESOURCE_TYPE_OBJECT","RESOURCE_TYPE_GROUP"],"default":"RESOURCE_TYPE_UNSPECIFIED"},"resource_id":{"type":"string","title":"resource_id defines the bucket/object/group id of the resource that grants permission for"},"statements":{"type":"array","items":{"type":"object","properties":{"effect":{"title":"effect define the impact of permissions, which can be Allow/Deny","type":"string","enum":["EFFECT_UNSPECIFIED","EFFECT_ALLOW","EFFECT_DENY"],"default":"EFFECT_UNSPECIFIED"},"actions":{"type":"array","items":{"type":"string","enum":["ACTION_UNSPECIFIED","ACTION_UPDATE_BUCKET_INFO","ACTION_DELETE_BUCKET","ACTION_CREATE_OBJECT","ACTION_DELETE_OBJECT","ACTION_COPY_OBJECT","ACTION_GET_OBJECT","ACTION_EXECUTE_OBJECT","ACTION_LIST_OBJECT","ACTION_UPDATE_GROUP_MEMBER","ACTION_DELETE_GROUP","ACTION_UPDATE_OBJECT_INFO","ACTION_UPDATE_GROUP_EXTRA","ACTION_TYPE_ALL"],"default":"ACTION_UNSPECIFIED","title":"ActionType defines the operations you can execute in greenfield storage network"},"description":"action_type define the operation type you can act. greenfield defines a set of permission\nthat you can specify in a permissionInfo. see ActionType enum for detail."},"resources":{"type":"array","items":{"type":"string"},"description":"CAN ONLY USED IN bucket level. Support fuzzy match and limit to 5.\nThe sub-resource name must comply with the standard specified in the greenfield/types/grn.go file for Greenfield resource names.\nIf the sub-resources include 'grn:o:{bucket_name}/*' in the statement, it indicates that specific permissions is granted to all objects within the specified bucket.\nIf the sub-resources include 'grn:o:{bucket_name}/test_*' in the statement, it indicates that specific permissions is granted to all objects with the `test_` prefix within the specified bucket.\nIf the sub-resources is empty, when you need to operate(excluding CreateObject) a specified subresource, it will be denied because it cannot match any subresource."},"expiration_time":{"type":"string","format":"date-time","description":"expiration_time defines how long the permission is valid. If not explicitly specified, it means it will not expire."},"limit_size":{"description":"limit_size defines the total data size that is allowed to operate. If not explicitly specified, it means it will not limit.","type":"object","properties":{"value":{"type":"string","format":"uint64","description":"The uint64 value."}}}}},"title":"statements defines the details content of the permission, including effect/actions/sub-resources"},"expiration_time":{"type":"string","format":"date-time","title":"expiration_time defines the whole expiration time of all the statements.\nNotices: Its priority is higher than the expiration time inside the Statement"}}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"resource","in":"path","required":true,"schema":{"type":"string"}},{"name":"principal_address","in":"path","required":true,"schema":{"type":"string"}}],"tags":["storage"],"description":"Queries a policy which grants permission to account","method":"get","path":"/greenfield/storage/policy_for_account/{resource}/{principal_address}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"QueryPolicyForAccount","description":{"content":"Queries a policy which grants permission to account","type":"text/plain"},"url":{"path":["greenfield","storage","policy_for_account",":resource",":principal_address"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"resource"},{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"principal_address"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## QueryPolicyForAccount + + + +Queries a policy which grants permission to account + +
Path Parameters
+ +A successful response. + +
Schema
    policy object
    principal object
    + +Principal define the roles that can be grant permissions to. Currently, it can be account or group. + +
    statements object[]
  • Array [
  • limit_size object
    + +limit_size defines the total data size that is allowed to operate. If not explicitly specified, it means it will not limit. + +
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/query-policy-for-group.api.mdx b/docs/greenfield-api/query-policy-for-group.api.mdx new file mode 100644 index 000000000..d0a0c591c --- /dev/null +++ b/docs/greenfield-api/query-policy-for-group.api.mdx @@ -0,0 +1,46 @@ +--- +id: query-policy-for-group +title: "QueryPolicyForGroup" +description: "Queries a policy that grants permission to a group" +sidebar_label: "QueryPolicyForGroup" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"QueryPolicyForGroup","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"policy":{"type":"object","properties":{"id":{"type":"string","title":"id is an unique u256 sequence for each policy. It also be used as NFT tokenID"},"principal":{"title":"principal defines the accounts/group which the permission grants to","type":"object","properties":{"type":{"type":"string","enum":["PRINCIPAL_TYPE_UNSPECIFIED","PRINCIPAL_TYPE_GNFD_ACCOUNT","PRINCIPAL_TYPE_GNFD_GROUP"],"default":"PRINCIPAL_TYPE_UNSPECIFIED","description":"PrincipalType refers to the identity type of system users or entities.\nIn Greenfield, it usually refers to accounts or groups."},"value":{"type":"string","title":"When the type is an account, its value is sdk.AccAddress().String();\nwhen the type is a group, its value is math.Uint().String()"}},"description":"Principal define the roles that can be grant permissions to. Currently, it can be account or group."},"resource_type":{"title":"resource_type defines the type of resource that grants permission for","type":"string","enum":["RESOURCE_TYPE_UNSPECIFIED","RESOURCE_TYPE_BUCKET","RESOURCE_TYPE_OBJECT","RESOURCE_TYPE_GROUP"],"default":"RESOURCE_TYPE_UNSPECIFIED"},"resource_id":{"type":"string","title":"resource_id defines the bucket/object/group id of the resource that grants permission for"},"statements":{"type":"array","items":{"type":"object","properties":{"effect":{"title":"effect define the impact of permissions, which can be Allow/Deny","type":"string","enum":["EFFECT_UNSPECIFIED","EFFECT_ALLOW","EFFECT_DENY"],"default":"EFFECT_UNSPECIFIED"},"actions":{"type":"array","items":{"type":"string","enum":["ACTION_UNSPECIFIED","ACTION_UPDATE_BUCKET_INFO","ACTION_DELETE_BUCKET","ACTION_CREATE_OBJECT","ACTION_DELETE_OBJECT","ACTION_COPY_OBJECT","ACTION_GET_OBJECT","ACTION_EXECUTE_OBJECT","ACTION_LIST_OBJECT","ACTION_UPDATE_GROUP_MEMBER","ACTION_DELETE_GROUP","ACTION_UPDATE_OBJECT_INFO","ACTION_UPDATE_GROUP_EXTRA","ACTION_TYPE_ALL"],"default":"ACTION_UNSPECIFIED","title":"ActionType defines the operations you can execute in greenfield storage network"},"description":"action_type define the operation type you can act. greenfield defines a set of permission\nthat you can specify in a permissionInfo. see ActionType enum for detail."},"resources":{"type":"array","items":{"type":"string"},"description":"CAN ONLY USED IN bucket level. Support fuzzy match and limit to 5.\nThe sub-resource name must comply with the standard specified in the greenfield/types/grn.go file for Greenfield resource names.\nIf the sub-resources include 'grn:o:{bucket_name}/*' in the statement, it indicates that specific permissions is granted to all objects within the specified bucket.\nIf the sub-resources include 'grn:o:{bucket_name}/test_*' in the statement, it indicates that specific permissions is granted to all objects with the `test_` prefix within the specified bucket.\nIf the sub-resources is empty, when you need to operate(excluding CreateObject) a specified subresource, it will be denied because it cannot match any subresource."},"expiration_time":{"type":"string","format":"date-time","description":"expiration_time defines how long the permission is valid. If not explicitly specified, it means it will not expire."},"limit_size":{"description":"limit_size defines the total data size that is allowed to operate. If not explicitly specified, it means it will not limit.","type":"object","properties":{"value":{"type":"string","format":"uint64","description":"The uint64 value."}}}}},"title":"statements defines the details content of the permission, including effect/actions/sub-resources"},"expiration_time":{"type":"string","format":"date-time","title":"expiration_time defines the whole expiration time of all the statements.\nNotices: Its priority is higher than the expiration time inside the Statement"}}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"resource","in":"path","required":true,"schema":{"type":"string"}},{"name":"principal_group_id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["storage"],"description":"Queries a policy that grants permission to a group","method":"get","path":"/greenfield/storage/policy_for_group/{resource}/{principal_group_id}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"QueryPolicyForGroup","description":{"content":"Queries a policy that grants permission to a group","type":"text/plain"},"url":{"path":["greenfield","storage","policy_for_group",":resource",":principal_group_id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"resource"},{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"principal_group_id"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## QueryPolicyForGroup + + + +Queries a policy that grants permission to a group + +
Path Parameters
+ +A successful response. + +
Schema
    policy object
    principal object
    + +Principal define the roles that can be grant permissions to. Currently, it can be account or group. + +
    statements object[]
  • Array [
  • limit_size object
    + +limit_size defines the total data size that is allowed to operate. If not explicitly specified, it means it will not limit. + +
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/query-quota-update-time.api.mdx b/docs/greenfield-api/query-quota-update-time.api.mdx new file mode 100644 index 000000000..46a428c4c --- /dev/null +++ b/docs/greenfield-api/query-quota-update-time.api.mdx @@ -0,0 +1,38 @@ +--- +id: query-quota-update-time +title: "QueryQuotaUpdateTime" +description: "Queries whether read and storage prices changed for the bucket." +sidebar_label: "QueryQuotaUpdateTime" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"QueryQuotaUpdateTime","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"update_at":{"type":"string","format":"int64"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"bucket_name","in":"path","required":true,"schema":{"type":"string"}}],"tags":["storage"],"description":"Queries whether read and storage prices changed for the bucket.","method":"get","path":"/greenfield/storage/quota_update_time/{bucket_name}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"QueryQuotaUpdateTime","description":{"content":"Queries whether read and storage prices changed for the bucket.","type":"text/plain"},"url":{"path":["greenfield","storage","quota_update_time",":bucket_name"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"bucket_name"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## QueryQuotaUpdateTime + + + +Queries whether read and storage prices changed for the bucket. + +
Path Parameters
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/query-sp-storage-price.api.mdx b/docs/greenfield-api/query-sp-storage-price.api.mdx new file mode 100644 index 000000000..768cce8f4 --- /dev/null +++ b/docs/greenfield-api/query-sp-storage-price.api.mdx @@ -0,0 +1,38 @@ +--- +id: query-sp-storage-price +title: "QuerySpStoragePrice" +description: "get the latest storage price of specific sp" +sidebar_label: "QuerySpStoragePrice" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"QuerySpStoragePrice","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"sp_storage_price":{"type":"object","properties":{"sp_id":{"type":"integer","format":"int64","title":"sp id"},"update_time_sec":{"type":"string","format":"int64","title":"update time, unix timestamp in seconds"},"read_price":{"type":"string","title":"read price, in bnb wei per charge byte"},"free_read_quota":{"type":"string","format":"uint64","title":"free read quota, in byte"},"store_price":{"type":"string","title":"store price, in bnb wei per charge byte"}},"title":"storage price of a specific sp"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"sp_addr","description":"operator address of sp","in":"path","required":true,"schema":{"type":"string"}}],"tags":["sp"],"description":"get the latest storage price of specific sp","method":"get","path":"/greenfield/sp/sp_storage_price/{sp_addr}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"QuerySpStoragePrice","description":{"content":"get the latest storage price of specific sp","type":"text/plain"},"url":{"path":["greenfield","sp","sp_storage_price",":sp_addr"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) operator address of sp","type":"text/plain"},"type":"any","value":"","key":"sp_addr"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## QuerySpStoragePrice + + + +get the latest storage price of specific sp + +
Path Parameters
+ +A successful response. + +
Schema
    sp_storage_price object
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/receive-sequence.api.mdx b/docs/greenfield-api/receive-sequence.api.mdx new file mode 100644 index 000000000..62899e1f4 --- /dev/null +++ b/docs/greenfield-api/receive-sequence.api.mdx @@ -0,0 +1,38 @@ +--- +id: receive-sequence +title: "ReceiveSequence" +description: "ReceiveSequence returns the receive sequence of the channel" +sidebar_label: "ReceiveSequence" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"ReceiveSequence","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"sequence":{"type":"string","format":"uint64","title":"sequence of the cross chain package"}},"description":"QuerySendSequenceResponse is the response type for the Query/ReceiveSequence RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"dest_chain_id","description":"destination chain id.","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"channel_id","description":"channel id of the cross chain package.","in":"query","required":false,"schema":{"type":"integer","format":"int64"}}],"tags":["crosschain"],"description":"ReceiveSequence returns the receive sequence of the channel","method":"get","path":"/cosmos/crosschain/v1/receive_sequence","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"ReceiveSequence","description":{"content":"ReceiveSequence returns the receive sequence of the channel","type":"text/plain"},"url":{"path":["cosmos","crosschain","v1","receive_sequence"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"destination chain id.","type":"text/plain"},"key":"dest_chain_id","value":""},{"disabled":false,"description":{"content":"channel id of the cross chain package.","type":"text/plain"},"key":"channel_id","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## ReceiveSequence + + + +ReceiveSequence returns the receive sequence of the channel + +
Query Parameters
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/redelegations.api.mdx b/docs/greenfield-api/redelegations.api.mdx new file mode 100644 index 000000000..fe3f37af2 --- /dev/null +++ b/docs/greenfield-api/redelegations.api.mdx @@ -0,0 +1,55 @@ +--- +id: redelegations +title: "Redelegations" +description: "Redelegations queries redelegations of given address." +sidebar_label: "Redelegations" +hide_title: true +hide_table_of_contents: true +api: {"description":"Redelegations queries redelegations of given address.","operationId":"Redelegations","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"redelegation_responses":{"type":"array","items":{"type":"object","properties":{"redelegation":{"type":"object","properties":{"delegator_address":{"type":"string","description":"delegator_address is the bech32-encoded address of the delegator."},"validator_src_address":{"type":"string","description":"validator_src_address is the validator redelegation source operator address."},"validator_dst_address":{"type":"string","description":"validator_dst_address is the validator redelegation destination operator address."},"entries":{"type":"array","items":{"type":"object","properties":{"creation_height":{"type":"string","format":"int64","description":"creation_height defines the height which the redelegation took place."},"completion_time":{"type":"string","format":"date-time","description":"completion_time defines the unix time for redelegation completion."},"initial_balance":{"type":"string","description":"initial_balance defines the initial balance when redelegation started."},"shares_dst":{"type":"string","description":"shares_dst is the amount of destination-validator shares created by redelegation."},"unbonding_id":{"type":"string","format":"uint64","title":"Incrementing id that uniquely identifies this entry"},"unbonding_on_hold_ref_count":{"type":"string","format":"int64","title":"Strictly positive if this entry's unbonding has been stopped by external modules"}},"description":"RedelegationEntry defines a redelegation object with relevant metadata."},"description":"entries are the redelegation entries."}},"description":"Redelegation contains the list of a particular delegator's redelegating bonds\nfrom a particular source validator to a particular destination validator."},"entries":{"type":"array","items":{"type":"object","properties":{"redelegation_entry":{"type":"object","properties":{"creation_height":{"type":"string","format":"int64","description":"creation_height defines the height which the redelegation took place."},"completion_time":{"type":"string","format":"date-time","description":"completion_time defines the unix time for redelegation completion."},"initial_balance":{"type":"string","description":"initial_balance defines the initial balance when redelegation started."},"shares_dst":{"type":"string","description":"shares_dst is the amount of destination-validator shares created by redelegation."},"unbonding_id":{"type":"string","format":"uint64","title":"Incrementing id that uniquely identifies this entry"},"unbonding_on_hold_ref_count":{"type":"string","format":"int64","title":"Strictly positive if this entry's unbonding has been stopped by external modules"}},"description":"RedelegationEntry defines a redelegation object with relevant metadata."},"balance":{"type":"string"}},"description":"RedelegationEntryResponse is equivalent to a RedelegationEntry except that it\ncontains a balance in addition to shares which is more suitable for client\nresponses."}}},"description":"RedelegationResponse is equivalent to a Redelegation except that its entries\ncontain a balance in addition to shares which is more suitable for client\nresponses."}},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryRedelegationsResponse is response type for the Query/Redelegations RPC\nmethod."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"delegator_addr","description":"delegator_addr defines the delegator address to query for.","in":"path","required":true,"schema":{"type":"string"}},{"name":"src_validator_addr","description":"src_validator_addr defines the validator address to redelegate from.","in":"query","required":false,"schema":{"type":"string"}},{"name":"dst_validator_addr","description":"dst_validator_addr defines the validator address to redelegate to.","in":"query","required":false,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["staking"],"method":"get","path":"/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"Redelegations","description":{"content":"Redelegations queries redelegations of given address.","type":"text/plain"},"url":{"path":["cosmos","staking","v1beta1","delegators",":delegator_addr","redelegations"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"src_validator_addr defines the validator address to redelegate from.","type":"text/plain"},"key":"src_validator_addr","value":""},{"disabled":false,"description":{"content":"dst_validator_addr defines the validator address to redelegate to.","type":"text/plain"},"key":"dst_validator_addr","value":""},{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) delegator_addr defines the delegator address to query for.","type":"text/plain"},"type":"any","value":"","key":"delegator_addr"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Redelegations + + + +Redelegations queries redelegations of given address. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    redelegation_responses object[]
  • Array [
  • redelegation object
    + +Redelegation contains the list of a particular delegator's redelegating bonds +from a particular source validator to a particular destination validator. + +
    entries object[]
    + +entries are the redelegation entries. + +
  • Array [
  • ]
  • entries object[]
  • Array [
  • redelegation_entry object
    + +RedelegationEntry defines a redelegation object with relevant metadata. + +
  • ]
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/send-enabled.api.mdx b/docs/greenfield-api/send-enabled.api.mdx new file mode 100644 index 000000000..34017b0a7 --- /dev/null +++ b/docs/greenfield-api/send-enabled.api.mdx @@ -0,0 +1,43 @@ +--- +id: send-enabled +title: "SendEnabled" +description: "SendEnabled queries for SendEnabled entries." +sidebar_label: "SendEnabled" +hide_title: true +hide_table_of_contents: true +api: {"description":"SendEnabled queries for SendEnabled entries.","operationId":"SendEnabled","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"send_enabled":{"type":"array","items":{"type":"object","properties":{"denom":{"type":"string"},"enabled":{"type":"boolean"}},"description":"SendEnabled maps coin denom to a send_enabled status (whether a denom is\nsendable)."}},"pagination":{"description":"pagination defines the pagination in the response. This field is only\npopulated if the denoms field in the request is empty.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QuerySendEnabledResponse defines the RPC response of a SendEnable query.\n\nSince: cosmos-sdk 0.47"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"denoms","description":"denoms is the specific denoms you want look up. Leave empty to get all entries.","in":"query","required":false,"explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["bank"],"method":"get","path":"/cosmos/bank/v1beta1/send_enabled","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"SendEnabled","description":{"content":"SendEnabled queries for SendEnabled entries.","type":"text/plain"},"url":{"path":["cosmos","bank","v1beta1","send_enabled"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"denoms is the specific denoms you want look up. Leave empty to get all entries.","type":"text/plain"},"key":"denoms","value":""},{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## SendEnabled + + + +SendEnabled queries for SendEnabled entries. + +
Query Parameters
+ +A successful response. + +
Schema
    send_enabled object[]
  • Array [
  • ]
  • pagination object
    + +pagination defines the pagination in the response. This field is only +populated if the denoms field in the request is empty. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/send-sequence.api.mdx b/docs/greenfield-api/send-sequence.api.mdx new file mode 100644 index 000000000..01888ee10 --- /dev/null +++ b/docs/greenfield-api/send-sequence.api.mdx @@ -0,0 +1,38 @@ +--- +id: send-sequence +title: "SendSequence" +description: "SendSequence returns the send sequence of the channel" +sidebar_label: "SendSequence" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"SendSequence","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"sequence":{"type":"string","format":"uint64","title":"sequence of the cross chain package"}},"description":"QuerySendSequenceResponse is the response type for the Query/SendSequence RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"dest_chain_id","description":"destination chain id.","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"channel_id","description":"channel id of the cross chain package.","in":"query","required":false,"schema":{"type":"integer","format":"int64"}}],"tags":["crosschain"],"description":"SendSequence returns the send sequence of the channel","method":"get","path":"/cosmos/crosschain/v1/send_sequence","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"SendSequence","description":{"content":"SendSequence returns the send sequence of the channel","type":"text/plain"},"url":{"path":["cosmos","crosschain","v1","send_sequence"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"destination chain id.","type":"text/plain"},"key":"dest_chain_id","value":""},{"disabled":false,"description":{"content":"channel id of the cross chain package.","type":"text/plain"},"key":"channel_id","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## SendSequence + + + +SendSequence returns the send sequence of the channel + +
Query Parameters
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/sidebar.js b/docs/greenfield-api/sidebar.js new file mode 100644 index 000000000..c2e4ae2c3 --- /dev/null +++ b/docs/greenfield-api/sidebar.js @@ -0,0 +1 @@ +module.exports = [{"type":"doc","id":"greenfield-api/greenfield-grpc-gateway-docs"},{"type":"category","label":"bridge","items":[{"type":"doc","id":"greenfield-api/bridge-params","label":"BridgeParams","className":"api-method get"}]},{"type":"category","label":"challenge","items":[{"type":"doc","id":"greenfield-api/attested-challenge","label":"AttestedChallenge","className":"api-method get"},{"type":"doc","id":"greenfield-api/inturn-attestation-submitter","label":"InturnAttestationSubmitter","className":"api-method get"},{"type":"doc","id":"greenfield-api/latest-attested-challenges","label":"LatestAttestedChallenges","className":"api-method get"},{"type":"doc","id":"greenfield-api/challenge-params","label":"ChallengeParams","className":"api-method get"}]},{"type":"category","label":"payment","items":[{"type":"doc","id":"greenfield-api/auto-settle-records","label":"AutoSettleRecords","className":"api-method get"},{"type":"doc","id":"greenfield-api/delayed-withdrawal","label":"DelayedWithdrawal","className":"api-method get"},{"type":"doc","id":"greenfield-api/dynamic-balance","label":"DynamicBalance","className":"api-method get"},{"type":"doc","id":"greenfield-api/out-flows","label":"OutFlows","className":"api-method get"},{"type":"doc","id":"greenfield-api/payment-params","label":"PaymentParams","className":"api-method get"},{"type":"doc","id":"greenfield-api/params-by-timestamp","label":"ParamsByTimestamp","className":"api-method get"},{"type":"doc","id":"greenfield-api/payment-account","label":"PaymentAccount","className":"api-method get"},{"type":"doc","id":"greenfield-api/payment-account-count","label":"PaymentAccountCount","className":"api-method get"},{"type":"doc","id":"greenfield-api/payment-account-counts","label":"PaymentAccountCounts","className":"api-method get"},{"type":"doc","id":"greenfield-api/payment-accounts","label":"PaymentAccounts","className":"api-method get"},{"type":"doc","id":"greenfield-api/payment-accounts-by-owner","label":"PaymentAccountsByOwner","className":"api-method get"},{"type":"doc","id":"greenfield-api/stream-record","label":"StreamRecord","className":"api-method get"},{"type":"doc","id":"greenfield-api/stream-records","label":"StreamRecords","className":"api-method get"}]},{"type":"category","label":"sp","items":[{"type":"doc","id":"greenfield-api/query-global-sp-store-price-by-time","label":"QueryGlobalSpStorePriceByTime","className":"api-method get"},{"type":"doc","id":"greenfield-api/sp-params","label":"SpParams","className":"api-method get"},{"type":"doc","id":"greenfield-api/query-sp-storage-price","label":"QuerySpStoragePrice","className":"api-method get"},{"type":"doc","id":"greenfield-api/storage-provider-by-operator-address","label":"StorageProviderByOperatorAddress","className":"api-method get"},{"type":"doc","id":"greenfield-api/storage-provider-maintenance-records-by-operator-address","label":"StorageProviderMaintenanceRecordsByOperatorAddress","className":"api-method get"},{"type":"doc","id":"greenfield-api/storage-provider","label":"StorageProvider","className":"api-method get"},{"type":"doc","id":"greenfield-api/storage-providers","label":"StorageProviders","className":"api-method get"}]},{"type":"category","label":"storage","items":[{"type":"doc","id":"greenfield-api/query-group-members-exist","label":"QueryGroupMembersExist","className":"api-method get"},{"type":"doc","id":"greenfield-api/query-groups-exist","label":"QueryGroupsExist","className":"api-method get"},{"type":"doc","id":"greenfield-api/query-groups-exist-by-id","label":"QueryGroupsExistById","className":"api-method get"},{"type":"doc","id":"greenfield-api/head-bucket","label":"HeadBucket","className":"api-method get"},{"type":"doc","id":"greenfield-api/head-bucket-by-id","label":"HeadBucketById","className":"api-method get"},{"type":"doc","id":"greenfield-api/head-bucket-extra","label":"HeadBucketExtra","className":"api-method get"},{"type":"doc","id":"greenfield-api/head-bucket-nft","label":"HeadBucketNFT","className":"api-method get"},{"type":"doc","id":"greenfield-api/head-group","label":"HeadGroup","className":"api-method get"},{"type":"doc","id":"greenfield-api/head-group-member","label":"HeadGroupMember","className":"api-method get"},{"type":"doc","id":"greenfield-api/head-group-nft","label":"HeadGroupNFT","className":"api-method get"},{"type":"doc","id":"greenfield-api/head-object","label":"HeadObject","className":"api-method get"},{"type":"doc","id":"greenfield-api/head-object-by-id","label":"HeadObjectById","className":"api-method get"},{"type":"doc","id":"greenfield-api/head-object-nft","label":"HeadObjectNFT","className":"api-method get"},{"type":"doc","id":"greenfield-api/query-is-price-changed","label":"QueryIsPriceChanged","className":"api-method get"},{"type":"doc","id":"greenfield-api/list-buckets","label":"ListBuckets","className":"api-method get"},{"type":"doc","id":"greenfield-api/list-groups","label":"ListGroups","className":"api-method get"},{"type":"doc","id":"greenfield-api/list-objects","label":"ListObjects","className":"api-method get"},{"type":"doc","id":"greenfield-api/list-objects-by-bucket-id","label":"ListObjectsByBucketId","className":"api-method get"},{"type":"doc","id":"greenfield-api/query-lock-fee","label":"QueryLockFee","className":"api-method get"},{"type":"doc","id":"greenfield-api/storage-params","label":"StorageParams","className":"api-method get"},{"type":"doc","id":"greenfield-api/query-params-by-timestamp","label":"QueryParamsByTimestamp","className":"api-method get"},{"type":"doc","id":"greenfield-api/query-policy-by-id","label":"QueryPolicyById","className":"api-method get"},{"type":"doc","id":"greenfield-api/query-policy-for-account","label":"QueryPolicyForAccount","className":"api-method get"},{"type":"doc","id":"greenfield-api/query-policy-for-group","label":"QueryPolicyForGroup","className":"api-method get"},{"type":"doc","id":"greenfield-api/query-quota-update-time","label":"QueryQuotaUpdateTime","className":"api-method get"},{"type":"doc","id":"greenfield-api/verify-permission","label":"VerifyPermission","className":"api-method get"}]},{"type":"category","label":"virtualgroup","items":[{"type":"doc","id":"greenfield-api/available-global-virtual-group-families","label":"AvailableGlobalVirtualGroupFamilies","className":"api-method get"},{"type":"doc","id":"greenfield-api/global-virtual-group","label":"GlobalVirtualGroup","className":"api-method get"},{"type":"doc","id":"greenfield-api/global-virtual-group-by-family-id","label":"GlobalVirtualGroupByFamilyID","className":"api-method get"},{"type":"doc","id":"greenfield-api/global-virtual-group-families","label":"GlobalVirtualGroupFamilies","className":"api-method get"},{"type":"doc","id":"greenfield-api/global-virtual-group-family","label":"GlobalVirtualGroupFamily","className":"api-method get"},{"type":"doc","id":"greenfield-api/virtual-group-params","label":"VirtualGroupParams","className":"api-method get"}]},{"type":"category","label":"auth","items":[{"type":"doc","id":"greenfield-api/account-info","label":"AccountInfo","className":"api-method get"},{"type":"doc","id":"greenfield-api/accounts","label":"Accounts","className":"api-method get"},{"type":"doc","id":"greenfield-api/account","label":"Account","className":"api-method get"},{"type":"doc","id":"greenfield-api/account-address-by-id","label":"AccountAddressByID","className":"api-method get"},{"type":"doc","id":"greenfield-api/module-accounts","label":"ModuleAccounts","className":"api-method get"},{"type":"doc","id":"greenfield-api/module-account-by-name","label":"ModuleAccountByName","className":"api-method get"},{"type":"doc","id":"greenfield-api/auth-params","label":"AuthParams","className":"api-method get"}]},{"type":"category","label":"authz","items":[{"type":"doc","id":"greenfield-api/grants","label":"Grants","className":"api-method get"},{"type":"doc","id":"greenfield-api/grantee-grants","label":"GranteeGrants","className":"api-method get"},{"type":"doc","id":"greenfield-api/granter-grants","label":"GranterGrants","className":"api-method get"}]},{"type":"category","label":"bank","items":[{"type":"doc","id":"greenfield-api/all-balances","label":"AllBalances","className":"api-method get"},{"type":"doc","id":"greenfield-api/balance","label":"Balance","className":"api-method get"},{"type":"doc","id":"greenfield-api/denom-owners","label":"DenomOwners","className":"api-method get"},{"type":"doc","id":"greenfield-api/denoms-metadata","label":"DenomsMetadata","className":"api-method get"},{"type":"doc","id":"greenfield-api/denom-metadata","label":"DenomMetadata","className":"api-method get"},{"type":"doc","id":"greenfield-api/bank-params","label":"BankParams","className":"api-method get"},{"type":"doc","id":"greenfield-api/send-enabled","label":"SendEnabled","className":"api-method get"},{"type":"doc","id":"greenfield-api/spendable-balances","label":"SpendableBalances","className":"api-method get"},{"type":"doc","id":"greenfield-api/spendable-balance-by-denom","label":"SpendableBalanceByDenom","className":"api-method get"},{"type":"doc","id":"greenfield-api/total-supply","label":"TotalSupply","className":"api-method get"},{"type":"doc","id":"greenfield-api/supply-of","label":"SupplyOf","className":"api-method get"}]},{"type":"category","label":"base","items":[{"type":"doc","id":"greenfield-api/abci-query","label":"ABCIQuery","className":"api-method get"},{"type":"doc","id":"greenfield-api/get-latest-block","label":"GetLatestBlock","className":"api-method get"},{"type":"doc","id":"greenfield-api/get-block-by-height","label":"GetBlockByHeight","className":"api-method get"},{"type":"doc","id":"greenfield-api/get-node-info","label":"GetNodeInfo","className":"api-method get"},{"type":"doc","id":"greenfield-api/get-syncing","label":"GetSyncing","className":"api-method get"},{"type":"doc","id":"greenfield-api/get-latest-validator-set","label":"GetLatestValidatorSet","className":"api-method get"},{"type":"doc","id":"greenfield-api/get-validator-set-by-height","label":"GetValidatorSetByHeight","className":"api-method get"}]},{"type":"category","label":"crosschain","items":[{"type":"doc","id":"greenfield-api/cross-chain-package","label":"CrossChainPackage","className":"api-method get"},{"type":"doc","id":"greenfield-api/crosschain-params","label":"CrosschainParams","className":"api-method get"},{"type":"doc","id":"greenfield-api/receive-sequence","label":"ReceiveSequence","className":"api-method get"},{"type":"doc","id":"greenfield-api/send-sequence","label":"SendSequence","className":"api-method get"}]},{"type":"category","label":"distribution","items":[{"type":"doc","id":"greenfield-api/community-pool","label":"CommunityPool","className":"api-method get"},{"type":"doc","id":"greenfield-api/delegation-total-rewards","label":"DelegationTotalRewards","className":"api-method get"},{"type":"doc","id":"greenfield-api/delegation-rewards","label":"DelegationRewards","className":"api-method get"},{"type":"doc","id":"greenfield-api/delegator-validators","label":"DelegatorValidators","className":"api-method get"},{"type":"doc","id":"greenfield-api/delegator-withdraw-address","label":"DelegatorWithdrawAddress","className":"api-method get"},{"type":"doc","id":"greenfield-api/distribution-params","label":"DistributionParams","className":"api-method get"},{"type":"doc","id":"greenfield-api/validator-distribution-info","label":"ValidatorDistributionInfo","className":"api-method get"},{"type":"doc","id":"greenfield-api/validator-commission","label":"ValidatorCommission","className":"api-method get"},{"type":"doc","id":"greenfield-api/validator-outstanding-rewards","label":"ValidatorOutstandingRewards","className":"api-method get"},{"type":"doc","id":"greenfield-api/validator-slashes","label":"ValidatorSlashes","className":"api-method get"}]},{"type":"category","label":"evidence","items":[{"type":"doc","id":"greenfield-api/all-evidence","label":"AllEvidence","className":"api-method get"},{"type":"doc","id":"greenfield-api/evidence","label":"Evidence","className":"api-method get"}]},{"type":"category","label":"feegrant","items":[{"type":"doc","id":"greenfield-api/allowance","label":"Allowance","className":"api-method get"},{"type":"doc","id":"greenfield-api/allowances","label":"Allowances","className":"api-method get"},{"type":"doc","id":"greenfield-api/allowances-by-granter","label":"AllowancesByGranter","className":"api-method get"}]},{"type":"category","label":"gashub","items":[{"type":"doc","id":"greenfield-api/msg-gas-params","label":"MsgGasParams","className":"api-method get"},{"type":"doc","id":"greenfield-api/gashub-params","label":"GashubParams","className":"api-method get"}]},{"type":"category","label":"gov","items":[{"type":"doc","id":"greenfield-api/gov-v-1-params","label":"GovV1Params","className":"api-method get"},{"type":"doc","id":"greenfield-api/gov-v-1-proposal","label":"GovV1Proposal","className":"api-method get"},{"type":"doc","id":"greenfield-api/gov-v-1-proposal","label":"GovV1Proposal","className":"api-method get"},{"type":"doc","id":"greenfield-api/gov-v-1-deposit","label":"GovV1Deposit","className":"api-method get"},{"type":"doc","id":"greenfield-api/gov-v-1-deposit","label":"GovV1Deposit","className":"api-method get"},{"type":"doc","id":"greenfield-api/gov-v-1-tally-result","label":"GovV1TallyResult","className":"api-method get"},{"type":"doc","id":"greenfield-api/gov-v-1-votes","label":"GovV1Votes","className":"api-method get"},{"type":"doc","id":"greenfield-api/gov-v-1-vote","label":"GovV1Vote","className":"api-method get"}]},{"type":"category","label":"mint","items":[{"type":"doc","id":"greenfield-api/annual-provisions","label":"AnnualProvisions","className":"api-method get"},{"type":"doc","id":"greenfield-api/inflation","label":"Inflation","className":"api-method get"},{"type":"doc","id":"greenfield-api/mint-params","label":"MintParams","className":"api-method get"}]},{"type":"category","label":"oracle","items":[{"type":"doc","id":"greenfield-api/inturn-relayer","label":"InturnRelayer","className":"api-method get"},{"type":"doc","id":"greenfield-api/oracle-params","label":"OracleParams","className":"api-method get"}]},{"type":"category","label":"slashing","items":[{"type":"doc","id":"greenfield-api/slashing-params","label":"SlashingParams","className":"api-method get"},{"type":"doc","id":"greenfield-api/signing-infos","label":"SigningInfos","className":"api-method get"},{"type":"doc","id":"greenfield-api/signing-info","label":"SigningInfo","className":"api-method get"}]},{"type":"category","label":"staking","items":[{"type":"doc","id":"greenfield-api/delegator-delegations","label":"DelegatorDelegations","className":"api-method get"},{"type":"doc","id":"greenfield-api/redelegations","label":"Redelegations","className":"api-method get"},{"type":"doc","id":"greenfield-api/delegator-unbonding-delegations","label":"DelegatorUnbondingDelegations","className":"api-method get"},{"type":"doc","id":"greenfield-api/staking-delegator-validators","label":"StakingDelegatorValidators","className":"api-method get"},{"type":"doc","id":"greenfield-api/delegator-validator","label":"DelegatorValidator","className":"api-method get"},{"type":"doc","id":"greenfield-api/historical-info","label":"HistoricalInfo","className":"api-method get"},{"type":"doc","id":"greenfield-api/staking-params","label":"StakingParams","className":"api-method get"},{"type":"doc","id":"greenfield-api/pool","label":"Pool","className":"api-method get"},{"type":"doc","id":"greenfield-api/validators","label":"Validators","className":"api-method get"},{"type":"doc","id":"greenfield-api/validator","label":"Validator","className":"api-method get"},{"type":"doc","id":"greenfield-api/validator-delegations","label":"ValidatorDelegations","className":"api-method get"},{"type":"doc","id":"greenfield-api/delegation","label":"Delegation","className":"api-method get"},{"type":"doc","id":"greenfield-api/unbonding-delegation","label":"UnbondingDelegation","className":"api-method get"},{"type":"doc","id":"greenfield-api/validator-unbonding-delegations","label":"ValidatorUnbondingDelegations","className":"api-method get"}]},{"type":"category","label":"tx","items":[{"type":"doc","id":"greenfield-api/tx-decode","label":"TxDecode","className":"api-method post"},{"type":"doc","id":"greenfield-api/tx-decode-amino","label":"TxDecodeAmino","className":"api-method post"},{"type":"doc","id":"greenfield-api/tx-encode","label":"TxEncode","className":"api-method post"},{"type":"doc","id":"greenfield-api/tx-encode-amino","label":"TxEncodeAmino","className":"api-method post"},{"type":"doc","id":"greenfield-api/simulate","label":"Simulate","className":"api-method post"},{"type":"doc","id":"greenfield-api/get-txs-event","label":"GetTxsEvent","className":"api-method get"},{"type":"doc","id":"greenfield-api/broadcast-tx","label":"BroadcastTx","className":"api-method post"},{"type":"doc","id":"greenfield-api/get-block-with-txs","label":"GetBlockWithTxs","className":"api-method get"},{"type":"doc","id":"greenfield-api/get-tx","label":"GetTx","className":"api-method get"}]},{"type":"category","label":"upgrade","items":[{"type":"doc","id":"greenfield-api/applied-plan","label":"AppliedPlan","className":"api-method get"},{"type":"doc","id":"greenfield-api/current-plan","label":"CurrentPlan","className":"api-method get"},{"type":"doc","id":"greenfield-api/module-versions","label":"ModuleVersions","className":"api-method get"},{"type":"doc","id":"greenfield-api/upgraded-consensus-state","label":"UpgradedConsensusState","className":"api-method get"}]}]; \ No newline at end of file diff --git a/docs/greenfield-api/signing-info.api.mdx b/docs/greenfield-api/signing-info.api.mdx new file mode 100644 index 000000000..4cc3a3cf4 --- /dev/null +++ b/docs/greenfield-api/signing-info.api.mdx @@ -0,0 +1,43 @@ +--- +id: signing-info +title: "SigningInfo" +description: "SigningInfo queries the signing info of given cons address" +sidebar_label: "SigningInfo" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"SigningInfo","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"val_signing_info":{"type":"object","properties":{"address":{"type":"string"},"start_height":{"type":"string","format":"int64","title":"Height at which validator was first a candidate OR was unjailed"},"index_offset":{"type":"string","format":"int64","description":"Index which is incremented each time the validator was a bonded\nin a block and may have signed a precommit or not. This in conjunction with the\n`SignedBlocksWindow` param determines the index in the `MissedBlocksBitArray`."},"jailed_until":{"type":"string","format":"date-time","description":"Timestamp until which the validator is jailed due to liveness downtime."},"tombstoned":{"type":"boolean","description":"Whether or not a validator has been tombstoned (killed out of validator set). It is set\nonce the validator commits an equivocation or for any other configured misbehiavor."},"missed_blocks_counter":{"type":"string","format":"int64","description":"A counter kept to avoid unnecessary array reads.\nNote that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`."}},"description":"ValidatorSigningInfo defines a validator's signing info for monitoring their\nliveness activity.","title":"val_signing_info is the signing info of requested val cons address"}},"title":"QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC\nmethod"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"cons_address","description":"cons_address is the address to query signing info of","in":"path","required":true,"schema":{"type":"string"}}],"tags":["slashing"],"description":"SigningInfo queries the signing info of given cons address","method":"get","path":"/cosmos/slashing/v1beta1/signing_infos/{cons_address}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"SigningInfo","description":{"content":"SigningInfo queries the signing info of given cons address","type":"text/plain"},"url":{"path":["cosmos","slashing","v1beta1","signing_infos",":cons_address"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) cons_address is the address to query signing info of","type":"text/plain"},"type":"any","value":"","key":"cons_address"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## SigningInfo + + + +SigningInfo queries the signing info of given cons address + +
Path Parameters
+ +A successful response. + +
Schema
    val_signing_info object
    + +ValidatorSigningInfo defines a validator's signing info for monitoring their +liveness activity. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/signing-infos.api.mdx b/docs/greenfield-api/signing-infos.api.mdx new file mode 100644 index 000000000..1f409aaee --- /dev/null +++ b/docs/greenfield-api/signing-infos.api.mdx @@ -0,0 +1,48 @@ +--- +id: signing-infos +title: "SigningInfos" +description: "SigningInfos queries signing info of all validators" +sidebar_label: "SigningInfos" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"SigningInfos","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"info":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"start_height":{"type":"string","format":"int64","title":"Height at which validator was first a candidate OR was unjailed"},"index_offset":{"type":"string","format":"int64","description":"Index which is incremented each time the validator was a bonded\nin a block and may have signed a precommit or not. This in conjunction with the\n`SignedBlocksWindow` param determines the index in the `MissedBlocksBitArray`."},"jailed_until":{"type":"string","format":"date-time","description":"Timestamp until which the validator is jailed due to liveness downtime."},"tombstoned":{"type":"boolean","description":"Whether or not a validator has been tombstoned (killed out of validator set). It is set\nonce the validator commits an equivocation or for any other configured misbehiavor."},"missed_blocks_counter":{"type":"string","format":"int64","description":"A counter kept to avoid unnecessary array reads.\nNote that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`."}},"description":"ValidatorSigningInfo defines a validator's signing info for monitoring their\nliveness activity."},"title":"info is the signing info of all validators"},"pagination":{"type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}},"description":"PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }"}},"title":"QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC\nmethod"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["slashing"],"description":"SigningInfos queries signing info of all validators","method":"get","path":"/cosmos/slashing/v1beta1/signing_infos","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"SigningInfos","description":{"content":"SigningInfos queries signing info of all validators","type":"text/plain"},"url":{"path":["cosmos","slashing","v1beta1","signing_infos"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## SigningInfos + + + +SigningInfos queries signing info of all validators + +
Query Parameters
+ +A successful response. + +
Schema
    info object[]
  • Array [
  • ]
  • pagination object
    + +PageResponse is to be embedded in gRPC response messages where the +corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/simulate.api.mdx b/docs/greenfield-api/simulate.api.mdx new file mode 100644 index 000000000..34db1a61d --- /dev/null +++ b/docs/greenfield-api/simulate.api.mdx @@ -0,0 +1,203 @@ +--- +id: simulate +title: "Simulate" +description: "Simulate simulates executing a transaction for estimating gas usage." +sidebar_label: "Simulate" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"Simulate","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"gas_info":{"description":"gas_info is the information about gas used in the simulation.","type":"object","properties":{"gas_wanted":{"type":"string","format":"uint64","description":"GasWanted is the maximum units of work we allow this tx to perform."},"gas_used":{"type":"string","format":"uint64","description":"GasUsed is the amount of gas actually consumed."},"min_gas_price":{"type":"string","description":"MinGasPrice are the min gas price."},"rw_used":{"type":"string","format":"uint64","description":"RWUsed is the amount of r/w actually consumed."}}},"result":{"description":"result is the result of the simulation.","type":"object","properties":{"data":{"type":"string","format":"byte","description":"Data is any data returned from message or handler execution. It MUST be\nlength prefixed in order to separate data from multiple message executions.\nDeprecated. This field is still populated, but prefer msg_response instead\nbecause it also contains the Msg response typeURL."},"log":{"type":"string","description":"Log contains the log information from message or handler execution."},"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"}},"description":"EventAttribute is a single key-value pair, associated with an event."}}},"description":"Event allows application developers to attach additional information to\nResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx.\nLater, transactions may be queried using these events."},"description":"Events contains a slice of Event objects that were emitted during message\nor handler execution."},"msg_responses":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"description":"msg_responses contains the Msg handler responses type packed in Anys.\n\nSince: cosmos-sdk 0.46"}}}},"description":"SimulateResponse is the response type for the\nService.SimulateRPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tx":{"description":"tx is the transaction to simulate.\nDeprecated. Send raw tx bytes instead.","type":"object","properties":{"body":{"title":"body is the processable content of the transaction","type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"description":"messages is a list of messages to be executed. The required signers of\nthose messages define the number and order of elements in AuthInfo's\nsigner_infos and Tx's signatures. Each required signer address is added to\nthe list only the first time it occurs.\nBy convention, the first required signer (usually from the first message)\nis referred to as the primary signer and pays the fee for the whole\ntransaction."},"memo":{"type":"string","description":"memo is any arbitrary note/comment to be added to the transaction.\nWARNING: in clients, any publicly exposed text should not be called memo,\nbut should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122)."},"timeout_height":{"type":"string","format":"uint64","title":"timeout is the block height after which this transaction will not\nbe processed by the chain"},"extension_options":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"title":"extension_options are arbitrary options that can be added by chains\nwhen the default options are not sufficient. If any of these are present\nand can't be handled, the transaction will be rejected"},"non_critical_extension_options":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"title":"extension_options are arbitrary options that can be added by chains\nwhen the default options are not sufficient. If any of these are present\nand can't be handled, they will be ignored"}},"description":"TxBody is the body of a transaction that all signers sign over."},"auth_info":{"title":"auth_info is the authorization related content of the transaction,\nspecifically signers, signer modes and fee","type":"object","properties":{"signer_infos":{"type":"array","items":{"type":"object","properties":{"public_key":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"mode_info":{"title":"mode_info describes the signing mode of the signer and is a nested\nstructure to support nested multisig pubkey's","type":"object","properties":{"single":{"title":"single represents a single signer","type":"object","properties":{"mode":{"title":"mode is the signing mode of the single signer","type":"string","enum":["SIGN_MODE_UNSPECIFIED","SIGN_MODE_DIRECT","SIGN_MODE_TEXTUAL","SIGN_MODE_DIRECT_AUX","SIGN_MODE_LEGACY_AMINO_JSON","SIGN_MODE_EIP_191","SIGN_MODE_EIP_712"],"default":"SIGN_MODE_UNSPECIFIED","description":"SignMode represents a signing mode with its own security guarantees.\n\nThis enum should be considered a registry of all known sign modes\nin the Cosmos ecosystem. Apps are not expected to support all known\nsign modes. Apps that would like to support custom sign modes are\nencouraged to open a small PR against this file to add a new case\nto this SignMode enum describing their sign mode so that different\napps have a consistent version of this enum.\n\n - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be\nrejected.\n - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is\nverified with raw bytes from Tx.\n - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some\nhuman-readable textual representation on top of the binary representation\nfrom SIGN_MODE_DIRECT. It is currently not supported.\n - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses\nSignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not\nrequire signers signing over other signers' `signer_info`. It also allows\nfor adding Tips in transactions.\n\nSince: cosmos-sdk 0.46\n - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses\nAmino JSON and will be removed in the future.\n - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos\nSDK. Ref: https://eips.ethereum.org/EIPS/eip-191\n\nCurrently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant,\nbut is not implemented on the SDK by default. To enable EIP-191, you need\nto pass a custom `TxConfig` that has an implementation of\n`SignModeHandler` for EIP-191. The SDK may decide to fully support\nEIP-191 in the future.\n\nSince: cosmos-sdk 0.45.2\n - SIGN_MODE_EIP_712: SIGN_MODE_EIP_712 specifies the sign mode for EIP 712 signing on the Cosmos\nSDK. Ref: https://eips.ethereum.org/EIPS/eip-712"}}},"multi":{"title":"multi represents a nested multisig signer","type":"object","properties":{"bitarray":{"title":"bitarray specifies which keys within the multisig are signing","type":"object","properties":{"extra_bits_stored":{"type":"integer","format":"int64"},"elems":{"type":"string","format":"byte"}},"description":"CompactBitArray is an implementation of a space efficient bit array.\nThis is used to ensure that the encoded data takes up a minimal amount of\nspace after proto encoding.\nThis is not thread safe, and is not intended for concurrent usage."},"mode_infos":{"type":"array","items":{"type":"object","properties":"circular()","description":"ModeInfo describes the signing mode of a single or nested multisig signer."},"title":"mode_infos is the corresponding modes of the signers of the multisig\nwhich could include nested multisig public keys"}}}},"description":"ModeInfo describes the signing mode of a single or nested multisig signer."},"sequence":{"type":"string","format":"uint64","description":"sequence is the sequence of the account, which describes the\nnumber of committed transactions signed by a given address. It is used to\nprevent replay attacks."}},"description":"SignerInfo describes the public key and signing mode of a single top-level\nsigner."},"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"},"gas_limit":{"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 specified account must pay the fees.\nthe payer must be a tx signer (and thus have signed this field in AuthInfo).\nsetting this field does *not* change 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 field) requests that a fee grant be used\nto pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does\nnot 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.\n\nSince: cosmos-sdk 0.46","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."},"signatures":{"type":"array","items":{"type":"string","format":"byte"},"description":"signatures is a list of signatures that matches the length and order of\nAuthInfo's signer_infos to allow connecting signature meta information like\npublic key and signing mode by position."}}},"tx_bytes":{"type":"string","format":"byte","description":"tx_bytes is the raw transaction.\n\nSince: cosmos-sdk 0.43"}},"description":"SimulateRequest is the request type for the Service.Simulate\nRPC method."}}},"required":true},"tags":["tx"],"description":"Simulate simulates executing a transaction for estimating gas usage.","method":"post","path":"/cosmos/tx/v1beta1/simulate","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"jsonRequestBodyExample":{"tx":{"body":{"messages":[{"type_url":"string","value":"string"}],"memo":"string","timeout_height":"string","extension_options":[{"type_url":"string","value":"string"}],"non_critical_extension_options":[{"type_url":"string","value":"string"}]},"auth_info":{"signer_infos":[{"public_key":{"type_url":"string","value":"string"},"mode_info":{"single":{"mode":"SIGN_MODE_UNSPECIFIED"},"multi":{"bitarray":{"extra_bits_stored":0,"elems":"string"},"mode_infos":[{}]}},"sequence":"string"}],"fee":{"amount":[{"denom":"string","amount":"string"}],"gas_limit":"string","payer":"string","granter":"string"},"tip":{"amount":[{"denom":"string","amount":"string"}],"tipper":"string"}},"signatures":["string"]},"tx_bytes":"string"},"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"Simulate","description":{"content":"Simulate simulates executing a transaction for estimating gas usage.","type":"text/plain"},"url":{"path":["cosmos","tx","v1beta1","simulate"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"*/*"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "post api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Simulate + + + +Simulate simulates executing a transaction for estimating gas usage. + +
Request Body required
    tx object
    + +tx is the transaction to simulate. +Deprecated. Send raw tx bytes instead. + +
    body object
    + +TxBody is the body of a transaction that all signers sign over. + +
    messages object[]
    + +messages is a list of messages to be executed. The required signers of +those messages define the number and order of elements in AuthInfo's +signer_infos and Tx's signatures. Each required signer address is added to +the list only the first time it occurs. +By convention, the first required signer (usually from the first message) +is referred to as the primary signer and pays the fee for the whole +transaction. + +
  • Array [
  • ]
  • extension_options object[]
  • Array [
  • ]
  • non_critical_extension_options object[]
  • Array [
  • ]
  • auth_info object
    + +AuthInfo describes the fee and signer modes that are used to sign a +transaction. + +
    signer_infos object[]
    + +signer_infos defines the signing modes for the required signers. The number +and order of elements must match the required signers from TxBody's +messages. The first element is the primary signer and the one which pays +the fee. + +
  • Array [
  • public_key object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
    mode_info object
    + +ModeInfo describes the signing mode of a single or nested multisig signer. + +
    single object
    multi object
    bitarray object
    + +CompactBitArray is an implementation of a space efficient bit array. +This is used to ensure that the encoded data takes up a minimal amount of +space after proto encoding. +This is not thread safe, and is not intended for concurrent usage. + +
    mode_infos object[]
  • Array [
  • ]
  • ]
  • fee object
    + +Fee is the fee and gas limit for the transaction. The first signer is the +primary signer and the one which pays the fee. The fee can be calculated +based on the cost of evaluating the body and doing signature verification +of the signers. This can be estimated via simulation. + +
    amount object[]
  • Array [
  • ]
  • tip object
    + +Tip is the optional tip used for transactions fees paid in another denom. + +This field is ignored if the chain didn't enable tips, i.e. didn't add the +`TipDecorator` in its posthandler. + +Since: cosmos-sdk 0.46 + +
    amount object[]
  • Array [
  • ]
+ +A successful response. + +
Schema
    gas_info object
    + +gas_info is the information about gas used in the simulation. + +
    result object
    + +result is the result of the simulation. + +
    events object[]
    + +Events contains a slice of Event objects that were emitted during message +or handler execution. + +
  • Array [
  • attributes object[]
  • Array [
  • ]
  • ]
  • msg_responses object[]
    + +msg_responses contains the Msg handler responses type packed in Anys. + +Since: cosmos-sdk 0.46 + +
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/slashing-params.api.mdx b/docs/greenfield-api/slashing-params.api.mdx new file mode 100644 index 000000000..402cdadbd --- /dev/null +++ b/docs/greenfield-api/slashing-params.api.mdx @@ -0,0 +1,42 @@ +--- +id: slashing-params +title: "SlashingParams" +description: "Params queries the parameters of slashing module" +sidebar_label: "SlashingParams" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"SlashingParams","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"params":{"type":"object","properties":{"signed_blocks_window":{"type":"string","format":"int64"},"min_signed_per_window":{"type":"string","format":"byte"},"downtime_jail_duration":{"type":"string"},"slash_fraction_double_sign":{"type":"string","format":"byte"},"slash_fraction_downtime":{"type":"string","format":"byte"}},"description":"Params represents the parameters used for by the slashing module."}},"title":"QueryParamsResponse is the response type for the Query/Params RPC method"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["slashing"],"description":"Params queries the parameters of slashing module","method":"get","path":"/cosmos/slashing/v1beta1/params","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"SlashingParams","description":{"content":"Params queries the parameters of slashing module","type":"text/plain"},"url":{"path":["cosmos","slashing","v1beta1","params"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## SlashingParams + + + +Params queries the parameters of slashing module + +
+ +A successful response. + +
Schema
    params object
    + +Params represents the parameters used for by the slashing module. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/sp-params.api.mdx b/docs/greenfield-api/sp-params.api.mdx new file mode 100644 index 000000000..dd0a22154 --- /dev/null +++ b/docs/greenfield-api/sp-params.api.mdx @@ -0,0 +1,42 @@ +--- +id: sp-params +title: "SpParams" +description: "Parameters queries the parameters of the module." +sidebar_label: "SpParams" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"SpParams","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","type":"object","properties":{"deposit_denom":{"type":"string","description":"deposit_denom defines the staking coin denomination."},"min_deposit":{"type":"string","description":"min_deposit defines the minimum deposit amount for storage providers."},"secondary_sp_store_price_ratio":{"type":"string","title":"the ratio of the store price of the secondary sp to the primary sp, the default value is 80%"},"num_of_historical_blocks_for_maintenance_records":{"type":"string","format":"int64","title":"previous blocks that be traced back to for maintenance_records"},"maintenance_duration_quota":{"type":"string","format":"int64","title":"the max duration that a SP can be in_maintenance within num_of_historical_blocks_for_maintenance_records"},"num_of_lockup_blocks_for_maintenance":{"type":"string","format":"int64","title":"the number of blocks to be wait for sp to be in maintenance mode again if already requested"},"update_global_price_interval":{"type":"string","format":"uint64","title":"the time interval to update global storage price, if it is not set then the price will be updated at the first block of each natural month"},"update_price_disallowed_days":{"type":"integer","format":"int64","title":"the days counting backwards from end of a month in which a sp cannot update its price"}}}},"description":"QueryParamsResponse is response type for the Query/Params RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["sp"],"description":"Parameters queries the parameters of the module.","method":"get","path":"/greenfield/sp/params","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"SpParams","description":{"content":"Parameters queries the parameters of the module.","type":"text/plain"},"url":{"path":["greenfield","sp","params"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## SpParams + + + +Parameters queries the parameters of the module. + +
+ +A successful response. + +
Schema
    params object
    + +params holds all the parameters of this module. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/spendable-balance-by-denom.api.mdx b/docs/greenfield-api/spendable-balance-by-denom.api.mdx new file mode 100644 index 000000000..3efa832e4 --- /dev/null +++ b/docs/greenfield-api/spendable-balance-by-denom.api.mdx @@ -0,0 +1,46 @@ +--- +id: spendable-balance-by-denom +title: "SpendableBalanceByDenom" +description: "SpendableBalanceByDenom queries the spendable balance of a single denom for" +sidebar_label: "SpendableBalanceByDenom" +hide_title: true +hide_table_of_contents: true +api: {"description":"SpendableBalanceByDenom queries the spendable balance of a single denom for\na single account.","operationId":"SpendableBalanceByDenom","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"balance":{"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."}},"description":"QuerySpendableBalanceByDenomResponse defines the gRPC response structure for\nquerying an account's spendable balance for a specific denom.\n\nSince: cosmos-sdk 0.47"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"address","description":"address is the address to query balances for.","in":"path","required":true,"schema":{"type":"string"}},{"name":"denom","description":"denom is the coin denom to query balances for.","in":"query","required":false,"schema":{"type":"string"}}],"tags":["bank"],"method":"get","path":"/cosmos/bank/v1beta1/spendable_balances/{address}/by_denom","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"SpendableBalanceByDenom","description":{"content":"SpendableBalanceByDenom queries the spendable balance of a single denom for\na single account.","type":"text/plain"},"url":{"path":["cosmos","bank","v1beta1","spendable_balances",":address","by_denom"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"denom is the coin denom to query balances for.","type":"text/plain"},"key":"denom","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) address is the address to query balances for.","type":"text/plain"},"type":"any","value":"","key":"address"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## SpendableBalanceByDenom + + + +SpendableBalanceByDenom queries the spendable balance of a single denom for +a single account. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    balance object
    + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method +signatures required by gogoproto. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/spendable-balances.api.mdx b/docs/greenfield-api/spendable-balances.api.mdx new file mode 100644 index 000000000..0837b7898 --- /dev/null +++ b/docs/greenfield-api/spendable-balances.api.mdx @@ -0,0 +1,47 @@ +--- +id: spendable-balances +title: "SpendableBalances" +description: "SpendableBalances queries the spendable balance of all coins for a single" +sidebar_label: "SpendableBalances" +hide_title: true +hide_table_of_contents: true +api: {"description":"SpendableBalances queries the spendable balance of all coins for a single\naccount.","operationId":"SpendableBalances","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"balances":{"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."},"description":"balances is the spendable balances of all the coins."},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QuerySpendableBalancesResponse defines the gRPC response structure for querying\nan account's spendable balances.\n\nSince: cosmos-sdk 0.46"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"address","description":"address is the address to query spendable balances for.","in":"path","required":true,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["bank"],"method":"get","path":"/cosmos/bank/v1beta1/spendable_balances/{address}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"SpendableBalances","description":{"content":"SpendableBalances queries the spendable balance of all coins for a single\naccount.","type":"text/plain"},"url":{"path":["cosmos","bank","v1beta1","spendable_balances",":address"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) address is the address to query spendable balances for.","type":"text/plain"},"type":"any","value":"","key":"address"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## SpendableBalances + + + +SpendableBalances queries the spendable balance of all coins for a single +account. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    balances object[]
    + +balances is the spendable balances of all the coins. + +
  • Array [
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/staking-delegator-validators.api.mdx b/docs/greenfield-api/staking-delegator-validators.api.mdx new file mode 100644 index 000000000..2f02663b1 --- /dev/null +++ b/docs/greenfield-api/staking-delegator-validators.api.mdx @@ -0,0 +1,147 @@ +--- +id: staking-delegator-validators +title: "StakingDelegatorValidators" +description: "DelegatorValidators queries all validators info for given delegator" +sidebar_label: "StakingDelegatorValidators" +hide_title: true +hide_table_of_contents: true +api: {"description":"DelegatorValidators queries all validators info for given delegator\naddress.","operationId":"StakingDelegatorValidators","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"validators":{"type":"array","items":{"type":"object","properties":{"operator_address":{"type":"string","description":"operator_address defines the address of the validator's operator; bech encoded in JSON."},"consensus_pubkey":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"jailed":{"type":"boolean","description":"jailed defined whether the validator has been jailed from bonded status or not."},"status":{"description":"status is the validator status (bonded/unbonding/unbonded).","type":"string","enum":["BOND_STATUS_UNSPECIFIED","BOND_STATUS_UNBONDED","BOND_STATUS_UNBONDING","BOND_STATUS_BONDED"],"default":"BOND_STATUS_UNSPECIFIED"},"tokens":{"type":"string","description":"tokens define the delegated tokens (incl. self-delegation)."},"delegator_shares":{"type":"string","description":"delegator_shares defines total shares issued to a validator's delegators."},"description":{"description":"description defines the description terms for the validator.","type":"object","properties":{"moniker":{"type":"string","description":"moniker defines a human-readable name for the validator."},"identity":{"type":"string","description":"identity defines an optional identity signature (ex. UPort or Keybase)."},"website":{"type":"string","description":"website defines an optional website link."},"security_contact":{"type":"string","description":"security_contact defines an optional email for security contact."},"details":{"type":"string","description":"details define other optional details."}}},"unbonding_height":{"type":"string","format":"int64","description":"unbonding_height defines, if unbonding, the height at which this validator has begun unbonding."},"unbonding_time":{"type":"string","format":"date-time","description":"unbonding_time defines, if unbonding, the min time for the validator to complete unbonding."},"commission":{"description":"commission defines the commission parameters.","type":"object","properties":{"commission_rates":{"description":"commission_rates defines the initial commission rates to be used for creating a validator.","type":"object","properties":{"rate":{"type":"string","description":"rate is the commission rate charged to delegators, as a fraction."},"max_rate":{"type":"string","description":"max_rate defines the maximum commission rate which validator can ever charge, as a fraction."},"max_change_rate":{"type":"string","description":"max_change_rate defines the maximum daily increase of the validator commission, as a fraction."}}},"update_time":{"type":"string","format":"date-time","description":"update_time is the last time the commission rate was changed."}}},"min_self_delegation":{"type":"string","description":"min_self_delegation is the validator's self declared minimum self delegation.\n\nSince: cosmos-sdk 0.46"},"unbonding_on_hold_ref_count":{"type":"string","format":"int64","title":"strictly positive if this validator's unbonding has been stopped by external modules"},"unbonding_ids":{"type":"array","items":{"type":"string","format":"uint64"},"title":"list of unbonding ids, each uniquely identifing an unbonding of this validator"},"self_del_address":{"type":"string","description":"self_del_address defines the address of the validator for self delegation."},"relayer_address":{"type":"string","description":"relayer_address defines the address of the validator's authorized relayer;."},"challenger_address":{"type":"string","description":"challenger_address defines the address of the validator's authorized challenger;."},"bls_key":{"type":"string","format":"byte","title":"bls_key defines the bls pubkey of the validator's authorized relayer/challenger/operator;"}},"description":"Validator defines a validator, together with the total amount of the\nValidator's bond shares and their exchange rate to coins. Slashing results in\na decrease in the exchange rate, allowing correct calculation of future\nundelegations without iterating over delegators. When coins are delegated to\nthis validator, the validator is credited with a delegation whose number of\nbond shares is based on the amount of coins delegated divided by the current\nexchange rate. Voting power can be calculated as total bonded shares\nmultiplied by exchange rate."},"description":"validators defines the validators' info of a delegator."},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryDelegatorValidatorsResponse is response type for the\nQuery/DelegatorValidators RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"delegator_addr","description":"delegator_addr defines the delegator address to query for.","in":"path","required":true,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["staking"],"method":"get","path":"/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"StakingDelegatorValidators","description":{"content":"DelegatorValidators queries all validators info for given delegator\naddress.","type":"text/plain"},"url":{"path":["cosmos","staking","v1beta1","delegators",":delegator_addr","validators"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) delegator_addr defines the delegator address to query for.","type":"text/plain"},"type":"any","value":"","key":"delegator_addr"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## StakingDelegatorValidators + + + +DelegatorValidators queries all validators info for given delegator +address. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    validators object[]
    + +validators defines the validators' info of a delegator. + +
  • Array [
  • consensus_pubkey object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
    description object
    + +description defines the description terms for the validator. + +
    commission object
    + +commission defines the commission parameters. + +
    commission_rates object
    + +commission_rates defines the initial commission rates to be used for creating a validator. + +
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/staking-params.api.mdx b/docs/greenfield-api/staking-params.api.mdx new file mode 100644 index 000000000..840a4bbe4 --- /dev/null +++ b/docs/greenfield-api/staking-params.api.mdx @@ -0,0 +1,42 @@ +--- +id: staking-params +title: "StakingParams" +description: "Parameters queries the staking parameters." +sidebar_label: "StakingParams" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"StakingParams","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","type":"object","properties":{"unbonding_time":{"type":"string","description":"unbonding_time is the time duration of unbonding."},"max_validators":{"type":"integer","format":"int64","description":"max_validators is the maximum number of validators."},"max_entries":{"type":"integer","format":"int64","description":"max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio)."},"historical_entries":{"type":"integer","format":"int64","description":"historical_entries is the number of historical entries to persist."},"bond_denom":{"type":"string","description":"bond_denom defines the bondable coin denomination."},"min_commission_rate":{"type":"string","title":"min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators"},"min_self_delegation":{"type":"string","description":"min_self_delegation defines the minimum self delegation for validators."}}}},"description":"QueryParamsResponse is response type for the Query/Params RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"tags":["staking"],"description":"Parameters queries the staking parameters.","method":"get","path":"/cosmos/staking/v1beta1/params","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"StakingParams","description":{"content":"Parameters queries the staking parameters.","type":"text/plain"},"url":{"path":["cosmos","staking","v1beta1","params"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## StakingParams + + + +Parameters queries the staking parameters. + +
+ +A successful response. + +
Schema
    params object
    + +params holds all the parameters of this module. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/storage-params.api.mdx b/docs/greenfield-api/storage-params.api.mdx new file mode 100644 index 000000000..412d43309 --- /dev/null +++ b/docs/greenfield-api/storage-params.api.mdx @@ -0,0 +1,46 @@ +--- +id: storage-params +title: "StorageParams" +description: "Parameters queries the parameters of the module." +sidebar_label: "StorageParams" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"StorageParams","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","type":"object","properties":{"versioned_params":{"type":"object","properties":{"max_segment_size":{"type":"string","format":"uint64","title":"max_segment_size is the maximum size of a segment. default: 16M"},"redundant_data_chunk_num":{"type":"integer","format":"int64","title":"redundant_data_check_num is the num of data chunks of EC redundancy algorithm"},"redundant_parity_chunk_num":{"type":"integer","format":"int64","title":"redundant_data_check_num is the num of parity chunks of EC redundancy algorithm"},"min_charge_size":{"type":"string","format":"uint64","title":"min_charge_size is the minimum charge size of the payload, objects smaller than this size will be charged as this size"}},"description":"VersionedParams defines the parameters for the storage module with multi version, each version store with different timestamp."},"max_payload_size":{"type":"string","format":"uint64","title":"max_payload_size is the maximum size of the payload, default: 2G"},"bsc_mirror_bucket_relayer_fee":{"type":"string","title":"relayer fee for the mirror bucket tx to bsc"},"bsc_mirror_bucket_ack_relayer_fee":{"type":"string","title":"relayer fee for the ACK or FAIL_ACK package of the mirror bucket tx to bsc"},"bsc_mirror_object_relayer_fee":{"type":"string","title":"relayer fee for the mirror object tx to bsc"},"bsc_mirror_object_ack_relayer_fee":{"type":"string","title":"Relayer fee for the ACK or FAIL_ACK package of the mirror object tx to bsc"},"bsc_mirror_group_relayer_fee":{"type":"string","title":"relayer fee for the mirror object tx to bsc"},"bsc_mirror_group_ack_relayer_fee":{"type":"string","title":"Relayer fee for the ACK or FAIL_ACK package of the mirror object tx to bsc"},"max_buckets_per_account":{"type":"integer","format":"int64","title":"The maximum number of buckets that can be created per account"},"discontinue_counting_window":{"type":"string","format":"uint64","title":"The window to count the discontinued objects or buckets"},"discontinue_object_max":{"type":"string","format":"uint64","title":"The max objects can be requested in a window"},"discontinue_bucket_max":{"type":"string","format":"uint64","title":"The max buckets can be requested in a window"},"discontinue_confirm_period":{"type":"string","format":"int64","title":"The object will be deleted after the confirm period in seconds"},"discontinue_deletion_max":{"type":"string","format":"uint64","title":"The max delete objects in each end block"},"stale_policy_cleanup_max":{"type":"string","format":"uint64","title":"The max number for deleting policy in each end block"},"min_quota_update_interval":{"type":"string","format":"uint64","title":"The min interval for making quota smaller in seconds"},"max_local_virtual_group_num_per_bucket":{"type":"integer","format":"int64","title":"the max number of local virtual group per bucket"},"op_mirror_bucket_relayer_fee":{"type":"string","title":"relayer fee for the mirror bucket tx to op chain"},"op_mirror_bucket_ack_relayer_fee":{"type":"string","title":"relayer fee for the ACK or FAIL_ACK package of the mirror bucket tx to op chain"},"op_mirror_object_relayer_fee":{"type":"string","title":"relayer fee for the mirror object tx to op chain"},"op_mirror_object_ack_relayer_fee":{"type":"string","title":"Relayer fee for the ACK or FAIL_ACK package of the mirror object tx to op chain"},"op_mirror_group_relayer_fee":{"type":"string","title":"relayer fee for the mirror object tx to op chain"},"op_mirror_group_ack_relayer_fee":{"type":"string","title":"Relayer fee for the ACK or FAIL_ACK package of the mirror object tx to op chain"}}}},"description":"QueryParamsResponse is response type for the Query/Params RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["storage"],"description":"Parameters queries the parameters of the module.","method":"get","path":"/greenfield/storage/params","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"StorageParams","description":{"content":"Parameters queries the parameters of the module.","type":"text/plain"},"url":{"path":["greenfield","storage","params"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## StorageParams + + + +Parameters queries the parameters of the module. + +
+ +A successful response. + +
Schema
    params object
    + +params holds all the parameters of this module. + +
    versioned_params object
    + +VersionedParams defines the parameters for the storage module with multi version, each version store with different timestamp. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/storage-provider-by-operator-address.api.mdx b/docs/greenfield-api/storage-provider-by-operator-address.api.mdx new file mode 100644 index 000000000..2855dd37f --- /dev/null +++ b/docs/greenfield-api/storage-provider-by-operator-address.api.mdx @@ -0,0 +1,42 @@ +--- +id: storage-provider-by-operator-address +title: "StorageProviderByOperatorAddress" +description: "Queries a StorageProvider by specify operator address." +sidebar_label: "StorageProviderByOperatorAddress" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"StorageProviderByOperatorAddress","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"storageProvider":{"type":"object","properties":{"id":{"type":"integer","format":"int64","title":"// id is the identifier of the storage provider, used in virtual group"},"operator_address":{"type":"string","description":"operator_address defines the account address of the storage provider's operator; It also is the unique index key of sp."},"funding_address":{"type":"string","description":"funding_address defines one of the storage provider's accounts which is used to deposit and reward."},"seal_address":{"type":"string","title":"seal_address defines one of the storage provider's accounts which is used to SealObject"},"approval_address":{"type":"string","title":"approval_address defines one of the storage provider's accounts which is used to approve use's createBucket/createObject request"},"gc_address":{"type":"string","description":"gc_address defines one of the storage provider's accounts which is used for gc purpose."},"maintenance_address":{"type":"string","title":"maintenance_address defines one of the storage provider's accounts which is used for testing while in maintenance mode"},"total_deposit":{"type":"string","description":"total_deposit defines the number of tokens deposited by this storage provider for staking."},"status":{"title":"status defines the current service status of this storage provider","type":"string","enum":["STATUS_IN_SERVICE","STATUS_IN_JAILED","STATUS_GRACEFUL_EXITING","STATUS_IN_MAINTENANCE"],"default":"STATUS_IN_SERVICE","description":"Status is the status of a storage provider."},"endpoint":{"type":"string","title":"endpoint define the storage provider's network service address"},"description":{"description":"description defines the description terms for the storage provider.","type":"object","properties":{"moniker":{"type":"string","title":"moniker defines a human-readable name for the storage provider"},"identity":{"type":"string","description":"identity defines an optional identity signature (ex. UPort or Keybase)."},"website":{"type":"string","description":"website defines an optional website link."},"security_contact":{"type":"string","description":"security_contact defines an optional email for security contact."},"details":{"type":"string","description":"details define other optional details."}}},"bls_key":{"type":"string","format":"byte","title":"bls_key defines the bls pub key of the Storage provider for sealing object and completing migration"}},"title":"StorageProvider defines the meta info of storage provider"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"operator_address","in":"query","required":false,"schema":{"type":"string"}}],"tags":["sp"],"description":"Queries a StorageProvider by specify operator address.","method":"get","path":"/greenfield/sp/storage_provider_by_operator_address","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"StorageProviderByOperatorAddress","description":{"content":"Queries a StorageProvider by specify operator address.","type":"text/plain"},"url":{"path":["greenfield","sp","storage_provider_by_operator_address"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"operator_address","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## StorageProviderByOperatorAddress + + + +Queries a StorageProvider by specify operator address. + +
Query Parameters
+ +A successful response. + +
Schema
    storageProvider object
    description object
    + +description defines the description terms for the storage provider. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/storage-provider-maintenance-records-by-operator-address.api.mdx b/docs/greenfield-api/storage-provider-maintenance-records-by-operator-address.api.mdx new file mode 100644 index 000000000..adaa9383e --- /dev/null +++ b/docs/greenfield-api/storage-provider-maintenance-records-by-operator-address.api.mdx @@ -0,0 +1,38 @@ +--- +id: storage-provider-maintenance-records-by-operator-address +title: "StorageProviderMaintenanceRecordsByOperatorAddress" +description: "Queries a StorageProvider by specify operator address." +sidebar_label: "StorageProviderMaintenanceRecordsByOperatorAddress" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"StorageProviderMaintenanceRecordsByOperatorAddress","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"height":{"type":"string","format":"int64","title":"block height that request to be in Maintenance mode"},"request_duration":{"type":"string","format":"int64","title":"request duration"},"actual_duration":{"type":"string","format":"int64","title":"actual duration"},"request_at":{"type":"string","format":"int64","title":"request timestamp"}},"title":"MaintenanceRecord is to keep track of every time a sp request to be in Maintenance mode"}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"operator_address","in":"query","required":false,"schema":{"type":"string"}}],"tags":["sp"],"description":"Queries a StorageProvider by specify operator address.","method":"get","path":"/greenfield/sp/storage_provider_maintenance_records_by_operator_address","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"StorageProviderMaintenanceRecordsByOperatorAddress","description":{"content":"Queries a StorageProvider by specify operator address.","type":"text/plain"},"url":{"path":["greenfield","sp","storage_provider_maintenance_records_by_operator_address"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"operator_address","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## StorageProviderMaintenanceRecordsByOperatorAddress + + + +Queries a StorageProvider by specify operator address. + +
Query Parameters
+ +A successful response. + +
Schema
    records object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/storage-provider.api.mdx b/docs/greenfield-api/storage-provider.api.mdx new file mode 100644 index 000000000..a79297dea --- /dev/null +++ b/docs/greenfield-api/storage-provider.api.mdx @@ -0,0 +1,42 @@ +--- +id: storage-provider +title: "StorageProvider" +description: "Queries a storage provider with specify id" +sidebar_label: "StorageProvider" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"StorageProvider","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"storageProvider":{"type":"object","properties":{"id":{"type":"integer","format":"int64","title":"// id is the identifier of the storage provider, used in virtual group"},"operator_address":{"type":"string","description":"operator_address defines the account address of the storage provider's operator; It also is the unique index key of sp."},"funding_address":{"type":"string","description":"funding_address defines one of the storage provider's accounts which is used to deposit and reward."},"seal_address":{"type":"string","title":"seal_address defines one of the storage provider's accounts which is used to SealObject"},"approval_address":{"type":"string","title":"approval_address defines one of the storage provider's accounts which is used to approve use's createBucket/createObject request"},"gc_address":{"type":"string","description":"gc_address defines one of the storage provider's accounts which is used for gc purpose."},"maintenance_address":{"type":"string","title":"maintenance_address defines one of the storage provider's accounts which is used for testing while in maintenance mode"},"total_deposit":{"type":"string","description":"total_deposit defines the number of tokens deposited by this storage provider for staking."},"status":{"title":"status defines the current service status of this storage provider","type":"string","enum":["STATUS_IN_SERVICE","STATUS_IN_JAILED","STATUS_GRACEFUL_EXITING","STATUS_IN_MAINTENANCE"],"default":"STATUS_IN_SERVICE","description":"Status is the status of a storage provider."},"endpoint":{"type":"string","title":"endpoint define the storage provider's network service address"},"description":{"description":"description defines the description terms for the storage provider.","type":"object","properties":{"moniker":{"type":"string","title":"moniker defines a human-readable name for the storage provider"},"identity":{"type":"string","description":"identity defines an optional identity signature (ex. UPort or Keybase)."},"website":{"type":"string","description":"website defines an optional website link."},"security_contact":{"type":"string","description":"security_contact defines an optional email for security contact."},"details":{"type":"string","description":"details define other optional details."}}},"bls_key":{"type":"string","format":"byte","title":"bls_key defines the bls pub key of the Storage provider for sealing object and completing migration"}},"title":"StorageProvider defines the meta info of storage provider"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"tags":["sp"],"description":"Queries a storage provider with specify id","method":"get","path":"/greenfield/storage_provider/{id}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"StorageProvider","description":{"content":"Queries a storage provider with specify id","type":"text/plain"},"url":{"path":["greenfield","storage_provider",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## StorageProvider + + + +Queries a storage provider with specify id + +
Path Parameters
+ +A successful response. + +
Schema
    storageProvider object
    description object
    + +description defines the description terms for the storage provider. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/storage-providers.api.mdx b/docs/greenfield-api/storage-providers.api.mdx new file mode 100644 index 000000000..a883d338f --- /dev/null +++ b/docs/greenfield-api/storage-providers.api.mdx @@ -0,0 +1,46 @@ +--- +id: storage-providers +title: "StorageProviders" +description: "Queries a list of GetStorageProviders items." +sidebar_label: "StorageProviders" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"StorageProviders","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"sps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","title":"// id is the identifier of the storage provider, used in virtual group"},"operator_address":{"type":"string","description":"operator_address defines the account address of the storage provider's operator; It also is the unique index key of sp."},"funding_address":{"type":"string","description":"funding_address defines one of the storage provider's accounts which is used to deposit and reward."},"seal_address":{"type":"string","title":"seal_address defines one of the storage provider's accounts which is used to SealObject"},"approval_address":{"type":"string","title":"approval_address defines one of the storage provider's accounts which is used to approve use's createBucket/createObject request"},"gc_address":{"type":"string","description":"gc_address defines one of the storage provider's accounts which is used for gc purpose."},"maintenance_address":{"type":"string","title":"maintenance_address defines one of the storage provider's accounts which is used for testing while in maintenance mode"},"total_deposit":{"type":"string","description":"total_deposit defines the number of tokens deposited by this storage provider for staking."},"status":{"title":"status defines the current service status of this storage provider","type":"string","enum":["STATUS_IN_SERVICE","STATUS_IN_JAILED","STATUS_GRACEFUL_EXITING","STATUS_IN_MAINTENANCE"],"default":"STATUS_IN_SERVICE","description":"Status is the status of a storage provider."},"endpoint":{"type":"string","title":"endpoint define the storage provider's network service address"},"description":{"description":"description defines the description terms for the storage provider.","type":"object","properties":{"moniker":{"type":"string","title":"moniker defines a human-readable name for the storage provider"},"identity":{"type":"string","description":"identity defines an optional identity signature (ex. UPort or Keybase)."},"website":{"type":"string","description":"website defines an optional website link."},"security_contact":{"type":"string","description":"security_contact defines an optional email for security contact."},"details":{"type":"string","description":"details define other optional details."}}},"bls_key":{"type":"string","format":"byte","title":"bls_key defines the bls pub key of the Storage provider for sealing object and completing migration"}},"title":"StorageProvider defines the meta info of storage provider"}},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["sp"],"description":"Queries a list of GetStorageProviders items.","method":"get","path":"/greenfield/storage_providers","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"StorageProviders","description":{"content":"Queries a list of GetStorageProviders items.","type":"text/plain"},"url":{"path":["greenfield","storage_providers"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## StorageProviders + + + +Queries a list of GetStorageProviders items. + +
Query Parameters
+ +A successful response. + +
Schema
    sps object[]
  • Array [
  • description object
    + +description defines the description terms for the storage provider. + +
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/stream-record.api.mdx b/docs/greenfield-api/stream-record.api.mdx new file mode 100644 index 000000000..ca6d962a8 --- /dev/null +++ b/docs/greenfield-api/stream-record.api.mdx @@ -0,0 +1,38 @@ +--- +id: stream-record +title: "StreamRecord" +description: "Queries a stream record by account." +sidebar_label: "StreamRecord" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"StreamRecord","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"stream_record":{"type":"object","properties":{"account":{"type":"string","title":"account address"},"crud_timestamp":{"type":"string","format":"int64","title":"latest update timestamp of the stream record"},"netflow_rate":{"type":"string","description":"The per-second rate that an account's balance is changing.\nIt is the sum of the account's inbound and outbound flow rates."},"static_balance":{"type":"string","description":"The balance of the stream account at the latest CRUD timestamp."},"buffer_balance":{"type":"string","title":"reserved balance of the stream account\nIf the netflow rate is negative, the reserved balance is `netflow_rate * reserve_time`"},"lock_balance":{"type":"string","title":"the locked balance of the stream account after it puts a new object and before the object is sealed"},"status":{"title":"the status of the stream account","type":"string","enum":["STREAM_ACCOUNT_STATUS_ACTIVE","STREAM_ACCOUNT_STATUS_FROZEN"],"default":"STREAM_ACCOUNT_STATUS_ACTIVE","description":"- STREAM_ACCOUNT_STATUS_ACTIVE: STREAM_ACCOUNT_STATUS_ACTIVE defines the active status of a stream account.\n - STREAM_ACCOUNT_STATUS_FROZEN: STREAM_ACCOUNT_STATUS_FROZEN defines the frozen status of a stream account.\nA frozen stream account cannot be used as payment address for buckets.\nIt can be unfrozen by depositing more BNB to the stream account."},"settle_timestamp":{"type":"string","format":"int64","title":"the unix timestamp when the stream account will be settled"},"out_flow_count":{"type":"string","format":"uint64","title":"the count of its out flows"},"frozen_netflow_rate":{"type":"string","title":"the frozen netflow rate, which is used when resuming stream account"}},"title":"Stream Payment Record of a stream account"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"account","in":"path","required":true,"schema":{"type":"string"}}],"tags":["payment"],"description":"Queries a stream record by account.","method":"get","path":"/greenfield/payment/stream_record/{account}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"StreamRecord","description":{"content":"Queries a stream record by account.","type":"text/plain"},"url":{"path":["greenfield","payment","stream_record",":account"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"account"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## StreamRecord + + + +Queries a stream record by account. + +
Path Parameters
+ +A successful response. + +
Schema
    stream_record object
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/stream-records.api.mdx b/docs/greenfield-api/stream-records.api.mdx new file mode 100644 index 000000000..1c7f360b9 --- /dev/null +++ b/docs/greenfield-api/stream-records.api.mdx @@ -0,0 +1,48 @@ +--- +id: stream-records +title: "StreamRecords" +description: "Queries all stream records." +sidebar_label: "StreamRecords" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"StreamRecords","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"stream_records":{"type":"array","items":{"type":"object","properties":{"account":{"type":"string","title":"account address"},"crud_timestamp":{"type":"string","format":"int64","title":"latest update timestamp of the stream record"},"netflow_rate":{"type":"string","description":"The per-second rate that an account's balance is changing.\nIt is the sum of the account's inbound and outbound flow rates."},"static_balance":{"type":"string","description":"The balance of the stream account at the latest CRUD timestamp."},"buffer_balance":{"type":"string","title":"reserved balance of the stream account\nIf the netflow rate is negative, the reserved balance is `netflow_rate * reserve_time`"},"lock_balance":{"type":"string","title":"the locked balance of the stream account after it puts a new object and before the object is sealed"},"status":{"title":"the status of the stream account","type":"string","enum":["STREAM_ACCOUNT_STATUS_ACTIVE","STREAM_ACCOUNT_STATUS_FROZEN"],"default":"STREAM_ACCOUNT_STATUS_ACTIVE","description":"- STREAM_ACCOUNT_STATUS_ACTIVE: STREAM_ACCOUNT_STATUS_ACTIVE defines the active status of a stream account.\n - STREAM_ACCOUNT_STATUS_FROZEN: STREAM_ACCOUNT_STATUS_FROZEN defines the frozen status of a stream account.\nA frozen stream account cannot be used as payment address for buckets.\nIt can be unfrozen by depositing more BNB to the stream account."},"settle_timestamp":{"type":"string","format":"int64","title":"the unix timestamp when the stream account will be settled"},"out_flow_count":{"type":"string","format":"uint64","title":"the count of its out flows"},"frozen_netflow_rate":{"type":"string","title":"the frozen netflow rate, which is used when resuming stream account"}},"title":"Stream Payment Record of a stream account"}},"pagination":{"type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}},"description":"PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["payment"],"description":"Queries all stream records.","method":"get","path":"/greenfield/payment/stream_records","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"StreamRecords","description":{"content":"Queries all stream records.","type":"text/plain"},"url":{"path":["greenfield","payment","stream_records"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## StreamRecords + + + +Queries all stream records. + +
Query Parameters
+ +A successful response. + +
Schema
    stream_records object[]
  • Array [
  • ]
  • pagination object
    + +PageResponse is to be embedded in gRPC response messages where the +corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/supply-of.api.mdx b/docs/greenfield-api/supply-of.api.mdx new file mode 100644 index 000000000..abbdc2d52 --- /dev/null +++ b/docs/greenfield-api/supply-of.api.mdx @@ -0,0 +1,45 @@ +--- +id: supply-of +title: "SupplyOf" +description: "SupplyOf queries the supply of a single coin." +sidebar_label: "SupplyOf" +hide_title: true +hide_table_of_contents: true +api: {"description":"SupplyOf queries the supply of a single coin.","operationId":"SupplyOf","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"amount":{"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."}},"description":"QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"denom","description":"denom is the coin denom to query balances for.","in":"query","required":false,"schema":{"type":"string"}}],"tags":["bank"],"method":"get","path":"/cosmos/bank/v1beta1/supply/by_denom","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"SupplyOf","description":{"content":"SupplyOf queries the supply of a single coin.","type":"text/plain"},"url":{"path":["cosmos","bank","v1beta1","supply","by_denom"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"denom is the coin denom to query balances for.","type":"text/plain"},"key":"denom","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## SupplyOf + + + +SupplyOf queries the supply of a single coin. + +
Query Parameters
+ +A successful response. + +
Schema
    amount object
    + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method +signatures required by gogoproto. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/total-supply.api.mdx b/docs/greenfield-api/total-supply.api.mdx new file mode 100644 index 000000000..bbe1dd067 --- /dev/null +++ b/docs/greenfield-api/total-supply.api.mdx @@ -0,0 +1,44 @@ +--- +id: total-supply +title: "TotalSupply" +description: "TotalSupply queries the total supply of all coins." +sidebar_label: "TotalSupply" +hide_title: true +hide_table_of_contents: true +api: {"description":"TotalSupply queries the total supply of all coins.","operationId":"TotalSupply","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"supply":{"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":"supply is the supply of the coins"},"pagination":{"description":"pagination defines the pagination in the response.\n\nSince: cosmos-sdk 0.43","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"title":"QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC\nmethod"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["bank"],"method":"get","path":"/cosmos/bank/v1beta1/supply","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"TotalSupply","description":{"content":"TotalSupply queries the total supply of all coins.","type":"text/plain"},"url":{"path":["cosmos","bank","v1beta1","supply"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## TotalSupply + + + +TotalSupply queries the total supply of all coins. + +
Query Parameters
+ +A successful response. + +
Schema
    supply object[]
  • Array [
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +Since: cosmos-sdk 0.43 + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/tx-decode-amino.api.mdx b/docs/greenfield-api/tx-decode-amino.api.mdx new file mode 100644 index 000000000..91fd240d9 --- /dev/null +++ b/docs/greenfield-api/tx-decode-amino.api.mdx @@ -0,0 +1,38 @@ +--- +id: tx-decode-amino +title: "TxDecodeAmino" +description: "TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON." +sidebar_label: "TxDecodeAmino" +hide_title: true +hide_table_of_contents: true +api: {"description":"TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON.","operationId":"TxDecodeAmino","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"amino_json":{"type":"string"}},"description":"TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino\nRPC method.\n\nSince: cosmos-sdk 0.47"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amino_binary":{"type":"string","format":"byte"}},"description":"TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino\nRPC method.\n\nSince: cosmos-sdk 0.47"}}},"required":true},"tags":["tx"],"method":"post","path":"/cosmos/tx/v1beta1/decode/amino","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"jsonRequestBodyExample":{"amino_binary":"string"},"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"TxDecodeAmino","description":{"content":"TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON.","type":"text/plain"},"url":{"path":["cosmos","tx","v1beta1","decode","amino"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"*/*"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "post api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## TxDecodeAmino + + + +TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. + +
Request Body required
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/tx-decode.api.mdx b/docs/greenfield-api/tx-decode.api.mdx new file mode 100644 index 000000000..60bae0ea9 --- /dev/null +++ b/docs/greenfield-api/tx-decode.api.mdx @@ -0,0 +1,183 @@ +--- +id: tx-decode +title: "TxDecode" +description: "TxDecode decodes the transaction." +sidebar_label: "TxDecode" +hide_title: true +hide_table_of_contents: true +api: {"description":"TxDecode decodes the transaction.","operationId":"TxDecode","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"tx":{"description":"tx is the decoded transaction.","type":"object","properties":{"body":{"title":"body is the processable content of the transaction","type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"description":"messages is a list of messages to be executed. The required signers of\nthose messages define the number and order of elements in AuthInfo's\nsigner_infos and Tx's signatures. Each required signer address is added to\nthe list only the first time it occurs.\nBy convention, the first required signer (usually from the first message)\nis referred to as the primary signer and pays the fee for the whole\ntransaction."},"memo":{"type":"string","description":"memo is any arbitrary note/comment to be added to the transaction.\nWARNING: in clients, any publicly exposed text should not be called memo,\nbut should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122)."},"timeout_height":{"type":"string","format":"uint64","title":"timeout is the block height after which this transaction will not\nbe processed by the chain"},"extension_options":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"title":"extension_options are arbitrary options that can be added by chains\nwhen the default options are not sufficient. If any of these are present\nand can't be handled, the transaction will be rejected"},"non_critical_extension_options":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"title":"extension_options are arbitrary options that can be added by chains\nwhen the default options are not sufficient. If any of these are present\nand can't be handled, they will be ignored"}},"description":"TxBody is the body of a transaction that all signers sign over."},"auth_info":{"title":"auth_info is the authorization related content of the transaction,\nspecifically signers, signer modes and fee","type":"object","properties":{"signer_infos":{"type":"array","items":{"type":"object","properties":{"public_key":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"mode_info":{"title":"mode_info describes the signing mode of the signer and is a nested\nstructure to support nested multisig pubkey's","type":"object","properties":{"single":{"title":"single represents a single signer","type":"object","properties":{"mode":{"title":"mode is the signing mode of the single signer","type":"string","enum":["SIGN_MODE_UNSPECIFIED","SIGN_MODE_DIRECT","SIGN_MODE_TEXTUAL","SIGN_MODE_DIRECT_AUX","SIGN_MODE_LEGACY_AMINO_JSON","SIGN_MODE_EIP_191","SIGN_MODE_EIP_712"],"default":"SIGN_MODE_UNSPECIFIED","description":"SignMode represents a signing mode with its own security guarantees.\n\nThis enum should be considered a registry of all known sign modes\nin the Cosmos ecosystem. Apps are not expected to support all known\nsign modes. Apps that would like to support custom sign modes are\nencouraged to open a small PR against this file to add a new case\nto this SignMode enum describing their sign mode so that different\napps have a consistent version of this enum.\n\n - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be\nrejected.\n - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is\nverified with raw bytes from Tx.\n - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some\nhuman-readable textual representation on top of the binary representation\nfrom SIGN_MODE_DIRECT. It is currently not supported.\n - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses\nSignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not\nrequire signers signing over other signers' `signer_info`. It also allows\nfor adding Tips in transactions.\n\nSince: cosmos-sdk 0.46\n - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses\nAmino JSON and will be removed in the future.\n - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos\nSDK. Ref: https://eips.ethereum.org/EIPS/eip-191\n\nCurrently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant,\nbut is not implemented on the SDK by default. To enable EIP-191, you need\nto pass a custom `TxConfig` that has an implementation of\n`SignModeHandler` for EIP-191. The SDK may decide to fully support\nEIP-191 in the future.\n\nSince: cosmos-sdk 0.45.2\n - SIGN_MODE_EIP_712: SIGN_MODE_EIP_712 specifies the sign mode for EIP 712 signing on the Cosmos\nSDK. Ref: https://eips.ethereum.org/EIPS/eip-712"}}},"multi":{"title":"multi represents a nested multisig signer","type":"object","properties":{"bitarray":{"title":"bitarray specifies which keys within the multisig are signing","type":"object","properties":{"extra_bits_stored":{"type":"integer","format":"int64"},"elems":{"type":"string","format":"byte"}},"description":"CompactBitArray is an implementation of a space efficient bit array.\nThis is used to ensure that the encoded data takes up a minimal amount of\nspace after proto encoding.\nThis is not thread safe, and is not intended for concurrent usage."},"mode_infos":{"type":"array","items":{"type":"object","properties":"circular()","description":"ModeInfo describes the signing mode of a single or nested multisig signer."},"title":"mode_infos is the corresponding modes of the signers of the multisig\nwhich could include nested multisig public keys"}}}},"description":"ModeInfo describes the signing mode of a single or nested multisig signer."},"sequence":{"type":"string","format":"uint64","description":"sequence is the sequence of the account, which describes the\nnumber of committed transactions signed by a given address. It is used to\nprevent replay attacks."}},"description":"SignerInfo describes the public key and signing mode of a single top-level\nsigner."},"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"},"gas_limit":{"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 specified account must pay the fees.\nthe payer must be a tx signer (and thus have signed this field in AuthInfo).\nsetting this field does *not* change 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 field) requests that a fee grant be used\nto pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does\nnot 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.\n\nSince: cosmos-sdk 0.46","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."},"signatures":{"type":"array","items":{"type":"string","format":"byte"},"description":"signatures is a list of signatures that matches the length and order of\nAuthInfo's signer_infos to allow connecting signature meta information like\npublic key and signing mode by position."}}}},"description":"TxDecodeResponse is the response type for the\nService.TxDecode method.\n\nSince: cosmos-sdk 0.47"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tx_bytes":{"type":"string","format":"byte","description":"tx_bytes is the raw transaction."}},"description":"TxDecodeRequest is the request type for the Service.TxDecode\nRPC method.\n\nSince: cosmos-sdk 0.47"}}},"required":true},"tags":["tx"],"method":"post","path":"/cosmos/tx/v1beta1/decode","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"jsonRequestBodyExample":{"tx_bytes":"string"},"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"TxDecode","description":{"content":"TxDecode decodes the transaction.","type":"text/plain"},"url":{"path":["cosmos","tx","v1beta1","decode"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"*/*"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "post api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## TxDecode + + + +TxDecode decodes the transaction. + +
Request Body required
+ +A successful response. + +
Schema
    tx object
    + +tx is the decoded transaction. + +
    body object
    + +TxBody is the body of a transaction that all signers sign over. + +
    messages object[]
    + +messages is a list of messages to be executed. The required signers of +those messages define the number and order of elements in AuthInfo's +signer_infos and Tx's signatures. Each required signer address is added to +the list only the first time it occurs. +By convention, the first required signer (usually from the first message) +is referred to as the primary signer and pays the fee for the whole +transaction. + +
  • Array [
  • ]
  • extension_options object[]
  • Array [
  • ]
  • non_critical_extension_options object[]
  • Array [
  • ]
  • auth_info object
    + +AuthInfo describes the fee and signer modes that are used to sign a +transaction. + +
    signer_infos object[]
    + +signer_infos defines the signing modes for the required signers. The number +and order of elements must match the required signers from TxBody's +messages. The first element is the primary signer and the one which pays +the fee. + +
  • Array [
  • public_key object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
    mode_info object
    + +ModeInfo describes the signing mode of a single or nested multisig signer. + +
    single object
    multi object
    bitarray object
    + +CompactBitArray is an implementation of a space efficient bit array. +This is used to ensure that the encoded data takes up a minimal amount of +space after proto encoding. +This is not thread safe, and is not intended for concurrent usage. + +
    mode_infos object[]
  • Array [
  • ]
  • ]
  • fee object
    + +Fee is the fee and gas limit for the transaction. The first signer is the +primary signer and the one which pays the fee. The fee can be calculated +based on the cost of evaluating the body and doing signature verification +of the signers. This can be estimated via simulation. + +
    amount object[]
  • Array [
  • ]
  • tip object
    + +Tip is the optional tip used for transactions fees paid in another denom. + +This field is ignored if the chain didn't enable tips, i.e. didn't add the +`TipDecorator` in its posthandler. + +Since: cosmos-sdk 0.46 + +
    amount object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/tx-encode-amino.api.mdx b/docs/greenfield-api/tx-encode-amino.api.mdx new file mode 100644 index 000000000..0e1e15586 --- /dev/null +++ b/docs/greenfield-api/tx-encode-amino.api.mdx @@ -0,0 +1,38 @@ +--- +id: tx-encode-amino +title: "TxEncodeAmino" +description: "TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes." +sidebar_label: "TxEncodeAmino" +hide_title: true +hide_table_of_contents: true +api: {"description":"TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes.","operationId":"TxEncodeAmino","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"amino_binary":{"type":"string","format":"byte"}},"description":"TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino\nRPC method.\n\nSince: cosmos-sdk 0.47"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amino_json":{"type":"string"}},"description":"TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino\nRPC method.\n\nSince: cosmos-sdk 0.47"}}},"required":true},"tags":["tx"],"method":"post","path":"/cosmos/tx/v1beta1/encode/amino","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"jsonRequestBodyExample":{"amino_json":"string"},"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"TxEncodeAmino","description":{"content":"TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes.","type":"text/plain"},"url":{"path":["cosmos","tx","v1beta1","encode","amino"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"*/*"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "post api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## TxEncodeAmino + + + +TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. + +
Request Body required
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/tx-encode.api.mdx b/docs/greenfield-api/tx-encode.api.mdx new file mode 100644 index 000000000..d1de723e5 --- /dev/null +++ b/docs/greenfield-api/tx-encode.api.mdx @@ -0,0 +1,183 @@ +--- +id: tx-encode +title: "TxEncode" +description: "TxEncode encodes the transaction." +sidebar_label: "TxEncode" +hide_title: true +hide_table_of_contents: true +api: {"description":"TxEncode encodes the transaction.","operationId":"TxEncode","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"tx_bytes":{"type":"string","format":"byte","description":"tx_bytes is the encoded transaction bytes."}},"description":"TxEncodeResponse is the response type for the\nService.TxEncode method.\n\nSince: cosmos-sdk 0.47"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tx":{"description":"tx is the transaction to encode.","type":"object","properties":{"body":{"title":"body is the processable content of the transaction","type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"description":"messages is a list of messages to be executed. The required signers of\nthose messages define the number and order of elements in AuthInfo's\nsigner_infos and Tx's signatures. Each required signer address is added to\nthe list only the first time it occurs.\nBy convention, the first required signer (usually from the first message)\nis referred to as the primary signer and pays the fee for the whole\ntransaction."},"memo":{"type":"string","description":"memo is any arbitrary note/comment to be added to the transaction.\nWARNING: in clients, any publicly exposed text should not be called memo,\nbut should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122)."},"timeout_height":{"type":"string","format":"uint64","title":"timeout is the block height after which this transaction will not\nbe processed by the chain"},"extension_options":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"title":"extension_options are arbitrary options that can be added by chains\nwhen the default options are not sufficient. If any of these are present\nand can't be handled, the transaction will be rejected"},"non_critical_extension_options":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"title":"extension_options are arbitrary options that can be added by chains\nwhen the default options are not sufficient. If any of these are present\nand can't be handled, they will be ignored"}},"description":"TxBody is the body of a transaction that all signers sign over."},"auth_info":{"title":"auth_info is the authorization related content of the transaction,\nspecifically signers, signer modes and fee","type":"object","properties":{"signer_infos":{"type":"array","items":{"type":"object","properties":{"public_key":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"mode_info":{"title":"mode_info describes the signing mode of the signer and is a nested\nstructure to support nested multisig pubkey's","type":"object","properties":{"single":{"title":"single represents a single signer","type":"object","properties":{"mode":{"title":"mode is the signing mode of the single signer","type":"string","enum":["SIGN_MODE_UNSPECIFIED","SIGN_MODE_DIRECT","SIGN_MODE_TEXTUAL","SIGN_MODE_DIRECT_AUX","SIGN_MODE_LEGACY_AMINO_JSON","SIGN_MODE_EIP_191","SIGN_MODE_EIP_712"],"default":"SIGN_MODE_UNSPECIFIED","description":"SignMode represents a signing mode with its own security guarantees.\n\nThis enum should be considered a registry of all known sign modes\nin the Cosmos ecosystem. Apps are not expected to support all known\nsign modes. Apps that would like to support custom sign modes are\nencouraged to open a small PR against this file to add a new case\nto this SignMode enum describing their sign mode so that different\napps have a consistent version of this enum.\n\n - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be\nrejected.\n - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is\nverified with raw bytes from Tx.\n - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some\nhuman-readable textual representation on top of the binary representation\nfrom SIGN_MODE_DIRECT. It is currently not supported.\n - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses\nSignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not\nrequire signers signing over other signers' `signer_info`. It also allows\nfor adding Tips in transactions.\n\nSince: cosmos-sdk 0.46\n - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses\nAmino JSON and will be removed in the future.\n - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos\nSDK. Ref: https://eips.ethereum.org/EIPS/eip-191\n\nCurrently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant,\nbut is not implemented on the SDK by default. To enable EIP-191, you need\nto pass a custom `TxConfig` that has an implementation of\n`SignModeHandler` for EIP-191. The SDK may decide to fully support\nEIP-191 in the future.\n\nSince: cosmos-sdk 0.45.2\n - SIGN_MODE_EIP_712: SIGN_MODE_EIP_712 specifies the sign mode for EIP 712 signing on the Cosmos\nSDK. Ref: https://eips.ethereum.org/EIPS/eip-712"}}},"multi":{"title":"multi represents a nested multisig signer","type":"object","properties":{"bitarray":{"title":"bitarray specifies which keys within the multisig are signing","type":"object","properties":{"extra_bits_stored":{"type":"integer","format":"int64"},"elems":{"type":"string","format":"byte"}},"description":"CompactBitArray is an implementation of a space efficient bit array.\nThis is used to ensure that the encoded data takes up a minimal amount of\nspace after proto encoding.\nThis is not thread safe, and is not intended for concurrent usage."},"mode_infos":{"type":"array","items":{"type":"object","properties":"circular()","description":"ModeInfo describes the signing mode of a single or nested multisig signer."},"title":"mode_infos is the corresponding modes of the signers of the multisig\nwhich could include nested multisig public keys"}}}},"description":"ModeInfo describes the signing mode of a single or nested multisig signer."},"sequence":{"type":"string","format":"uint64","description":"sequence is the sequence of the account, which describes the\nnumber of committed transactions signed by a given address. It is used to\nprevent replay attacks."}},"description":"SignerInfo describes the public key and signing mode of a single top-level\nsigner."},"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"},"gas_limit":{"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 specified account must pay the fees.\nthe payer must be a tx signer (and thus have signed this field in AuthInfo).\nsetting this field does *not* change 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 field) requests that a fee grant be used\nto pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does\nnot 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.\n\nSince: cosmos-sdk 0.46","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."},"signatures":{"type":"array","items":{"type":"string","format":"byte"},"description":"signatures is a list of signatures that matches the length and order of\nAuthInfo's signer_infos to allow connecting signature meta information like\npublic key and signing mode by position."}}}},"description":"TxEncodeRequest is the request type for the Service.TxEncode\nRPC method.\n\nSince: cosmos-sdk 0.47"}}},"required":true},"tags":["tx"],"method":"post","path":"/cosmos/tx/v1beta1/encode","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"jsonRequestBodyExample":{"tx":{"body":{"messages":[{"type_url":"string","value":"string"}],"memo":"string","timeout_height":"string","extension_options":[{"type_url":"string","value":"string"}],"non_critical_extension_options":[{"type_url":"string","value":"string"}]},"auth_info":{"signer_infos":[{"public_key":{"type_url":"string","value":"string"},"mode_info":{"single":{"mode":"SIGN_MODE_UNSPECIFIED"},"multi":{"bitarray":{"extra_bits_stored":0,"elems":"string"},"mode_infos":[{}]}},"sequence":"string"}],"fee":{"amount":[{"denom":"string","amount":"string"}],"gas_limit":"string","payer":"string","granter":"string"},"tip":{"amount":[{"denom":"string","amount":"string"}],"tipper":"string"}},"signatures":["string"]}},"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"TxEncode","description":{"content":"TxEncode encodes the transaction.","type":"text/plain"},"url":{"path":["cosmos","tx","v1beta1","encode"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"*/*"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "post api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## TxEncode + + + +TxEncode encodes the transaction. + +
Request Body required
    tx object
    + +tx is the transaction to encode. + +
    body object
    + +TxBody is the body of a transaction that all signers sign over. + +
    messages object[]
    + +messages is a list of messages to be executed. The required signers of +those messages define the number and order of elements in AuthInfo's +signer_infos and Tx's signatures. Each required signer address is added to +the list only the first time it occurs. +By convention, the first required signer (usually from the first message) +is referred to as the primary signer and pays the fee for the whole +transaction. + +
  • Array [
  • ]
  • extension_options object[]
  • Array [
  • ]
  • non_critical_extension_options object[]
  • Array [
  • ]
  • auth_info object
    + +AuthInfo describes the fee and signer modes that are used to sign a +transaction. + +
    signer_infos object[]
    + +signer_infos defines the signing modes for the required signers. The number +and order of elements must match the required signers from TxBody's +messages. The first element is the primary signer and the one which pays +the fee. + +
  • Array [
  • public_key object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
    mode_info object
    + +ModeInfo describes the signing mode of a single or nested multisig signer. + +
    single object
    multi object
    bitarray object
    + +CompactBitArray is an implementation of a space efficient bit array. +This is used to ensure that the encoded data takes up a minimal amount of +space after proto encoding. +This is not thread safe, and is not intended for concurrent usage. + +
    mode_infos object[]
  • Array [
  • ]
  • ]
  • fee object
    + +Fee is the fee and gas limit for the transaction. The first signer is the +primary signer and the one which pays the fee. The fee can be calculated +based on the cost of evaluating the body and doing signature verification +of the signers. This can be estimated via simulation. + +
    amount object[]
  • Array [
  • ]
  • tip object
    + +Tip is the optional tip used for transactions fees paid in another denom. + +This field is ignored if the chain didn't enable tips, i.e. didn't add the +`TipDecorator` in its posthandler. + +Since: cosmos-sdk 0.46 + +
    amount object[]
  • Array [
  • ]
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/unbonding-delegation.api.mdx b/docs/greenfield-api/unbonding-delegation.api.mdx new file mode 100644 index 000000000..46635cb2d --- /dev/null +++ b/docs/greenfield-api/unbonding-delegation.api.mdx @@ -0,0 +1,48 @@ +--- +id: unbonding-delegation +title: "UnbondingDelegation" +description: "UnbondingDelegation queries unbonding info for given validator delegator" +sidebar_label: "UnbondingDelegation" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"UnbondingDelegation","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"unbond":{"type":"object","properties":{"delegator_address":{"type":"string","description":"delegator_address is the bech32-encoded address of the delegator."},"validator_address":{"type":"string","description":"validator_address is the bech32-encoded address of the validator."},"entries":{"type":"array","items":{"type":"object","properties":{"creation_height":{"type":"string","format":"int64","description":"creation_height is the height which the unbonding took place."},"completion_time":{"type":"string","format":"date-time","description":"completion_time is the unix time for unbonding completion."},"initial_balance":{"type":"string","description":"initial_balance defines the tokens initially scheduled to receive at completion."},"balance":{"type":"string","description":"balance defines the tokens to receive at completion."},"unbonding_id":{"type":"string","format":"uint64","title":"Incrementing id that uniquely identifies this entry"},"unbonding_on_hold_ref_count":{"type":"string","format":"int64","title":"Strictly positive if this entry's unbonding has been stopped by external modules"}},"description":"UnbondingDelegationEntry defines an unbonding object with relevant metadata."},"description":"entries are the unbonding delegation entries."}},"description":"UnbondingDelegation stores all of a single delegator's unbonding bonds\nfor a single validator in an time-ordered list."}},"description":"QueryDelegationResponse is response type for the Query/UnbondingDelegation\nRPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"validator_addr","description":"validator_addr defines the validator address to query for.","in":"path","required":true,"schema":{"type":"string"}},{"name":"delegator_addr","description":"delegator_addr defines the delegator address to query for.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["staking"],"description":"UnbondingDelegation queries unbonding info for given validator delegator\npair.","method":"get","path":"/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"UnbondingDelegation","description":{"content":"UnbondingDelegation queries unbonding info for given validator delegator\npair.","type":"text/plain"},"url":{"path":["cosmos","staking","v1beta1","validators",":validator_addr","delegations",":delegator_addr","unbonding_delegation"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) validator_addr defines the validator address to query for.","type":"text/plain"},"type":"any","value":"","key":"validator_addr"},{"disabled":false,"description":{"content":"(Required) delegator_addr defines the delegator address to query for.","type":"text/plain"},"type":"any","value":"","key":"delegator_addr"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## UnbondingDelegation + + + +UnbondingDelegation queries unbonding info for given validator delegator +pair. + +
Path Parameters
+ +A successful response. + +
Schema
    unbond object
    + +UnbondingDelegation stores all of a single delegator's unbonding bonds +for a single validator in an time-ordered list. + +
    entries object[]
    + +entries are the unbonding delegation entries. + +
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/upgraded-consensus-state.api.mdx b/docs/greenfield-api/upgraded-consensus-state.api.mdx new file mode 100644 index 000000000..127a9a5bd --- /dev/null +++ b/docs/greenfield-api/upgraded-consensus-state.api.mdx @@ -0,0 +1,43 @@ +--- +id: upgraded-consensus-state +title: "UpgradedConsensusState" +description: "UpgradedConsensusState queries the consensus state that will serve" +sidebar_label: "UpgradedConsensusState" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"UpgradedConsensusState","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"upgraded_consensus_state":{"type":"string","format":"byte","title":"Since: cosmos-sdk 0.43"}},"description":"QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState\nRPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"last_height","description":"last height of the current chain must be sent in request\nas this is the height under which next consensus state is stored","in":"path","required":true,"schema":{"type":"string","format":"int64"}}],"tags":["upgrade"],"description":"UpgradedConsensusState queries the consensus state that will serve\nas a trusted kernel for the next version of this chain. It will only be\nstored at the last height of this chain.\nUpgradedConsensusState RPC not supported with legacy querier\nThis rpc is deprecated now that IBC has its own replacement\n(https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54)","method":"get","path":"/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"UpgradedConsensusState","description":{"content":"UpgradedConsensusState queries the consensus state that will serve\nas a trusted kernel for the next version of this chain. It will only be\nstored at the last height of this chain.\nUpgradedConsensusState RPC not supported with legacy querier\nThis rpc is deprecated now that IBC has its own replacement\n(https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54)","type":"text/plain"},"url":{"path":["cosmos","upgrade","v1beta1","upgraded_consensus_state",":last_height"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) last height of the current chain must be sent in request\nas this is the height under which next consensus state is stored","type":"text/plain"},"type":"any","value":"","key":"last_height"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## UpgradedConsensusState + + + +UpgradedConsensusState queries the consensus state that will serve +as a trusted kernel for the next version of this chain. It will only be +stored at the last height of this chain. +UpgradedConsensusState RPC not supported with legacy querier +This rpc is deprecated now that IBC has its own replacement +(https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) + +
Path Parameters
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/validator-commission.api.mdx b/docs/greenfield-api/validator-commission.api.mdx new file mode 100644 index 000000000..98704b227 --- /dev/null +++ b/docs/greenfield-api/validator-commission.api.mdx @@ -0,0 +1,42 @@ +--- +id: validator-commission +title: "ValidatorCommission" +description: "ValidatorCommission queries accumulated commission for a validator." +sidebar_label: "ValidatorCommission" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"ValidatorCommission","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"commission":{"description":"commission defines the commission the validator received.","type":"object","properties":{"commission":{"type":"array","items":{"type":"object","properties":{"denom":{"type":"string"},"amount":{"type":"string"}},"description":"DecCoin defines a token with a denomination and a decimal amount.\n\nNOTE: The amount field is an Dec which implements the custom method\nsignatures required by gogoproto."}}}}},"title":"QueryValidatorCommissionResponse is the response type for the\nQuery/ValidatorCommission RPC method"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"validator_address","description":"validator_address defines the validator address to query for.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["distribution"],"description":"ValidatorCommission queries accumulated commission for a validator.","method":"get","path":"/cosmos/distribution/v1beta1/validators/{validator_address}/commission","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"ValidatorCommission","description":{"content":"ValidatorCommission queries accumulated commission for a validator.","type":"text/plain"},"url":{"path":["cosmos","distribution","v1beta1","validators",":validator_address","commission"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) validator_address defines the validator address to query for.","type":"text/plain"},"type":"any","value":"","key":"validator_address"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## ValidatorCommission + + + +ValidatorCommission queries accumulated commission for a validator. + +
Path Parameters
+ +A successful response. + +
Schema
    commission object
    + +commission defines the commission the validator received. + +
    commission object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/validator-delegations.api.mdx b/docs/greenfield-api/validator-delegations.api.mdx new file mode 100644 index 000000000..9aad6da2b --- /dev/null +++ b/docs/greenfield-api/validator-delegations.api.mdx @@ -0,0 +1,55 @@ +--- +id: validator-delegations +title: "ValidatorDelegations" +description: "ValidatorDelegations queries delegate info for given validator." +sidebar_label: "ValidatorDelegations" +hide_title: true +hide_table_of_contents: true +api: {"description":"ValidatorDelegations queries delegate info for given validator.","operationId":"ValidatorDelegations","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"delegation_responses":{"type":"array","items":{"type":"object","properties":{"delegation":{"type":"object","properties":{"delegator_address":{"type":"string","description":"delegator_address is the bech32-encoded address of the delegator."},"validator_address":{"type":"string","description":"validator_address is the bech32-encoded address of the validator."},"shares":{"type":"string","description":"shares define the delegation shares received."}},"description":"Delegation represents the bond with tokens held by an account. It is\nowned by one delegator, and is associated with the voting power of one\nvalidator."},"balance":{"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."}},"description":"DelegationResponse is equivalent to Delegation except that it contains a\nbalance in addition to shares which is more suitable for client responses."}},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"title":"QueryValidatorDelegationsResponse is response type for the\nQuery/ValidatorDelegations RPC method"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"validator_addr","description":"validator_addr defines the validator address to query for.","in":"path","required":true,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["staking"],"method":"get","path":"/cosmos/staking/v1beta1/validators/{validator_addr}/delegations","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"ValidatorDelegations","description":{"content":"ValidatorDelegations queries delegate info for given validator.","type":"text/plain"},"url":{"path":["cosmos","staking","v1beta1","validators",":validator_addr","delegations"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) validator_addr defines the validator address to query for.","type":"text/plain"},"type":"any","value":"","key":"validator_addr"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## ValidatorDelegations + + + +ValidatorDelegations queries delegate info for given validator. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    delegation_responses object[]
  • Array [
  • delegation object
    + +Delegation represents the bond with tokens held by an account. It is +owned by one delegator, and is associated with the voting power of one +validator. + +
    balance object
    + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method +signatures required by gogoproto. + +
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/validator-distribution-info.api.mdx b/docs/greenfield-api/validator-distribution-info.api.mdx new file mode 100644 index 000000000..edb64dabc --- /dev/null +++ b/docs/greenfield-api/validator-distribution-info.api.mdx @@ -0,0 +1,46 @@ +--- +id: validator-distribution-info +title: "ValidatorDistributionInfo" +description: "ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator" +sidebar_label: "ValidatorDistributionInfo" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"ValidatorDistributionInfo","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"operator_address":{"type":"string","description":"operator_address defines the validator operator address."},"self_bond_rewards":{"type":"array","items":{"type":"object","properties":{"denom":{"type":"string"},"amount":{"type":"string"}},"description":"DecCoin defines a token with a denomination and a decimal amount.\n\nNOTE: The amount field is an Dec which implements the custom method\nsignatures required by gogoproto."},"description":"self_bond_rewards defines the self delegations rewards."},"commission":{"type":"array","items":{"type":"object","properties":{"denom":{"type":"string"},"amount":{"type":"string"}},"description":"DecCoin defines a token with a denomination and a decimal amount.\n\nNOTE: The amount field is an Dec which implements the custom method\nsignatures required by gogoproto."},"description":"commission defines the commission the validator received."}},"description":"QueryValidatorDistributionInfoResponse is the response type for the Query/ValidatorDistributionInfo RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"validator_address","description":"validator_address defines the validator address to query for.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["distribution"],"description":"ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator","method":"get","path":"/cosmos/distribution/v1beta1/validators/{validator_address}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"ValidatorDistributionInfo","description":{"content":"ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator","type":"text/plain"},"url":{"path":["cosmos","distribution","v1beta1","validators",":validator_address"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) validator_address defines the validator address to query for.","type":"text/plain"},"type":"any","value":"","key":"validator_address"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## ValidatorDistributionInfo + + + +ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator + +
Path Parameters
+ +A successful response. + +
Schema
    self_bond_rewards object[]
    + +self_bond_rewards defines the self delegations rewards. + +
  • Array [
  • ]
  • commission object[]
    + +commission defines the commission the validator received. + +
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/validator-outstanding-rewards.api.mdx b/docs/greenfield-api/validator-outstanding-rewards.api.mdx new file mode 100644 index 000000000..518093794 --- /dev/null +++ b/docs/greenfield-api/validator-outstanding-rewards.api.mdx @@ -0,0 +1,43 @@ +--- +id: validator-outstanding-rewards +title: "ValidatorOutstandingRewards" +description: "ValidatorOutstandingRewards queries rewards of a validator address." +sidebar_label: "ValidatorOutstandingRewards" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"ValidatorOutstandingRewards","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"rewards":{"type":"object","properties":{"rewards":{"type":"array","items":{"type":"object","properties":{"denom":{"type":"string"},"amount":{"type":"string"}},"description":"DecCoin defines a token with a denomination and a decimal amount.\n\nNOTE: The amount field is an Dec which implements the custom method\nsignatures required by gogoproto."}}},"description":"ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards\nfor a validator inexpensive to track, allows simple sanity checks."}},"description":"QueryValidatorOutstandingRewardsResponse is the response type for the\nQuery/ValidatorOutstandingRewards RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"validator_address","description":"validator_address defines the validator address to query for.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["distribution"],"description":"ValidatorOutstandingRewards queries rewards of a validator address.","method":"get","path":"/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"ValidatorOutstandingRewards","description":{"content":"ValidatorOutstandingRewards queries rewards of a validator address.","type":"text/plain"},"url":{"path":["cosmos","distribution","v1beta1","validators",":validator_address","outstanding_rewards"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) validator_address defines the validator address to query for.","type":"text/plain"},"type":"any","value":"","key":"validator_address"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## ValidatorOutstandingRewards + + + +ValidatorOutstandingRewards queries rewards of a validator address. + +
Path Parameters
+ +A successful response. + +
Schema
    rewards object
    + +ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards +for a validator inexpensive to track, allows simple sanity checks. + +
    rewards object[]
  • Array [
  • ]
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/validator-slashes.api.mdx b/docs/greenfield-api/validator-slashes.api.mdx new file mode 100644 index 000000000..a5f30abff --- /dev/null +++ b/docs/greenfield-api/validator-slashes.api.mdx @@ -0,0 +1,46 @@ +--- +id: validator-slashes +title: "ValidatorSlashes" +description: "ValidatorSlashes queries slash events of a validator." +sidebar_label: "ValidatorSlashes" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"ValidatorSlashes","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"slashes":{"type":"array","items":{"type":"object","properties":{"validator_period":{"type":"string","format":"uint64"},"fraction":{"type":"string"}},"description":"ValidatorSlashEvent represents a validator slash event.\nHeight is implicit within the store key.\nThis is needed to calculate appropriate amount of staking tokens\nfor delegations which are withdrawn after a slash has occurred."},"description":"slashes defines the slashes the validator received."},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryValidatorSlashesResponse is the response type for the\nQuery/ValidatorSlashes RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"validator_address","description":"validator_address defines the validator address to query for.","in":"path","required":true,"schema":{"type":"string"}},{"name":"starting_height","description":"starting_height defines the optional starting height to query the slashes.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"ending_height","description":"starting_height defines the optional ending height to query the slashes.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["distribution"],"description":"ValidatorSlashes queries slash events of a validator.","method":"get","path":"/cosmos/distribution/v1beta1/validators/{validator_address}/slashes","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"ValidatorSlashes","description":{"content":"ValidatorSlashes queries slash events of a validator.","type":"text/plain"},"url":{"path":["cosmos","distribution","v1beta1","validators",":validator_address","slashes"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"starting_height defines the optional starting height to query the slashes.","type":"text/plain"},"key":"starting_height","value":""},{"disabled":false,"description":{"content":"starting_height defines the optional ending height to query the slashes.","type":"text/plain"},"key":"ending_height","value":""},{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) validator_address defines the validator address to query for.","type":"text/plain"},"type":"any","value":"","key":"validator_address"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## ValidatorSlashes + + + +ValidatorSlashes queries slash events of a validator. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    slashes object[]
    + +slashes defines the slashes the validator received. + +
  • Array [
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/validator-unbonding-delegations.api.mdx b/docs/greenfield-api/validator-unbonding-delegations.api.mdx new file mode 100644 index 000000000..ebfe033b7 --- /dev/null +++ b/docs/greenfield-api/validator-unbonding-delegations.api.mdx @@ -0,0 +1,46 @@ +--- +id: validator-unbonding-delegations +title: "ValidatorUnbondingDelegations" +description: "ValidatorUnbondingDelegations queries unbonding delegations of a validator." +sidebar_label: "ValidatorUnbondingDelegations" +hide_title: true +hide_table_of_contents: true +api: {"description":"ValidatorUnbondingDelegations queries unbonding delegations of a validator.","operationId":"ValidatorUnbondingDelegations","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"unbonding_responses":{"type":"array","items":{"type":"object","properties":{"delegator_address":{"type":"string","description":"delegator_address is the bech32-encoded address of the delegator."},"validator_address":{"type":"string","description":"validator_address is the bech32-encoded address of the validator."},"entries":{"type":"array","items":{"type":"object","properties":{"creation_height":{"type":"string","format":"int64","description":"creation_height is the height which the unbonding took place."},"completion_time":{"type":"string","format":"date-time","description":"completion_time is the unix time for unbonding completion."},"initial_balance":{"type":"string","description":"initial_balance defines the tokens initially scheduled to receive at completion."},"balance":{"type":"string","description":"balance defines the tokens to receive at completion."},"unbonding_id":{"type":"string","format":"uint64","title":"Incrementing id that uniquely identifies this entry"},"unbonding_on_hold_ref_count":{"type":"string","format":"int64","title":"Strictly positive if this entry's unbonding has been stopped by external modules"}},"description":"UnbondingDelegationEntry defines an unbonding object with relevant metadata."},"description":"entries are the unbonding delegation entries."}},"description":"UnbondingDelegation stores all of a single delegator's unbonding bonds\nfor a single validator in an time-ordered list."}},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"description":"QueryValidatorUnbondingDelegationsResponse is response type for the\nQuery/ValidatorUnbondingDelegations RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"validator_addr","description":"validator_addr defines the validator address to query for.","in":"path","required":true,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["staking"],"method":"get","path":"/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"ValidatorUnbondingDelegations","description":{"content":"ValidatorUnbondingDelegations queries unbonding delegations of a validator.","type":"text/plain"},"url":{"path":["cosmos","staking","v1beta1","validators",":validator_addr","unbonding_delegations"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) validator_addr defines the validator address to query for.","type":"text/plain"},"type":"any","value":"","key":"validator_addr"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## ValidatorUnbondingDelegations + + + +ValidatorUnbondingDelegations queries unbonding delegations of a validator. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
    unbonding_responses object[]
  • Array [
  • entries object[]
    + +entries are the unbonding delegation entries. + +
  • Array [
  • ]
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/validator.api.mdx b/docs/greenfield-api/validator.api.mdx new file mode 100644 index 000000000..2d34b2d24 --- /dev/null +++ b/docs/greenfield-api/validator.api.mdx @@ -0,0 +1,149 @@ +--- +id: validator +title: "Validator" +description: "Validator queries validator info for given validator address." +sidebar_label: "Validator" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"Validator","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"validator":{"type":"object","properties":{"operator_address":{"type":"string","description":"operator_address defines the address of the validator's operator; bech encoded in JSON."},"consensus_pubkey":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"jailed":{"type":"boolean","description":"jailed defined whether the validator has been jailed from bonded status or not."},"status":{"description":"status is the validator status (bonded/unbonding/unbonded).","type":"string","enum":["BOND_STATUS_UNSPECIFIED","BOND_STATUS_UNBONDED","BOND_STATUS_UNBONDING","BOND_STATUS_BONDED"],"default":"BOND_STATUS_UNSPECIFIED"},"tokens":{"type":"string","description":"tokens define the delegated tokens (incl. self-delegation)."},"delegator_shares":{"type":"string","description":"delegator_shares defines total shares issued to a validator's delegators."},"description":{"description":"description defines the description terms for the validator.","type":"object","properties":{"moniker":{"type":"string","description":"moniker defines a human-readable name for the validator."},"identity":{"type":"string","description":"identity defines an optional identity signature (ex. UPort or Keybase)."},"website":{"type":"string","description":"website defines an optional website link."},"security_contact":{"type":"string","description":"security_contact defines an optional email for security contact."},"details":{"type":"string","description":"details define other optional details."}}},"unbonding_height":{"type":"string","format":"int64","description":"unbonding_height defines, if unbonding, the height at which this validator has begun unbonding."},"unbonding_time":{"type":"string","format":"date-time","description":"unbonding_time defines, if unbonding, the min time for the validator to complete unbonding."},"commission":{"description":"commission defines the commission parameters.","type":"object","properties":{"commission_rates":{"description":"commission_rates defines the initial commission rates to be used for creating a validator.","type":"object","properties":{"rate":{"type":"string","description":"rate is the commission rate charged to delegators, as a fraction."},"max_rate":{"type":"string","description":"max_rate defines the maximum commission rate which validator can ever charge, as a fraction."},"max_change_rate":{"type":"string","description":"max_change_rate defines the maximum daily increase of the validator commission, as a fraction."}}},"update_time":{"type":"string","format":"date-time","description":"update_time is the last time the commission rate was changed."}}},"min_self_delegation":{"type":"string","description":"min_self_delegation is the validator's self declared minimum self delegation.\n\nSince: cosmos-sdk 0.46"},"unbonding_on_hold_ref_count":{"type":"string","format":"int64","title":"strictly positive if this validator's unbonding has been stopped by external modules"},"unbonding_ids":{"type":"array","items":{"type":"string","format":"uint64"},"title":"list of unbonding ids, each uniquely identifing an unbonding of this validator"},"self_del_address":{"type":"string","description":"self_del_address defines the address of the validator for self delegation."},"relayer_address":{"type":"string","description":"relayer_address defines the address of the validator's authorized relayer;."},"challenger_address":{"type":"string","description":"challenger_address defines the address of the validator's authorized challenger;."},"bls_key":{"type":"string","format":"byte","title":"bls_key defines the bls pubkey of the validator's authorized relayer/challenger/operator;"}},"description":"Validator defines a validator, together with the total amount of the\nValidator's bond shares and their exchange rate to coins. Slashing results in\na decrease in the exchange rate, allowing correct calculation of future\nundelegations without iterating over delegators. When coins are delegated to\nthis validator, the validator is credited with a delegation whose number of\nbond shares is based on the amount of coins delegated divided by the current\nexchange rate. Voting power can be calculated as total bonded shares\nmultiplied by exchange rate."}},"title":"QueryValidatorResponse is response type for the Query/Validator RPC method"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"validator_addr","description":"validator_addr defines the validator address to query for.","in":"path","required":true,"schema":{"type":"string"}}],"tags":["staking"],"description":"Validator queries validator info for given validator address.","method":"get","path":"/cosmos/staking/v1beta1/validators/{validator_addr}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"Validator","description":{"content":"Validator queries validator info for given validator address.","type":"text/plain"},"url":{"path":["cosmos","staking","v1beta1","validators",":validator_addr"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) validator_addr defines the validator address to query for.","type":"text/plain"},"type":"any","value":"","key":"validator_addr"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Validator + + + +Validator queries validator info for given validator address. + +
Path Parameters
+ +A successful response. + +
Schema
    validator object
    + +Validator defines a validator, together with the total amount of the +Validator's bond shares and their exchange rate to coins. Slashing results in +a decrease in the exchange rate, allowing correct calculation of future +undelegations without iterating over delegators. When coins are delegated to +this validator, the validator is credited with a delegation whose number of +bond shares is based on the amount of coins delegated divided by the current +exchange rate. Voting power can be calculated as total bonded shares +multiplied by exchange rate. + +
    consensus_pubkey object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
    description object
    + +description defines the description terms for the validator. + +
    commission object
    + +commission defines the commission parameters. + +
    commission_rates object
    + +commission_rates defines the initial commission rates to be used for creating a validator. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/validators.api.mdx b/docs/greenfield-api/validators.api.mdx new file mode 100644 index 000000000..0330a66cb --- /dev/null +++ b/docs/greenfield-api/validators.api.mdx @@ -0,0 +1,146 @@ +--- +id: validators +title: "Validators" +description: "Validators queries all validators that match the given status." +sidebar_label: "Validators" +hide_title: true +hide_table_of_contents: true +api: {"description":"Validators queries all validators that match the given status.","operationId":"Validators","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"validators":{"type":"array","items":{"type":"object","properties":{"operator_address":{"type":"string","description":"operator_address defines the address of the validator's operator; bech encoded in JSON."},"consensus_pubkey":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"},"jailed":{"type":"boolean","description":"jailed defined whether the validator has been jailed from bonded status or not."},"status":{"description":"status is the validator status (bonded/unbonding/unbonded).","type":"string","enum":["BOND_STATUS_UNSPECIFIED","BOND_STATUS_UNBONDED","BOND_STATUS_UNBONDING","BOND_STATUS_BONDED"],"default":"BOND_STATUS_UNSPECIFIED"},"tokens":{"type":"string","description":"tokens define the delegated tokens (incl. self-delegation)."},"delegator_shares":{"type":"string","description":"delegator_shares defines total shares issued to a validator's delegators."},"description":{"description":"description defines the description terms for the validator.","type":"object","properties":{"moniker":{"type":"string","description":"moniker defines a human-readable name for the validator."},"identity":{"type":"string","description":"identity defines an optional identity signature (ex. UPort or Keybase)."},"website":{"type":"string","description":"website defines an optional website link."},"security_contact":{"type":"string","description":"security_contact defines an optional email for security contact."},"details":{"type":"string","description":"details define other optional details."}}},"unbonding_height":{"type":"string","format":"int64","description":"unbonding_height defines, if unbonding, the height at which this validator has begun unbonding."},"unbonding_time":{"type":"string","format":"date-time","description":"unbonding_time defines, if unbonding, the min time for the validator to complete unbonding."},"commission":{"description":"commission defines the commission parameters.","type":"object","properties":{"commission_rates":{"description":"commission_rates defines the initial commission rates to be used for creating a validator.","type":"object","properties":{"rate":{"type":"string","description":"rate is the commission rate charged to delegators, as a fraction."},"max_rate":{"type":"string","description":"max_rate defines the maximum commission rate which validator can ever charge, as a fraction."},"max_change_rate":{"type":"string","description":"max_change_rate defines the maximum daily increase of the validator commission, as a fraction."}}},"update_time":{"type":"string","format":"date-time","description":"update_time is the last time the commission rate was changed."}}},"min_self_delegation":{"type":"string","description":"min_self_delegation is the validator's self declared minimum self delegation.\n\nSince: cosmos-sdk 0.46"},"unbonding_on_hold_ref_count":{"type":"string","format":"int64","title":"strictly positive if this validator's unbonding has been stopped by external modules"},"unbonding_ids":{"type":"array","items":{"type":"string","format":"uint64"},"title":"list of unbonding ids, each uniquely identifing an unbonding of this validator"},"self_del_address":{"type":"string","description":"self_del_address defines the address of the validator for self delegation."},"relayer_address":{"type":"string","description":"relayer_address defines the address of the validator's authorized relayer;."},"challenger_address":{"type":"string","description":"challenger_address defines the address of the validator's authorized challenger;."},"bls_key":{"type":"string","format":"byte","title":"bls_key defines the bls pubkey of the validator's authorized relayer/challenger/operator;"}},"description":"Validator defines a validator, together with the total amount of the\nValidator's bond shares and their exchange rate to coins. Slashing results in\na decrease in the exchange rate, allowing correct calculation of future\nundelegations without iterating over delegators. When coins are delegated to\nthis validator, the validator is credited with a delegation whose number of\nbond shares is based on the amount of coins delegated divided by the current\nexchange rate. Voting power can be calculated as total bonded shares\nmultiplied by exchange rate."},"description":"validators contains all the queried validators."},"pagination":{"description":"pagination defines the pagination in the response.","type":"object","properties":{"next_key":{"type":"string","format":"byte","description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results."},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}}},"title":"QueryValidatorsResponse is response type for the Query/Validators RPC method"}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"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."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"}}}}}}}},"parameters":[{"name":"status","description":"status enables to query for validators matching a given status.","in":"query","required":false,"schema":{"type":"string"}},{"name":"pagination.key","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","in":"query","required":false,"schema":{"type":"string","format":"byte"}},{"name":"pagination.offset","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.limit","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","in":"query","required":false,"schema":{"type":"string","format":"uint64"}},{"name":"pagination.count_total","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pagination.reverse","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","in":"query","required":false,"schema":{"type":"boolean"}}],"tags":["staking"],"method":"get","path":"/cosmos/staking/v1beta1/validators","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"Validators","description":{"content":"Validators queries all validators that match the given status.","type":"text/plain"},"url":{"path":["cosmos","staking","v1beta1","validators"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"status enables to query for validators matching a given status.","type":"text/plain"},"key":"status","value":""},{"disabled":false,"description":{"content":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"text/plain"},"key":"pagination.key","value":""},{"disabled":false,"description":{"content":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"text/plain"},"key":"pagination.offset","value":""},{"disabled":false,"description":{"content":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"text/plain"},"key":"pagination.limit","value":""},{"disabled":false,"description":{"content":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"text/plain"},"key":"pagination.count_total","value":""},{"disabled":false,"description":{"content":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"text/plain"},"key":"pagination.reverse","value":""}],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Validators + + + +Validators queries all validators that match the given status. + +
Query Parameters
+ +A successful response. + +
Schema
    validators object[]
    + +validators contains all the queried validators. + +
  • Array [
  • consensus_pubkey object
    + +`Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + +
    description object
    + +description defines the description terms for the validator. + +
    commission object
    + +commission defines the commission parameters. + +
    commission_rates object
    + +commission_rates defines the initial commission rates to be used for creating a validator. + +
  • ]
  • pagination object
    + +pagination defines the pagination in the response. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/verify-permission.api.mdx b/docs/greenfield-api/verify-permission.api.mdx new file mode 100644 index 000000000..dcf5016ad --- /dev/null +++ b/docs/greenfield-api/verify-permission.api.mdx @@ -0,0 +1,38 @@ +--- +id: verify-permission +title: "VerifyPermission" +description: "Queries a list of VerifyPermission items." +sidebar_label: "VerifyPermission" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"VerifyPermission","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"effect":{"type":"string","enum":["EFFECT_UNSPECIFIED","EFFECT_ALLOW","EFFECT_DENY"],"default":"EFFECT_UNSPECIFIED","title":"Effect define the effect of the operation permission, include Allow or deny"}}}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"parameters":[{"name":"operator","in":"path","required":true,"schema":{"type":"string"}},{"name":"bucket_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"action_type","in":"path","required":true,"schema":{"type":"string","enum":["ACTION_UNSPECIFIED","ACTION_UPDATE_BUCKET_INFO","ACTION_DELETE_BUCKET","ACTION_CREATE_OBJECT","ACTION_DELETE_OBJECT","ACTION_COPY_OBJECT","ACTION_GET_OBJECT","ACTION_EXECUTE_OBJECT","ACTION_LIST_OBJECT","ACTION_UPDATE_GROUP_MEMBER","ACTION_DELETE_GROUP","ACTION_UPDATE_OBJECT_INFO","ACTION_UPDATE_GROUP_EXTRA","ACTION_TYPE_ALL"]}},{"name":"object_name","in":"query","required":false,"schema":{"type":"string"}}],"tags":["storage"],"description":"Queries a list of VerifyPermission items.","method":"get","path":"/greenfield/storage/verify_permission/{operator}/{bucket_name}/{action_type}","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"VerifyPermission","description":{"content":"Queries a list of VerifyPermission items.","type":"text/plain"},"url":{"path":["greenfield","storage","verify_permission",":operator",":bucket_name",":action_type"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"object_name","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"operator"},{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"bucket_name"},{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"action_type"}]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## VerifyPermission + + + +Queries a list of VerifyPermission items. + +
Path Parameters
Query Parameters
+ +A successful response. + +
Schema
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/greenfield-api/virtual-group-params.api.mdx b/docs/greenfield-api/virtual-group-params.api.mdx new file mode 100644 index 000000000..49e5e8754 --- /dev/null +++ b/docs/greenfield-api/virtual-group-params.api.mdx @@ -0,0 +1,42 @@ +--- +id: virtual-group-params +title: "VirtualGroupParams" +description: "Parameters queries the parameters of the module." +sidebar_label: "VirtualGroupParams" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"VirtualGroupParams","responses":{"200":{"description":"A successful response.","content":{"*/*":{"schema":{"type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","type":"object","properties":{"deposit_denom":{"type":"string","description":"deposit_denom defines the staking coin denomination."},"gvg_staking_per_bytes":{"type":"string","title":"store price, in bnb wei per charge byte"},"max_local_virtual_group_num_per_bucket":{"type":"integer","format":"int64","title":"the max number of lvg which allowed in a bucket"},"max_global_virtual_group_num_per_family":{"type":"integer","format":"int64","title":"the max number of gvg which can exist in a family"},"max_store_size_per_family":{"type":"string","format":"uint64","title":"if the store size reach the exceed, the family is not allowed to sever more buckets"}}}},"description":"QueryParamsResponse is response type for the Query/Params RPC method."}}}},"default":{"description":"An unexpected error response.","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string"},"value":{"type":"string","format":"byte"}}}}}}}}}},"tags":["virtualgroup"],"description":"Parameters queries the parameters of the module.","method":"get","path":"/greenfield/virtualgroup/params","servers":[{"url":"https://greenfield-chain.bnbchain.org","description":"Mainnet RPC (uses live data)"},{"url":"https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org","description":"Testnet RPC (uses test data)"}],"info":{"title":"Greenfield - gRPC Gateway docs","description":"A REST interface for state queries","version":"1.0.0"},"postman":{"name":"VirtualGroupParams","description":{"content":"Parameters queries the parameters of the module.","type":"text/plain"},"url":{"path":["greenfield","virtualgroup","params"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"*/*"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/greenfield-api/greenfield-grpc-gateway-docs +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## VirtualGroupParams + + + +Parameters queries the parameters of the module. + +
+ +A successful response. + +
Schema
    params object
    + +params holds all the parameters of this module. + +
+ +An unexpected error response. + +
Schema
    details object[]
  • Array [
  • ]
+ \ No newline at end of file diff --git a/docs/modules/billing-and-payment.md b/docs/modules/billing-and-payment.md new file mode 100644 index 000000000..f46b00799 --- /dev/null +++ b/docs/modules/billing-and-payment.md @@ -0,0 +1,680 @@ +# Billing and Payment + +If you're interested in knowing the real-time pricing for storage and querying on Greenfield, we invite you to +the [Price Calculator](https://dcellar.io/pricing-calculator). + +The fees are paid on Greenfield in the style of +`Stream` from users to Global Virtual Groups and Global Virtual Group Families at a constant rate. +The fees are charged every second as they are used. + +## Concepts and Formulas + +Streaming is a constant by-the-second movement of funds from a sending +account to a receiving account. Instead of sending payment transactions +now and then, Greenfield records the static balance, the latest update +timestamp, and flow rate in its payment module, and calculates the +dynamic balance with a formula using this data in the records. If the +net flow rate is not zero, the dynamic balance will change as time +elapses. + +### Terminology + +- **Payment Module:** This module is a special ledger system designed + to manage billing and payments on the Greenfield blockchain. + Funds will be deposited or charged into it from users' balance or + payment accounts via the Payment Module; + +- **Stream Account**: The Payment Module has its own ledger for + billing management. Users can deposit and withdraw funds into + their corresponding "accounts" on the payment module ledger. These + accounts are called `Stream Account`, which will directly interact + with the stream payment functions and bill the users for the + storage and data service; + +- **Payment Account**: Payment account has been discussed in other + sections of Part 1 and Part 3 already. It is actually a type of + Stream Account. Users can create different payment accounts and + associate it with different buckets for different purposes; + +- **Payment Stream:** Whenever the users add, delete or change a storage + object or download a data package, they add or change one or more + `payment streams` for that service provided by SPs; + +- **Flow Rate**: The per-second rate at which a sender decreases its + net outflow stream and increases a receiver's net inflow stream + when creating or updating a payment stream; + +- **Netflow Rate**: The per-second rate that an account's balance is + changing. It is the sum of the account's inbound and outbound + flow rates; + +- **Sender**: The stream account that starts the payment stream by + specifying a receiver and a flow rate at which its net flow + decreases; + +- **Receiver**: The stream account on the receiving end of one or more payment streams. + +- **CRUD Timestamp**: The timestamp that indicates when a user + creates, updates, or deletes a payment stream; + +- **Delta Balance**: The amount of the stream account's balance that has + changed since the latest CRUD timestamp due to the flow. It can be + positive or negative; + +- **Static Balance**: The balance of the stream account at the latest + CRUD timestamp; + +- **Dynamic Balance**: The actual balance of a stream account. It is + the sum of the Static Balance and the Delta Balance. + +When a user's stream account is initiated in the payment module by +deposit, several fields will be recorded for this stream account: + +- **CRUD Timestamp** - will be the timestamp at the time; + +- **Static Balance** - will be the deposit amount; + +- **Netflow Rate** - will be 0; + +- **Buffer Balance** - will be 0. + +### Formula + +*Static Balance = Initial Balance at latest CRUD timestamp* + +*Delta Balance = Netflow Rate \* Seconds elapsed since latest CRUD timestamp* + +*Current Balance = Static Balance + Delta Balance* + +*Buffer Balance = - Netflow Rate \* pre-configured ReserveTime if Netflow Rate is negative* + +![funds-flow](../../../../static/asset/04-Funds-Flow.jpg) + +
How a User Receives Inflow and Outflow of Funds
+ + +Every time a user creates, updates, or deletes a payment stream, many +variables in the above formulas will be updated and the users' stream accounts in the +payment module will be settled. + +- The net flow for the user's stream account in the payment module + will be re-calculated to net all of its inbound and outbound flow + rates by adding/removing the new payment stream against the + current NetFlow Rate. (E.g. when a user creates a new object whose + price is \$0.4/month, its NetFlow Rate will add -\$0.4/month); + +- If the NetFlow rate is negative, the associated amount of BNB will + be reserved in a buffer balance. It is used to avoid the dynamic + balance becoming negative. When the dynamic balance becomes under + the threshold, the account will be forced settled; + +- CRUD Timestamp will become the current timestamp; + +- Static Balance will be re-calculated. The previous dynamic balance + will be settled. The new static Balance will be the Current + Balance plus the change of the Buffer Balance. + +## Key Workflow + +### Deposit and Withdrawal + +All users can deposit and withdraw BNB in the payment +module. The `StaticBalance` in the `StreamRecord` data struct will be +"settled" first: the `CRUDTimeStamp` will be updated and `StaticBalance` +will be netted with `DeltaBalance`. Then the deposit and withdrawal number +will try to add/reduce the `StaticBalance` in the record. If the static +balance is less than the withdrawal amount, the withdrawal will fail. If +the withdrawal amount is equal to or greater than 100BNB, it will be +timelock-ed for 1 day duration. + +Deposit and withdrawal via cross-chain will also be supported to enable +users to deposit and withdraw from BSC directly. + +Specifically, the payment deposit can be triggered automatically during +the creation of objects or the addition of data packages. As long as +users have assets in their address accounts and payment accounts, the +payment module may directly charge the users by moving the funds from +address accounts. + +### Payment Stream + +Payment streams are flowing in one direction. Whenever the users deposit +from their address accounts into the stream accounts (including users' +default stream account and created payment accounts), the funds first go +from the users' address accounts to a system account maintained by the +Payment Module, although the fund size and other payment parameters will +be recorded on the users' stream account, i.e. the `StreamRecord` record, +in the Payment Module ledger. When the payment is settled, the funds +will go from the system account to Global Virtual Groups' or Global Virtual +Group Families' virtual funding addresses according to +their in-flow calculation. + +Every time users do the actions below, their `StreamRecord` will +be updated: + +- Creating an object will create new streams to the Global Virtual Groups + and Global Virtual Group Family; + +- Deleting an object will delete associated streams to the Global Virtual Groups + and Global Virtual Group Family; + +- Adjusting the read quota will + create/delete/update the associated streams. + +### Forced Settlement + +If a user doesn't deposit for a long time, his previous deposit may be +all used up for the stored objects. Greenfield has a forced settlement +mechanism to ensure enough funds are secured for further service fees. + +There are two configurations, `ReserveTime` and `ForcedSettleTime`. + +Let's take an example where the `ReserveTime` is 7 days and the `ForcedSettleTime` is 1 day. +If a user wants to store an object at the price of +approximately $0.1 per month($0.00000004/second), he must reserve fees +for 7 days in the buffer balance, which is `$0.00000004 * 7 * 86400 = +$0.024192`. If the user deposits is $1 initially, the stream payment +record will be as below: + +- **CRUD Timestamp**: 100; + +- **Static Balance**: $0.975808; + +- **Netflow Rate**: -$0.00000004/sec; + +- **Buffer Balance**: $0.024192. + +After 10000 seconds, the dynamic balance of the user will be `0.975808 - 10000 * 0.00000004 = 0.975408`. + +After 24395200 seconds(approximately 282 days), the dynamic balance of +the user will become negative. Users should have some alarms for such +events that remind them to supply more funds in time. + +If no more funds are supplied and the dynamic balance plus buffer +balance is under the forced settlement threshold, the account will be +forcibly settled. All payment streams of the account will be closed and +the account will be marked as out of balance. The download speed for all +objects associated with the account or payment account will be +downgraded. The objects will be deleted by the SPs if no fund is +provided within the predefined threshold. + +The forced settlement will also charge some fees which is another +incentive for users to replenish funds proactively. + +Let's say the `ForceSettlementTime` variable is set to 1 day. After 24913601 +seconds(approximately 288 days), the dynamic balance becomes `0.975808 - +24913601 *0.00000004 = -0.02073604`, plus the buffer balance is +$0.00345596. The forced settlement threshold is `86400* 0.00000004 = +0.003456`. The forced settlement will be triggered, and the record of the +user will become as below: + +- **CRUD Timestamp**: 24913701; + +- **Static Balance**: \$0; + +- **Netflow Rate**: \$0/sec; + +- **Buffer Balance**: \$0. + +The validators will get the remaining $0.00345596 as a reward. The +account will be marked as "frozen" and his objects get downgraded +by SPs. + +Every time a stream record is updated, Greenfield calculates the time +when the account will be out of balance. So Greenfield can keep an +on-chain list to trace the timestamps for the potential forced +settlement. The list will be checked by the end of every block +processing. When the block time passes the forced settlement timestamp, +the settlement of the associated stream accounts will be triggered +automatically. There is another parameter `MaxAutoSettleFlowCount` controls +how many outflows (not `StreamRecord`) will be force settled in a block. + +For example, when `MaxAutoSettleFlowCount` is 10, and a `StreamRecord` has 15 +outflows, it will take 2 blocks to totally force settle the record, and in the +first block, the account will be marked as "frozen". + +### Payment Account + +Payment account is a special "Stream Account" type in the Payment +Module. Users can create multiple payment accounts and have the +permission to link buckets to different payment accounts to pay for +storage and data package. + +The payment accounts have the below traits: + +- Every user can create multiple payment accounts. The payment + accounts created by the user are recorded with a map on the + Greenfield blockchain. + +- The address format of the payment account is the same as normal + accounts. It's derived by the hash of the user address and + payment account index. The payment account only exists in the + storage payment module. Users can deposit into, withdraw from and + query the balance of payment accounts in the payment module, which + means payment accounts cannot be used for transfer or staking. + +- Users can only associate their buckets with their payment accounts + to pay for storage and bandwidth. Users cannot associate their own + buckets with others' payment accounts, and users cannot associate + others' buckets with their own payment accounts. + +- The owner of a payment account is the user who creates it. The owner + can set it non-refundable. It's a one-way setting and can not be + revoked. Thus, users can set some objects as "public goods" which + can receive donations for storage and bandwidth while preserving + the ownership. + +### Account Freeze and Resume + +If a payment account is out of balance, it will be settled and set a +flag as out of balance. + +The `NetflowRate` will be set to 0, while the current settings of the +stream pay will be backed up in another data structure. The download +speed for all objects under this account will be downgraded. + +If someone deposits BNB tokens into a frozen account and the static balance is +enough for reserved fees, the account will be resumed automatically. The +stream pay will be recovered from the backup. Usually, when user deposits to his +payment account, the payment account will be "active" quickly. However, if there +are many outflows associated to the payment account, the payment account will be +queued for resume and handled in the following blocks. There is a parameter +`MaxAutoResumeFlowCount` designed for this. For example, when `MaxAutoResumeFlowCount` +is 10, if a user wants to resume a payment account with 5 outflows, the payment account +will be "active" immediately, and if a user wants to resume a payment account with 15 +outflow, it will take two blocks and finally the payment account will be "active". + +During the `OutOfBalance` period, no objects can be associated with this +payment account again, which results in no object can be created under +the bucket associated with the account. + +If the associated object is deleted, the backup stream pay settings will +be changed accordingly to ensure it reflects the latest once the account +is resumed. + +### Storage Fee Price and Adjustment + +The cost of **object storage fee** and **data package fee** are composed of 3 parts: + +- The primary SP will store the whole object file; +- The secondary SPs will store part of the object file as a replica; +- The primary SP will supply all the download requests of the object. + +Hence, there are 3 different on-chain prices globally, which are used to charge storage +and download: + +- Primary SP Store Price; +- Primary SP Read Price; +- Secondary SP Store Price. + +Every SP can set their own suggested store price and read price via on-chain transactions. +At the first block of each month, the median all SPs' store prices will be calculated as +the Primary SP Store Price, the Secondary SP Store Price will be calculated as a proportion +of the Primary SP Store Price (e.g. 12%, which can be governed), and the median of all SPs' +read prices will be calculated as the Primary SP Read Price. + +To make the global prices predictable to users and avoid price war, during the last two days +of a month all SPs are not allowed to set their own suggested prices. + +The unit of price is a decimal, which indicates wei BNB per byte per second. +E.g. the price is 0.027, means approximately $0.022 / GB / Month. +(`0.027 * (30 * 86400) * (1024 * 1024 * 1024) * 300 / 10 ** 18 ≈ 0.022`, assume the BNB price is 300 USD) + +The storage fees are calculated and charged in bucket level. +The primary store price, secondary store price, and primary read price are stored in the chain state +and the same for all buckets at a specific time. +The total size of all objects and per Global Virtual Group served size in a bucket will be recorded in the bucket +metadata. +The charge size will be used instead of the real size, e.g. files under 1KB will be charged as 1KB to cover the cost. +The payment bill will be calculated by the size statistics and prices, and it will be charged from +the stream account specified in the bucket to the Global Virtual Groups and Global Virtual Group family. + +## Payment States + +The payment module keeps state of the following primary objects: + +- The stream payment ledger; +- The payment accounts and total account created by users; +- An AutoSettleRecord list to keep track of the auto-settle timestamp of the stream accounts. + +In addition, the payment module keeps the following indexes to manage the aforementioned state: + +- StreamRecord Index. `address -> StreamRecord`; +- OutFlow Index. `address -> OutFlow`; +- PaymentAccount Index. `address -> PaymentAccount`; +- PaymentAccountCount Index. `address -> PaymentAccountCount`; +- AutoSettleRecord Index. `settle-timestamp | address -> 0`. +- AutoResumeRecord Index. `resume-timestamp | address -> 0`. + +``` +message StreamRecord { + string account = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + int64 crud_timestamp = 2; + string netflow_rate = 3 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + string staticBalance = 4 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + string bufferBalance = 5 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + string lockBalance = 6 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + int32 status = 7; + int64 settleTimestamp = 8; + uint64 out_flow_count = 9; + string frozen_netflow_rate = 10 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} + +message OutFlow { + string to_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string rate = 2 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + int32 status = 3; +} + +message PaymentAccount { + string addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string owner = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + bool refundable = 3; +} + +message PaymentAccountCount { + string owner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + uint64 count = 2; +} + +message AutoSettleRecord { + int64 timestamp = 1; + string addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +message AutoResumeRecord { + int64 timestamp = 1; + string addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} +``` + +## Payment Module Parameters + +The payment module contains the following parameters, +they can be updated with governance. The `VersionedParams` will keep track of +all versions of `ReserveTime` and `ValidatorTaxRate`. + +``` +message Params { + VersionedParams versioned_params = 1 [(gogoproto.nullable) = false]; + // The maximum number of payment accounts that can be created by one user + uint64 payment_account_count_limit = 2 [(gogoproto.moretags) = "yaml:\"payment_account_count_limit\""]; + // Time duration threshold of forced settlement. + // If dynamic balance is less than NetOutFlowRate * forcedSettleTime, the account can be forced settled. + uint64 forced_settle_time = 3 [(gogoproto.moretags) = "yaml:\"forced_settle_time\""]; + // the maximum number of flows that will be auto forced settled in one block + uint64 max_auto_settle_flow_count = 4 [(gogoproto.moretags) = "yaml:\"max_auto_settle_flow_count\""]; + // the maximum number of flows that will be auto resumed in one block + uint64 max_auto_resume_flow_count = 5 [(gogoproto.moretags) = "yaml:\"max_auto_resume_flow_count\""]; + // The denom of fee charged in payment module + string fee_denom = 6 [(gogoproto.moretags) = "yaml:\"fee_denom\""]; + // The withdrawal amount threshold to trigger time lock + string withdraw_time_lock_threshold = 7 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" + ]; + // The duration of the time lock for a big amount withdrawal + uint64 withdraw_time_lock_duration = 8 [(gogoproto.moretags) = "yaml:\"withdraw_time_lock_duration\""]; +} + +// VersionedParams defines the parameters with multiple versions, each version is stored with different timestamp. +message VersionedParams { + // Time duration which the buffer balance need to be reserved for NetOutFlow e.g. 6 month + uint64 reserve_time = 1 [(gogoproto.moretags) = "yaml:\"reserve_time\""]; + // The tax rate to pay for validators in storage payment. The default value is 1%(0.01) + string validator_tax_rate = 2 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} +``` + +| Key | Type | Example | +|:----------------------------:|:------:|:-------------------:| +| reserve_time | uint64 | 15552000 (180 days) | +| payment_account_count_limit | uint64 | 200 | +| forced_settle_time | uint64 | 604800 (7 days) | +| max_auto_settle_flow_count | uint64 | 100 | +| max_auto_resume_flow_count | uint64 | 100 | +| fee_denom | string | BNB | +| withdraw_time_lock_threshold | Int | 100*1e18 | +| withdraw_time_lock_duration | uint64 | 86400 (1 day) | + +## Payment Module Keepers + +The payment module keeper provides access to query the parameters, +payment account owner, storage price and several ways to update the ledger. + +Currently, it's only used by the storage module. + +``` +type PaymentKeeper interface { + GetParams(ctx sdk.Context) paymenttypes.Params + IsPaymentAccountOwner(ctx sdk.Context, addr string, owner string) bool + GetStoragePrice(ctx sdk.Context, params paymenttypes.StoragePriceParams) (price paymenttypes.StoragePrice, err error) + ApplyFlowChanges(ctx sdk.Context, from string, flowChanges []paymenttypes.OutFlow) (err error) + ApplyUserFlowsList(ctx sdk.Context, userFlows []paymenttypes.UserFlows) (err error) + UpdateStreamRecordByAddr(ctx sdk.Context, change *paymenttypes.StreamRecordChange) (ret *paymenttypes.StreamRecord, err error) +} +``` + +## Messages + +### MsgCreatePaymentAccount + +Used to create new payment account for a user. + +``` +message MsgCreatePaymentAccount { + option (cosmos.msg.v1.signer) = "creator"; + + // creator is the address of the stream account that created the payment account + string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} +``` + +### MsgDeposit + +Used to deposit BNB tokens to a stream account. + +``` +message MsgDeposit { + option (cosmos.msg.v1.signer) = "creator"; + + // creator is the message signer for MsgDeposit and the address of the account to deposit from + string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // to is the address of the account to deposit to + string to = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // amount is the amount to deposit + string amount = 3 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} +``` + +### MsgWithdraw + +Used to withdraw BNB tokens from a stream account. + +When the withdrawal amount is too large (i.e. equal to or greater than `withdraw_time_lock_threshold`, which is defined +as a payment parameter), the withdrawal will be timelock-ed for a specific duration (i.e. `withdraw_time_lock_duration` +seconds, which is also defined as a payment parameter), and after the duration the user can withdraw the locked amount +by sending a message without `from` field. For example, on testnet, when withdrawal amount is equal to or greater than +100 BNB, the withdrawal will be locked for 1 day duration. + +``` +message MsgWithdraw { + option (cosmos.msg.v1.signer) = "creator"; + + // creator is the message signer for MsgWithdraw and the address of the receive account + string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // from is the address of the account to withdraw from + string from = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // amount is the amount to withdraw + string amount = 3 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} +``` + +### MsgDisableRefund + +Used to make a stream account non-refundable. + +``` +message MsgDisableRefund { + option (cosmos.msg.v1.signer) = "owner"; + + // owner is the message signer for MsgDisableRefund and the address of the payment account owner + string owner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // addr is the address of the payment account to disable refund + string addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} +``` + +### MsgSetBucketFlowRateLimit + +Used to set the flow rate limit for a bucket. + +``` +message MsgSetBucketFlowRateLimit { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the account address of the operator, either the object owner or the updater with granted permission. + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // bucket_name defines the name of the bucket + string bucket_name = 2; + // bucket_owner defines the account address of the bucket owner + string bucket_owner = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // payment_address defines an account address to pay the fee for the bucket. + string payment_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // flow_rate_limit defines the flow rate limit of the bucket + string flow_rate_limit = 5 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} +``` + +## Related Storage Key Workflows + +### Create Bucket + +When creating object, the **data package** can be defined by the bucket owner. +If the **data package** is not zero, there will be two outflows created for the payment account. + +- the outflow going to Global Virtual Group Family will be created for read fee +- the outflow going to validator tax pool will be created for extra validator tax fee + +### Update Bucket + +The bucket owner can update the **data package** of his bucket, e.g., increasing the read quota. +Then the outflow will be updated to reflect the new quota. + +- the outflow which goes to Global Virtual Group Family will be updated +- the outflow which goes to validator tax pool will be updated + +The bucket owner can also assign new payment account to his bucket. In such case, + +- old payment account's outflow which goes to the Global Virtual Group Family will be decreased or removed +- old payment account's outflow which goes to validator tax pool will be decreased or removed +- new payment accounts' outflow going to Global Virtual Group Family will be created for read fee +- new payment accounts' outflow going to validator tax pool will be created for extra validator tax fee + +Be noted, if read fee or store fee has been changed (e.g., the primary sp updated its read fee), during updating bucket, +it will also recalculate the store fee for all objects in the bucket. After updating bucket, +the bucket need to pay using the new price for both **object storage fee** and **data package fee**. + +### Delete Bucket + +When deleting a bucket, there should be no object in it. The related outflows will be updated, + +- the outflow which goes to the Global Virtual Group Family will be decreased or removed +- the outflow which goes to validator tax pool will be decreased or removed + +### Set Bucket Flow Rate Limit + +If the flow rate limit set for a bucket is less than the current flow rate, the related outflows will be updated, + +- the outflow which goes to the Global Virtual Group Family will be decreased to 0 or removed +- the outflow which goes to validator tax pool will be decreased to 0 or removed + +### Create Object + +When creating an object which is not empty, there will be not outflow change for the bucket's payment account. +However, some amount of BNB will be locked to make sure the payment account has enough BNB for storing the object +for at least `ReserveTime` long. + +The locked fee is calculated as below: + +``` + primaryRate = PrimaryStorePrice * ChargeSize + secondaryRate = SecondaryStorePrice * ChargeSize * SecondaySPNumber + validatorTaxRate = ValidatorTaxRate * (primaryRate + secondaryRate) + + totalRate = primaryRate + secondaryRate + validatorTaxRate + lockAmount = totalRate * ReserveTime +``` + +The `ChargeSize` is calculated from the object's payload size, if the payload size is less than **128KB** then `ChargeSize` is **128KB**, otherwise `ChargeSize` is equal to payload size. + +> [!NOTE] +> To optimize your cost, it is advisable to consolidate small files into payloads exceeding **128KB**. Failing to do so may result in higher charges. + +### Seal Object + +When creating an object which is empty, it will be sealed directly. + + +When sealing object, the locked fee will be moved from lock balance to buffer balance and the following outflows will be +created for the payment account. + +- the outflow going to Global Virtual Group Family will be created for primary store fee +- the outflow going to Global Virtual Group will be created for secondary store fee +- the outflow going to validator tax pool will be created for extra validator tax fee + +Be noted, if read fee or store fee has been changed (e.g., the primary sp updated its read fee), during sealing object, +it will also recalculate the read fee and the store fee for all objects in the bucket. After sealing object, +the bucket need to pay using the new price for both **object storage fee** and **data package fee**. + +### Delete Object + +When deleting an object, the following outflows will be updated. + +- the outflow which goes to Global Virtual Group Family will be decreased or removed +- the outflow which goes to Global Virtual Group will be decreased or removed +- the outflow which goes to validator tax pool will be decreased or removed + +Be noted, when deleting an object, if it is stored less than `ReserveTime`, it still needs to pay for +storing `ReserveTime` +and the unpaid fee will be transferred to Global Virtual Group Family, Global Virtual Group, and validator tax pool. \ No newline at end of file diff --git a/docs/modules/consensus-and-staking.md b/docs/modules/consensus-and-staking.md new file mode 100644 index 000000000..e08e8e0d8 --- /dev/null +++ b/docs/modules/consensus-and-staking.md @@ -0,0 +1,75 @@ +# Consensus and Staking + +The BNB Greenfield blockchain places a strong emphasis on network security, +which is achieved through a Proof-of-Stake (PoS) consensus mechanism based on Tendermint. +Validators play a crucial role in this process, with a new block being created every +2 seconds by a group of elected validators. Notably, BNB serves as the staking token on this blockchain. + +Upon genesis state, a set of validators will be established, with their staked BNB locked +in the BNB Smart Chain (BSC) side. Other validators can apply to become part of +the network by submitting a create-validator proposal. Should a validator fail to uphold +their responsibilities, they can be impeached. If the impeach-validator proposal is approved, +the validator is removed and jailed permanently. + +It is important to note that validators are distinct from storage providers within the Greenfield +ecosystem. While validators are responsible for generating blocks, ensuring data availability, +and managing cross-chain communication, storage providers focus on storing data objects. +Though their roles are closely related, there is no stringent binding relationship between the two. + +Overall, the Greenfield blockchain's PoS consensus mechanism, Validator set, and impeachment +process serve to maintain network security and ensure the integrity of the ecosystem. +The separation of duties between validators and storage providers enables a more efficient +and streamlined network architecture. + +## Create Validator + +To become a validator, a create-validator proposal should be submitted and adopted by the majority of the current validators. +Meanwhile, in the early stage, only self delegation is allowed, and in the further open delegation can be supported. +Here are the steps for becoming a new validator: + +- Self delegator of the new validator grants the delegate authorization to the gov module account. + +- The new validator should initiate a create-validator proposal. + +- Wait for the current validators to vote on this proposal. + +- Once the proposal is passed, the new validator would be created automatically. + +## Edit Validator + +There are several fields that validators can edit after they have been created. Including description, commission rate, +min-self-delegation, relayer address, and relayer bls public key. All these fields can be edited by submitting an +edit-validator transaction. + +## Impeach Validator + +If a validator behaves badly, anyone can submit a proposal to impeach the validator, and if the proposal is passed, the +validator would be jailed forever. Here are the steps for impeaching a validator: + +- Initiate an impeach-validator proposal. + +- Wait for the current validators to vote on this proposal. + +- Once the proposal is passed, the validator would be jailed forever automatically, + that means it can’t become an active validator anymore. + +## Staking Reward Distribution + +In the BNB Greenfield blockchain, validators receive rewards from transaction fees. +To ensure fairness, the fee distribution module allocates these rewards to the validators' +delegators in a proportional and transparent manner. + +Rewards are calculated over specific periods, which are updated every time there is a change in +a validator's delegation, such as when a new delegation is received. +To determine the rewards for a validator during a particular period, +their total rewards from the previous period are subtracted from the current total rewards. + +When a validator is removed or requests a withdrawal, their commission +is paid based on the accumulated fee amounts calculated and updated with +each `BeginBlock` operation. + +Delegators receive their rewards either when they change or remove their delegation, +or when they request a withdrawal. Before distributing the rewards, any penalties imposed on +the validator for that delegation period are taken into account. + +The detailed fee distribution rules is [described here](https://github.com/bnb-chain/greenfield-cosmos-sdk/blob/master/docs/spec/fee_distribution/f1_fee_distr.pdf) \ No newline at end of file diff --git a/docs/modules/cross-chain.md b/docs/modules/cross-chain.md new file mode 100644 index 000000000..2e8cf2ebc --- /dev/null +++ b/docs/modules/cross-chain.md @@ -0,0 +1,227 @@ +# Cross Chain + +> [!NOTE] +> #### Pre-requisite Readings +> +> The Greenfield ecosystem consists of three distinct layers. To have more information about them, +we invite you to read [this page](../../core-concept/programmability.md#framework). + + +## Communication Layer + +The communication layer is composed of a set of **Greenfield Relayers**: + +- Each validator should run two relayers. One is for crosschain communication with BSC, + whereas the other is responsible for communication with opBNB. Both relayers possess the same + BLS private key, and the corresponding address of the key stored on-chain as part of the validator's + mandatory information. + +- The relayer watches all cross-chain events happen on BSC/opBNB and the + Greenfield blockchain separately. Once a sufficient number of blocks + have been confirmed to reach finality, the relayer will sign a message + using the BLS key to confirm these events. This signed message is called the "vote". + The relayer will then broadcast the vote through a p2p network to other relayers. + +- Once enough votes from the relayers operated by other validators are collected, + the relayer will assemble a cross-chain package transaction and submit it to + BSC/opBNB or Greenfield network. + +Here more details about the communication layer and economics will be explained. + +### Vote Poll +A new p2p communication across the cross-chain relayers is +introduced, called `Vote Poll`. This `Vote Poll` will gossip about the +signed votes within the network. To avoid message flooding, all the +signed votes will expire after a fixed time. The Greenfield relayers can +either put votes to or fetch votes from the poll and assemble it as +cross-chain package transactions. + +### Channel and Sequence +To allow multiplexing and replay attack resistance, "Channel" and +"Sequence" concepts are introduced to manage any type of communication. +The following type is an example of a definition: + +```go +type Package struct { + PackType uint8 // SYN, ACK or FAIL_ACK + SrcChainId uint16 + DstChainId uint16 + Sequence int64 + ChannelId uint16 + Payload []byte + BLSSignature sdk.Sig + BLSBits sdk.Bits // indicate the signer of the package +} +``` + +The packages in the same channel must be processed in sequence, while +they can be processed in parallel if they belong to different channels. + +The operation messages on different Greenfield resources are mapped to +different channels. For example, buckets and storage objects belong to +different channels. + +### Reliability Protocol +A protocol is defined to ensure reliable stream delivery of data +between BSC/opBNB and Greenfield. + +The protocol must recover the scenarios when the cross-chain data is +damaged, duplicated, or delivered out of order by the relayers. It +assigns a sequence number to each package and requires a positive +acknowledgment (`ACK`) from the target chain. Here there are three kinds +of packages: + +1. `SYN`: the initial cross-chain packages started by either users or dApps. + +2. `ACK`: the positive acknowledgment sent by the resource layer of the + target chain. + +3. `FAIL_ACK`: the negative acknowledgment sent by the communication + layer of the target chain, usually caused by damaged data or + protocol inconsistency triggered by the edge case. + +Each communication package must start with `SYN` and end with `ACK` or +`FAIL_ACK`. + +### Validator Update + +With an aggregatable multi-signature scheme, e.g. BLS, the cross-chain +can be quite light-weighted. However, sufficient data must be appended +onto the package to indicate the validators who sign the events, this +can be achieved by combining a bitmap and a validator set on-chain. +However, the Greenfield validator set is volatile, Greenfield validators +have to sync the information to BSC/opBNB once there is an update about the +Greenfield validator set. This is implemented by building a Greenfield +light client on BSC/opBNB, which is similar to the light client implemented +for BNB Beacon Chain on BSC/opBNB. + +### Economic + +The Greenfield relayers play an important role in relaying inter-chain +packages. A proper incentive is introduced to keep relayers making their +long-term contribution. + +#### Fee and Reward of Cross-Chain Packages + +Both `SYN` and `ACK`/`FAIL_ACK` packages cost gas to relay, the users (or +smart contracts) will need to pay the fee to cover both of them when +they start the `SYN` cross-chain packages. + +To encourage Greenfield relayers to sign cross-chain packages: + +1. The package deliverer will get a fixed ratio of the relay fee as a reward. + +2. The rest relay fee will be distributed equally among those who sign the vote. + +#### Race to Deliver Cross-Chain Packages + +There are multiple Greenfield relayers, and they may compete to submit +the aggregated multi-signed packages onto the Greenfield blockchain and +BSC/opBNB. To avoid racing transactions caused by the competition, which +wastes gas, the relayers are rotated to relay transactions, e.g. taking +shifts every 10 minutes. Each cross-chain package gets a timestamp, if +it is not relayed within a limited delay when the designated relayer +doesn't perform the duty, any other Greenfield relayers are allowed to +relay such a package. + +#### Callbacks and Limited Gas + +BSC/opBNB dApps, i.e. smart contracts on BSC/opBNB, are allowed to implement their +own logic to handle `ACK` or `FAIL_ACK` packages. The smart contracts can +register callback functions to handle the `ACK` packages. As it is +impossible for the cross-chain infrastructure to predict the gas +consumption of the callback, a gas limitation estimate should be defined +from the smart contracts that register the callbacks. + +For any cross-chain packages that start from BSC/opBNB, the smart contract +needs to specify the gas limitation for the `ACK` or `FAIL_ACK` package, the +relayer fee is prepaid accordingly on BSC/opBNB. Relayers may refund the +excessive fees later. + +## Resource Mirror Layer + +### Resource Entity Mirror + +The purposes of almost all the cross-chain packages are to change the +state of the resource entities on the Greenfield blockchain. Thus, the +below resource entities should be able to be mirrored on BSC/opBNB: Account, Bucket, Object and Group. +The only resource entity different from others is BNB, which is able to be mirrored on BSC but not opBNB from Greenfield. + +The account mapping is natural as BSC/opBNB and Greenfield use the same +address scheme. The same address values on both sides mean that it is the same +account. They don't require an actual mirror. + +BNB is a natively pegged token from the genesis of Greenfield. The +`Token Hub` contract is a smart contract built on BSC to ensure +that Greenfield can't inflate BNB and secure the total circulation of +BNB. + +Bucket, Object, and Group are mirrored onto BSC/opBNB as NFTs of a new BEP +revised from the [ERC-721](https://eips.ethereum.org/EIPS/eip-721) and +[ERC-1155](https://eips.ethereum.org/EIPS/eip-1155) standard. +These NFTs have corresponding metadata information for the resources. +The ownerships of the NFTs on BSC/opBNB stand for the ownerships of these +resources on Greenfield. As these ownerships aren't transferable on +Greenfield, these NFTs aren't transferable on BSC/opBNB. + +To avoid state racing, the following rules are introduced: + +- Any resources that are initiated to be created by BSC/opBNB can only be controlled by BSC/opBNB; + +- Any resources that are controlled by BSC/opBNB can't transfer control rights to Greenfield; + +- Any resources that are controlled by Greenfield can transfer control rights to BSC/opBNB. + +### Cross-Chain Operating Primitives + +A few series of cross-chain primitives are defined for dApps to call to +operate on these resource entities. + +It is worth highlighting that smart contracts can call these primitives +in a similar way as EOAs. + +**Accounts**: + +- create payment accounts on BSC/opBNB + +**BNB**: + +- transfer BNB bidirectionally between BSC and Greenfield + +**Bucket**: + +- create a bucket on BSC/opBNB + +- mirror bucket from Greenfield to BSC/opBNB + +**Object**: + +- mirror object from Greenfield to BSC/opBNB + +- create an object on BSC/opBNB + +- grant/revoke permissions of objects on BSC/opBNB to accounts/groups + +- copy objects on BSC/opBNB + +- Kick off the execution of an object on BSC/opBNB + +- associate buckets to payment accounts on BSC/opBNB + +**Group**: + +- mirror group from Greenfield to BSC/opBNB + +- create a group on BSC/opBNB + +- change group members on BSC/opBNB + +- leave a group on BSC/opBNB + +Once these primitives are called by an EOA or smart contracts, the +predefined events will be emitted. Greenfield Relayers should pick up +these events and relay them over to Greenfield. As the change +will happen asynchronously, there will be specific cross-chain packages +for acknowledgments or errors, which can trigger a callback. The caller +of the primitives should pay the fees upfront for cross-chain operations +and also for the potential callback. \ No newline at end of file diff --git a/docs/modules/data-availability-challenge.md b/docs/modules/data-availability-challenge.md new file mode 100644 index 000000000..d7e7eb33c --- /dev/null +++ b/docs/modules/data-availability-challenge.md @@ -0,0 +1,113 @@ +# Data Availability Challenge + +Data availability refers to the correct storage and accessibility of data on storage providers for users. +To determine if a specific data segment or piece is correctly stored on a designated storage provider, +a challenge module is employed. The challenge comprises three steps: + +1. The validator requests the data piece and local manifest of the object from the challenged storage provider. + If the expected piece is not obtained, it is considered unavailable. +2. The validator computes the hash of the local manifest and compares it with the global manifest recorded in the + object's metadata. If they differ, the piece is considered unavailable. +3. The validator computes the hash of the challenged data piece and compares it with the data recorded in the local + manifest. If they differ, the piece is considered unavailable. + +The validator collects challenge signatures and if more than two-thirds of validators vote the same result, +those signatures are aggregated to create a data challenge attestation. This attestation is then submitted on-chain +via a transaction that awards the first submitter. Subsequent submissions of the same attestation will fail verification. +Only the validators whose votes were included in the attestation are rewarded, therefore, some validators who voted but +were not included will not be rewarded for the data availability challenge. + +## Workflow + +![Data Availability Challenge Workflow](https://raw.githubusercontent.com/bnb-chain/greenfield-whitepaper/main/assets/19.2%20Data%20Availability%20Challenge.jpg) + +
Data Availability Challenge Workflow
+ +The Workflow for the Data Availability Challenge is as Follows: + +1. Any user can submit a transaction to challenge the availability of data. The related information will be recorded + temporarily on-chain and also be included in typed events once the transaction is executed. +2. At the end block phase of each block, a random algorithm is used to generate data availability challenge events by + default. All challenge information will be stored until confirmed or expired. +3. The off-chain data availability detection module tracks on-chain challenge information and initiates off-chain detection. +4. The validator uses their BLS private key to sign a data challenge vote that includes block header, data challenge information, and the result. +5. The validator collates data challenge votes, aggregates the signatures, and creates a data challenge attestation. +6. Once 2/3 validators have reached an agreement, the validator submits the attestation. +7. The data challenge attestation transaction is executed, and the attestation is verified, and the challenge storage is cleared. + Malicious nodes are penalized, and rewards are distributed. A cooling-off period is implemented to avoid repeated attacks. +8. During the cooling-off period, the validator can regain, recover, or shift the data. + Once the cooling-off period expires, the data can be challenged again. If the data is still unavailable, the validator will be penalized once more. + +## Create Challenge + +There are two ways to trigger challenges. + +### Submitted Challenges + +Anyone can send `MsgSubmit` messages to trigger data availability challenges, if he/she finds that the data is not +available or incorrect stored. When submitting the challenge, user can choose the segment/piece of an object to +challenge or let the blockchain randomly selects a segment/piece to challenge. +The submitter will be called as challenger, and will be rewarded if the challenge +succeeds later. + +### Random Challenges + +In each block, challenges will be automatically created, to challenge different objects which are stored on different +storage providers. The count of random challenges in each block is governed, and can be changed by submitting proposals. +To support randomness, a *RANDAO* mechanism is introduced in Greenfield blockchain. For more information about *RANDAO*, +please refer to the following section. + +## Attest Challenge + +Each validator will listen to the events of challenge creations, and vote the challenge by using its own BLS key. +When there are more than 2/3 votes are collected, an attestation message `MsgAttest` will be submitted to slash the +challenged storage provider. And the voted validators, the attestation submitter, and the challenger (if there is) will +be rewarded accordingly. + + +## Challenge Heartbeat + +To indicate the off-chain challenge detect module is running correctly, validators have to vote and submit +`MsgHeartbeat` messages periodically to the blockchain. During processing this kind of messages, the income for securing +stored objects will be transferred from payment account to distribution account, +and income can be withdrawn by validators and their delegators later. + +## Challenge Events + +The following events are introduced for data availability challenge. For the detailed definition, please refer +to [this](https://github.com/bnb-chain/greenfield/blob/master/proto/greenfield/challenge/events.proto). + +### Start Event + +This kind of events indicates that a data availability challenge is triggered on-chain. The off-chain module should +monitor the events, asking the according storage prover for data, compute hashes and do the comparison, and submit +an attestation if needed. + +### Complete Event + +When an attestation is received and accepted, then this kind of events will be emitted. In the events, the slash +and rewards amounts are also recorded. + +### Heartbeat Event + +Heartbeat only includes the necessary information for liveness-check purpose. + +## RANDAO + +To support random challenges, a RANDAO mechanism is introduced like the following. +Overall, the idea is very similar to the RANDAO in Ethereum beacon chain, you can refer to +[here](https://eth2book.info/altair/part2/building_blocks/randomness) for more information. + +When proposing a new block, the proposer, i.e. a validator, needs to sign the current block number to get +a `randao reveal`, and mixes the reveal into randao result `randao mix` by using `xor` operation. +The other validators will verify the `randao reveal` and `randao mix` by following steps: +1. The signature is verified using the proposer's public key. It means that the proposer has almost no choice +about what it contributes to the RANDAO. It either contributes the correct signature over the block number, +or it gives up the right for proposing the current block. If the validator does propose the current block, +it still cannot predict the reveal from other validators, and even be slashed for stopping proposing blocks. +2. The `randao mix` is correctly updated by using `xor` operation. + + +The implementation is conducted in Tendermint layer - a new field called `randao_mix` is added into block header. +Greenfield blockchain then uses the field as a seed to randomly pick objects and storage providers to challenge +in each block. \ No newline at end of file diff --git a/docs/modules/governance.md b/docs/modules/governance.md new file mode 100644 index 000000000..651beb1e9 --- /dev/null +++ b/docs/modules/governance.md @@ -0,0 +1,72 @@ +# Governance + +> [!NOTE] +> Since Greenfield Governance is derived from Cosmos, The majority of the content in this page is copied from the +[Cosmos SDK](hhttps://hub.cosmos.network/main/governance/process.html). + + +The Greenfield BlockChain utilizes on-chain governance, which achieved by steps listed below: + +- **Proposal submission**: Proposal is submitted to the blockchain with a deposit; +- **Vote**: Once deposit reaches threshold `MinDeposit`, proposal is confirmed and vote opens. Bonded BNB holders can vote on the proposal; +- **Execution**: After voting period, the votes are tallied and if proposal `passed`, the messages in the proposal will be executed. + +There are various types of proposals. This includes, but is not limited to: +- Proposals for creating and editing validators, staking rewards distribution, details as described in [staking module](consensus-and-staking.md); +- Proposals for creating and removing storage provider which specified in [storage provider module](storage-provider.md); +- Parameters change proposal for `Greenfield` modules; +- Parameters change proposals for `BSC` smart contracts; +- `BSC` smart contracts upgrade proposals. + + +## Governance Parameters +- **Minimum deposit**: The threshold for transiting a proposal from deposit period to vote period; +- **Maximum deposit period**: The most lasting time for depositing a proposal. If it reaches `min_deposit`, this period ends immediately; +- **Voting period**: The time lasted for validators and delegators to vote on a proposal; +- **Quorum**: Minimum proportion of participating voting power, measured by number of bonded BNB tokens; +- **Pass threshold**: Minimum proportion of `Yes` votes (excluding Abstain votes), measured by number of bonded BNB; +- **Veto threshold**: Maximum proportion of `NoWithVeto` (counts as No but also adds a Veto vote). + +## Submit proposal: + +In `Greenfield`, any account can submit proposals by sending `MsgSubmitProposal` transaction. + +## Deposit: + +Proposals must be submitted with a deposit in `BNB` defined by the `MinDeposit` param, the deposit is required as spam +protection. Any BNB holder can contribute to this deposit to support proposal, the submitter is not mandatory to provide +the deposit itself, thought it is usually filled by proposal maker. To transit a newly created proposal into active status, +`MinDeposit` need to be met, otherwise proposal will stay inactive. Once deposit end time comes, the proposal will be +destroyed and all deposits will be burned. For +proposals which deposits reaches minimum threshold, status turn into active and `voting period` starts. + +## Voting period: + +All bonded BNB holders get the right to vote on proposals with one of following options: + +- `Yes`: Approval of the proposal in its current form; +- `No`: Disapproval of the proposal in its current form; +- `NoWithVeto`: Which indicates a proposal either (1) spam (2) infringes on minority interests (3) violates rules of engagement; +- `Abstain`: The voter wishes to contribute to quorum without voting for or against a proposal. + +Voters may change their vote at any time before voting period ends. Be aware that voting power is measured in terms +of bonded BNB, and delegators inherit the vote of validators they are delegated to. If a delegator votes after their validator, +the delegator's vote will override the validator's vote. + +## Tally + +Following requirements need to be met for a proposal to be accepted by the end of voting period: + +- **Quorum**: A minimal of 33.40% of total bonded BNB(voting power) need to be participated in the vote; +- **Threshold**: `Yes` votes should be more than 50% excluding `Abstain` votes; +- **Veto**: `NoWithVeto` votes is less than 33.40%, including Abstain votes. + +If a proposal is approved or rejected without `NoWithVeto`, deposit will be refunded to depositor. In the case where +`NoWithVeto` exceed 33.40% , deposits will be burned and proposal information will be removed from state. + +Validators not in the active set can cast a vote, but their voting power (including their delegators) +will not count toward the vote if they are not in the active set when the voting period ends. That means that if BNB +is delegated to a validator that is jailed, tombstone, or outside the active set at the time that the voting period +ends, that BNB's stake-weight will not count in the vote. + + diff --git a/docs/modules/permission.md b/docs/modules/permission.md new file mode 100644 index 000000000..959da13aa --- /dev/null +++ b/docs/modules/permission.md @@ -0,0 +1,248 @@ +# Permission + +The permission module serves as the foundation for basic permission control management in the Greenfield Storage Network. + +All data resources, such as objects, buckets, payment accounts, and groups, require specific permissions to be accessed. +These authorizations dictate the actions that can be taken by each account. + +**Note**: Groups are collections of accounts that share the same permissions, allowing them to be handled as a single entity. + +Examples of permissions include: + +* Put, List, Get, Delete, Copy, and Execute data objects; +* Create, Delete, and List buckets +* Create, Delete, ListMembers, Leave groups +* Create, Associate payment accounts +* Grant, Revoke the above permissions + +These permissions are linked to both the data resources and the accounts or groups authorized to access them. +The group definitions are publicly stored on the Greenfield blockchain, and are currently in plain text. +However, a privacy mode utilizing Zero Knowledge Proof technology is planned for future implementation. + +Notably, permission operations can be directly executed from BSC, whether through smart contracts or an EOA, further enhancing their convenience. + +Overall, the interface semantics of the permission module are similar to S3. + +## Concepts + +### Terminology + +- **Resources**: Buckets, objects, and groups are the primary resources within the Greenfield network that require +permission authorization. These resources are identified through the Greenfield Resource Name (GRN) in policies. +- **Actions**: Each resource within Greenfield has a designated set of operations that can be performed on it. To specify which actions are allowed or denied, an action enum value must be provided. +- **Principals**: Accounts or groups that are granted permission to access specific resources and actions can be identified in the policy. +- **Statements**: Policies outline the specific details of permissions, including the Effect, ActionList, and Resources. +- **Effect**: The Effect sets the outcome when a user requests a particular action, and can be configured as either allow or deny. + +### Resource + +Greenfield utilizes resources, which are the main entities that can be manipulated. +Buckets, objects, and groups are all considered resources, and each has its own set of subresources. + +Bucket subresources consist of the following: + +- **BucketInfo**: Allows for modification of specific fields in a bucket, such as `IsPublic`, `ReadQuota`, `paymentAccount`, etc; +- **Policy**: Stores permissions information for the bucket; +- **Objects**: Every object must be stored within a bucket; +- **Object ownership**: Newly uploaded objects are automatically transferred to the bucket owner, regardless of who uploaded them. + + +Object subresources consist of the following: + +- **ObjectInfo**: Allows for modification of certain fields within an object, such as `IsPublic`, etc; +- **Policy**: Stores access permissions information for the object. + +Group subresources consist of the following: + +- **GroupInfo**: Allows for modification of specific fields within a group, such as members, user-meta, etc; +- **Policy**: Stores access permissions information for the group; +- **GroupMember**: Any account in Greenfield has the ability to join a group, but a group cannot become a member of another group; expiration time can be set for group membership if the member is expired the permission will be revoked. + +### Ownership + +The resources owner refers to the account that creates the resource. By default, only the resource owner has the permission +to access its resources. + +- The resource creator owns the resource. +- Each resource only has one owner and the ownership cannot be transferred once the resource is created. +- There are features that allow an account to "approve" another account to create and upload objects to be owned by the approver, as long as it is within limits. +- The owner or payment account of the owner pays for the resource. + + +### Definitions + +- **Ownership Permission**: By default, the owner has all permissions on the resource. +- **Public or Private Permission**: By default, the resource is private, only the owner can access the resource. If a resource is public, anyone can access it. +- **Shared Permission**: These permissions are managed by the permission module. It usually manages who has permission for which resources. + +There are two types of shared permissions: Single Account Permission and Group Permission, which are stored in +different formats in the blockchain state. + +### Revoke + +Users can assign one or more permissions as needed. However, when a resource is deleted, its associated permissions +should also be removed, even if the user does not initiate the deletion – this can be managed through clean-up mechanisms. +If too many accounts have permission to delete an object, the processing time required may become excessively lengthy for +a single transaction to handle. + +### Examples + +Let's say Greenfield has two accounts, Bob(0x1110) and Alice(0x1111). A basic example scenario would be: + +* Bob uploaded a picture named `avatar.jpg` into a bucket named "profile"; +* Bob grants the `GetObject` action permission for the object `avatar.jpg` to Alice, it will store a `key 0x11 | ResourceID( +profile_avatar.jpg) | Address(Alice)` into a permission state tree; +* when Alice wants to read the `avatar.jpg`, the SP should check the Greenfield blockchain that whether the `key Prefix( +ObjectPermission) | ResourceID(profile_avatar.jpg) | Address(Alice)` existed in the permission state tree, and whether +the action list contains GetObject. + +Let's move on to more complex scenarios: + +* Bob created a bucket named "profile"; +* Bob grants the `PutObject` action permission for the bucket "profile" to Alice, the key `0x10 | ResourceID(profile) | +Address(Alice)` will be put into the permission state tree; +* When Alice wants to upload an object named `avatar.jpg` into the bucket profile, it creates a `PutObject` transaction and +will be executed on the chain; +* The Greenfield blockchain needs to confirm that Alice has permission to operate, so it checks whether the key `0x10 | +ResourceID(profile) | Address(Alice)` existed in the permission state tree and got the permission information if it +existed; +* If the permission info shows that Alice has the `PutObject` action permission of the bucket profile, then she can do +`PutObject` operation. + +Another more complex scenario that contains groups: + +* Bob creates a group named "Games", and creates a bucket named "profile". +* Bob adds Alice to the Games group, the `key 0x12 | ResourceID(Games) | Address(Alice)` will be put into the permission +state tree +* Bob put a picture `avatar.jpg` to the bucket profile and grants the `CopyObject` action permission to the group Games +* When Alice wants to copy the object avatar.jpg . First, Greenfield blockchain checks whether she has permission via the +`key 0x11 | ResourceID(avatar.jpg) | Address(Alice)`; if it is a miss, Greenfield will iterate all groups that the object +`avatar.jpg `associates and check whether Alice is a member of one of these groups by checking, e.g. if the +`key 0x21 | ResourceID(group, e.g. Games)` existed, then iterate the `permissionInfo` map, and determine if Alice is in a group which +has the permission to do `CopyObject` operation via the key `0x12| ResourceID(Games) | Address(Alice)` + +## State + +The permission module keeps state of the following primary objects: + +1. `Policy`: The owner account of the resource grant its specify permission to another account; +2. `PolicyGroup`: A limited list of `Policy`, and each `Policy` items defines the owner account of the resource grant + its specify permission to a group. + +These primary objects should be primarily stored and accessed by the `ID` which is an auto-incremented sequence. An +additional indices are maintained per primary objects in order to compatibility with the S3 object storage. + +* BucketPolicyForAccount: `0x11 | BigEndian(BucketID) | AccAddress -> BigEndian(PolicyID)` +* ObjectPolicyForAccount: `0x12 | BigEndian(ObjectID) | AccAddress -> BigEndian(PolicyID)` +* GroupPolicyForAccount: `0x13 | BigEndian(GroupID) | AccAddress -> BigEndian(PolicyID)` +* BucketPolicyForGroup: `0x21 | BigEndian(BucketID) -> ProtoBuf(PolicyGroup)` +* ObjectPolicyForGroup: `0x22 | BigEndian(ObjectID) -> ProtoBuf(PolicyGroup)` +* PolicyByID: `0x31 | BigEndian(PolicyID) -> ProtoBuf(Policy)` + +### Policy + +```protobuf +message Policy { + string id = 1 [ + (cosmos_proto.scalar) = "cosmos.Uint", + (gogoproto.customtype) = "Uint", + (gogoproto.nullable) = false + ]; + permission.Principal principal = 2; + resource.ResourceType resource_type = 3; + string resource_id = 4 [ + (cosmos_proto.scalar) = "cosmos.Uint", + (gogoproto.customtype) = "Uint", + (gogoproto.nullable) = false + ]; + repeated permission.Statement statements = 5; + permission.Statement member_statement = 6; +} +``` + +### PolicyGroup + +Each resource can only grant permissions to a limited number of groups and limited number is defined +by `MaximumGroupNum` in module params. + +```protobuf +message PolicyGroup { + message Item { + string policy_id = 1 [ + (cosmos_proto.scalar) = "cosmos.Uint", + (gogoproto.customtype) = "Uint", + (gogoproto.nullable) = false + ]; + string group_id = 2 [ + (cosmos_proto.scalar) = "cosmos.Uint", + (gogoproto.customtype) = "Uint", + (gogoproto.nullable) = false + ]; + } + repeated Item items = 1; +} +``` + +### params + +```protobuf +// Params defines the parameters for the module. +message Params { + option (gogoproto.goproto_stringer) = false; + + uint64 maximum_statements_num = 1; + uint64 maximum_group_num = 2; +} +``` + +## Message + +> Notice: Permission-related messages are defined in the storage module + +### PutPolicy + +Used to create a policy for a resource. + +```protobuf +message MsgPutPolicy { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the granter who grant the permission to another principal + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // Principal define the roles that can be grant permissions to. Currently, it can be account or group. + permission.Principal principal = 2; + + // resource define a greenfield standard resource name that can be generated by GRN structure + string resource = 3; + + // statements define a list of individual statement which describe the detail rules of policy + repeated permission.Statement statements = 4; + + // expiration_time defines the whole expiration time of all the statements. + // Notices: Its priority is higher than the expiration time inside the Statement + google.protobuf.Timestamp expiration_time = 5 [ + (gogoproto.stdtime) = true, + (gogoproto.nullable) = true + ]; +} +``` + +### DeletePolicy + +Used to delete the policy that is associated with an account, group, and resource. + +```protobuf +message MsgDeletePolicy { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the granter who grant the permission to another principal + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // Principal define the roles that can be grant permissions to. Currently, it can be account or group. + permission.Principal principal = 2; + + // resource define a greenfield standard resource name that can be generated by GRN structure + string resource = 3; +} +``` diff --git a/docs/modules/storage-module.md b/docs/modules/storage-module.md new file mode 100644 index 000000000..dc559dd60 --- /dev/null +++ b/docs/modules/storage-module.md @@ -0,0 +1,479 @@ +# Storage Module + +## Concepts + +### Bucket + +A bucket serves as a logical container for storing objects in Greenfield. Each bucket is assigned a unique name by the user at the time of creation. It's essential that bucket names be globally unique within the Greenfield namespace to avoid duplication of names. Additionally, bucket names must conform to DNS naming conventions, consisting of one or more labels separated by periods. + +Objects can be uploaded to a bucket using various methods, such as the gnfd cmd or SDKs, after the bucket has been created. Objects within a bucket can be organized and managed like folders, also referred to as "prefixes". Besides, each object is assigned a unique key (a string value) to identify it within the bucket. + +Each user account can create multiple buckets, with the account owning each created bucket. Every bucket should have its Primary SP associated with it, along with payment accounts for Read and Store. The owner's address will be the default payment account. + +### Object + +An object represents a fundamental unit of storage in Greenfield, consisting of both data and associated metadata. Each object has a unique name (a string value) within a bucket, identifying it. + +Although objects are primarily used to store files in Greenfield, they can contain any data type, including text, images, videos, and program binaries. Users can upload, download, copy, or move objects using various methods such as the gnfd cmd and SDKs. + +Objects in Greenfield have several critical features, including their name and ID, owner, hosting bucket, size and timestamps, content type, checkSums for storage pieces, storage status, and associated SP information. Object metadata is stored using the bucket name as its prefix, allowing iteration through all objects within the same bucket. However, doing so for a large bucket with numerous objects may require considerable effort. + +Objects in Greenfield have several important characteristics, including: +- name and ID +- owner +- bucket that hosts it +- size and timestamps +- content type +- checkSums for the storage pieces +- storage status +- associated SP information +- tags + +## Group + +A Group is a collection of accounts that share the same permissions. The group name cannot be duplicated under the same user. However, a group cannot create or own any resources, nor can it be a member of another group. + +To ensure that the on-chain permission check can be completed within a constant time, only a limited number of groups can be associated with a resource for permissions. + +## State + +The storage module keeps state of the following primary objects: + +* BucketInfo + +https://github.com/bnb-chain/greenfield/blob/v1.0.0/proto/greenfield/storage/types.proto#L14C1-L41C2 + +* ObjectInfo: + +https://github.com/bnb-chain/greenfield/blob/v1.0.0/proto/greenfield/storage/types.proto#L54C4-L87 + +* GroupInfo + +https://github.com/bnb-chain/greenfield/blob/v1.0.0/proto/greenfield/storage/types.proto#L89-L104 + +The primary objects are intended to be stored and accessed mainly using the auto-incremented sequence `ID`. +However, additional indices are also maintained for each primary object to ensure compatibility with the S3 object storage. + +* BucketInfo: `0x11 | hash(bucketName) -> BigEndian(bucketId)` +* ObjectInfo: `0x12 | hash(bucketName)_hash(objectName) -> BigEndian(objectId)` +* GroupInfo: `0x13 | OwnerAddr_hash(groupName) -> BigEndian(groupId)` + +* BucketInfoById: `0x21 | BigEndian(bucketId) -> ProtoBuf(BucketInfo)` +* ObjectInfoById: `0x22 | BigEndian(objectId) -> ProtoBuf(ObjectInfo)` +* GroupInfoById: `0x23 | BigEndian(groupId) -> ProtoBuf(GroupInfo)` + +### Params + +The storage module contains the following parameters, +they can be updated with governance. + +| name | default value | meaning | +|---------------------------|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| MaxSegmentSize | 16M | The maximum size of the segment. The payload data of an object will split into several segment. Only the size of the last segment can be less than MaxSegmentSize, others is equals. | +| RedundantDataChunkNum | 4 | The number of the data chunks in Erasure-Code algorithm. | +| RedundantParityChunkNum | 2 | The number of the parity chunks in Erasure-Code algorithm. | +| MaxPayloadSize | 32G | The maximum size of the payload data that allowed in greenfield storage network. | +| MinChargeSize | 128KB | The minimum charge size of the payload, objects smaller than this size will be charged as this size | +| MaxBucketsPerAccount | 100 | The maximum number of buckets that can be created per account | + +## Messages + +In this section, we'll list out the various messages that are associated with storage modules. + +### MsgCreateBucket + +Used to create a new bucket. Buckets are used to contain storage objects. + +```protobuf +message MsgCreateBucket { + option (cosmos.msg.v1.signer) = "creator"; + + // creator defines the account address of bucket creator, it is also the bucket owner. + string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // bucket_name defines a globally unique name of bucket + string bucket_name = 2; + // visibility means the bucket is private or public. if private, only bucket owner or grantee can read it, + // otherwise every greenfield user can read it. + VisibilityType visibility = 3; + // payment_address defines an account address specified by bucket owner to pay the read fee. Default: creator + string payment_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // primary_sp_address defines the address of primary sp. + string primary_sp_address = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // primary_sp_approval defines the approval info of the primary SP which indicates that primary sp confirm the user's request. + common.Approval primary_sp_approval = 6; + // charged_read_quota defines the read data that users are charged for, measured in bytes. + // The available read data for each user is the sum of the free read data provided by SP and + // the ChargeReadQuota specified here. + uint64 charged_read_quota = 7; +} +``` + +### MsgDeleteBucket + +Used to delete an existing bucket. It is important to note that you cannot delete a non-empty bucket. + +```protobuf +message MsgDeleteBucket { + option (cosmos.msg.v1.signer) = "operator"; + + // creator defines the account address of the grantee who has the DeleteBucket permission of the bucket to be deleted. + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // bucket_name defines the name of the bucket to be deleted. + string bucket_name = 2; +} +``` + +### MsgUpdateBucketInfo + +Used to update the information in a bucket. + +```protobuf +message MsgUpdateBucketInfo { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the account address of the operator + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // bucket_name defines the name of bucket which you'll update + string bucket_name = 2; + // charged_read_quota defines the traffic quota that you read from primary sp + // if read_quota is nil, it means don't change the read_quota + common.UInt64Value charged_read_quota = 3; + // payment_address defines the account address of the payment account + // if payment_address is empty, it means don't change the payment_address + string payment_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // visibility means the bucket is private or public. if private, only bucket owner or grantee can read it, + // otherwise every greenfield user can read it. + VisibilityType visibility = 5; +} +``` + +### MsgCreateObject + +Used to create an initial object under a bucket. + +```protobuf +message MsgCreateObject { + option (cosmos.msg.v1.signer) = "creator"; + + // creator defines the account address of object uploader + string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // bucket_name defines the name of the bucket where the object is stored. + string bucket_name = 2; + // object_name defines the name of object + string object_name = 3; + // payload_size defines size of the object's payload + uint64 payload_size = 4; + // visibility means the object is private or public. if private, only object owner or grantee can access it, + // otherwise every greenfield user can access it. + VisibilityType visibility = 5; + // content_type defines a standard MIME type describing the format of the object. + string content_type = 6; + // primary_sp_approval defines the approval info of the primary SP which indicates that primary sp confirm the user's request. + Approval primary_sp_approval = 7; + // expect_checksums defines a list of hashes which was generate by redundancy algorithm. + repeated bytes expect_checksums = 8; + // redundancy_type can be ec or replica + RedundancyType redundancy_type = 9; +} +``` +### MsgDeleteObject + +Used to delete object that is no longer useful, the deleted storage object is not recoverable. + +```protobuf +message MsgDeleteObject { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the account address of the operator who has the DeleteObject permission of the object to be deleted. + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // bucket_name defines the name of the bucket where the object which to be deleted is stored. + string bucket_name = 2; + // object_name defines the name of the object which to be deleted. + string object_name = 3; +} + +``` +### MsgSealObject + +With this message, Storage providers seal an object once the underlying files are well saved by both primary and second SPs. + +```protobuf +message MsgSealObject { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the account address of primary SP + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // bucket_name defines the name of the bucket where the object is stored. + string bucket_name = 2; + // object_name defines the name of object to be sealed. + string object_name = 3; + // global_virtual_group_id defines the id of global virtual group + uint32 global_virtual_group_id = 4; + // secondary_sp_bls_agg_signatures defines the aggregate bls signature of the secondary sp that can + // acknowledge that the payload data has received and stored. + bytes secondary_sp_bls_agg_signatures = 5; +} +``` +### MsgCopyObject + +Used to send a copy of an object to another user. + +```protobuf +message MsgCopyObject { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the account address of the operator who has the CopyObject permission. + string operator = 1; + // src_bucket_name defines the name of the bucket where the object to be copied is located + string src_bucket_name = 2; + // dst_bucket_name defines the name of the bucket where the object is copied to. + string dst_bucket_name = 3; + // src_object_name defines the name of the object which to be copied + string src_object_name = 4; + // dst_object_name defines the name of the object which is copied to + string dst_object_name = 5; + // primary_sp_approval defines the approval info of the primary SP which indicates that primary sp confirm the user's request. + common.Approval dst_primary_sp_approval = 6; +} +``` +### MsgRejectSealObject + +A storage provider may reject to seal an object if it refuses to, or be unable to do so due to unexpected errors. + +```protobuf +message MsgRejectSealObject { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the account address of the object owner + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // bucket_name defines the name of the bucket where the object is stored. + string bucket_name = 2; + // object_name defines the name of unsealed object to be reject. + string object_name = 3; +} +``` +### MsgCancelCreateObject + +The users are able to cancel an initial object before it is sealed with this message. + +```protobuf +message MsgCancelCreateObject { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the account address of the operator + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // bucket_name defines the name of the bucket + string bucket_name = 2; + // object_name defines the name of the object + string object_name = 3; +} +``` +### MsgCreateGroup + +Used to create a new group. + +```protobuf +message MsgCreateGroup { + option (cosmos.msg.v1.signer) = "creator"; + + // owner defines the account address of group owner who create the group + string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // group_name defines the name of the group. it's not globally unique. + string group_name = 2; + // extra defines extra info for the group + string extra = 3; +} +``` +### MsgDeleteGroup + +Used to delete a group that is no longer used. Please note that the underlying members are not deleted yet. + +```protobuf +message MsgDeleteGroup { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the account address of the operator who has the DeleteGroup permission of the group to be deleted. + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // group_name defines the name of the group which to be deleted + string group_name = 2; +} + +``` +### MsgLeaveGroup + +A group member can choose to leave a group by sending this message. + +```protobuf +message MsgLeaveGroup { + option (cosmos.msg.v1.signer) = "member"; + + // member defines the account address of the member who want to leave the group + string member = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // group_owner defines the owner of the group you want to leave + string group_owner = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // group_name defines the name of the group you want to leave + string group_name = 3; +} +``` + +### MsgMirrorObject + +Mirror an object to the destination chain as NFT. + +```protobuf +message MsgMirrorObject { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the account address of the object owner. + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // id defines the unique u256 for object. + string id = 2 [ + (cosmos_proto.scalar) = "cosmos.Uint", + (gogoproto.customtype) = "Uint", + (gogoproto.nullable) = false + ]; + // bucket_name defines the name of the bucket where the object is stored + string bucket_name = 3; + // object_name defines the name of object + string object_name = 4; + // destination chain id + uint32 dest_chain_id = 5; +} +``` + +### MsgMirrorBucket + +Mirror a bucket to the destination chain as NFT. + +```protobuf +message MsgMirrorBucket { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the account address of the bucket owner. + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // id defines the unique u256 for bucket. + string id = 2 [ + (cosmos_proto.scalar) = "cosmos.Uint", + (gogoproto.customtype) = "Uint", + (gogoproto.nullable) = false + ]; + // bucket_name defines a globally unique name of bucket + string bucket_name = 3; + // destination chain id + uint32 dest_chain_id = 4; +} +``` + +### MsgMirrorGroup + +Mirror a group to the destination chain as NFT. + +```protobuf +message MsgMirrorGroup { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the account address of the group owner. + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // id defines the unique u256 for group. + string id = 2 [ + (cosmos_proto.scalar) = "cosmos.Uint", + (gogoproto.customtype) = "Uint", + (gogoproto.nullable) = false + ]; + // group_name defines the name of the group + string group_name = 3; + // destination chain id + uint32 dest_chain_id = 4; +} +``` + +### MsgMigrateBucket + +Migrate a bucket to another primary SP. + +```protobuf +message MsgMigrateBucket { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the account address of the operator who initial the migrate bucket + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // bucket_name defines the name of the bucket that need to be migrated + string bucket_name = 2; + // dst_primary_sp_id defines the destination SP for migration + uint32 dst_primary_sp_id = 3; + // dst_primary_sp_approval defines the approval of destination sp + common.Approval dst_primary_sp_approval = 4; +} +``` + +### MsgCancelMigrateBucket + +Cancel an existing bucket migration. + +```protobuf +message MsgCancelMigrateBucket { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the account address of the msg operator. + // Only the user can send this transaction to cancel the migrate bucket + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // bucket_name defines the name of the bucket that need to be migrated + string bucket_name = 2; +} +``` +### MsgSetTag + +Used to update the tags of a resource. The old tags will be overwritten directly. + +```protobuf +message MsgSetTag { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the operator who adds the tags + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // resource defines a greenfield standard resource name that can be generated by GRN structure + string resource = 2; + // tags defines a list of tags which will be set to the resource + ResourceTags tags = 3; +} +``` + +### MsgUpdateObjectContent + +Used to update an existing object content + +```protobuf +message MsgUpdateObjectContent { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the account address of the operator, either the object owner or the updater with granted permission. + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // bucket_name defines the name of the bucket where the object is stored. + string bucket_name = 2; + // object_name defines the name of object + string object_name = 3; + // payload_size defines size of the object's payload + uint64 payload_size = 4; + // content_type defines a standard MIME type describing the format of the object. + string content_type = 5; + // expect_checksums defines a list of hashes which was generate by redundancy algorithm. + repeated bytes expect_checksums = 6; +} +``` + +### MsgCancelUpdateObjectContent + +Used to cancel the update on an existing object + +```protobuf +message MsgCancelUpdateObjectContent { + option (cosmos.msg.v1.signer) = "operator"; + + // operator defines the account address of the operator, either the object owner or the updater with granted permission. + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // bucket_name defines the name of the bucket + string bucket_name = 2; + // object_name defines the name of the object + string object_name = 3; +} +``` \ No newline at end of file diff --git a/docs/modules/storage-provider.md b/docs/modules/storage-provider.md new file mode 100644 index 000000000..0038db1fe --- /dev/null +++ b/docs/modules/storage-provider.md @@ -0,0 +1,284 @@ +# Storage Provider + +## Abstract + +The storage providers (SP) are storage service infrastructures that organizations or individuals provide and the +corresponding roles they play. They use Greenfield as the ledger and the single source of truth. Each SP can and +will respond to users' requests to write (upload) and read (download) data, and serve as the gatekeeper for +user rights and authentications. + +The SP module is responsible for managing and keeping storage providers in the network. This includes: + +- **Metadata**: Basic information, such as address, tokens, and status, about each SP. +- **Deposit**: Aspiring SPs must stake tokens to guarantee their capacity to offer storage services. +- **Slash**: Stored data on an SP is occasionally challenged. If the challenge succeeds, the SP is penalized by losing some of its staked tokens. +- **Reputation**: We are implementing a reputation system to assess the quality of each SP's service. Users can select an SP based on its reputation score to store their data. +- **Exit**: SPs can leave voluntarily as long as they adhere to specific rules and recover their staked tokens. Greenfield may also force an SP to exit if it lacks sufficient staked tokens or its reputation score falls below the minimum requirements for an SP. + +## Key Workflow + +### Join the network + +SPs have to register themselves first by depositing BNB tokens on the Greenfield blockchain as their "Service Stake". +The validators will go through a dedicated governance procedure to vote for the SPs of their election. SPs are encouraged to +advertise their information and prove to the community their capability, as SPs have to provide a professional storage +system with high-quality SLA. + +It will take several transactions to join the greenfield storage network for storage provider. + +1. The funding account of SP should grant the governance module account to deduct tokens for staking; +2. The SP submit a `CreateStorageProvider` proposal to governance module; +3. Deposit enough BNB tokens for the proposal; +4. The validators should either vote `Pass` or `reject` for the proposal; +5. When more than half of the validators have voted, the storage provider will be automatically created on chain. +6. The SP status will be `STATUS_IN_MAINTENANCE` after created, it must send a transaction to update its status to `STATUS_IN_SERVICE` to activate itself. + +### Leave the network + +When the SPs join or leave the network, they have to follow a series of actions to ensure data redundancy for the +users; otherwise, their "Service Stake" will be fined. This is achieved through the data availability challenge and +validator governance votes. + +For more information, please see [SP exit](../modules/virtual-group.md#sp-exit-workflow) + +## State + +### StorageProvider + +The storage provider can be in one of these several statuses: + +* `STATUS_IN_SERVICE`: The SP is in service. it can serve user's Create/Upload/Download request. +* `STATUS_IN_MAINTENANCE`: The SP is in maintenance. it can not serve user's Create/Upload request. It might be able to serve Download request. +* `STATUS_GRACEFUL_EXITING`: The SP is exiting gracefully. All the object stored in it will be shifted to another sp. + +The storage providers metadata should be primarily stored and accessed by the `OperatorAddr`, an EIP712 account address +for the operator of the storage provider. Three additional indices are maintained per storage provider metadata in +order to fulfill required lookups for SealObject/Deposit/Slash/GetApproval. + +* StorageProvider: `0x21 | OperatorAddr -> ProtocolBuffer(StorageProvider)` +* StorageProviderByFundingAddress: `0x22 | FundingAddress -> OperatorAddr` +* StorageProviderBySealAddress: `0x23 | SealAddress -> OperatorAddr` +* StorageProviderByApprovalAddress: `0x24 | ApprovalAddress -> OperatorAddr` + +Each storage provider's state is stored in a `StorageProvider` struct. + +```protobuf +// StorageProvider defines the meta info of storage provider +message StorageProvider { + // // id is the identifier of the storage provider, used in virtual group + uint32 id = 1; + // operator_address defines the account address of the storage provider's operator; It also is the unique index key of sp. + string operator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // funding_address defines one of the storage provider's accounts which is used to deposit and reward. + string funding_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // seal_address defines one of the storage provider's accounts which is used to SealObject + string seal_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // approval_address defines one of the storage provider's accounts which is used to approve use's migrateBucket request + string approval_address = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // gc_address defines one of the storage provider's accounts which is used for gc purpose. + string gc_address = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // maintenance_address defines one of the storage provider's accounts which is used for testing while in maintenance mode + string maintenance_address = 7 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // total_deposit defines the number of tokens deposited by this storage provider for staking. + string total_deposit = 8 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + // status defines the current service status of this storage provider + Status status = 9; + // endpoint define the storage provider's network service address + string endpoint = 10; + // description defines the description terms for the storage provider. + Description description = 11 [(gogoproto.nullable) = false]; + // bls_key defines the bls pub key of the Storage provider for sealing object and completing migration + bytes bls_key = 12; +} +``` + +### Params + +Params is a module-wide configuration structure that stores system parameters +and defines overall functioning of the SP module. + +```protobuf +// Params defines the parameters for the module. +message Params { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + // deposit_denom defines the staking coin denomination. + string deposit_denom = 1; + // min_deposit defines the minimum deposit amount for storage providers. + string min_deposit = 2 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + // the ratio of the store price of the secondary sp to the primary sp, the default value is 12% + string secondary_sp_store_price_ratio = 3 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // previous blocks that be traced back to for maintenance_records + int64 num_of_historical_blocks_for_maintenance_records = 4 [(gogoproto.moretags) = "yaml:\"num_of_historical_blocks_for_maintenance_records\""]; + // the max duration that a SP can be in_maintenance within num_of_historical_blocks_for_maintenance_records + int64 maintenance_duration_quota = 5 [(gogoproto.moretags) = "yaml:\"maintenance_duration_quota\""]; + // the number of blocks to be wait for sp to be in maintenance mode again if already requested + int64 num_of_lockup_blocks_for_maintenance = 6 [(gogoproto.moretags) = "yaml:\"num_of_lockup_blocks_for_maintenance\""]; + // the time interval to update global storage price, if it is not set then the price will be updated at the first block of each natural month + uint64 update_global_price_interval = 7 [(gogoproto.moretags) = "yaml:\"update_global_price_interval\""]; + // the days counting backwards from end of a month in which a sp cannot update its price + uint32 update_price_disallowed_days = 8 [(gogoproto.moretags) = "yaml:\"update_price_disallowed_days\""]; +} +``` + +### Deposit Pool + +The SP module uses its module account to manage all the staking tokens deposited by storage providers. + +## Message + +### MsgCreateStorageProvider + +A storage provider is created using the `MsgCreateProvider` messages. + +```protobuf +message MsgCreateStorageProvider { + option (cosmos.msg.v1.signer) = "creator"; + + string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + Description description = 2 [(gogoproto.nullable) = false]; + string sp_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string funding_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string seal_address = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string approval_address = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string gc_address = 7 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string maintenance_address = 8 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string endpoint = 9; + cosmos.base.v1beta1.Coin deposit = 10 [(gogoproto.nullable) = false]; + string read_price = 11 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + uint64 free_read_quota = 12; + string store_price = 13 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + string bls_key = 14; + string bls_proof = 15; +} +``` + +This message is expected to fail if: + +* Another storage provider with this operator/seal/funding/approval address is already registered; +* The initial deposit tokens do not belong to the denomination that is specified as the deposit denomination of the SP module; +* The deposit tokens is insufficient. + +### MsgEditStorageProvider + +The metadata of a storage provider can be edited by using `MsgEditStorageProvider` messages. + +```protobuf +// MsgEditStorageProvider defines a SDK message for editing an existed SP. +message MsgEditStorageProvider { + option (cosmos.msg.v1.signer) = "sp_address"; + + string sp_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string endpoint = 2; + Description description = 3 [(gogoproto.nullable) = false]; + string seal_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string approval_address = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string gc_address = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string maintenance_address = 7 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string bls_key = 8; + string bls_proof = 9; +} +``` + +This message is expected to fail if: + +* The storage provider is not existed. +* The description fields are too large. +* The bls_proof verification failed. + +### MsgDeposit + +When the deposit tokens of a storage provider are insufficient, it can use `MsgDeposit` messages to resupply the +deposit tokens. + +```protobuf +// MsgDeposit defines a SDK message to deposit token for SP. +message MsgDeposit { + option (cosmos.msg.v1.signer) = "creator"; + + // creator is the msg signer, it should be SP address or sp's fund address + string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // sp_address is the operator address of sp + string sp_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // deposit is a mount of token which used to deposit for SP + cosmos.base.v1beta1.Coin deposit = 3 [(gogoproto.nullable) = false]; +} +``` + +This message is expected to fail if: + +* The storage provider doesn't exist; +* The tokens that are deposited do not belong to the denomination that is specified as the deposit denomination of the SP module. + +### MsgUpdateStorageProviderStatus + +```protobuf +// MsgUpdateStorageProviderStatus is used to update the status of a SP by itself +message MsgUpdateStorageProviderStatus { + option (cosmos.msg.v1.signer) = "sp_address"; + string sp_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + Status status = 2; + int64 duration = 3; +} +``` + +This message is expected to fail if: + +* The storage provider doesn't exist; +* The status is not changed +* The restrictions violated + +### UpdateSpStoragePrice + +A storage provider can update its free read quote, suggested primary store price and read price. All SPs' suggested primary store and +read prices will be used to generate the global primary/secondary store price and read price. + +```protobuf +// MsgUpdateSpStoragePrice defines a SDK message to update its prices of a SP. +message MsgUpdateSpStoragePrice { + option (cosmos.msg.v1.signer) = "sp_address"; + + // sp address + string sp_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // read price, in bnb wei per charge byte + string read_price = 2 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // free read quota, in byte + uint64 free_read_quota = 3; + // store price, in bnb wei per charge byte + string store_price = 4 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} +``` + +This message is expected to fail if: + +* The storage provider doesn't exist; +* The storage provider tries to update its prices in the last `update_price_disallowed_days` (default value is 2) days. diff --git a/docs/modules/virtual-group.md b/docs/modules/virtual-group.md new file mode 100644 index 000000000..60752ad52 --- /dev/null +++ b/docs/modules/virtual-group.md @@ -0,0 +1,315 @@ +# Virtual Group + +## Abstract + +We propose the adoption of Virtual Groups as a solution to untangle the interdependency between Buckets/Objects and Storage Providers (SPs). This approach effectively reduces the need for a large number of transactions to be transmitted when modifying the on-chain BucketInfo and ObjectInfo during SP exits and bucket migrations. + +A Virtual Group comprises a primary storage provider and several secondary storage providers. Each object is associated with a specific virtual group, which restricts the range of secondary storage providers responsible for storing object replica data. The number of storage providers in each virtual group is determined by the redundancy policy. For example, if our redundancy policy specifies a full replica and a 4+2 erasure coding (EC) replica, every virtual group should consist of one primary SP and six secondary SPs. + +### Terminology + +- Global Virtual Group (GVG): A global virtual group consists of one primary SP (SP) and multiple secondary SPs. +Local Virtual Group(LVG): Each bucket maintains a mapping from the local group ID to the global group ID. j(e.g 3 ➝ 001960583). +- Virtual Group Family(VGF): Each primary storage provider can create multiple virtual group families, with each family containing several global virtual groups. Each family serves a limited number of buckets. Once the store size exceeds a specified threshold, the family will no longer allow to serve more buckets. + +### Relationships + +Local virtual groups are linked to their corresponding buckets, and each object needs to store the ID information of the local virtual group. Each local virtual group must correspond to one and only one global virtual group. + +![VirtualGroup Overview](../../../../static/asset/12-Greenfield-VirtualGroup.png) + +In order to avoid all the data of a primary SP being transferred to one SP within a short period of time, we introduce the concept of "family". + +![VirtualGroup Family](../../../../static/asset/13-Greenfield-VirtualGroupFamily.png) + +A family can contain multiple GVG that the same SP creates. A bucket can only be served by the GVGs that are in the same family, cross family GVG is not allowed within one bucket. Once the total storage size of a family exceeds 64TB(TBD), the GVG inside the family can not server new buckets, the SP has to create a new family. By introducing family , the primary SP can exit at family level without breaking the one bucket, one primary SP rule. + +### Staking For Storage + +We introduce a new staking rule based on storage size. The minimum required staking tokens can be calculated using the formula storage_staking_price * stored_size . The storage providers have the option to pre-stake tokens for upcoming storage if needed. + +All staking tokens will be managed by the Virtual Group Module account. Only during deletion or swapping out, the storage providers can get these staking tokens back. In the event of a storage provider's forced exit, these tokens will be forfeited and used to reward those storage providers which take over these GVG. + +## Key Workflow + +### Creation and Destruction + +A Global Virtual Group (GVG) can be created autonomously by any storage provider without the need for approvals from secondary SPs. Nevertheless, in order to control the proliferation of validator groups, the creation of a GVP entails relatively higher fees and need staking for storage. + +The count of secondary SPs within a group can serve as an indicator of redundancy for all objects stored within that group. With the capability to establish distinct secondary virtual groups with varying levels of redundancy, the system offers significant flexibility. + +When creating a GVG (Global Virtual Group), if no GVG Family is specified, the transaction will automatically create a family on-chain and associate it with the newly created GVG. + +Conversely, a Local Virtual Group (LVG) is automatically generated during object creation, but its quantity within a bucket should be restricted to a specific limit. + +When the stored size within a GVG becomes zero, any SP (Storage Provider) within it can delete it and the staking tokens will be return to the owner of this GVG. We cannot proactively delete a GVG family. If all GVGs within the family are deleted, the family will be automatically removed as well. + +We also do not need to manually delete LVGs, as they are always removed automatically when the associated bucket is deleted. + +### SP Exit Workflow + +Below are the key steps in the Storage Provider (SP) exit process: + +1. The Storage Provider (SP1) initiates the exit process by submitting a StorageProviderExit transaction to the blockchain. +2. Subsequently, SP1 or its successor SP must repeatedly call SwapOut to remove itself from all Global Virtual Groups (GVGs). +3. For the primary SP, the swap-out process occurs at the family level, ensuring there are no conflicts with other SPs within the GVG. +4. For secondary SPs, the swap-out happens at the GVG level and must also avoid conflicts with the primary SP. +5. Once SP1 successfully completes the swap-out process from all GVGs, it can submit a CompleteStorageProviderExit transaction to retrieve the staked tokens. + +This orderly exit process ensures a smooth transition of responsibilities and resources while preserving the integrity of the network and the staked tokens associated with the exiting SP. + + +### Bucket Migration Workflow + +![Bucket Miragtion](../../../../static/asset/14-Greenfield-Bucket-Migration.png) + +Below are the key workflow of Bucket Migration: + +1. The user submits a bucket migration transaction with the signature of the new primary SP. +2. The new SP starts receiving full data from the old primary SP or from secondary SPs. +3. The new SP distributes data among the secondary SPs according to his new GVPs. (more details required...) +4. The new SP submit a bucket seal transaction on-chain along with all the aggregate signature from new secondary SPs. +5. The on-chain module will: + * Unbind the old LVG and GVG mapping, and build a new mapping relationship. + * Settle the payment stream between LVG, GVF, and SPs. +6. During the migration period, the user can not upload files to this bucket. +7. During the migration period, the old SP should still serve the query request. + +## Params + +The virtial group module contains the following parameters, +they can be updated with governance. + +```protobuf +// Params defines the parameters for the module. +message Params { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + // deposit_denom defines the staking coin denomination. + string deposit_denom = 1; + // store price, in bnb wei per charge byte + string gvg_staking_per_bytes = 2 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + // the max number of lvg which allowed in a bucket + uint32 max_local_virtual_group_num_per_bucket = 3; + // the max number of gvg which can exist in a family + uint32 max_global_virtual_group_num_per_family = 4; + // if the store size reach the exceed, the family is not allowed to sever more buckets + uint64 max_store_size_per_family = 5; +} +``` + +## States +The virtualgroup module keeps state of the following primary objects. + +### Global Virtual Group +```protobuf +// A global virtual group consists of one primary SP (SP) and multiple secondary SP. +// Every global virtual group must belong to a GVG family, and the objects of each +// bucket must be stored in a GVG within a group family. +message GlobalVirtualGroup { + // ID represents the unique identifier of the global virtual group. + uint32 id = 1; + // Family ID represents the identifier of the GVG family that the group belongs to. + uint32 family_id = 2; + // Primary SP ID represents the unique identifier of the primary storage provider in the group. + uint32 primary_sp_id = 3; + // Secondary SP IDs represents the list of unique identifiers of the secondary storage providers in the group. + repeated uint32 secondary_sp_ids = 4; + // Stored size represents the size of the stored objects within the group. + uint64 stored_size = 5; + // Virtual payment address represents the payment address associated with the group. + string virtual_payment_address = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // Total deposit represents the number of tokens deposited by this storage provider for staking. + string total_deposit = 7 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} + +``` + +### Global Virtual Group Family + +```protobuf +// Global virtual group family serve as a means of grouping global virtual groups. +// Each bucket must be associated with a unique global virtual group family and cannot cross families. +message GlobalVirtualGroupFamily { + // id is the identifier of the global virtual group family. + uint32 id = 1; + // primary_sp_id + uint32 primary_sp_id = 2; + // global_virtual_group_ids is a list of identifiers of the global virtual groups associated with the family. + repeated uint32 global_virtual_group_ids = 3; + // virtual_payment_address is the payment address associated with the global virtual group family. + string virtual_payment_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} +``` + +### Swap Out Info + +```protobuf +message SwapOutInfo { + // sp_id is the unique id of the storage provider who want to swap out. + uint32 sp_id = 1; + // successor_sp_id is the id of the successor storage provider. + uint32 successor_sp_id = 2; +} +``` + +## Messages +### MsgCreateGlobalVirtualGroup + +Used to create a new global virtual group. + +```protobuf +message MsgCreateGlobalVirtualGroup { + option (cosmos.msg.v1.signer) = "storage_provider"; + + // storage_provider defines the operator account address of the storage provider who create the global virtual group. + string storage_provider = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // family_id is the identifier for the virtual group's family. + uint32 family_id = 2; + // secondary_sp_id is a list of secondary storage provider IDs associated with the virtual group. + repeated uint32 secondary_sp_ids = 3; + // total_deposit is the total deposit amount required for the virtual group. + // The tokens needs deposited and the size of storage are correlated. + cosmos.base.v1beta1.Coin deposit = 4 [(gogoproto.nullable) = false]; +} +``` + +### MsgDeleteGlobalVirtualGroup +Used to delete a global virtual group. + +```protobuf +message MsgDeleteGlobalVirtualGroup { + option (cosmos.msg.v1.signer) = "storage_provider"; + + // storage_provider defines the operator account address of the storage provider who delete the global virtual group. + string storage_provider = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // global_virtual_group_id is the identifier of the global virtual group. + uint32 global_virtual_group_id = 2; +} +``` +### MsgDeposit + +Used to deposit more tokens for the objects stored on it. + +```protobuf +message MsgDeposit { + option (cosmos.msg.v1.signer) = "storage_provider"; + + // storage_provider defines the operator/funding account address of the storage provider who deposit to the global virtual group. + string storage_provider = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // global_virtual_group_id is the identifier of the global virtual group. + uint32 global_virtual_group_id = 2; + // deposit is the amount of tokens being deposited for the global virtual group. + cosmos.base.v1beta1.Coin deposit = 3 [(gogoproto.nullable) = false]; +} +``` + +### MsgWithdraw + +Used to withdraw the excess tokens + +```protobuf +message MsgWithdraw { + option (cosmos.msg.v1.signer) = "storage_provider"; + + // storage_provider defines the operator/funding account address of the storage provider who withdraw from the global virtual group. + string storage_provider = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // global_virtual_group_id is the identifier of the global virtual group. + uint32 global_virtual_group_id = 2; + // withdraw is the amount of coins to be withdrawn. + // The amount needs to be smaller than stored_size * storage_staking_price + cosmos.base.v1beta1.Coin withdraw = 3 [(gogoproto.nullable) = false]; +} + +``` +### MsgSettle + +Used to settle the virtual payment account of the gvg and gvg family + +```protobuf +// MsgSettle define the message for settling storage income of GVG family or several GVGs. +// Firstly, the handler will do stream settlement for the payment account; and +// secondly, the income will be distributed to related storage providers. +message MsgSettle { + option (cosmos.msg.v1.signer) = "storage_provider"; + + // storage_provider defines the operator/funding account address of the storage provider who initial settle request. + string storage_provider = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // global_virtual_group_family_id is the identifier of the global virtual group family. + uint32 global_virtual_group_family_id = 2; + // global_virtual_group_id is the identifier of the global virtual group. + repeated uint32 global_virtual_group_ids = 3; +} +``` + +### MsgSwapOut +Used to initiate a swapout transaction and specify successor SP + +```protobuf +message MsgSwapOut { + option (cosmos.msg.v1.signer) = "storage_provider"; + + // storage_provider defines the operator account address of the storage provider who want to swap out from the global virtual group. + string storage_provider = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // virtual_group_family_id is the identifier of the virtual group family. + // if it set to non-zero, it represents that the operator swap out as the primary storage provider + // it it set to zero, it represents that the operator swap out as the secondary storage provider. + uint32 global_virtual_group_family_id = 2; + // global_virtual_group_ids is a list of global virtual group IDs associated with the swap out. + // It allows to be empty only when the operator is the primary storage provider. + repeated uint32 global_virtual_group_ids = 3; + // successor_sp_id is the unique id of the successor storage provider. + uint32 successor_sp_id = 4; + // approval includes an expiration time and a signature. + // The fields to be signed with contains the necessary information of the successor. + common.Approval successor_sp_approval = 5; +} +``` +### CompleteSwapOut + +Used to complete the swapout event, which is initiated by successor SP + +```protobuf +message MsgCompleteSwapOut { + option (cosmos.msg.v1.signer) = "storage_provider"; + + // storage_provider defines the operator account address of the storage provider who complete swap out task. + string storage_provider = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // virtual_group_family_id is the identifier of the virtual group family. + // if it set to non-zero, it represents that the operator swap out as the primary storage provider + // it it set to zero, it represents that the operator swap out as the secondary storage provider. + uint32 global_virtual_group_family_id = 2; + // global_virtual_group_ids is a list of global virtual group IDs associated with the swap out. + // It allows to be empty only when the operator is the primary storage provider. + repeated uint32 global_virtual_group_ids = 3; +} +``` + +### CancelSwapOut + +Used to cancel the swapout + +```protobuf +message MsgCancelSwapOut { + option (cosmos.msg.v1.signer) = "storage_provider"; + + // storage_provider defines the operator account address of the storage provider who cancel the swap out task. + string storage_provider = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // virtual_group_family_id is the identifier of the virtual group family. + // if it set to non-zero, it represents that the operator swap out as the primary storage provider + // it it set to zero, it represents that the operator swap out as the secondary storage provider. + uint32 global_virtual_group_family_id = 2; + // global_virtual_group_ids is a list of global virtual group IDs associated with the swap out. + // It allows to be empty only when the operator is the primary storage provider. + repeated uint32 global_virtual_group_ids = 3; +} +``` diff --git a/docs/modules/world-state.md b/docs/modules/world-state.md new file mode 100644 index 000000000..88d678714 --- /dev/null +++ b/docs/modules/world-state.md @@ -0,0 +1,44 @@ +# World State +All Greenfield validators have access to up-to-date active data in full. Anyone can join the blockchain as a +full node and freely synchronize this data. + +The active data is stored on-chain and can only be updated through transactions on the Greenfield blockchain. +There are several types of active data, which are described below. + +## Accounts and Balance +Each user has their "Owner Address" as the identifier for their owner account to "own" the data resources. There is +another "payment account" type dedicated to billing and payment purposes and owned by owner addresses. + +Both owner accounts and payment accounts can hold the BNB balance on Greenfield. Users can deposit BNB from BSC, accept +transfers from other users, and spend them on transaction gas and storage usage. + +## Validator and SP Metadata +These are the basic information about the Greenfield validators and Greenfield SPs. SPs may have more information, as +it has to publish their service information for users' data operations. There should be a reputation mechanism for SPs +as well. + +## Storage Metadata +The "storage metadata" includes size, ownership, checksum hashes, and distribution location among SPs. Similar to AWS S3, +the basic unit of the storage is an "object", which can be a piece of binary data, text files, photos, videos, or any +other format. Users can create their objects under their "bucket". A bucket is globally unique. The object can be referred +to via the bucket name and the object ID. It can also be located by the bucket name, the prefix tag, and the object ID +via off-chain facility. + +## Permission Metadata +Data resources on Greenfield, such as the data objects and the buckets, all have access control, such as which address +can create, read, list, or even execute the resources, and which address can grant/revoke these permissions. + +Two other data resources also have access control. One is "Group". A group represents a group of user addresses that have +the same permissions to the same resources. It can be used in the same way as an address in the access control. Meanwhile, +it requires permission too to change the group. The other is "payment account". They are created by the owner accounts. + +Here the access control is enforced by the SPs off-chain. People can test and challenge the SPs if they mess up the +control. Slash and reward will happen to keep the SPs sticking to the principles. + +## Billing Metadata +Users have to pay fees to store data objects on Greenfield. While each object enjoys a free quota to download by users +who are permitted to, the excessive download will require extra data packages to be paid for the bandwidth. Besides +the owner address, users can derive multiple "Payment Addresses" to pay these fees. Objects are stored under buckets, +while each bucket can be associated with these payment addresses, and the system will charge these accounts for storing +and/or downloading. Many buckets can share the same payment address. Such association information is also stored on +chains with consensus as well. \ No newline at end of file diff --git a/e2e/core/basesuite.go b/e2e/core/basesuite.go index bde8bab85..4e3c4b59f 100644 --- a/e2e/core/basesuite.go +++ b/e2e/core/basesuite.go @@ -177,7 +177,7 @@ func (s *BaseSuite) SetupSuite() { // Create a GVG for each sp by default deposit := sdk.Coin{ Denom: s.Config.Denom, - Amount: types.NewIntFromInt64WithDecimal(1, types.DecimalBNB), + Amount: types.NewIntFromInt64WithDecimal(1000, types.DecimalBNB), } var secondaryIDs []uint32 for _, ssp := range s.StorageProviders { diff --git a/e2e/tests/storage_rate_limit_test.go b/e2e/tests/storage_rate_limit_test.go index 14368d7bc..0017f9e81 100644 --- a/e2e/tests/storage_rate_limit_test.go +++ b/e2e/tests/storage_rate_limit_test.go @@ -89,6 +89,103 @@ func (s *StorageTestSuite) TestSetBucketRateLimitToZero() { s.SendTxBlockWithExpectErrorString(msgCreateObject, user, "greater than the flow rate limit") } +func (s *StorageTestSuite) TestSetBucketRateLimitToZeroAndDelete() { + var err error + sp := s.BaseSuite.PickStorageProvider() + gvg, found := sp.GetFirstGlobalVirtualGroup() + s.Require().True(found) + user := s.User + // CreateBucket + bucketName := storageutils.GenRandomBucketName() + msgCreateBucket := storagetypes.NewMsgCreateBucket( + user.GetAddr(), bucketName, storagetypes.VISIBILITY_TYPE_PUBLIC_READ, sp.OperatorKey.GetAddr(), + nil, math.MaxUint, nil, 0) + msgCreateBucket.PrimarySpApproval.GlobalVirtualGroupFamilyId = gvg.FamilyId + msgCreateBucket.PrimarySpApproval.Sig, err = sp.ApprovalKey.Sign(msgCreateBucket.GetApprovalBytes()) + s.Require().NoError(err) + s.SendTxBlock(user, msgCreateBucket) + + // HeadBucket + ctx := context.Background() + queryHeadBucketRequest := storagetypes.QueryHeadBucketRequest{ + BucketName: bucketName, + } + queryHeadBucketResponse, err := s.Client.HeadBucket(ctx, &queryHeadBucketRequest) + s.Require().NoError(err) + s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketName, bucketName) + s.Require().Equal(queryHeadBucketResponse.BucketInfo.Owner, user.GetAddr().String()) + s.Require().Equal(queryHeadBucketResponse.BucketInfo.GlobalVirtualGroupFamilyId, gvg.FamilyId) + s.Require().Equal(queryHeadBucketResponse.BucketInfo.PaymentAddress, user.GetAddr().String()) + s.Require().Equal(queryHeadBucketResponse.BucketInfo.Visibility, storagetypes.VISIBILITY_TYPE_PUBLIC_READ) + s.Require().Equal(queryHeadBucketResponse.BucketInfo.SourceType, storagetypes.SOURCE_TYPE_ORIGIN) + + queryQuotaUpdateTimeResponse, err := s.Client.QueryQuotaUpdateTime(ctx, &storagetypes.QueryQuoteUpdateTimeRequest{ + BucketName: bucketName, + }) + s.Require().NoError(err) + s.Require().Equal(queryHeadBucketResponse.BucketInfo.CreateAt, queryQuotaUpdateTimeResponse.UpdateAt) + + fmt.Printf("User: %s\n", s.User.GetAddr().String()) + fmt.Printf("queryHeadBucketResponse.BucketInfo.Owner: %s\n", queryHeadBucketResponse.BucketInfo.Owner) + fmt.Printf("queryHeadBucketResponse.BucketInfo.PaymentAccount: %s\n", queryHeadBucketResponse.BucketInfo.PaymentAddress) + + // SetBucketRateLimit + msgSetBucketRateLimit := storagetypes.NewMsgSetBucketFlowRateLimit(s.User.GetAddr(), s.User.GetAddr(), s.User.GetAddr(), bucketName, sdkmath.NewInt(100000000000000000)) + s.SendTxBlock(s.User, msgSetBucketRateLimit) + + // CreateObject + objectName := storageutils.GenRandomObjectName() + // create test buffer + var buffer bytes.Buffer + // Create 1MiB content where each line contains 1024 characters. + for i := 0; i < 1024; i++ { + buffer.WriteString(fmt.Sprintf("[%05d] %s\n", i, line)) + } + payloadSize := buffer.Len() + checksum := sdk.Keccak256(buffer.Bytes()) + expectChecksum := [][]byte{checksum, checksum, checksum, checksum, checksum, checksum, checksum} + contextType := "text/event-stream" + msgCreateObject := storagetypes.NewMsgCreateObject(user.GetAddr(), bucketName, objectName, uint64(payloadSize), storagetypes.VISIBILITY_TYPE_PRIVATE, expectChecksum, contextType, storagetypes.REDUNDANCY_EC_TYPE, math.MaxUint, nil) + msgCreateObject.PrimarySpApproval.Sig, err = sp.ApprovalKey.Sign(msgCreateObject.GetApprovalBytes()) + s.Require().NoError(err) + s.SendTxBlock(s.User, msgCreateObject) + + // HeadObject + queryHeadObjectRequest := storagetypes.QueryHeadObjectRequest{ + BucketName: bucketName, + ObjectName: objectName, + } + queryHeadObjectResponse, err := s.Client.HeadObject(ctx, &queryHeadObjectRequest) + s.Require().NoError(err) + + // SealObject + gvgId := gvg.Id + msgSealObject := storagetypes.NewMsgSealObject(sp.SealKey.GetAddr(), bucketName, objectName, gvg.Id, nil) + secondarySigs := make([][]byte, 0) + secondarySPBlsPubKeys := make([]bls.PublicKey, 0) + blsSignHash := storagetypes.NewSecondarySpSealObjectSignDoc(s.GetChainID(), gvgId, queryHeadObjectResponse.ObjectInfo.Id, storagetypes.GenerateHash(queryHeadObjectResponse.ObjectInfo.Checksums[:])).GetBlsSignHash() + // every secondary sp signs the checksums + for _, spID := range gvg.SecondarySpIds { + sig, err := core.BlsSignAndVerify(s.StorageProviders[spID], blsSignHash) + s.Require().NoError(err) + secondarySigs = append(secondarySigs, sig) + pk, err := bls.PublicKeyFromBytes(s.StorageProviders[spID].BlsKey.PubKey().Bytes()) + s.Require().NoError(err) + secondarySPBlsPubKeys = append(secondarySPBlsPubKeys, pk) + } + aggBlsSig, err := core.BlsAggregateAndVerify(secondarySPBlsPubKeys, blsSignHash, secondarySigs) + s.Require().NoError(err) + msgSealObject.SecondarySpBlsAggSignatures = aggBlsSig + s.T().Logf("msg %s", msgSealObject.String()) + s.SendTxBlock(sp.SealKey, msgSealObject) + + msgSetBucketRateLimit = storagetypes.NewMsgSetBucketFlowRateLimit(s.User.GetAddr(), s.User.GetAddr(), s.User.GetAddr(), bucketName, sdkmath.NewInt(0)) + s.SendTxBlock(s.User, msgSetBucketRateLimit) + + msgDeleteObject := storagetypes.NewMsgDeleteObject(user.GetAddr(), bucketName, objectName) + s.SendTxBlockWithExpectErrorString(msgDeleteObject, user, "bucket is rate limited") +} + // TestNotOwnerSetBucketRateLimit_Object // 1. user create a bucket with 0 read quota // 2. the payment account set the rate limit diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index 7ef9340ea..adad58fb0 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -136,7 +136,7 @@ func (s *VirtualGroupTestSuite) TestBasic() { s.Require().Contains(spAvailableGvgFamilyIds, gvg.FamilyId) spOptimalGvgFamilyId := s.querySpOptimalGlobalVirtualGroupFamily(primarySP.Info.Id, virtualgroupmoduletypes.Strategy_Maximize_Free_Store_Size) - s.Require().Equal(spOptimalGvgFamilyId, gvg.FamilyId) + s.Require().Contains(spAvailableGvgFamilyIds, spOptimalGvgFamilyId) srcGVGs := s.queryGlobalVirtualGroupsByFamily(gvg.FamilyId) diff --git a/x/storage/keeper/bucket_rate_limit.go b/x/storage/keeper/bucket_rate_limit.go index cc792311a..da4b8ec19 100644 --- a/x/storage/keeper/bucket_rate_limit.go +++ b/x/storage/keeper/bucket_rate_limit.go @@ -172,6 +172,7 @@ func (k Keeper) setBucketFlowRateLimitStatus(ctx sdk.Context, bucketName string, store.Set(types.GetBucketFlowRateLimitStatusKey(bucketName), bz) if err := ctx.EventManager().EmitTypedEvents(&types.EventBucketFlowRateLimitStatus{ + BucketId: bucketId, BucketName: bucketName, IsLimited: status.IsBucketLimited, }); err != nil { diff --git a/x/storage/keeper/keeper.go b/x/storage/keeper/keeper.go index abbfa1e1d..199424d12 100644 --- a/x/storage/keeper/keeper.go +++ b/x/storage/keeper/keeper.go @@ -2166,6 +2166,13 @@ func (k Keeper) MigrateBucket(ctx sdk.Context, operator sdk.AccAddress, bucketNa return err } + if ctx.IsUpgraded(upgradetypes.Erdos) { + isRateLimited := k.IsBucketRateLimited(ctx, bucketInfo.BucketName) + if isRateLimited { + return fmt.Errorf("bucket is rate limited: %s", bucketInfo.BucketName) + } + } + key := types.GetMigrationBucketKey(bucketInfo.Id) if store.Has(key) { panic("migration bucket key is existed.") diff --git a/x/storage/keeper/payment.go b/x/storage/keeper/payment.go index 462359a3f..8e00e0fb3 100644 --- a/x/storage/keeper/payment.go +++ b/x/storage/keeper/payment.go @@ -445,6 +445,10 @@ func (k Keeper) ChargeViaObjectChange(ctx sdk.Context, bucketInfo *storagetypes. shouldApplyFlowRate = false } } else { + isRateLimited := k.IsBucketRateLimited(ctx, bucketInfo.BucketName) + if isRateLimited { + return nil, fmt.Errorf("bucket is rate limited: %s", bucketInfo.BucketName) + } // we should only check the flow rate limit when is not forced currentBill, err := k.GetBucketReadStoreBill(ctx, bucketInfo, internalBucketInfo) if err != nil { @@ -598,6 +602,11 @@ func (k Keeper) ChargeBucketReadStoreFee(ctx sdk.Context, bucketInfo *storagetyp } if ctx.IsUpgraded(upgradetypes.Erdos) { + isRateLimited := k.IsBucketRateLimited(ctx, bucketInfo.BucketName) + if isRateLimited { + return fmt.Errorf("bucket is rate limited: %s", bucketInfo.BucketName) + } + err := k.isBucketFlowRateUnderLimit(ctx, sdk.MustAccAddressFromHex(bucketInfo.PaymentAddress), sdk.MustAccAddressFromHex(bucketInfo.Owner), bucketInfo.BucketName, bill) if err != nil { return err