# Asset Module Commands

# Get Asset Table

# Usage

Usage: miyabi-cli getassettable [Options]

Options:
--help             Show help information
-t|--table <name>  Asset table name

# Functionality

Online reference general table that returns the contents of the asset table/permissioned asset table.

-t is a required option.

-cc is required to specify the update admin of the table, if the target table is permissioned asset table and read restricted.

# Example

$ ./miyabi-cli.exe getassettable -t test_asset
{"00":-1000.0,"02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5":900.0,"02f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9":100.0}

# Get Asset

# Usage

Usage: miyabi-cli getasset [Options]

Options:
--help              Show help information
-t|--table <name>   Asset table name
-a|--address <hex>  Address

# Functionality

Online general reference command that returns the specific entry specified by -t and -a.

-t should specify an asset table or permissioned asset table.

-cc may required if -t specify a read restricted permissioned asset table.

# Example

$ ./miyabi-cli.exe getasset -t test_asset -a 02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5
900.0

# Create Asset Table

# Usage

Usage: miyabi-cli sendtransaction createassettable [Options] [-- InnerCommand [InnerCommand Options] <arg(s)>]

Options:
--help                 Show help information
-o|--owner <address>   Table owner's address
--rules <rules>        Rules
--trusted <addresses>  Trusted addresses
-p|--privatekey <key>  Private key of table admin
-t|--table <name>      Table name
--proofs               Turn on proof
--track                Track the history

# Functionality

Transaction subcommand that creates a transaction which will create an asset table.

-t,-o, and -p is required.

-p should specify the private key of table admin, and -o should specify the public key of table owner.

--trusted is used to specify trusted addresses that allow withdrawing money from any address(except void address) up to their balance.

--rules takes numbers as input that specifies the rules of the table.

--proofs specify if the table support state proof.

--track specify if the table should record the history of each entry.

# Example

$ ./miyabi-cli.exe -t test_asset -o 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 -p 10425b7e6ebf5e0d5918717f77ce8a66aaf92bc64b65996f885ff12bd94ef529
bf2ac5105fe8650602f6549aae61b1eb99ae9f69b506f1e4f03983ff072e8d8f

# Create Permissioned Asset Table

# Usage

Usage: miyabi-cli sendtransaction createpermissionedassettable [Options] [-- InnerCommand [InnerCommand Options] <arg(s)>]

Options:
--help                 Show help information
--rules <rules>        Rules
--trusted <addresses>  Trusted addresses
-o|--owner <address>   Table owner's address
-r|--restricted        Read restricted
-p|--privatekey <key>  Private key of table admin
-t|--table <name>      Table name
--proofs               Turn on proof
--track                Track the history

# Functionality

Transaction subcommand creates a transaction that will create a permissioned asset table. Usage of most options are the same as create asset table.

-r specify if the table is read restricted that update admin's signature is needed for reading entries(even the address of that entry is not allowed alone). update admin, insert admin, and ACL admin is set to table owner.

# Example

$ ./miyabi-cli.exe sendtransaction createpermissionedassettable -t test_permissioned_asset -o 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 -p 10425b7e6ebf5e0d5918717f77ce8a66aaf92bc64b65996f885ff12bd94ef529
59ae3ef72a9bf1003b0bfd15c1c99b157fd5c3e416b061f5be15e3cc022bf085

# Generate Asset

# Usage

Usage: miyabi-cli sendtransaction generateasset [Options] [-- InnerCommand [InnerCommand Options] <arg(s)>]

Options:
--help                  Show help information
-p|--privatekey <key>   Private key of table owner
-t|--table <name>       Asset table name
-a|--address <address>  Address to generate asset for
-m|--amount <decimal>   Asset ammount to generate
--memo <string>         Memo text for the operation

# Functionality

Transaction subcommand that will generate in the given table for a given address.

-t,-a,-p, and -m are required.

-p must be asset admin(default to asset owner) and insert admin or update admin(in permissioned asset table case when asset admin is not insert admin/update admin).

--memo will create a memo entry of a given string and added to this transaction.

# Example

$ ./miyabi-cli.exe sendtransaction generateasset -p 01 -t test_asset -a 02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5 -m 1000
8

# Move Asset

# Usage

Usage: miyabi-cli sendtransaction moveasset [Options] [-- InnerCommand [InnerCommand Options] <arg(s)>]

Options:
--help                 Show help information
-p|--privatekey <key>  Private key of signer(table owner/trusted address/asset owner)
--from <address>       From address
--to <address>         To address
-t|--table <name>      Asset table name
-m|--amount <decimal>  Asset amount to move
--memo <string>        Memo text for the operation
--permissioned <key>   Private key of permissioned admin(update admin/table owner in permissioned asset table)

# Functionality

Transaction subcommand that will move assets from one address to another address.

-p, --from, --to,-t, and -m are required.

--permiessioned is used to specify the private key of update admin/insert admin,

-p is used to specify private key of --from address or --to if it is a trusted address.

# Example

$ ./miyabi-cli.exe sendtransaction moveasset -t test_asset --from 02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5 --to 02f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9 -m 100 -p 02
ba30c06af0ea5a4a17cada96b3f98b5da1bb371491d1be4d4f5be3743fdb2e5f