# Binary Module Commands

# Create Binary Table

# Usage

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

Options:
--help                 Show help information
-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 will create a binary table. -t and -p are required where -p should specify the private key of table admin.

# Example

$ ./miyabi-cli.exe sendtransaction createbinarytable -t test_binary -p 10425b7e6ebf5e0d5918717f77ce8a66aaf92bc64b65996f885ff12bd94ef529
1b513803dcf3fb26834a74c42e377ee744a346cda1ec40bddbf72a9c18223cca

# Create Permissioned Binary Table

# Usage

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

Options:
--help                 Show help information
-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 that creates permissioned binary table. -o,-p, and -t are required. The table owner will be granted with all ACL permissions.

# Example

$ ./miyabi-cli.exe sendtransaction createpermissionedbinarytable -t test_permissionedbinary -p 10425b7e6ebf5e0d5918717f77ce8a66aaf92bc64b65996f885ff12bd94ef529 -o 02e3c13b6862eda179ac49d03b334ef17cf654c05bd3fa6dc0cf6078fefe82aea2
9d0acc9f8d0b5d0daa91abd38a554fc97140ccef08d650983d7bd34271a98924

# Set Binary Value

# Usage

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

Options:
--help                 Show help information
-t|--table <name>      Table name
-k|--key <hex>         Entry key
-v|--value <hex>       Entry value
-p|--privatekey <key>  Private key of table owner(required only for permissioned binary table)

# Functionality

Transaction subcommand that sets the value of a specific table entry specified by -t and -k. All options take byte string as input. -p is required if the table is not permissioned binary table or permissioned row binary table. Set binary value can be used to create a new entry or update an existed entry.

# Example

$ ./miyabi-cli.exe sendtransaction setbinaryvalue -t test_binary -k 1111 -v 2222
de41c1ffa3a54bf8dd41d68d201e7bf941b160ac5f022fa631cacaf7cf3f864f

# Get Binary Table

# Usage

Usage: miyabi-cli getbinarytable [Options]

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

# Functionality

Command that gets all the entries for a binary table t.t is required.

# Example

$ ./miyabi-cli.exe getbinarytable -t test_binary
{"2222":"3333","5678":"35687358734534"}

# Get Binary Value

# Usage

Usage: miyabi-cli getbinaryvalue [Options]

Options:
--help                 Show help information
-t|--table <name>      Table name
-k|--key <hex>         Entry key

# Functionality

Command that gets a specific entry of a binary table of name t for a key k.Both parameters are required.

# Example

$ ./miyabi-cli.exe getbinaryvalue -t test_binary -k 1111
"2222"

# Delete Binary Value

# Usage

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

Options:
--help                 Show help information
-t|--table <name>      Table name
-k|--key <hex>         Entry key
-p|--privatekey <key>  Private key of table owner(required only for permissioned binary table)

# Functionality

Transaction subcommand that deletes a specific entry of a binary table. -p is required for permissioned binary table(update admin) and permissioned row binary table(update admin or row owner)

# Example

$ ./miyabi-cli.exe sendtransaction deletebinaryvalue -t test_binary -k 1111
e0536b62be6b20127d85e4f2ede1f383fbc68d99e0d9abdc1a5e1b947b7aaa87