sui client command provides tools for interacting with the Sui blockchain network.
Synopsis
Global Options
Path to client configuration file (default:
~/.sui/sui_config/client.yaml)The Sui environment to use (must be present in config file)
Create a new sui config without prompting if none exists
Return command outputs in JSON format
Commands
active-address
Display the default address used for commands when none specified.active-env
Display the default environment used for commands when none specified.addresses
Obtain the addresses managed by the client.Sort by alias instead of address
balance
List the coin balance of an address.Address or its alias. If not specified, uses active address
Show balance for the specified coin (e.g.,
0x2::sui::SUI). Shows all coins if not specifiedShow a list with each coin’s object ID and balance
call
Call a Move function.Object ID of the package containing the module
The name of the module in the package
Function name in module
Type arguments to the generic function. All must be specified
Simplified ordered args like in the function syntax. ObjectIDs and addresses must be hex strings
IDs of gas objects for payment. Auto-selected if not provided
Gas budget for this transaction (in MIST). If not provided, performs dry run to estimate
Gas price for this transaction (in MIST). Uses reference gas price if not provided
chain-identifier
Query the chain identifier from the RPC endpoint.dynamic-field
Query dynamic fields by parent object address.The ID of the parent object
Optional paging cursor
Maximum items returned per page
envs
List all Sui environments.faucet
Request gas coin from faucet.Address or its alias. Uses active address if not specified
The url to the faucet. Auto-detected based on active network if not specified
For testnet tokens, use the Web UI at https://faucet.sui.io/
gas
Obtain all gas objects owned by an address.Address or its alias owning the objects. Uses active address if not specified
merge-coin
Merge two coin objects into one coin.The address of the coin to merge into
The address of the coin to be merged
Gas budget for this transaction (in MIST)
new-address
Generate new address and keypair.Keypair scheme:
ed25519, secp256k1, or secp256r1Optional alias for the address. Must start with a letter and contain only letters, digits, hyphens (-), or underscores (_)
Mnemonic word length:
word12, word15, word18, word21, or word24. Default: word12Optional derivation path. Defaults:
- ed25519:
m/44'/784'/0'/0'/0' - secp256k1:
m/54'/784'/0'/0/0 - secp256r1:
m/74'/784'/0'/0/0
new-env
Add new Sui environment.Environment alias
RPC server URL
WebSocket URL
Basic authentication in format
username:passwordobject
Get object information.Object ID of the object to fetch
Return the BCS serialized version of the object
objects
Obtain all objects owned by an address.Address owning the objects. Uses active address if not specified. Accepts address or alias
pay
Pay coins to recipients following specified amounts.The input coins to be used for pay recipients
The recipient addresses. Must be same length as amounts. Accepts addresses or aliases
The amounts to be paid, following the order of recipients
Gas budget for this transaction (in MIST)
pay-all-sui
Pay all residual SUI coins to recipient, after deducting gas cost.The input coins including the gas coin
The recipient address or alias
Gas budget for this transaction (in MIST)
pay-sui
Pay SUI coins to recipients following specified amounts.The input coins including the gas coin
The recipient addresses. Must be same length as amounts
The amounts to be paid
Gas budget for this transaction (in MIST)
ptb
Run a Programmable Transaction Block from provided arguments.publish
Publish Move modules.Path to directory containing a Move package
Publish without checking whether dependency source code compiles to on-chain bytecode
Check that dependency source code compiles to on-chain bytecode before publishing
Also publish transitive dependencies that have not already been published
Gas budget for this transaction (in MIST)
remove-address
Remove an existing address by its alias or hexadecimal string.split-coin
Split a coin object into multiple coins.ID of the coin object to split
Specific amounts to split out from the coin (mutually exclusive with —count)
Count of equal-size coins to split into (mutually exclusive with —amounts)
Gas budget for this transaction (in MIST)
switch
Switch active address and/or network environment.Address or alias to use as active address
The RPC server environment to use
transfer
Transfer object to an address.Recipient address or its alias
ID of the object to transfer
Gas budget for this transaction (in MIST)
transfer-sui
Transfer SUI, and pay gas with the same SUI coin object.Recipient address or its alias
ID of the coin to transfer (also used as gas)
The amount to transfer. If not specified, the entire coin object will be transferred
Gas budget for this transaction (in MIST)
tx-block
Get the effects of executing a transaction block.Digest of the transaction block
upgrade
Upgrade Move modules.Path to directory containing a Move package
ID of the upgrade capability for the package being upgraded
Upgrade without checking whether dependency source code compiles to on-chain bytecode
Also publish transitive dependencies that have not already been published
Gas budget for this transaction (in MIST)
verify-bytecode-meter
Run the bytecode verifier on a package.Path to directory containing a Move package (defaults to current directory)
Protocol version to use for the bytecode verifier (defaults to latest)
Paths to specific pre-compiled module bytecode to verify. Can be specified multiple times
verify-source
Verify local Move packages against on-chain packages.Path to directory containing a Move package
Verify on-chain dependencies
Don’t verify source (only valid if —verify-deps is enabled)
Override addresses for the package’s own modules. Only works for unpublished modules (whose addresses are 0x0)
Transaction Processing Options
Many commands support these transaction processing options:Compute the transaction digest and print it, but do not execute
Perform a dry run of the transaction without executing it
Perform a dev inspect on the transaction
Serialize the BCS bytes of unsigned transaction data and print as Base64. Can be used with
execute-signed-txSerialize the BCS bytes of signed transaction data and print as Base64. Can be used with
execute-combined-signed-txSet the transaction sender to this address