Gaia Lite Generate Only Support (w/o Keybase) (#3396)

This commit is contained in:
Alexander Bezobchuk
2019-01-29 11:22:47 -08:00
committed by Jack Zampolin
parent 1a656e7023
commit 90797f5e09
23 changed files with 1138 additions and 1011 deletions
+13 -4
View File
@@ -105,10 +105,19 @@ The recommended way to listen for incoming transaction is to periodically query
## Rest API
The Rest API documents all the available endpoints that you can use to interract with your full node. It can be found [here](https://cosmos.network/rpc/).
The Rest API documents all the available endpoints that you can use to interact
with your full node. It can be found [here](https://cosmos.network/rpc/).
The API is divided into ICS standards for each category of endpoints. For example, the [ICS20](https://cosmos.network/rpc/#/ICS20/) describes the API to interact with tokens.
The API is divided into ICS standards for each category of endpoints. For
example, the [ICS20](https://cosmos.network/rpc/#/ICS20/) describes the API to
interact with tokens.
To give more flexibility to implementers, we have included the ability to generate unsigned transactions, [sign](https://cosmos.network/rpc/#/ICS20/post_tx_sign) and [broadcast](https://cosmos.network/rpc/#/ICS20/post_tx_broadcast) them with different API endpoints. This allows service providers to use their own signing mechanism for instance.
To give more flexibility to implementers, we have included the ability to
generate unsigned transactions, [sign](https://cosmos.network/rpc/#/ICS20/post_tx_sign)
and [broadcast](https://cosmos.network/rpc/#/ICS20/post_tx_broadcast) them with
different API endpoints. This allows service providers to use their own signing
mechanism for instance.
In order to generate an unsigned transaction (example with [coin transfer](https://cosmos.network/rpc/#/ICS20/post_bank_accounts__address__transfers)), you need to use the flag `?generate_only`.
In order to generate an unsigned transaction (example with
[coin transfer](https://cosmos.network/rpc/#/ICS20/post_bank_accounts__address__transfers)),
you need to use the field `generate_only` in the body of `base_req`.
+12 -3
View File
@@ -209,7 +209,8 @@ You can also check your balance at a given block by using the `--block` flag:
gaiacli query account <account_cosmos> --block=<block_height>
```
You can simulate a transaction without actually broadcasting it by appending the `--dry-run` flag to the command line:
You can simulate a transaction without actually broadcasting it by appending the
`--dry-run` flag to the command line:
```bash
gaiacli tx send \
@@ -220,7 +221,8 @@ gaiacli tx send \
--dry-run
```
Furthermore, you can build a transaction and print its JSON format to STDOUT by appending `--generate-only` to the list of the command line arguments:
Furthermore, you can build a transaction and print its JSON format to STDOUT by
appending `--generate-only` to the list of the command line arguments:
```bash
gaiacli tx send \
@@ -231,7 +233,14 @@ gaiacli tx send \
--generate-only > unsignedSendTx.json
```
You can now sign the transaction file generated through the `--generate-only` flag by providing your key to the following command:
::: tip Note
Simulation cannot be used in conjunction with tx generation only functionality
due to the fact that simulation requires a public key and generation only does
not utilize a Keybase.
You can now sign the transaction file generated through the `--generate-only`
flag by providing your key to the following command:
:::
```bash
gaiacli tx sign \