Skip to content

Add coin splitting command that uses largest coin#83

Merged
TheLastCicada merged 5 commits into
mainfrom
split-largest-coin
Jul 11, 2025
Merged

Add coin splitting command that uses largest coin#83
TheLastCicada merged 5 commits into
mainfrom
split-largest-coin

Conversation

@TheLastCicada

Copy link
Copy Markdown
Contributor

Most of the time that I do coin splitting, I just want to take the largest coin in my wallet and split off a few smaller ones. It is a hassle to find the coin ID of the largest coin and then provide that to the coin splitting command. This command automates that for us - now if you do chia-tools coins split-largest -f 00000000 -m 0.00000002 -n 2 -a 0.00033 it will find the largest coin and split off 2 coins worth 0.00033 XCH. It takes the same flags as chia wallet coin split except the options have been reduced to pretty much just the amount, number of coins, and fees. Here's the help output:

chia-tools coins split-largest -h                                         
Find the largest coin in the wallet and split it into smaller coins

Usage:
  chia-tools coins split-largest [flags]

Examples:
chia-tools coins split-largest --fingerprint 123456789 --amount-per-coin 0.001 --number-of-coins 10
chia-tools coins split-largest --id 1 --amount-per-coin 0.001 --number-of-coins 10 --fee 0.0001

Flags:
  -a, --amount-per-coin string   The amount of each newly created coin, in XCH or CAT units
  -m, --fee string               Set the fees for the transaction, in XCH (default "0")
  -f, --fingerprint int          Fingerprint of the wallet to use
  -h, --help                     help for split-largest
  -i, --id uint32                Id of the wallet to use (default 1)
  -n, --number-of-coins uint32   The number of coins we are creating

Global Flags:
      --dry-run            Show what changes would be made without actually making them. For commands that modify data or configuration, this will show the old and new values.
      --log-level string   The log-level for the application, can be one of info, warn, error, debug. (default "info")

Before this is merged, we'll need to update the go-chia-libs version that is pulled in after merging Chia-Network/go-chia-libs#206

@socket-security

socket-security Bot commented Jul 11, 2025

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgithub.com/​chia-network/​go-chia-libs@​v0.21.7 ⏵ v0.21.887 +1100100100100

View full report

@TheLastCicada
TheLastCicada enabled auto-merge July 11, 2025 17:30
Comment thread cmd/coins/split-largest.go Outdated
@TheLastCicada
TheLastCicada merged commit 5c819eb into main Jul 11, 2025
15 checks passed
@TheLastCicada
TheLastCicada deleted the split-largest-coin branch July 11, 2025 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants