# General Commands
# Block Commands
Block commands are all online commands.
Command | Description |
---|---|
getblock (deprecated) | Return the specific block information of the given block height or block Id |
getblockbyheight | Return the specific block information for the given block height |
getblockbyid | Return the specific block information for the given block Id |
getblockevents (deprecated) | Return the block events of a specific block height or block Id |
getblockeventsbyheight | Return the block events at a specific block height |
getblockeventsbyid | Return the block events for a specific block Id |
getblocks | Return blocks from startheight to min(startheight + depth, currentHeight) |
getheader (deprecated) | Return the block header of a specific block height or block Id |
getheaderbyheight | Return the block header at a specific block height |
getheaderbyid | Return the block header for a specific block Id |
getheaders | Return the specific block headers from startheight to min(startheight + depth, currentHeight) |
getheight | Return the current height of the blockchain stored in the connected node |
# Certificate Commands
Certificate operation commands are designed to help users manage their private keys and public keys. These commands use the ECC-SEPC256K1 algorithm.
All certificate operation commands are offline commands.
Command | Description |
---|---|
derivepkcs12 | Derive PKCS#12 store with private key and self-signed certificate |
generatemultisig | Return a multi-signature address for a given set of public keys along with a threshold limit for its verification |
generatepkcs12 | Generate a PKCS12 certificate with a random private key |
getpublickey | Return the public key of the given private key |
parsepkcs12 | Get the private key from PKCS12 certificate |
# Core Transaction Subcommands
Transaction subcommands create an entry and wrap it as a transaction passed to the main command for sending or displaying. These subcommands can only be used along with a Transaction Creation Commands as the main command.
This section introduces subcommands that are not specific to any modules. Other commands will be introduced in Module Commands section.
Command | Description |
---|---|
addconsensuscredentialsadmins | Add new admin(s) to the existing consensus credentials admins |
addextensionmodule | Add new extension module to blockchain |
addpermissionedtableacl | Add address(es) to permissioned table's ACL |
addtableowners | Add table owners for a table |
addtokenadmins | Add token admins for an NFT table or Asset table |
addtrustedentities | Add trusted entities for an NFT table or Asset table |
changeblockchainparameters | Update the blockchain parameters |
changeconsensuscredentials | Change the consensus credentials |
deletetable | Delete a table |
removeconsensuscredentialsadmins | Remove provided admin(s) from the existing consensus credentials admins |
removepermissionedtableacl | Remove addresses from permissioned table's ACL |
removetableowners | Remove table owner(s) from a table |
removetokenadmins | Remove token admins from an NFT table or Asset table |
removetrustedentities | Remove trusted entities from an NFT table or Asset table |
updateworldpermission | Grant or revoke the world permissions such as Root , CreateTable , ChangeConfig , GrantCreateTable of the passed addresses |
# Node Operation Commands
These commands will get access to the information that belongs to the Miyabi node.
All node operation commands are online commands.
Command | Description |
---|---|
getallinfo | Return the current information of all nodes in the SDK config (hosts) |
getconsensuscredentials | Return all consensus nodes credentials for a specific block height |
getinfo | Return the node status and information |
getnodeconfig | An admin command that gets the current node configuration of the node |
getpeercount | Return the number of nodes that the current node is connected to |
getpeers | Return the credentials of nodes that the current node is connected to |
getperformance | Get the performance statistics of the node |
refreshclientcache | Refresh the client cache |
# State Query Commands
The state query commands query the World State to get information.
As these commands need to fetch World State data from the node, these are all online commands.
Command | Description |
---|---|
getblockchainparameters | Return the Blockchain Parameters for the blockchain at a given height |
gethistory | Return the historical transaction Ids that have updated the specified table entry |
getstateproof | Return the state proof of table entry |
gettables | Return the TableDescriptor s of all tables |
# Transaction Creation Commands
Transaction creation commands can create and send the transaction to Miyabi.
Inner command is supported by all transaction creation commands.
The user needs to attach --
to the end of the last command option, and the output of this transaction will automatically be treated as an argument of the 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
- A file containing the serialized transaction
Command | Description |
---|---|
createtransaction | An offline command that creates a transaction from provided input transaction data |
sendtransaction | An online command that sends a transaction to the connected Miyabi node |
# Transaction Operation Command
These commands are designed to modify a transaction or read transaction from the block.
Some of them can be used as inner commands.
Command | Description | Inner Command |
---|---|---|
addcredential | An offline command that adds one credential to the specific transaction's RequiredCredentials and returns the new transaction | |
addevidence | An offline command that adds an evidence (a signature of the transaction) directly to the transaction and returns the new transaction | |
gettransactionid | An offline command that gets the transaction Id of the provided transaction | yes |
gettransactioninfo | An online command that queries the information of one transaction according to its transaction Id | yes |
gettransactioninfos | An online command that queries the information of multiple transactions based on their transaction Ids | |
gettransactionlist | An online command that queries transaction list for a specific block height | |
gettransactionresult | An online command to get the current status of a transaction | yes |
gettransactionresults | An online command to get the current status of multiple transactions | |
jsonifytransaction | An offline command that decodes a binary transaction and returns JSON format | yes |
signtransaction | An offline command that signs a transaction with provided private key and returns the new transaction | |
updatetransactions | An offline command that signs multiple transactions with multiple private keys | |
waittransaction | An online command that tries to retrieve the result of a given transaction once it has been executed (not transaction code Pending ) on Miyabi | yes |
# Utility Commands
Utility commands transform data to satisfy the requirement of different options.
All utility commands are offline commands except invoke API.
Command | Description |
---|---|
computehash | Compute hash for the given input using a specified hashing algorithm |
decodefromhex | Decode the input ByteString to utf-8 string |
encodetohex | Encode the input utf-8 string to a ByteString |
invokeapi | Online command that can invoke Get API with relevant query parameters |
proofhash | Return the RIPEMD160 hash (as used in state proofs) of the given data |