# Tx Creation Commands
Transaction creation commands can create a transaction. These commands can be used with subcommand
to specify the entry within the transaction. The inner command is supported by all transaction creation commands. The user just needs to attach --
to the tail of the last command option and the output of this transaction will automatically be treated as argument of inner command's argument.
# Create Transaction
# Usage
Usage: miyabi-cli createtransaction [Options] [Command, [Command Options]] <TxData> [-- InnerCommand [InnerCommand Options] <arg(s)>]
Arguments:
TxData
Options:
--help Show help information
-J|--json Output result will be in Json format
Commands:
addentity Add entity to an entity table
addentityparent Add parent to an entity
changeconsensuscredentials Change consensus credentials
....
# Functionality
An offline command that will create a transaction from giving data. Users can use subcommands like addentity
and related parameters to create a transaction with the entry defined by subcommand. The output is the binary transaction data that can be deserialized to JSON format.
# Example
$ ./miyabi-cli.exe createtransaction generateasset -p c302dfe03e9c70f925349d8a235bdf60c57f254407ec4d331d6fffd910738781 -t bFBC_coin -a 033f4654afe65504ed1fe697f997c273b7c30d7e05d5086db0ade47345149815e9 -m 1000 -- addevidence --evidence 3001
d2c03300020196d7ffb6b4e0405e9fff7fd7ffb6b4e0405e9fff7fd7ffb6b4e0405ea00d8f91c439d2a55e00410193a9624642435f636f696ea431303030c421033f4654afe65504ed1fe697f997c273b7c30d7e05d5086db0ade47345149815e991c421034cdae9dd567b23d29c9affef3ce7ff5c1d16d35512bb72a9008ac3283911611892c446304402207120af164af9e89c6a7a462fac8c73d10cce735bb2614a51beb90c3f603916d702207c831ea819fcb5cd505e5c1f1f38244b37897035610cf8a6637366ad3c169a71c4023001
# Note
An inner command should take transaction data as the argument like signtransaction
.
# Send Transaction
# Usage
Usage: miyabi-cli sendtransaction [Options] [Command, [Command Options]] <TxData> [-- InnerCommand [InnerCommand Options] <arg(s)>]
Arguments:
TxData
Options:
--help Show help information
Commands:
addentity Add entity to a entity table
addentityparent Add parent to an entity
...
# Functionality
Online general update command that will send a transaction to the connected Miyabi node. Transaction Id will be returned that can be used as input for other commands like waittransaction
.
# Example
$ ./miyabi-cli.exe sendtransaction generateasset -p c302dfe03e9c70f925349d8a235bdf60c57f254407ec4d331d6fffd910738781 -t bFBC_coin -a 033f4654afe65504ed1fe697f997c273b7c30d7e05d5086db0ade47345149815e9 -m 1000 -- waittransaction
{"resultCode":0}
# Note
The inner command should take transaction Id as argument like gettransactioninfo
or waittransaction
.