Commit Graph

16 Commits

Author SHA1 Message Date
Matt Hauff
a545e6a8a7
Introduce TXConfig and CoinSelectionConfig (#15666)
* Explore TXConfig

* test fixes

* more test fixs

* more test fixs

* Make TXConfig a CoinSelectionConfig subclass

* Move RPC config loading into decorator

* Fix mempool performance test

* Fix wallet sync test

* Fix streamable

* Forgot send_transaction_multi

* Remove potentially_inside_lock change

* Add .override to config object

* A few fixes from review

* Get create_message_spend working with tx_config.reuse_puzhash

* pylint and rebase fixes

* Add tests for CMD loaders

* Add RPC client and tests for cancel_offers endpoint

* Add some coverage

* Fix did test

* Add DID test coverage

* add tests for TXConfig & CoinSelectionConfig

* Add reuse_puzhash to dl wallet test

* Add reuse puzhash to dl_wallet test

* Add test coverage to wallet sync test

* Add more tests for TXConfig

* Add tests for coin_funcs.py

* Add some wallet_funcs tests

* Bad merge

* Fix bad test

* condense cmd tests

* test coverage ignore

* merge fix

* Undo GUI change

* Remove a couple of unused tx_endpoints

* Changes due to (#15846)

* Merge fixes

* new=True

* Fix the coins tests

* Fix DID tests

* Fix NFT tests

* Fix VC tests

* Fix wallet tests

* Delete now uneccessary tests

* Fix bad change
2023-08-18 14:03:37 -05:00
Matt Hauff
a111f2537c
Add self revocation path to VC wallet (#16051)
* Add self revocation path to VC wallet

* add test coverage

* actually test coverage
2023-08-17 12:52:30 -05:00
Matt Hauff
e72e155391
Don't raise on duplicate VC proof insertion (#16077) 2023-08-17 12:51:20 -05:00
Matt Hauff
12bde8c5ee
Remove pointless outgoing TX for CR-CAT claim (#16010)
* Remove pointless outgoing TX for CR-CAT claim

* coverage
2023-08-15 12:23:01 -05:00
Matt Hauff
5ee19ea053
Simplify get_max_send_amount for XCH and CATs (#15859)
* Simplify get_max_send_amount for XCH and CATs

* Update crcat wallet
2023-08-08 20:38:29 -05:00
Matt Hauff
289260c374
Credential Restricted CATs (#15411)
* Allow create_tandem_xch_tx to take a set of announcements

* Create potential announcement in correct arm of create_tandem_xch_tx

* Make does_coin_belong_to_wallet more robust

* Add match_hinted_coin to wallet protocol

* Add CROuterPuzzle

* Add conditions with fee announce.clsp

* Add CRCATWallet

* Add CLI support for CR-CATs

* Fix bug in CATOuterPuzzle

* Add SOFTFORK_HEIGHTS as an exportable variable from conftest

* Allow specifying num of blocks to farm to wallets_prefarm_services

* Add potential subclasses to cat wallet creation

* Integrate CR-CATs into offers

* Address comments by @geoffwalmsley

* Add CRCAT info to get_wallets

* Changes due to (#15846)
2023-08-03 19:36:21 -05:00
Matt Hauff
226c601764
Remove hack_populate'ing secret keys (#15846)
* Remove hack_populate'ing secret keys

* Add an optional version of get_private_key

* test fixes

* remove pool wallet's sign method

* Move sign_transaction to wallet_state_manager

* Add test coverage

* Fix PoolWallet

* Test coverage

* remove e_msg
2023-07-31 11:16:21 -05:00
Matt Hauff
58e6081465
Add DIDWallet.get_coin() to simplify DID wallet (#15730)
* Add DIDWallet.get_coin() to simplify DID wallet

* set not list

* Test coverage
2023-07-12 11:10:03 -05:00
Matt Hauff
a449a2feae
Handle VC syncing exceptions better (#15627)
* Handle VC syncing exceptions better

* coverage

* Return
2023-06-30 13:41:58 -05:00
Matt Hauff
79bf694800
Add **kwargs to all generate_signed_transaction definitions (#15240)
* Add **kwargs to all generate_signed_transaction definitions

* Add support for VC wallet too

* attempt to hint kwargs

* Import TypedDict from typing_extensions instead

* Fix tail driver call to generate_signed_transaction
2023-06-13 17:24:17 -05:00
Matt Hauff
8e5441c208
Repin clvm_tools_rs==0.1.34 (#15455)
* Repin clvm_tools_rs

* Update hex files to have newlines
2023-06-07 14:08:17 -05:00
Matt Hauff
0bd6a8ac3b
Move CAT_MOD from cat_loader -> cat_utils (#15459)
Move CAT_MOD from chia.wallet.puzzles.cat_loader -> chia.wallet.cat_wallet.cat_utils
2023-06-06 19:13:11 -05:00
Matt Hauff
5dd204a001
Fix .get_next_from_coin_spend on VerifiedCredential and test new puzhashes (#15423)
Fix .get_next_from_coin_spend on VCWallet and test new puzhashes
2023-06-02 17:54:04 -05:00
Kronus91
c45875d517
Add notification for VC (#15353)
* Add notification for VC

* Resolve comment
2023-05-22 17:38:12 -05:00
Matt Hauff
598450f320
Pass VC fee parameter all the way through and check balances in tests (#15286)
Pass fee all the way through and check balances in tests
2023-05-15 19:49:31 -05:00
Matt Hauff
c1c4f99f6c
Introduce Verifiable Credentials Primitive (#15059)
* First crack at VC puzzles

* Add p2_puzzle_or_hidden_puzzle

* First crack at drivers

* Basic test infra

* compile clsp and test covenant layer

* lint

* Add test for match_covenant_layer

* Add tests for DID TP

* Add tests for DID backdoor

* Add tests for p2_puzzle_or_hidden_puzzle

* Change DID backdoor -> p2_puzzle_w_auth + did_puzzle_authorizer

* Add a VerifiedCredential class

* Make p2_puz_or_hidden_puz viral

* Add morpher solution to covenant layer

* Add capability to update the proofs of a VC

* update_proofs -> do_spend

* Finish lifecycle of VC

* Make backdoor puzzle, remove p2_puzzle_w_auth from stack

* Extract p2_puzzle_w_auth to its own files

* lint

* rework launch process so it works after revocation

* Add some extra tests for the final state after revocation

* Add cost logging

* slight opimizations

* python comments and ergonomic improvements

* Comments for chialisp

* Add VC wallet and store infra

* Add a negative test for updating proofs w/o DID

* First crack at CR CAT

* Turn two hashes into one

* Extract some shatrees out of puzzle hash creation

* Add a stager function

* Precalculate initial_singleton_inner_puzhash_hash

* Add another stager

* Refine stagers

* Add cost logging and assert provider is authorized

* Add sketched out CRCAT class

* black

* Test most of CRCAT drivers

* lint

* Remove an unnecessary param

* Don't commit to singleton ID in parent morpher

* Extract DID to ownership layer

* lint

* use intitial puzzle hash for covenant as proof to morpher

* Collapse hash of parent morhper

* Remove stagers

* Rename some params

* Use SELF_HASH construct

* remove dependency on shatree

* Minor optimization of curried hashes

* Balance tree

* hint -> remark

* Make a v2 ownership layer for cost-sake

* (WIP) Migrate to tp hash at ownership layer

* (WIP) Return tp_hash from tp

* use a stager again

* use constants for ints

* use more constants

* inline a function, get rid of constant

* Switch to tree metadata on ownership layer

* Impelement wallet launch vc

* Minor fixes and rename a bunch of stuff

* lint

* Fix tests

* First crack at proof checking

* Remove unused imports

* Merge tests to get better coverageg

* Fix is_vc methods

* pre-commit

* pre-commit again

* Implement VC spend

* make sql pre-commit check work with git worktrees

* CRCATWallet

* Comment reasoning in script file

Co-authored-by: Kyle Altendorf <sda@fstab.net>

* Add a concept of VCProofs

* Show proofs in vc_get_vc_list as well

* Implememnt CRCAT wallet

* Extend lineage store

* Make tests pass

* WalletIdentifier fix

* Add revocation RPC

* forgotten bytes32

* Return coin name with vc record

* First crack at adding VC authorizations to offers

* Add CROuterPuzzle

* Fix wallet_funcs.py

* VCWallet changes only

* Fix wallet db schema test

* Add RPC client methods and tests

* Allow a path for user to clear VC

* Mint VC command

* Get VCs command

* Forgotten hex compilation

* Automatically fetch DID when we have it

* Update Proofs command

* Add Proof Reveal command

* Get Proofs For Root command

* Revoke VC command

* Chialisp pre-commit cleanup

* Deprecate as_python()

* Add a limit to some sql queries

* Fix some bad imports

* Fix changed wallet sync function

* Check for tail condition amounts in CAT spending

* Add RPC docs

* only need one mojo for a singleton

* Fix comment

* remove create_puzhash from add_new_wallet

* Remove create_tandam_xch_tx

* fix wallet_state_manager hinting

* Rename RPCs

* Use streamable classes for RPC request parsing

* add back accidentally deleted method call

* Remove unnecessary copy() call

* Add negative test for using wrong DID to update proofs/revoke vc

* Add negative test for making sure invalid proofs can't be proven

* Add negative test for trying to piggyback on top an unrelated VC spend

* Make output_amount a uint64

* some chialisp bug fixes

* chialisp readability improvements

* Force same provider on provider update of DID

* typo in EML

* Add vc_wallet folders to package list

* mypy

* Increase test coverage a bit

* Add a bit more coverage

* rework wallet creation

* Delete is_addition_relevant

* Coveralls ignores

* remove brick reference

* coveralls-ignore --> pragma: no cover

* Couple more ignores

* typo corrections

---------

Co-authored-by: ytx1991 <t.yu@chia.net>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-05-11 19:09:05 -05:00