# Tx Creation Commands
Transaction creation commands can create a transaction.
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.
These commands can be used with either:
- a
subcommand
to specify the entry within the transaction - transaction data in JSON/hex
- transaction JSON file path
# 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
--multiple-lines Allow tx input with multiple lines (Use Ctrl+z or an empty line to signal end of input)
Commands:
addbinaryowner Add binary owner for a specific binary data row
addentity Add entity to a entity table
addentityowner Add entity owner for a specific entity
....
# Functionality
An offline command that creates a transaction from provided input txn data. Users can use subcommands like generateasset
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
d2c03300020196d7ff641b6ac062d68a77d7ff641b6ac062d68a77d7ff641b6ac062d6988791c439d2a55e00410193a9624642435f636f696ea431303030c421033f4654afe65504ed1fe697f997c273b7c30d7e05d5086db0ade47345149815e991c421034cdae9dd567b23d29c9affef3ce7ff5c1d16d35512bb72a9008ac3283911611891c4473045022100a33279a56d4101d1b4c6cac69672d9f6910f9d59386aa673d4075d2acda178d40220763da4f727e14160da023c67e87b173a23ed9ab46f098b6f6c4db9fcf06e7fc1
# Note
An inner command should take transaction data as the argument like gettransactionid
.
# Send Transaction
# Usage
Usage: miyabi-cli sendtransaction [Options] [Command, [Command Options]] <TxData> [-- InnerCommand [InnerCommand Options] <arg(s)>]
Arguments:
TxData
Options:
--help Show help information
--multiple-lines Allow tx input with multiple lines (Use Ctrl+z or an empty line to signal end of input)
Commands:
addbinaryowner Add binary owner for a specific binary data row
addentity Add entity to a entity table
...
# Functionality
Online general update command that sends 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
.