<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Medium Risk**
> Refactors wallet coin split/combine paths used by RPC; behavior should
be equivalent but touches core transaction construction and coin
selection.
>
> **Overview**
> Moves **split** and **combine** coin logic out of `WalletStateManager`
into a new **`FungibilityManager`**, wired on the state manager at
startup and used by the wallet RPC for `split_coins` / `combine_coins`.
>
> RPC handlers now resolve a fungible wallet via `get_fungible_wallet`
(standard or CAT only) and call the manager instead of
`wallet_state_manager.split_coins` / `combine_coins`. Invalid wallet
types raise **`Wallet {id} is not eligible for coin splitting`** (tests
updated for split and combine RPC paths). **`coin_num_limit`** is no
longer forwarded into the combine implementation; limits still apply via
`CombineCoins` request validation.
>
> Behavior of coin selection, fees, and transaction building is intended
to stay the same—this is primarily structural cleanup for LABS-490.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
28e52c2070. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
* Use a separate config for pooling information
* New PlotNFT drivers
* PlotNFT2 Wallet
* PlotNFT V2 RPCs and CLI
* Integrate v2 pooling protocol into farmer
* Comment by @cursor
* Fix test
* Comments by @cursor
* whoops
* Comments by @cursor
* Comments by @cursor
* Comments by @cursor
* Some tidying
* fix test for memo adjustment
* tweak additional memos again
* empirical testing with v1 pools
* Add expiration to `GetAuthRequest`
* Remove pyjwt dep
* Revert `get_login_link` to old behavior
* Add an extra derivation to auth key for v2
* unhardened
* Fix login link test
* Fix login link test again
* Fix network protocol data
* Comments by cursor
* Fix test
* Use correct pool url after redirect
* Fix test for coverage
* Upstream wallet fixes
* Add `REMARK` option to `launch`
* pre-commit
* chmod
* test coverage
* Add wallet name
* test coverage
* moar test coverage
* commentsby @cursor
* moar test coverage
* fix custody architecture namespace
* Comments by @matt-o-how
* Fix /GET farmer to omit the signature rather than None
* Fix protocol test
* fix test
* comments by @cursor
* diff minimizatino
* event dispatch
* Fix test deadlock
* Comments by @cursor
* test coverage
* Comments by @cursor
* Comments by @cursor
* Port `chia wallet notifications` to `@chia_command` framework
* Comments by @cursor
* Add parsing tests
* Fix tests
* Add context for AddressParamType
* Comments by @cursor
* Port `chia wallet vcs` to `@chia_command` framework
* Add context for AddressParamType
* Remove old CLI test
* [LABS-189] Port `chia wallet did` to `@chia_command`
* Fix tests
* Fix tests
* Comments by @cursor
* Comments by @cursor
* Comments by @cursor
* Port `chia wallet nft` to `@chia_command`
* test coverage
* remove executable bit
* Bad merge
* little bit more test coverage
* [LABS-480] Remove interested_ph_cache and initialize coin cache in init
* [LABS-481] Remove unnecessary `server` field from WSM
* [LABS-486] Remove useless `add_transaction` from WSM
* [LABS-488] Extract signing functionality to its own module
* Test coverage
* Generate Wallet RPC
* Comment by @cursor
* fix test
* executable bit
* Comments by @cursor & fix tests
* Fix tests
* Fix tests
* Comments by @cursor
* test coverage
* Add pre-commit build for wallet stubs
* Comments by @cursor
* Comments by @cursor
* Comments by @cursor
* Comments by @cursor
* Port `get_coin_records` and `get_height_info` to `@marshal` decorator
* Remove executable bits?
* Comments by @cursor
* Comments by @cursor
* Add comment at top of .pyi file
* [LABS-470] Fix mismatching Wallets with WalletProtocol
* [LABS-471] Remove contravariant from WalletProtocol
* [LABS-472] Remove some `has/getattr` in favor of `runtime_checkable` protocols
* [LABS-473] Fix `clvm_streamable` to prevent typing through wrapping
* [LABS-474] Make sure `crcat` is always bound
* [LABS-475] Fix basedpyright errors
* Comments by @cursor
* fix tests
* remove trade_store from mypy exclusions
* some easy wallet_rpc_api fixes
* Another easy fix for WalletRpcAPI
* [LABS-476] Make CATWallet subclassing less problematic
* Comment by @cursor
* fix tests
* Remove puzzle_for_pk methods as unused
* Port `chia wallet notifications` to `@chia_command` framework
* Comments by @cursor
* Add parsing tests
* Fix tests
* Add context for AddressParamType
* Comments by @cursor
* Port `chia wallet vcs` to `@chia_command` framework
* Add context for AddressParamType
* Remove old CLI test
* [LABS-189] Port `chia wallet did` to `@chia_command`
* Fix tests
* Fix tests
* Comments by @cursor
* Comments by @cursor
* Comments by @cursor
* Test coverage
* Fix tests
* Comments by @cursor
* bad merge
* [LABS-480] Remove interested_ph_cache and initialize coin cache in init
* [LABS-481] Remove unnecessary `server` field from WSM
* [LABS-486] Remove useless `add_transaction` from WSM
* also remove `unlink_db`
* Port `chia wallet notifications` to `@chia_command` framework
* Comments by @cursor
* Add parsing tests
* Fix tests
* Add context for AddressParamType
* Comments by @cursor
* Port `chia wallet vcs` to `@chia_command` framework
* Add context for AddressParamType
* Remove old CLI test
* Fix tests
* Test coverage
* Comments by @cursor
* test coverage
* Comment by @cursor
* Comment by @cursor
* Comments by @cursor
* Test coverage
* [LABS-470] Fix mismatching Wallets with WalletProtocol
* [LABS-471] Remove contravariant from WalletProtocol
* [LABS-472] Remove some `has/getattr` in favor of `runtime_checkable` protocols
* Use a separate config for pooling information
* New PlotNFT drivers
* PlotNFT2 Wallet
* Comment by @cursor
* whoops
* Comments by @cursor
* Comments by @cursor
* Comments by @cursor
* Some tidying
* fix test for memo adjustment
* tweak additional memos again
* Comments by cursor
* Fix test for coverage
* Upstream wallet fixes
* Add `REMARK` option to `launch`
* pre-commit
* chmod
* test coverage
* Add wallet name
* moar test coverage
* fix custody architecture namespace
* Comments by @matt-o-how
* diff minimization
* Contemporize(?) action scope test
* diff minimization
* Remove potentially unnecessary change
* Comment by @cursor
* whoops
* Use a separate config for pooling information
* New PlotNFT drivers
* Comment by @cursor
* whoops
* Comments by @cursor
* Comments by @cursor
* Comments by @cursor
* Some tidying
* fix test for memo adjustment
* tweak additional memos again
* Fix test for coverage
* Add `REMARK` option to `launch`
* fix custody architecture namespace
* Comments by @matt-o-how
* Add ability to specify coins to include in `CoinSelectionConfig`
* Actually return the included coins
* Comments by @cursor
* Fix accidental empty set return on zero value selection
* Fix tests
* Comment by @cursor
* Add `primary_coin` as another option
* fix tests
* comments by @cursor
* comments by @cursor
* comments by @cursor
* Fixed test
* Added propagation of primary_coin
* Revert previous test fix and fix test
* Comment by @cursor
* whoops
---------
Co-authored-by: Bram Cohen <bram@chia.net>
* Initial draft of custody architecture
* Rename CustodyType -> Puzzle
* Rename UnknownCustody -> UnknownPuzzle
* Rename CustodyHint -> PuzzleHint
* Rename CustodyWithRestrictions -> PuzzleWithRestrictions
* Reorganize for clarity
* Add support for identifying and filling in unknown puzzles
* rename custody -> puzzle
* MofN puzzles
* Restriction layer
* Fix PlaceholderPuzzle with MofN restriction
* Add indexing
* Elaborate on potential optimizations
* Light comment improvements
* Add spec namespace
* 3.10 compatibility I think?
* pylint I hate you
* pylint I really hate you
* Add an optimized puzzle for 1ofN
* Coverage ignores
* Add optimization for NofN
* Add support for `PuzzleWithRestrictions` with no MofN
* comments
* Fix members with restrictions inside of MofNs
* pylint
* Rework restrictions
* Use feeder pattern for MofNs as well
* f you pylint
* initial commit
* start work on tests
* fix all but signature in test
* fix test
* black, isort, flake8
* migrate changes to new files / folders
* mypy fixes
* remove unused imports
* add bls_member to deployed_puzzle_hashes
* no memo for BLS Member
* change comments on BLSMember
* chialispp bls_member
* update test comment
* black again
* pylint disable
* add a more minimal test for blsmember
* fix quex comments
* flake8
* Add basic framework for delegated puzzle validators
* code coverage for memo()
* don't reuse variable of different type
* coverage
* pre-commit
* pre-commit
* Fix spend sim import
* Add passkey member puzzle
* Dedup a bit
* Add `Timelock` restriction
* Rename variable
* Add coin announcement restriction
* initial commit
* Add comments per @matt-o-how
* typo
* correct formatting for using secp_verify
* secp256r1 fix
* pretty print lisp
* add to deployed puzzle hashes
* ruff formatted
* Add a restriction to mimic existing vault recovery
* Add a helper method
* initial commit
* fix test
* fix_test_2
* ruff format
* add secp256k1_member to deployed puzzle hashes
* pretty print lisp
* ruff check fix.
* curve_order fix
* ruff format
* Add memo-ization to the restriction
* add assertion for secpr1_member memo in test_secp256r1_member
* add assertion for secpk1_member memo in test_secp256k1_member
* add secpmember solve method
* - specify type for secp_sk in member puzzles
* add SECPK1 and SECPR1 "puzzle assert" members with corresponding tests
* Fix bug and add test coverage to dpuz wrapper enforcement puzzle
* Fix bug and add test coverage to timelock puzzle
* pre-commit
* initial commit
* Add dataclass for SingletonMember in member_puzzles.py
* fix message coin_ids
* rename eve to launcher
* add minimal message condition test
* change message mode to 3F
* use correct message format
* fix test
* cleanup
* fix formatting in singleton_member.clsp
* Add files for test chialisp
* Add a wrapper that forces a message condition with a coin ID commitment
* Add a version of a passkey puzzle that only asserts puzzle hash
* add comments, remove unused code, add customisable singleton info
* initial commit
* fix typo and pprint chialisp
* chialisp pretty print
* Add comment about message
* add bls_with_taproot puzzle and member class
* mypy fixes
* more mypy fixes
* remove breakpoint
* correct name in deployed_puzzle_hashes
* remove mod from name
* only allowed delegated_puzzle as taproot_path
* add test that checks bad taproot is blocked
* ruff fix
* make BLSWithTaproot Member flexible
* address nitpicks
* mypy fixes
* Remove member and restriction implementations
* Import from chia_puzzles_py (and fix tests)
* Remove executable bibt?
* Re-add some of the member and restrictions
* Some kw_only
* More kw_only
* Reviews by @matt-o-how and cursor
* Comments by cursor
* Remove `Force1of2WithRestrictedVariable`
* Bring in some downstream stuff
* Make a heightlock instead of timelock restriction
* comments by cursor
* Test coverage
* Better condition_codes.clib-ing
* comments by @matt-o-how
---------
Co-authored-by: Matthew Howard <m.o.howard97@gmail.com>
Co-authored-by: matt-o-how <48453825+matt-o-how@users.noreply.github.com>
* Add the request types
* Add the request types
* some test fixes
* Add the client ports
* Fix tests
* Add cmd support and fix a test
* Missed a couple
* Add test for `CreateNewWallet.__post_init__()`
* Port `test_send_transaction`
* Port `test_push_transactions`
* Port `test_get_balance`
* Port `test_get_farmed_amount`
* Port `test_get_farmed_amount_with_fee`
* Port `test_get_timestamp_for_height`
* (restrict some parametrizations)
* Port `create_signed_transaction` (and fix WalletTestFramework)
* Port `test_create_signed_transaction_with_puzzle/coin_announcement`
* Port `test_create_signed_transaction_with_excluded_coins`
* Port `test_get_transactions`
* Port `test_get_transaction_count`
* Port `test_get_coin_records_by_names`
* Port `test_did_endpoints`
* Port `test_nft_endpoints`
* Port `test_key_and_address_endpoints`
* Port `test_select_coins_rpc`
* Port `test_get_coin_records_rpc`
* Port `test_get_coin_records_rpc_limits/failures`
* Port `test_notification_rpcs`
* Port `test_verify_signature`
* Port `test_set_wallet_resync_on_startup`
* Port `test_set_wallet_resync_on_startup_disable`
* Port `test_set_wallet_resync_schema`
* Port `test_cat_spend_run_tail`
* Port `test_get_balances`
* Delete unused fixtures
* Remove DEFAULT_TX_CONFIG
* Fix reuse_puzhash behavior
* Minor improvements.
---------
Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
* merge `get_cat_spendable_coins` into `get_spendable_coins_for_wallet`
* Remove `get_max_spendable_coins` as well
* Fix CR-CAT wallet
* Make the max cap optional
* Comment about coverage between tests
* Add a test for errors in wallet file
* Modify manual claim test to do multiple clawbacks at once
* Convert `test_wallet_clawback_claim_auto`
* Convert `test_wallet_clawback_clawback`
* Convert `test_wallet_clawback_sent_self`
* Convert `test_wallet_clawback_claim_manual`
* Convert `test_wallet_clawback_reorg`
* Convert `test_get_clawback_coins`
* Convert `test_clawback_resync`
* Delete original test
* Cleanup helper comments
* Delete auto claim settings test
* Delete get auto claim settings test
* Minor improvement.
---------
Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
* initial changes
* poetry fix
* Address ruff
* Install scripts issues
* Experiment a little bit
* Okay now try for rocky linux and use 3.12 instead
* Remove the now unused thing
* Move defaults from 3.10 to 3.12
* Setup python3.12
* debug
* debug
* whoops
* listen I really dont know what Im doing
* debug
* debug
* debug
* debug
* debug
* debug
* debug
* debug
* debug
* debug
* Use Chia action
* Use an upstream change
* debug
* Move the python setup to the install action
* try something dumb
* back to sh
* debug
* Cleanup after extensive debug
* Add SQLite version report
* test with new images
* remove python setup
* try this image?
* back to this
* Try hyphenless
* Use published pyhon312 tags
* initial changes
* poetry fix
* Address ruff
* Install scripts issues
* Experiment a little bit
* Okay now try for rocky linux and use 3.12 instead
* Remove the now unused thing
* Use dnf for consistency
* Simplify installations
* Still need git
* relock poetry with 2.2.0
* relock poetry with 2.2.0
* try `git checkout main poetry.lock && .penv/bin/poetry lock` on altendky's system
---------
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* Port `spend_clawback_coins` to `@marshal`
* fix tests
* fix test again
* how do I keep missing these?
* Port `select_coins` to `@marshal`
* fix tests
* fix test
* Port `get_spendable_coins`
* Port `get_coin_records_by_names`
* Port `send_notifications` to `@marshal`
* Fixing the thing that is always broken
* Remove accidental import
* Port `get_default_cat_list`
* Port `cat_set_name`
* Port `cat_get_name`
* Port `get_stray_cats`
* Port `cat_get_asset_id`
* Port `cat_asset_id_to_name`
* Port `check_offer_validity`
* Port `get_offers_count`
* Port `spend_clawback_coins` to `@marshal`
* fix tests
* fix test again
* how do I keep missing these?
* Port `select_coins` to `@marshal`
* fix tests
* fix test
* Port `get_spendable_coins`
* Port `get_coin_records_by_names`
* Port `send_notifications` to `@marshal`
* Fixing the thing that is always broken
* Remove accidental import
* Port `spend_clawback_coins` to `@marshal`
* fix tests
* fix test again
* how do I keep missing these?
* Port `select_coins` to `@marshal`
* fix tests
* fix test
* Port `get_spendable_coins`
* Port `get_coin_records_by_names`
* bad port of `include_spent_coins`
* Less bad replace logic
* Actually autofill the CoinSelectionConfigLoader in `get_spendable_coins`
* Comments by @altendky
* Use fully recursive JSON logic for compound clvm streamable types
* Accomodate rust types
* Accomodate dicts
* Broaden function to handle type[object] instead of type[Streamable] (with a little mypy workaround)
* Whoops, delete that
* Small bug
* Okay a complete rework
* Delete some now unused stuff
* Some edge cases