Wallet CLI
This document is a reference for Chia's wallet
CLI commands. The following wallet
commands are documented on their own dedicated pages:
Reference
add_token
Functionality: Add/Rename a CAT to the wallet by its asset ID
Usage: chia wallet add_token [OPTIONS]
Options:
Short Command | Long Command | Type | Required | Description |
---|---|---|---|---|
-wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml |
-id | --asset-id | TEXT | True | The Asset ID of the coin you wish to add/rename (the treehash of the TAIL program) |
-n | --token-name | TEXT | False | The name you wish to designate to the token |
-f | --fingerprint | INTEGER | False | The wallet fingerprint you wish to add the token to |
-h | --help | None | False | Show a help message and exit |
Example
Add the Spacebucks token:
chia wallet add_token --asset-id a628c1c2c6fcb74d53746157e438e108eab5c0bb3e5c80ff9b1910b3e4832913 --token-name Spacebucks --fingerprint 2121994410
Response:
Successfully added Spacebucks with wallet id 3 on key 2121994410
coins:
Functionality: List, split, and combine your wallet's coins
list
Functionality: List coins in a wallet, with options for filtering
Usage: chia wallet coins list [OPTIONS]
Options:
Short Command | Long Command | Type | Required | Description |
---|---|---|---|---|
-p | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml |
-f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use |
-i | --id | INTEGER | False | Id of the wallet to use [default: 1] |
-u | --show-unconfirmed | BOOLEAN | False | Separately display unconfirmed coins [default: false] |
--min-amount | TEXT | False | Ignore coins worth less then this much (XCH or CAT units) | |
--max-amount | TEXT | False | Ignore coins worth more then this much (XCH or CAT units) | |
--exclude-coin | TEXT | False | Prevent this coin from being included (can be reused to exclude multiple coins) | |
--exclude-amount | TEXT | False | Exclude any coins with this amount from being included (can be reused to exclude multiple amounts) | |
--paginate | None | False | Prompt for each page of data. Defaults to enabled for interactive consoles, otherwise defaults to disabled | |
--no-paginate | None | False | Do not prompt for each page of data. Defaults to disabled for interactive consoles, otherwise defaults to enabled | |
-h | --help | None | False | Show a help message and exit |
By default, it you have more than 200 unspent coins worth less than one million mojos in your wallet, the dust filter will be activated. Any coins that have been filtered will not be listed. You can disable the dust filter by editing ~/.chia/mainnet/config/config.yaml
and changing the value of xch_spam_amount
to 0
. More info on the dust filter.
Example 1 will give a baseline:
Example 1
List all coins for a given fingerprint:
chia wallet coins list -f 590161281
In the response, note that pagination is enabled by default:
There are a total of 7 coins in wallet 1.
7 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0xdd4e3bf8bd9f5079ca90315ed36fde77af0c04352a296b397bcdaff655ce3e35
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000010000000 (10000000 mojo), Confirmed in block: 2767623
Coin ID: 0xf3b39365c6740a06bae6fe0e94405c8a2679d4bccd1abb725d4338bbc8800156
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2767579
Coin ID: 0x242e1c68d1cd5c151c77702006596efc65e733c1803c3aa5617203f39904db54
Address: xch1cdw9mgrzw9aa0rskg023wuf9pmqh87qakv4jwlenwxfddu88mqusg990d4 Amount: 0.241499799999 (241499799999 mojo), Confirmed in block: 2768188
Coin ID: 0x976c7291b6c946a425b57ae21b7f5c5fe1a5c122fa797d6fa598d8931541f833
Address: xch1m66vmtxm3xlerru7r49l7sfurphlusxywrkkl8q5a5mwvemwjawqq5ygjp Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2768188
Coin ID: 0x2749503fb302b9654fc9f0dabd88787083ad341aaeee4a2bac113feb92ae59fc
Address: xch1q94gd4hd62ecx08d0kuagmp5cr8umrwtcvatfupmd7uyzhuf4c4sy2zd46 Amount: 0.000000099999 (99999 mojo), Confirmed in block: 2767579
Press q to quit, or c to continue
c
Coin ID: 0x8ac5ff2d0ea13f61de631c7519581f030c3236710e5ea62c81a03182da4b7984
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.249979799998 (249979799998 mojo), Confirmed in block: 2767623
Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb
Address: xch15pmsqc28x3vgms4ma3z0x4t5qh9hkalqnay8fz9rmvph2lfh575qzerres Amount: 0.500000000000 (500000000000 mojo), Confirmed in block: 2735639
The following examples all use the same coin state that was obtained in Example 1:
Example 2: exclude small coins
Exclude coins smaller than 0.1 XCH:
chia wallet coins list -f 590161281 --min-amount 0.1
Response:
There are a total of 3 coins in wallet 1.
3 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0x242e1c68d1cd5c151c77702006596efc65e733c1803c3aa5617203f39904db54
Address: xch1cdw9mgrzw9aa0rskg023wuf9pmqh87qakv4jwlenwxfddu88mqusg990d4 Amount: 0.241499799999 (241499799999 mojo), Confirmed in block: 2768188
Coin ID: 0x8ac5ff2d0ea13f61de631c7519581f030c3236710e5ea62c81a03182da4b7984
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.249979799998 (249979799998 mojo), Confirmed in block: 2767623
Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb
Address: xch15pmsqc28x3vgms4ma3z0x4t5qh9hkalqnay8fz9rmvph2lfh575qzerres Amount: 0.500000000000 (500000000000 mojo), Confirmed in block: 2735639
Example 3: exclude large coins
Exclude coins larger than 0.00001 XCH. Note that there is one coin of exactly that value. It is included:
chia wallet coins list -f 590161281 --max-amount 0.00001
Response:
There are a total of 4 coins in wallet 1.
4 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0xdd4e3bf8bd9f5079ca90315ed36fde77af0c04352a296b397bcdaff655ce3e35
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000010000000 (10000000 mojo), Confirmed in block: 2767623
Coin ID: 0xf3b39365c6740a06bae6fe0e94405c8a2679d4bccd1abb725d4338bbc8800156
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2767579
Coin ID: 0x976c7291b6c946a425b57ae21b7f5c5fe1a5c122fa797d6fa598d8931541f833
Address: xch1m66vmtxm3xlerru7r49l7sfurphlusxywrkkl8q5a5mwvemwjawqq5ygjp Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2768188
Coin ID: 0x2749503fb302b9654fc9f0dabd88787083ad341aaeee4a2bac113feb92ae59fc
Address: xch1q94gd4hd62ecx08d0kuagmp5cr8umrwtcvatfupmd7uyzhuf4c4sy2zd46 Amount: 0.000000099999 (99999 mojo), Confirmed in block: 2767579
Example 4: exclude specific coins
Use the --exclude-coin
flag multiple times to exclude individual coins:
chia wallet coins list -f 590161281 --exclude-coin 0xdd4e3bf8bd9f5079ca90315ed36fde77af0c04352a296b397bcdaff655ce3e35 --exclude-coin 0xf3b39365c6740a06bae6fe0e94405c8a2679d4bccd1abb725d4338bbc8800156
Response:
There are a total of 5 coins in wallet 1.
5 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0x242e1c68d1cd5c151c77702006596efc65e733c1803c3aa5617203f39904db54
Address: xch1cdw9mgrzw9aa0rskg023wuf9pmqh87qakv4jwlenwxfddu88mqusg990d4 Amount: 0.241499799999 (241499799999 mojo), Confirmed in block: 2768188
Coin ID: 0x976c7291b6c946a425b57ae21b7f5c5fe1a5c122fa797d6fa598d8931541f833
Address: xch1m66vmtxm3xlerru7r49l7sfurphlusxywrkkl8q5a5mwvemwjawqq5ygjp Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2768188
Coin ID: 0x2749503fb302b9654fc9f0dabd88787083ad341aaeee4a2bac113feb92ae59fc
Address: xch1q94gd4hd62ecx08d0kuagmp5cr8umrwtcvatfupmd7uyzhuf4c4sy2zd46 Amount: 0.000000099999 (99999 mojo), Confirmed in block: 2767579
Coin ID: 0x8ac5ff2d0ea13f61de631c7519581f030c3236710e5ea62c81a03182da4b7984
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.249979799998 (249979799998 mojo), Confirmed in block: 2767623
Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb
Address: xch15pmsqc28x3vgms4ma3z0x4t5qh9hkalqnay8fz9rmvph2lfh575qzerres Amount: 0.500000000000 (500000000000 mojo), Confirmed in block: 2735639
Example 5: exclude specific amounts
Use the --exclude-amount
flag multiple times to exclude specific amounts. Note that if multiple coins have the same amount, they will all be excluded:
chia wallet coins list -f 590161281 --exclude-amount 0.0000001 --exclude-amount 0.241499799999
Response:
There are a total of 4 coins in wallet 1.
4 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0xdd4e3bf8bd9f5079ca90315ed36fde77af0c04352a296b397bcdaff655ce3e35
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000010000000 (10000000 mojo), Confirmed in block: 2767623
Coin ID: 0x2749503fb302b9654fc9f0dabd88787083ad341aaeee4a2bac113feb92ae59fc
Address: xch1q94gd4hd62ecx08d0kuagmp5cr8umrwtcvatfupmd7uyzhuf4c4sy2zd46 Amount: 0.000000099999 (99999 mojo), Confirmed in block: 2767579
Coin ID: 0x8ac5ff2d0ea13f61de631c7519581f030c3236710e5ea62c81a03182da4b7984
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.249979799998 (249979799998 mojo), Confirmed in block: 2767623
Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb
Address: xch15pmsqc28x3vgms4ma3z0x4t5qh9hkalqnay8fz9rmvph2lfh575qzerres Amount: 0.500000000000 (500000000000 mojo), Confirmed in block: 2735639
Example 6: disable pagination
The --no-paginate
flag will cause all coins to be listed with no additional input from the user:
chia wallet coins list -f 590161281 --no-paginate
Response:
There are a total of 7 coins in wallet 1.
7 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0xdd4e3bf8bd9f5079ca90315ed36fde77af0c04352a296b397bcdaff655ce3e35
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000010000000 (10000000 mojo), Confirmed in block: 2767623
Coin ID: 0xf3b39365c6740a06bae6fe0e94405c8a2679d4bccd1abb725d4338bbc8800156
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2767579
Coin ID: 0x242e1c68d1cd5c151c77702006596efc65e733c1803c3aa5617203f39904db54
Address: xch1cdw9mgrzw9aa0rskg023wuf9pmqh87qakv4jwlenwxfddu88mqusg990d4 Amount: 0.241499799999 (241499799999 mojo), Confirmed in block: 2768188
Coin ID: 0x976c7291b6c946a425b57ae21b7f5c5fe1a5c122fa797d6fa598d8931541f833
Address: xch1m66vmtxm3xlerru7r49l7sfurphlusxywrkkl8q5a5mwvemwjawqq5ygjp Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2768188
Coin ID: 0x2749503fb302b9654fc9f0dabd88787083ad341aaeee4a2bac113feb92ae59fc
Address: xch1q94gd4hd62ecx08d0kuagmp5cr8umrwtcvatfupmd7uyzhuf4c4sy2zd46 Amount: 0.000000099999 (99999 mojo), Confirmed in block: 2767579
Coin ID: 0x8ac5ff2d0ea13f61de631c7519581f030c3236710e5ea62c81a03182da4b7984
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.249979799998 (249979799998 mojo), Confirmed in block: 2767623
Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb
Address: xch15pmsqc28x3vgms4ma3z0x4t5qh9hkalqnay8fz9rmvph2lfh575qzerres Amount: 0.500000000000 (500000000000 mojo), Confirmed in block: 2735639
combine
Functionality: Combine coins (typically used for combining dust). Functionality: Combine coins (typically used for combining dust). The maximum number of coins that can be combined within a single transaction is 500.
Usage: chia wallet coins combine [OPTIONS]
Options:
Short Command | Long Command | Type | Required | Description |
---|---|---|---|---|
-p | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml |
-f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use |
-i | --id | INTEGER | False | ID of the wallet to use [default: 1] |
-a | --target-amount | TEXT | False | Select coins until this amount (in XCH or CAT) is reached. Combine all selected coins into one coin, which will have a value of at least target-amount |
--min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units [default: disabled] | |
--exclude-amount | TEXT | False | Exclude any coins with this amount from being included (can be reused | |
-n | --number-of-coins | INTEGER | False | The number of coins we are combining [default: 500] |
--max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units [default: disabled] | |
-m | --fee | TEXT | False | Set the fees for the transaction, in XCH [default: 0] |
--input-coin | TEXT | False | Only combine coins with these ids (can be reused) | |
--largest-first | None | False | Sort coins from largest to smallest [default: smallest-first] | |
--smallest-first | None | False | Sort coins from smallest to largest (this is the default behavior) | |
-h | --help | None | False | Show a help message and exit |
Example 1: specific coins
First, list all coins, without pagination:
chia wallet coins list -f 590161281 --no-paginate
Result:
There are a total of 7 coins in wallet 1.
7 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0xdd4e3bf8bd9f5079ca90315ed36fde77af0c04352a296b397bcdaff655ce3e35
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000010000000 (10000000 mojo), Confirmed in block: 2767623
Coin ID: 0xf3b39365c6740a06bae6fe0e94405c8a2679d4bccd1abb725d4338bbc8800156
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2767579
Coin ID: 0x976c7291b6c946a425b57ae21b7f5c5fe1a5c122fa797d6fa598d8931541f833
Address: xch1m66vmtxm3xlerru7r49l7sfurphlusxywrkkl8q5a5mwvemwjawqq5ygjp Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2768188
Coin ID: 0x2749503fb302b9654fc9f0dabd88787083ad341aaeee4a2bac113feb92ae59fc
Address: xch1q94gd4hd62ecx08d0kuagmp5cr8umrwtcvatfupmd7uyzhuf4c4sy2zd46 Amount: 0.000000099999 (99999 mojo), Confirmed in block: 2767579
Coin ID: 0x8ac5ff2d0ea13f61de631c7519581f030c3236710e5ea62c81a03182da4b7984
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.249979799998 (249979799998 mojo), Confirmed in block: 2767623
Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb
Address: xch15pmsqc28x3vgms4ma3z0x4t5qh9hkalqnay8fz9rmvph2lfh575qzerres Amount: 0.500000000000 (500000000000 mojo), Confirmed in block: 2735639
Coin ID: 0xc1d5123dc10d3fb949df266a51c0591fe87c9914157cc82e248cd5e2f4b09965
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.241499799999 (241499799999 mojo), Confirmed in block: 3064891
Next, select two specific coins to combine, and supply a 1000-mojo blockchain fee:
chia wallet coins combine -f 590161281 --input-coin 0xdd4e3bf8bd9f5079ca90315ed36fde77af0c04352a296b397bcdaff655ce3e35 --input-coin 0x2749503fb302b9654fc9f0dabd88787083ad341aaeee4a2bac113feb92ae59fc --fee 0.000000001
Response:
Combining 2 coins.
Would you like to Continue? (y/n): y
Transaction sent: dfc2ff46fd6cd2923371096d8e2b98d65dcfec25156dd53a15a4dedf4b4a8085
To get status, use command: chia wallet get_transaction -f 590161281 -tx 0xdfc2ff46fd6cd2923371096d8e2b98d65dcfec25156dd53a15a4dedf4b4a8085
Get the status of this command:
chia wallet get_transaction -f 590161281 -tx 0xdfc2ff46fd6cd2923371096d8e2b98d65dcfec25156dd53a15a4dedf4b4a8085
Result:
Transaction dfc2ff46fd6cd2923371096d8e2b98d65dcfec25156dd53a15a4dedf4b4a8085
Status: Confirmed
Amount sent: 0.000010098999 XCH
To address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu
Created at: 2023-01-05 12:51:05
After the transaction has been confirmed, show all coins once again:
chia wallet coins list -f 590161281 --no-paginate
The two specified coins have been combined (see the last coin in the list), and 1000 mojos has been deducted as a blockchain fee:
There are a total of 6 coins in wallet 1.
6 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0xf3b39365c6740a06bae6fe0e94405c8a2679d4bccd1abb725d4338bbc8800156
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2767579
Coin ID: 0x976c7291b6c946a425b57ae21b7f5c5fe1a5c122fa797d6fa598d8931541f833
Address: xch1m66vmtxm3xlerru7r49l7sfurphlusxywrkkl8q5a5mwvemwjawqq5ygjp Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2768188
Coin ID: 0x8ac5ff2d0ea13f61de631c7519581f030c3236710e5ea62c81a03182da4b7984
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.249979799998 (249979799998 mojo), Confirmed in block: 2767623
Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb
Address: xch15pmsqc28x3vgms4ma3z0x4t5qh9hkalqnay8fz9rmvph2lfh575qzerres Amount: 0.500000000000 (500000000000 mojo), Confirmed in block: 2735639
Coin ID: 0xc1d5123dc10d3fb949df266a51c0591fe87c9914157cc82e248cd5e2f4b09965
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.241499799999 (241499799999 mojo), Confirmed in block: 3064891
Coin ID: 0xbeaf029a3a09792d5f77193c7efa1de09d46e85dde0e0acdb5e53e41237ccf1a
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.000010098999 (10098999 mojo), Confirmed in block: 3064913
Example 2: enable min/max thresholds
Start by listing all coins, with pagination disabled:
chia wallet coins list -f 590161281 --no-paginate
Response:
There are a total of 6 coins in wallet 1.
6 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0xf3b39365c6740a06bae6fe0e94405c8a2679d4bccd1abb725d4338bbc8800156
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2767579
Coin ID: 0x976c7291b6c946a425b57ae21b7f5c5fe1a5c122fa797d6fa598d8931541f833
Address: xch1m66vmtxm3xlerru7r49l7sfurphlusxywrkkl8q5a5mwvemwjawqq5ygjp Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2768188
Coin ID: 0x8ac5ff2d0ea13f61de631c7519581f030c3236710e5ea62c81a03182da4b7984
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.249979799998 (249979799998 mojo), Confirmed in block: 2767623
Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb
Address: xch15pmsqc28x3vgms4ma3z0x4t5qh9hkalqnay8fz9rmvph2lfh575qzerres Amount: 0.500000000000 (500000000000 mojo), Confirmed in block: 2735639
Coin ID: 0xc1d5123dc10d3fb949df266a51c0591fe87c9914157cc82e248cd5e2f4b09965
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.241499799999 (241499799999 mojo), Confirmed in block: 3064891
Coin ID: 0xbeaf029a3a09792d5f77193c7efa1de09d46e85dde0e0acdb5e53e41237ccf1a
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.000010098999 (10098999 mojo), Confirmed in block: 3064913
Combine all coins worth at least 0.1 XCH and at most 0.25 XCH. Add a 1000-mojo blockchain fee:
chia wallet coins combine -f 590161281 --min-amount 0.1 --max-dust-amount 0.25 --fee 0.000000001
Response:
Combining 2 coins.
Would you like to Continue? (y/n): y
Transaction sent: 899eda2f67bf70261599629be19c3b6b1c4657e3fb1f6bc18d6690f92ee6bdfa
To get status, use command: chia wallet get_transaction -f 590161281 -tx 0x899eda2f67bf70261599629be19c3b6b1c4657e3fb1f6bc18d6690f92ee6bdfa
Show the result of the transaction:
chia wallet get_transaction -f 590161281 -tx 0x899eda2f67bf70261599629be19c3b6b1c4657e3fb1f6bc18d6690f92ee6bdfa
Response:
Transaction 899eda2f67bf70261599629be19c3b6b1c4657e3fb1f6bc18d6690f92ee6bdfa
Status: Confirmed
Amount sent: 0.491479598997 XCH
To address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu
Created at: 2023-01-05 12:59:27
After the transaction has completed, list all coins once again. The two coins between the min and max thresholds have been combined, minus a 1000-mojo blockchain fee:
chia wallet coins list -f 590161281 --no-paginate
Response:
There are a total of 5 coins in wallet 1.
5 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0xf3b39365c6740a06bae6fe0e94405c8a2679d4bccd1abb725d4338bbc8800156
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2767579
Coin ID: 0x976c7291b6c946a425b57ae21b7f5c5fe1a5c122fa797d6fa598d8931541f833
Address: xch1m66vmtxm3xlerru7r49l7sfurphlusxywrkkl8q5a5mwvemwjawqq5ygjp Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2768188
Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb
Address: xch15pmsqc28x3vgms4ma3z0x4t5qh9hkalqnay8fz9rmvph2lfh575qzerres Amount: 0.500000000000 (500000000000 mojo), Confirmed in block: 2735639
Coin ID: 0x25eb90a2a8cba2a9f0e3ddac8850f2861815856776109beedbbaa3db483be14a
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.491479598997 (491479598997 mojo), Confirmed in block: 3064939
Coin ID: 0xbeaf029a3a09792d5f77193c7efa1de09d46e85dde0e0acdb5e53e41237ccf1a
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.000010098999 (10098999 mojo), Confirmed in block: 3064913
Example 3: combine the two smallest coins
Start by listing all coins, with pagination disabled:
chia wallet coins list -f 590161281 --no-paginate
Response:
chia wallet coins list -f 590161281 --no-paginate
There are a total of 5 coins in wallet 1.
5 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0xf3b39365c6740a06bae6fe0e94405c8a2679d4bccd1abb725d4338bbc8800156
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2767579
Coin ID: 0x976c7291b6c946a425b57ae21b7f5c5fe1a5c122fa797d6fa598d8931541f833
Address: xch1m66vmtxm3xlerru7r49l7sfurphlusxywrkkl8q5a5mwvemwjawqq5ygjp Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2768188
Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb
Address: xch15pmsqc28x3vgms4ma3z0x4t5qh9hkalqnay8fz9rmvph2lfh575qzerres Amount: 0.500000000000 (500000000000 mojo), Confirmed in block: 2735639
Coin ID: 0x25eb90a2a8cba2a9f0e3ddac8850f2861815856776109beedbbaa3db483be14a
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.491479598997 (491479598997 mojo), Confirmed in block: 3064939
Coin ID: 0xbeaf029a3a09792d5f77193c7efa1de09d46e85dde0e0acdb5e53e41237ccf1a
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.000010098999 (10098999 mojo), Confirmed in block: 3064913
Combine the two smallest coins, with a 1000-mojo blockchain fee:
chia wallet coins combine -f 590161281 --number-of-coins 2 --fee 0.000000001
Response:
Combining 2 coins.
Would you like to Continue? (y/n): y
Transaction sent: efa130a51d877f57a93fa45835f1d95a77f17ff50eb82adfe457eae14a952c21
To get status, use command: chia wallet get_transaction -f 590161281 -tx 0xefa130a51d877f57a93fa45835f1d95a77f17ff50eb82adfe457eae14a952c21
Get the status of the transaction:
chia wallet get_transaction -f 590161281 -tx 0xefa130a51d877f57a93fa45835f1d95a77f17ff50eb82adfe457eae14a952c21
Response:
Transaction efa130a51d877f57a93fa45835f1d95a77f17ff50eb82adfe457eae14a952c21
Status: Confirmed
Amount sent: 1.99E-7 XCH
To address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu
Created at: 2023-01-05 13:24:28
After the transaction has been confirmed, list the coins again:
chia wallet coins list -f 590161281 --no-paginate
The two smallest coins have been combined, along with a 1000-mojo blockchain fee:
There are a total of 4 coins in wallet 1.
4 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0x25eb90a2a8cba2a9f0e3ddac8850f2861815856776109beedbbaa3db483be14a
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.491479598997 (491479598997 mojo), Confirmed in block: 3064939
Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb
Address: xch15pmsqc28x3vgms4ma3z0x4t5qh9hkalqnay8fz9rmvph2lfh575qzerres Amount: 0.500000000000 (500000000000 mojo), Confirmed in block: 2735639
Coin ID: 0x7934503c149a124a67888891fb2a7f813b5a5afe40d38384f6986fb3e3eec5fe
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.000000199000 (199000 mojo), Confirmed in block: 3065014
Coin ID: 0xbeaf029a3a09792d5f77193c7efa1de09d46e85dde0e0acdb5e53e41237ccf1a
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.000010098999 (10098999 mojo), Confirmed in block: 3064913
Example 4: largest first / target amount
Start by listing all coins, with pagination disabled:
chia wallet coins list -f 590161281 --no-paginate
There are a total of 4 coins in wallet 1.
4 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0x25eb90a2a8cba2a9f0e3ddac8850f2861815856776109beedbbaa3db483be14a
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.491479598997 (491479598997 mojo), Confirmed in block: 3064939
Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb
Address: xch15pmsqc28x3vgms4ma3z0x4t5qh9hkalqnay8fz9rmvph2lfh575qzerres Amount: 0.500000000000 (500000000000 mojo), Confirmed in block: 2735639
Coin ID: 0x7934503c149a124a67888891fb2a7f813b5a5afe40d38384f6986fb3e3eec5fe
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.000000199000 (199000 mojo), Confirmed in block: 3065014
Coin ID: 0xbeaf029a3a09792d5f77193c7efa1de09d46e85dde0e0acdb5e53e41237ccf1a
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.000010098999 (10098999 mojo), Confirmed in block: 3064913
Combine coins until their value is at least 0.6, starting with the largest coin. Include a 1000-mojo blockchain fee:
chia wallet coins combine -f 590161281 --largest-first --target-amount 0.6 --fee 0.000000001
Response:
Combining 2 coins.
Would you like to Continue? (y/n): y
Transaction sent: 5fa8b6393d876a11a05768f06b84032f2bf20b81c6239b189c11187fab477cbb
To get status, use command: chia wallet get_transaction -f 590161281 -tx 0x5fa8b6393d876a11a05768f06b84032f2bf20b81c6239b189c11187fab477cbb
After the transaction has been confirmed, show all coins again:
chia wallet coins list -f 590161281 --no-paginate
The largest coin was selected first. This coin's value was less than 0.6, so the next largest coin was selected. The total was greater than 0.6, so only those two coins were combined, and a 1000-mojo fee was deducted from the resulting coin:
There are a total of 3 coins in wallet 1.
3 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0xc58618fd5c30245291377901d3b911fe0ee7e826b28ae4875e60a2fd09d6fc52
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.991479597997 (991479597997 mojo), Confirmed in block: 3065287
Coin ID: 0x7934503c149a124a67888891fb2a7f813b5a5afe40d38384f6986fb3e3eec5fe
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.000000199000 (199000 mojo), Confirmed in block: 3065014
Coin ID: 0xbeaf029a3a09792d5f77193c7efa1de09d46e85dde0e0acdb5e53e41237ccf1a
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.000010098999 (10098999 mojo), Confirmed in block: 3064913
Example 5: error case
Start by listing all coins of at least 0.9 XCH:
chia wallet coins list -f 590161281 --min-amount 0.9
The result shows that there is only one coin of this size:
There are a total of 1 coins in wallet 1.
1 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0xc58618fd5c30245291377901d3b911fe0ee7e826b28ae4875e60a2fd09d6fc52
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.991479597997 (991479597997 mojo), Confirmed in block: 3065287
Now run the combine
command with the same parameters:
chia wallet coins combine -f 590161281 --min-amount 0.9
Result:
Only one coin found, you need at least two coins to combine.
This shows that you cannot combine a single coin. Lowering (or removing) the --min-amount
could result in more than one coin being selected.
Example 6: default settings
Start by listing all coins, with pagination disabled:
chia wallet coins list -f 590161281 --no-paginate
Response:
There are a total of 3 coins in wallet 1.
3 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0xc58618fd5c30245291377901d3b911fe0ee7e826b28ae4875e60a2fd09d6fc52
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.991479597997 (991479597997 mojo), Confirmed in block: 3065287
Coin ID: 0x7934503c149a124a67888891fb2a7f813b5a5afe40d38384f6986fb3e3eec5fe
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.000000199000 (199000 mojo), Confirmed in block: 3065014
Coin ID: 0xbeaf029a3a09792d5f77193c7efa1de09d46e85dde0e0acdb5e53e41237ccf1a
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.000010098999 (10098999 mojo), Confirmed in block: 3064913
Run the combine
command with the default settings:
chia wallet coins combine -f 590161281
Up to 500 coins will be combined by default, starting with the smallest coin. In this case, there are only three coins to combine:
Combining 3 coins.
Would you like to Continue? (y/n): y
Transaction sent: 8f285700e4c6db9290739206e21349bf484bd1e650c8281c6b8095f0e333af3b
To get status, use command: chia wallet get_transaction -f 590161281 -tx 0x8f285700e4c6db9290739206e21349bf484bd1e650c8281c6b8095f0e333af3b
After the transaction has completed, list all coins again:
chia wallet coins list -f 590161281
There is now only one coin in the wallet:
There are a total of 1 coins in wallet 1.
1 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0x5dc5106862c7e00b0611b79137dbd7520e4c90da1bbbadb01a4518e3e4ec1797
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.991489895996 (991489895996 mojo), Confirmed in block: 3065530
split
Functionality: Split one coin into one or more new coins
Usage: chia wallet coins split [OPTIONS]
Options:
Short Command | Long Command | Type | Required | Description |
---|---|---|---|---|
-p | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml |
-f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use |
-i | --id | INTEGER | False | ID of the wallet to use [default: 1] |
-n | --number-of-coins | INTEGER | True | The number of new coins to create, excluding the remainder coin (minimum 1, maximum 500) |
-m | --fee | TEXT | False | Set the fees for the transaction, in XCH [default: 0] |
-a | --amount-per-coin | TEXT | True | The amount of each newly created coin, in XCH |
-t | --target-coin-id | TEXT | True | The coin id of the coin we are splitting |
-h | --help | None | False | Show a help message and exit |
This command requires a single coin to be specified for splitting. The maximum number of new coins is 500. These coins will be of equal value, and the original coin must contain sufficient funds for the splitting to occur. If any value remains after splitting, this will be stored in a new coin.
Keep in mind that (by default) the dust filter will be activated if you have over 200 coins worth one million mojos in your wallet. Therefore, if you split a coin into more than 200 coins worth less than one million mojos, not all of them will show up in your wallet unless you modify or disable the dust filter (see the above link for instructions).
The minimum number of new coins is 1. "Splitting" one coin into one new coin could be useful because a second new coin will be created with the remaining value.
Example
First, list the coins available:
chia wallet coins list -f 590161281
Response:
There are a total of 1 coins in wallet 1.
1 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0x5dc5106862c7e00b0611b79137dbd7520e4c90da1bbbadb01a4518e3e4ec1797
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.991489895996 (991489895996 mojo), Confirmed in block: 3065530
Split the existing coin into five coins of 0.15 XCH, and include a 1000-mojo blockchain fee:
chia wallet coins split -f 590161281 --number-of-coins 5 --amount-per-coin 0.15 --target-coin-id 0x5dc5106862c7e00b0611b79137dbd7520e4c90da1bbbadb01a4518e3e4ec1797 --fee 0.000000001
Result:
Transaction sent: 2489efe8c89e72459a09bb681b121c3acee0e9f40d65c37c8a9d98bb7cb47d09
To get status, use command: chia wallet get_transaction -f 590161281 -tx 0x2489efe8c89e72459a09bb681b121c3acee0e9f40d65c37c8a9d98bb7cb47d09
View the result of the transaction:
chia wallet get_transaction -f 590161281 -tx 0x2489efe8c89e72459a09bb681b121c3acee0e9f40d65c37c8a9d98bb7cb47d09
Result:
Transaction 2489efe8c89e72459a09bb681b121c3acee0e9f40d65c37c8a9d98bb7cb47d09
Status: Confirmed
Amount sent: 0.75 XCH
To address: xch1p2hs025nkujyqk4a6qxfxfde6uvcajqhmq2kzvacj79wf8kfvaxqw3t4zp
Created at: 2023-01-05 16:15:31
Finally, show the coins again after splitting:
chia wallet coins list -f 590161281 --no-paginate