chia-blockchain 2.5.4rc2__py3-none-any.whl → 2.5.5rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chia/_tests/blockchain/blockchain_test_utils.py +2 -3
- chia/_tests/blockchain/test_augmented_chain.py +2 -3
- chia/_tests/blockchain/test_blockchain.py +261 -44
- chia/_tests/blockchain/test_blockchain_transactions.py +4 -3
- chia/_tests/blockchain/test_build_chains.py +197 -1
- chia/_tests/blockchain/test_get_block_generator.py +1 -1
- chia/_tests/blockchain/test_lookup_fork_chain.py +1 -1
- chia/_tests/clvm/benchmark_costs.py +1 -1
- chia/_tests/clvm/coin_store.py +3 -4
- chia/_tests/clvm/test_message_conditions.py +2 -2
- chia/_tests/clvm/test_puzzle_compression.py +2 -3
- chia/_tests/clvm/test_puzzles.py +1 -2
- chia/_tests/clvm/test_singletons.py +2 -3
- chia/_tests/clvm/test_spend_sim.py +7 -7
- chia/_tests/cmds/cmd_test_utils.py +30 -25
- chia/_tests/cmds/test_dev_gh.py +1 -1
- chia/_tests/cmds/test_farm_cmd.py +1 -1
- chia/_tests/cmds/test_show.py +1 -2
- chia/_tests/cmds/wallet/test_did.py +101 -56
- chia/_tests/cmds/wallet/test_nft.py +109 -84
- chia/_tests/cmds/wallet/test_notifications.py +1 -1
- chia/_tests/cmds/wallet/test_offer.toffer +1 -1
- chia/_tests/cmds/wallet/test_vcs.py +8 -8
- chia/_tests/cmds/wallet/test_wallet.py +100 -46
- chia/_tests/conftest.py +31 -20
- chia/_tests/connection_utils.py +1 -1
- chia/_tests/core/consensus/stores/__init__.py +0 -0
- chia/_tests/core/consensus/stores/test_coin_store_protocol.py +40 -0
- chia/_tests/core/consensus/test_block_creation.py +2 -31
- chia/_tests/core/consensus/test_pot_iterations.py +38 -3
- chia/_tests/core/custom_types/test_proof_of_space.py +154 -26
- chia/_tests/core/custom_types/test_spend_bundle.py +2 -3
- chia/_tests/core/daemon/test_daemon.py +80 -0
- chia/_tests/core/data_layer/test_data_layer.py +1 -1
- chia/_tests/core/data_layer/test_data_layer_util.py +1 -1
- chia/_tests/core/data_layer/test_data_rpc.py +14 -10
- chia/_tests/core/data_layer/test_data_store.py +5 -5
- chia/_tests/core/farmer/test_farmer_api.py +2 -2
- chia/_tests/core/full_node/full_sync/test_full_sync.py +446 -406
- chia/_tests/core/full_node/ram_db.py +3 -1
- chia/_tests/core/full_node/stores/test_block_store.py +28 -16
- chia/_tests/core/full_node/stores/test_coin_store.py +277 -185
- chia/_tests/core/full_node/stores/test_full_node_store.py +11 -4
- chia/_tests/core/full_node/stores/test_hint_store.py +2 -2
- chia/_tests/core/full_node/test_address_manager.py +200 -27
- chia/_tests/core/full_node/test_block_height_map.py +2 -2
- chia/_tests/core/full_node/test_conditions.py +7 -6
- chia/_tests/core/full_node/test_full_node.py +456 -40
- chia/_tests/core/full_node/test_generator_tools.py +32 -2
- chia/_tests/core/full_node/test_hint_management.py +1 -1
- chia/_tests/core/full_node/test_node_load.py +20 -21
- chia/_tests/core/full_node/test_performance.py +3 -4
- chia/_tests/core/full_node/test_prev_tx_block.py +43 -0
- chia/_tests/core/full_node/test_subscriptions.py +1 -2
- chia/_tests/core/full_node/test_transactions.py +9 -5
- chia/_tests/core/full_node/test_tx_processing_queue.py +1 -2
- chia/_tests/core/large_block.py +1 -2
- chia/_tests/core/make_block_generator.py +3 -4
- chia/_tests/core/mempool/test_mempool.py +36 -86
- chia/_tests/core/mempool/test_mempool_fee_estimator.py +1 -1
- chia/_tests/core/mempool/test_mempool_item_queries.py +1 -3
- chia/_tests/core/mempool/test_mempool_manager.py +421 -69
- chia/_tests/core/mempool/test_mempool_performance.py +3 -2
- chia/_tests/core/mempool/test_singleton_fast_forward.py +60 -131
- chia/_tests/core/server/flood.py +1 -1
- chia/_tests/core/server/test_dos.py +1 -1
- chia/_tests/core/server/test_node_discovery.py +41 -27
- chia/_tests/core/server/test_rate_limits.py +1 -1
- chia/_tests/core/server/test_server.py +1 -1
- chia/_tests/core/services/test_services.py +5 -5
- chia/_tests/core/ssl/test_ssl.py +1 -1
- chia/_tests/core/test_cost_calculation.py +6 -6
- chia/_tests/core/test_crawler.py +2 -2
- chia/_tests/core/test_crawler_rpc.py +1 -1
- chia/_tests/core/test_db_conversion.py +3 -1
- chia/_tests/core/test_db_validation.py +5 -3
- chia/_tests/core/test_farmer_harvester_rpc.py +15 -15
- chia/_tests/core/test_filter.py +4 -1
- chia/_tests/core/test_full_node_rpc.py +99 -82
- chia/_tests/core/test_program.py +2 -2
- chia/_tests/core/util/test_block_cache.py +1 -1
- chia/_tests/core/util/test_keychain.py +2 -2
- chia/_tests/core/util/test_lockfile.py +1 -1
- chia/_tests/core/util/test_log_exceptions.py +5 -5
- chia/_tests/core/util/test_streamable.py +81 -22
- chia/_tests/db/test_db_wrapper.py +1 -3
- chia/_tests/environments/wallet.py +5 -5
- chia/_tests/farmer_harvester/test_farmer.py +9 -7
- chia/_tests/farmer_harvester/test_farmer_harvester.py +11 -4
- chia/_tests/farmer_harvester/test_filter_prefix_bits.py +6 -5
- chia/_tests/farmer_harvester/test_third_party_harvesters.py +15 -9
- chia/_tests/fee_estimation/test_fee_estimation_integration.py +1 -2
- chia/_tests/fee_estimation/test_fee_estimation_rpc.py +7 -5
- chia/_tests/fee_estimation/test_fee_estimation_unit_tests.py +1 -1
- chia/_tests/generator/test_compression.py +1 -2
- chia/_tests/generator/test_rom.py +8 -4
- chia/_tests/plot_sync/test_plot_sync.py +3 -3
- chia/_tests/plot_sync/test_receiver.py +3 -3
- chia/_tests/plot_sync/test_sender.py +1 -1
- chia/_tests/plot_sync/test_sync_simulated.py +3 -3
- chia/_tests/plot_sync/util.py +2 -2
- chia/_tests/pools/test_pool_cmdline.py +48 -21
- chia/_tests/pools/test_pool_puzzles_lifecycle.py +2 -3
- chia/_tests/pools/test_pool_rpc.py +237 -105
- chia/_tests/pools/test_pool_wallet.py +11 -2
- chia/_tests/pools/test_wallet_pool_store.py +5 -4
- chia/_tests/rpc/test_rpc_client.py +1 -1
- chia/_tests/simulation/test_simulation.py +13 -8
- chia/_tests/simulation/test_simulator.py +2 -2
- chia/_tests/timelord/test_new_peak.py +191 -47
- chia/_tests/timelord/test_timelord.py +1 -1
- chia/_tests/tools/test_full_sync.py +0 -2
- chia/_tests/tools/test_run_block.py +3 -1
- chia/_tests/util/benchmark_cost.py +3 -3
- chia/_tests/util/benchmarks.py +2 -2
- chia/_tests/util/blockchain.py +11 -5
- chia/_tests/util/blockchain_mock.py +1 -4
- chia/_tests/util/coin_store.py +29 -0
- chia/_tests/util/constants.py +2 -18
- chia/_tests/util/full_sync.py +3 -3
- chia/_tests/util/generator_tools_testing.py +2 -3
- chia/_tests/util/key_tool.py +2 -3
- chia/_tests/util/misc.py +33 -31
- chia/_tests/util/network_protocol_data.py +19 -17
- chia/_tests/util/protocol_messages_bytes-v1.0 +0 -0
- chia/_tests/util/protocol_messages_json.py +3 -1
- chia/_tests/util/run_block.py +2 -2
- chia/_tests/util/setup_nodes.py +7 -7
- chia/_tests/util/spend_sim.py +47 -55
- chia/_tests/util/test_condition_tools.py +5 -4
- chia/_tests/util/test_config.py +2 -2
- chia/_tests/util/test_dump_keyring.py +1 -1
- chia/_tests/util/test_full_block_utils.py +12 -14
- chia/_tests/util/test_misc.py +2 -2
- chia/_tests/util/test_paginator.py +4 -4
- chia/_tests/util/test_priority_mutex.py +2 -2
- chia/_tests/util/test_replace_str_to_bytes.py +15 -5
- chia/_tests/util/test_ssl_check.py +1 -1
- chia/_tests/util/test_testnet_overrides.py +13 -3
- chia/_tests/util/time_out_assert.py +4 -2
- chia/_tests/wallet/cat_wallet/test_cat_lifecycle.py +1 -1
- chia/_tests/wallet/cat_wallet/test_cat_outer_puzzle.py +1 -2
- chia/_tests/wallet/cat_wallet/test_cat_wallet.py +352 -432
- chia/_tests/wallet/cat_wallet/test_offer_lifecycle.py +3 -6
- chia/_tests/wallet/cat_wallet/test_trades.py +53 -77
- chia/_tests/wallet/clawback/test_clawback_decorator.py +3 -1
- chia/_tests/wallet/clawback/test_clawback_lifecycle.py +3 -3
- chia/_tests/wallet/clawback/test_clawback_metadata.py +4 -2
- chia/_tests/wallet/conftest.py +11 -12
- chia/_tests/wallet/db_wallet/test_db_graftroot.py +11 -4
- chia/_tests/wallet/db_wallet/test_dl_offers.py +433 -130
- chia/_tests/wallet/db_wallet/test_dl_wallet.py +3 -3
- chia/_tests/wallet/did_wallet/test_did.py +2132 -2000
- chia/_tests/wallet/nft_wallet/config.py +1 -1
- chia/_tests/wallet/nft_wallet/test_nft_1_offers.py +1610 -742
- chia/_tests/wallet/nft_wallet/test_nft_bulk_mint.py +486 -907
- chia/_tests/wallet/nft_wallet/test_nft_lifecycle.py +4 -4
- chia/_tests/wallet/nft_wallet/test_nft_wallet.py +517 -294
- chia/_tests/wallet/rpc/test_dl_wallet_rpc.py +133 -62
- chia/_tests/wallet/rpc/test_wallet_rpc.py +305 -184
- chia/_tests/wallet/simple_sync/test_simple_sync_protocol.py +10 -6
- chia/_tests/wallet/sync/test_wallet_sync.py +89 -60
- chia/_tests/wallet/test_clvm_casts.py +88 -0
- chia/_tests/wallet/test_coin_management.py +1 -1
- chia/_tests/wallet/test_coin_selection.py +1 -1
- chia/_tests/wallet/test_conditions.py +1 -1
- chia/_tests/wallet/test_new_wallet_protocol.py +13 -11
- chia/_tests/wallet/test_notifications.py +5 -3
- chia/_tests/wallet/test_sign_coin_spends.py +6 -6
- chia/_tests/wallet/test_signer_protocol.py +13 -12
- chia/_tests/wallet/test_singleton.py +1 -1
- chia/_tests/wallet/test_singleton_lifecycle_fast.py +5 -7
- chia/_tests/wallet/test_util.py +2 -2
- chia/_tests/wallet/test_wallet.py +108 -29
- chia/_tests/wallet/test_wallet_action_scope.py +9 -2
- chia/_tests/wallet/test_wallet_blockchain.py +2 -3
- chia/_tests/wallet/test_wallet_key_val_store.py +1 -2
- chia/_tests/wallet/test_wallet_node.py +2 -4
- chia/_tests/wallet/test_wallet_retry.py +4 -2
- chia/_tests/wallet/test_wallet_state_manager.py +191 -5
- chia/_tests/wallet/test_wallet_test_framework.py +1 -1
- chia/_tests/wallet/vc_wallet/test_vc_lifecycle.py +8 -8
- chia/_tests/wallet/vc_wallet/test_vc_wallet.py +29 -12
- chia/_tests/wallet/wallet_block_tools.py +6 -6
- chia/_tests/weight_proof/test_weight_proof.py +10 -48
- chia/apis.py +1 -1
- chia/cmds/beta.py +1 -1
- chia/cmds/chia.py +9 -9
- chia/cmds/cmd_classes.py +12 -11
- chia/cmds/cmd_helpers.py +1 -1
- chia/cmds/cmds_util.py +12 -9
- chia/cmds/coin_funcs.py +2 -2
- chia/cmds/configure.py +2 -2
- chia/cmds/data.py +0 -2
- chia/cmds/data_funcs.py +1 -1
- chia/cmds/db_validate_func.py +1 -2
- chia/cmds/dev/__init__.py +0 -0
- chia/cmds/dev/data.py +273 -0
- chia/cmds/{gh.py → dev/gh.py} +5 -5
- chia/cmds/dev/main.py +22 -0
- chia/cmds/dev/mempool.py +78 -0
- chia/cmds/dev/mempool_funcs.py +63 -0
- chia/cmds/farm_funcs.py +5 -4
- chia/cmds/init_funcs.py +11 -11
- chia/cmds/keys.py +2 -2
- chia/cmds/keys_funcs.py +4 -4
- chia/cmds/netspace_funcs.py +1 -1
- chia/cmds/peer_funcs.py +2 -2
- chia/cmds/plotnft_funcs.py +72 -26
- chia/cmds/rpc.py +1 -1
- chia/cmds/show_funcs.py +5 -5
- chia/cmds/signer.py +8 -7
- chia/cmds/sim_funcs.py +8 -9
- chia/cmds/wallet.py +2 -2
- chia/cmds/wallet_funcs.py +165 -131
- chia/{util → consensus}/augmented_chain.py +1 -2
- chia/consensus/block_body_validation.py +54 -40
- chia/consensus/block_creation.py +42 -76
- chia/consensus/block_header_validation.py +32 -26
- chia/consensus/block_record.py +0 -3
- chia/consensus/blockchain.py +23 -32
- chia/consensus/blockchain_interface.py +1 -5
- chia/consensus/check_time_locks.py +57 -0
- chia/consensus/coin_store_protocol.py +151 -0
- chia/consensus/coinbase.py +0 -6
- chia/consensus/condition_costs.py +4 -0
- chia/{util → consensus}/condition_tools.py +4 -5
- chia/consensus/cost_calculator.py +1 -1
- chia/consensus/default_constants.py +32 -9
- chia/consensus/deficit.py +1 -3
- chia/consensus/difficulty_adjustment.py +1 -2
- chia/consensus/find_fork_point.py +1 -3
- chia/consensus/full_block_to_block_record.py +1 -6
- chia/{util → consensus}/generator_tools.py +1 -3
- chia/consensus/get_block_challenge.py +30 -7
- chia/consensus/make_sub_epoch_summary.py +1 -5
- chia/consensus/multiprocess_validation.py +21 -20
- chia/consensus/pot_iterations.py +74 -13
- chia/{util → consensus}/prev_transaction_block.py +1 -1
- chia/consensus/vdf_info_computation.py +1 -3
- chia/daemon/keychain_proxy.py +5 -5
- chia/daemon/server.py +22 -5
- chia/data_layer/data_layer.py +92 -51
- chia/{rpc → data_layer}/data_layer_rpc_api.py +1 -1
- chia/{rpc → data_layer}/data_layer_rpc_util.py +3 -6
- chia/data_layer/data_layer_util.py +4 -6
- chia/data_layer/data_layer_wallet.py +42 -69
- chia/data_layer/dl_wallet_store.py +12 -6
- chia/data_layer/download_data.py +3 -3
- chia/data_layer/s3_plugin_service.py +0 -1
- chia/farmer/farmer.py +3 -4
- chia/farmer/farmer_api.py +11 -7
- chia/{rpc → farmer}/farmer_rpc_client.py +1 -1
- chia/full_node/block_height_map.py +7 -6
- chia/full_node/block_store.py +5 -7
- chia/full_node/bundle_tools.py +1 -2
- chia/full_node/coin_store.py +143 -124
- chia/{types → full_node}/eligible_coin_spends.py +39 -70
- chia/full_node/fee_estimator.py +1 -1
- chia/full_node/fee_estimator_interface.py +0 -8
- chia/full_node/fee_tracker.py +25 -25
- chia/full_node/full_node.py +70 -53
- chia/full_node/full_node_api.py +57 -40
- chia/{rpc → full_node}/full_node_rpc_api.py +87 -8
- chia/{rpc → full_node}/full_node_rpc_client.py +7 -6
- chia/full_node/full_node_store.py +23 -8
- chia/full_node/mempool.py +206 -53
- chia/full_node/mempool_check_conditions.py +20 -63
- chia/full_node/mempool_manager.py +26 -40
- chia/full_node/subscriptions.py +1 -3
- chia/full_node/tx_processing_queue.py +50 -3
- chia/full_node/weight_proof.py +46 -37
- chia/harvester/harvester.py +1 -1
- chia/harvester/harvester_api.py +22 -7
- chia/introducer/introducer.py +1 -1
- chia/introducer/introducer_api.py +1 -1
- chia/plot_sync/exceptions.py +1 -1
- chia/plot_sync/receiver.py +1 -1
- chia/plot_sync/sender.py +2 -2
- chia/pools/pool_puzzles.py +13 -18
- chia/pools/pool_wallet.py +23 -46
- chia/protocols/farmer_protocol.py +11 -3
- chia/protocols/full_node_protocol.py +1 -4
- chia/protocols/harvester_protocol.py +3 -3
- chia/protocols/pool_protocol.py +1 -2
- chia/protocols/shared_protocol.py +3 -3
- chia/protocols/timelord_protocol.py +1 -3
- chia/protocols/wallet_protocol.py +3 -3
- chia/rpc/rpc_client.py +7 -8
- chia/rpc/rpc_server.py +3 -3
- chia/rpc/util.py +3 -1
- chia/seeder/crawler.py +1 -1
- chia/seeder/crawler_api.py +1 -1
- chia/seeder/dns_server.py +2 -0
- chia/seeder/start_crawler.py +3 -3
- chia/server/address_manager.py +286 -38
- chia/server/address_manager_store.py +0 -215
- chia/{types → server}/aliases.py +7 -7
- chia/server/api_protocol.py +1 -1
- chia/server/chia_policy.py +1 -1
- chia/server/node_discovery.py +76 -113
- chia/server/rate_limits.py +1 -1
- chia/server/resolve_peer_info.py +43 -0
- chia/server/server.py +5 -5
- chia/server/start_data_layer.py +4 -4
- chia/server/start_farmer.py +5 -4
- chia/server/start_full_node.py +5 -4
- chia/server/start_harvester.py +7 -5
- chia/server/start_introducer.py +2 -2
- chia/server/start_service.py +1 -1
- chia/server/start_timelord.py +7 -5
- chia/server/start_wallet.py +7 -5
- chia/server/ws_connection.py +1 -1
- chia/simulator/add_blocks_in_batches.py +2 -2
- chia/simulator/block_tools.py +245 -201
- chia/simulator/full_node_simulator.py +38 -10
- chia/simulator/setup_services.py +12 -12
- chia/simulator/simulator_full_node_rpc_api.py +2 -2
- chia/simulator/simulator_full_node_rpc_client.py +2 -2
- chia/simulator/simulator_test_tools.py +2 -2
- chia/simulator/start_simulator.py +1 -1
- chia/simulator/wallet_tools.py +10 -18
- chia/ssl/create_ssl.py +1 -1
- chia/timelord/iters_from_block.py +14 -14
- chia/timelord/timelord.py +15 -11
- chia/timelord/timelord_api.py +14 -2
- chia/timelord/timelord_state.py +20 -14
- chia/types/blockchain_format/program.py +53 -10
- chia/types/blockchain_format/proof_of_space.py +73 -19
- chia/types/coin_spend.py +3 -56
- chia/types/generator_types.py +28 -0
- chia/types/internal_mempool_item.py +1 -2
- chia/types/mempool_item.py +12 -7
- chia/types/unfinished_header_block.py +1 -2
- chia/types/validation_state.py +1 -2
- chia/types/weight_proof.py +1 -3
- chia/util/action_scope.py +3 -3
- chia/util/block_cache.py +1 -2
- chia/util/byte_types.py +1 -1
- chia/util/casts.py +21 -0
- chia/util/config.py +0 -37
- chia/util/db_wrapper.py +8 -1
- chia/util/errors.py +3 -2
- chia/util/initial-config.yaml +21 -5
- chia/util/keychain.py +6 -7
- chia/util/keyring_wrapper.py +5 -5
- chia/util/limited_semaphore.py +1 -1
- chia/util/priority_mutex.py +1 -1
- chia/util/streamable.py +63 -5
- chia/util/task_timing.py +1 -1
- chia/util/virtual_project_analysis.py +1 -1
- chia/wallet/cat_wallet/cat_info.py +7 -3
- chia/wallet/cat_wallet/cat_outer_puzzle.py +9 -5
- chia/wallet/cat_wallet/cat_utils.py +1 -1
- chia/wallet/cat_wallet/cat_wallet.py +44 -36
- chia/wallet/cat_wallet/lineage_store.py +7 -0
- chia/wallet/cat_wallet/r_cat_wallet.py +273 -0
- chia/wallet/conditions.py +5 -10
- chia/wallet/db_wallet/db_wallet_puzzles.py +4 -4
- chia/wallet/derivation_record.py +33 -0
- chia/wallet/derive_keys.py +3 -3
- chia/wallet/did_wallet/did_info.py +12 -3
- chia/wallet/did_wallet/did_wallet.py +132 -101
- chia/wallet/did_wallet/did_wallet_puzzles.py +9 -9
- chia/wallet/driver_protocol.py +3 -1
- chia/{types/spend_bundle.py → wallet/estimate_fees.py} +2 -7
- chia/wallet/nft_wallet/metadata_outer_puzzle.py +5 -3
- chia/wallet/nft_wallet/nft_puzzle_utils.py +1 -1
- chia/wallet/nft_wallet/nft_wallet.py +69 -112
- chia/wallet/nft_wallet/ownership_outer_puzzle.py +5 -3
- chia/wallet/nft_wallet/singleton_outer_puzzle.py +6 -4
- chia/wallet/nft_wallet/transfer_program_puzzle.py +4 -2
- chia/wallet/nft_wallet/uncurry_nft.py +4 -6
- chia/wallet/notification_manager.py +2 -3
- chia/wallet/outer_puzzles.py +7 -2
- chia/wallet/puzzle_drivers.py +1 -1
- chia/wallet/puzzles/clawback/drivers.py +5 -4
- chia/wallet/puzzles/p2_delegated_puzzle_or_hidden_puzzle.py +1 -1
- chia/wallet/puzzles/singleton_top_layer.py +2 -1
- chia/wallet/puzzles/singleton_top_layer_v1_1.py +2 -1
- chia/wallet/puzzles/tails.py +1 -3
- chia/wallet/signer_protocol.py +5 -6
- chia/wallet/singleton.py +5 -4
- chia/wallet/singleton_record.py +1 -1
- chia/wallet/trade_manager.py +18 -20
- chia/wallet/trade_record.py +3 -6
- chia/wallet/trading/offer.py +12 -13
- chia/wallet/uncurried_puzzle.py +2 -2
- chia/wallet/util/compute_additions.py +58 -0
- chia/wallet/util/compute_hints.py +3 -3
- chia/wallet/util/compute_memos.py +4 -4
- chia/wallet/util/curry_and_treehash.py +2 -1
- chia/wallet/util/debug_spend_bundle.py +1 -1
- chia/wallet/util/merkle_tree.py +1 -1
- chia/wallet/util/peer_request_cache.py +1 -2
- chia/wallet/util/tx_config.py +3 -8
- chia/wallet/util/wallet_sync_utils.py +10 -5
- chia/wallet/util/wallet_types.py +1 -0
- chia/wallet/vc_wallet/cr_cat_drivers.py +17 -18
- chia/wallet/vc_wallet/cr_cat_wallet.py +30 -28
- chia/wallet/vc_wallet/cr_outer_puzzle.py +5 -3
- chia/wallet/vc_wallet/vc_drivers.py +50 -8
- chia/wallet/vc_wallet/vc_store.py +3 -5
- chia/wallet/vc_wallet/vc_wallet.py +15 -22
- chia/wallet/wallet.py +36 -46
- chia/wallet/wallet_action_scope.py +73 -4
- chia/wallet/wallet_blockchain.py +1 -3
- chia/wallet/wallet_interested_store.py +1 -1
- chia/wallet/wallet_nft_store.py +3 -3
- chia/wallet/wallet_node.py +17 -16
- chia/wallet/wallet_node_api.py +4 -5
- chia/wallet/wallet_pool_store.py +1 -1
- chia/wallet/wallet_protocol.py +2 -0
- chia/wallet/wallet_puzzle_store.py +1 -1
- chia/{rpc → wallet}/wallet_request_types.py +670 -81
- chia/{rpc → wallet}/wallet_rpc_api.py +735 -766
- chia/{rpc → wallet}/wallet_rpc_client.py +268 -420
- chia/wallet/wallet_singleton_store.py +8 -7
- chia/wallet/wallet_spend_bundle.py +4 -3
- chia/wallet/wallet_state_manager.py +320 -191
- chia/wallet/wallet_weight_proof_handler.py +1 -2
- chia/wallet/wsm_apis.py +98 -0
- {chia_blockchain-2.5.4rc2.dist-info → chia_blockchain-2.5.5rc1.dist-info}/METADATA +7 -7
- {chia_blockchain-2.5.4rc2.dist-info → chia_blockchain-2.5.5rc1.dist-info}/RECORD +443 -436
- mozilla-ca/cacert.pem +3 -165
- chia/_tests/fee_estimation/test_mempoolitem_height_added.py +0 -145
- chia/cmds/dev.py +0 -18
- chia/types/blockchain_format/slots.py +0 -9
- chia/types/blockchain_format/sub_epoch_summary.py +0 -5
- chia/types/end_of_slot_bundle.py +0 -5
- chia/types/full_block.py +0 -5
- chia/types/header_block.py +0 -5
- chia/types/spend_bundle_conditions.py +0 -7
- chia/types/transaction_queue_entry.py +0 -56
- chia/types/unfinished_block.py +0 -5
- /chia/cmds/{installers.py → dev/installers.py} +0 -0
- /chia/cmds/{sim.py → dev/sim.py} +0 -0
- /chia/{util → cmds}/dump_keyring.py +0 -0
- /chia/{full_node → consensus}/signage_point.py +0 -0
- /chia/{rpc → data_layer}/data_layer_rpc_client.py +0 -0
- /chia/{rpc → farmer}/farmer_rpc_api.py +0 -0
- /chia/{util → full_node}/full_block_utils.py +0 -0
- /chia/{rpc → harvester}/harvester_rpc_api.py +0 -0
- /chia/{rpc → harvester}/harvester_rpc_client.py +0 -0
- /chia/{full_node → protocols}/fee_estimate.py +0 -0
- /chia/{server → protocols}/outbound_message.py +0 -0
- /chia/{rpc → seeder}/crawler_rpc_api.py +0 -0
- /chia/{util → simulator}/vdf_prover.py +0 -0
- /chia/{util → ssl}/ssl_check.py +0 -0
- /chia/{rpc → timelord}/timelord_rpc_api.py +0 -0
- {chia_blockchain-2.5.4rc2.dist-info → chia_blockchain-2.5.5rc1.dist-info}/LICENSE +0 -0
- {chia_blockchain-2.5.4rc2.dist-info → chia_blockchain-2.5.5rc1.dist-info}/WHEEL +0 -0
- {chia_blockchain-2.5.4rc2.dist-info → chia_blockchain-2.5.5rc1.dist-info}/entry_points.txt +0 -0
|
@@ -3,25 +3,56 @@ from __future__ import annotations
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from typing import Optional, Union
|
|
5
5
|
|
|
6
|
+
import pytest
|
|
6
7
|
from chia_rs import G2Element
|
|
7
|
-
from chia_rs.sized_bytes import bytes48
|
|
8
|
-
from chia_rs.sized_ints import uint32, uint64
|
|
8
|
+
from chia_rs.sized_bytes import bytes32, bytes48
|
|
9
|
+
from chia_rs.sized_ints import uint16, uint32, uint64
|
|
9
10
|
|
|
10
11
|
from chia._tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, logType, run_cli_command_and_assert
|
|
11
12
|
from chia._tests.cmds.wallet.test_consts import FINGERPRINT_ARG, STD_TX, STD_UTX, get_bytes32
|
|
12
|
-
from chia.
|
|
13
|
+
from chia.types.blockchain_format.program import NIL, Program
|
|
13
14
|
from chia.types.signing_mode import SigningMode
|
|
14
15
|
from chia.util.bech32m import encode_puzzle_hash
|
|
15
16
|
from chia.util.config import load_config
|
|
16
17
|
from chia.wallet.conditions import Condition, ConditionValidTimes, CreateCoinAnnouncement, CreatePuzzleAnnouncement
|
|
18
|
+
from chia.wallet.did_wallet.did_info import did_recovery_is_nil
|
|
19
|
+
from chia.wallet.util.curry_and_treehash import NIL_TREEHASH
|
|
17
20
|
from chia.wallet.util.tx_config import DEFAULT_TX_CONFIG, TXConfig
|
|
21
|
+
from chia.wallet.wallet_request_types import (
|
|
22
|
+
DIDFindLostDID,
|
|
23
|
+
DIDFindLostDIDResponse,
|
|
24
|
+
DIDGetDID,
|
|
25
|
+
DIDGetDIDResponse,
|
|
26
|
+
DIDGetInfo,
|
|
27
|
+
DIDGetInfoResponse,
|
|
28
|
+
DIDMessageSpend,
|
|
29
|
+
DIDMessageSpendResponse,
|
|
30
|
+
DIDSetWalletName,
|
|
31
|
+
DIDSetWalletNameResponse,
|
|
32
|
+
DIDTransferDID,
|
|
33
|
+
DIDTransferDIDResponse,
|
|
34
|
+
DIDUpdateMetadata,
|
|
35
|
+
DIDUpdateMetadataResponse,
|
|
36
|
+
)
|
|
18
37
|
from chia.wallet.wallet_spend_bundle import WalletSpendBundle
|
|
19
38
|
|
|
20
39
|
test_condition_valid_times: ConditionValidTimes = ConditionValidTimes(min_time=uint64(100), max_time=uint64(150))
|
|
21
40
|
|
|
22
|
-
|
|
41
|
+
|
|
42
|
+
@pytest.mark.parametrize(
|
|
43
|
+
argnames=["program", "result"],
|
|
44
|
+
argvalues=[
|
|
45
|
+
(Program.to(NIL_TREEHASH), True),
|
|
46
|
+
(NIL, True),
|
|
47
|
+
(Program.to(bytes32([1] * 32)), False),
|
|
48
|
+
],
|
|
49
|
+
)
|
|
50
|
+
def test_did_recovery_is_nil(program: Program, result: bool) -> None:
|
|
51
|
+
# test that the alternate wallet nil recovery list bytes are used
|
|
52
|
+
assert did_recovery_is_nil(program) is result
|
|
23
53
|
|
|
24
54
|
|
|
55
|
+
# DID Commands
|
|
25
56
|
def test_did_create(capsys: object, get_test_cli_clients: tuple[TestRpcClients, Path]) -> None:
|
|
26
57
|
test_rpc_clients, root_dir = get_test_cli_clients
|
|
27
58
|
|
|
@@ -102,9 +133,9 @@ def test_did_set_name(capsys: object, get_test_cli_clients: tuple[TestRpcClients
|
|
|
102
133
|
|
|
103
134
|
# set RPC Client
|
|
104
135
|
class DidSetNameRpcClient(TestWalletRpcClient):
|
|
105
|
-
async def did_set_wallet_name(self,
|
|
106
|
-
self.add_to_log("did_set_wallet_name", (wallet_id, name))
|
|
107
|
-
return
|
|
136
|
+
async def did_set_wallet_name(self, request: DIDSetWalletName) -> DIDSetWalletNameResponse:
|
|
137
|
+
self.add_to_log("did_set_wallet_name", (request.wallet_id, request.name))
|
|
138
|
+
return DIDSetWalletNameResponse(request.wallet_id)
|
|
108
139
|
|
|
109
140
|
inst_rpc_client = DidSetNameRpcClient()
|
|
110
141
|
test_rpc_clients.wallet_rpc_client = inst_rpc_client
|
|
@@ -125,9 +156,13 @@ def test_did_get_did(capsys: object, get_test_cli_clients: tuple[TestRpcClients,
|
|
|
125
156
|
|
|
126
157
|
# set RPC Client
|
|
127
158
|
class DidGetDidRpcClient(TestWalletRpcClient):
|
|
128
|
-
async def get_did_id(self,
|
|
129
|
-
self.add_to_log("get_did_id", (wallet_id,))
|
|
130
|
-
return
|
|
159
|
+
async def get_did_id(self, request: DIDGetDID) -> DIDGetDIDResponse:
|
|
160
|
+
self.add_to_log("get_did_id", (request.wallet_id,))
|
|
161
|
+
return DIDGetDIDResponse(
|
|
162
|
+
wallet_id=request.wallet_id,
|
|
163
|
+
my_did=encode_puzzle_hash(get_bytes32(1), "did:chia:"),
|
|
164
|
+
coin_id=get_bytes32(2),
|
|
165
|
+
)
|
|
131
166
|
|
|
132
167
|
inst_rpc_client = DidGetDidRpcClient()
|
|
133
168
|
test_rpc_clients.wallet_rpc_client = inst_rpc_client
|
|
@@ -148,21 +183,21 @@ def test_did_get_details(capsys: object, get_test_cli_clients: tuple[TestRpcClie
|
|
|
148
183
|
|
|
149
184
|
# set RPC Client
|
|
150
185
|
class DidGetDetailsRpcClient(TestWalletRpcClient):
|
|
151
|
-
async def get_did_info(self,
|
|
152
|
-
self.add_to_log("get_did_info", (coin_id, latest))
|
|
153
|
-
response =
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
"metadata": "
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
186
|
+
async def get_did_info(self, request: DIDGetInfo) -> DIDGetInfoResponse:
|
|
187
|
+
self.add_to_log("get_did_info", (request.coin_id, request.latest))
|
|
188
|
+
response = DIDGetInfoResponse(
|
|
189
|
+
did_id=encode_puzzle_hash(get_bytes32(2), "did:chia:"),
|
|
190
|
+
latest_coin=get_bytes32(3),
|
|
191
|
+
p2_address=encode_puzzle_hash(get_bytes32(4), "xch"),
|
|
192
|
+
public_key=bytes48([5] * 48),
|
|
193
|
+
launcher_id=get_bytes32(6),
|
|
194
|
+
metadata={"did metadata": "yes"},
|
|
195
|
+
recovery_list_hash=get_bytes32(7),
|
|
196
|
+
num_verification=uint16(8),
|
|
197
|
+
full_puzzle=Program.to(9),
|
|
198
|
+
solution=Program.to(10),
|
|
199
|
+
hints=[get_bytes32(11), get_bytes32(12)],
|
|
200
|
+
)
|
|
166
201
|
return response
|
|
167
202
|
|
|
168
203
|
inst_rpc_client = DidGetDetailsRpcClient()
|
|
@@ -176,11 +211,11 @@ def test_did_get_details(capsys: object, get_test_cli_clients: tuple[TestRpcClie
|
|
|
176
211
|
"Inner P2 Address: xch1qszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqkxck8d",
|
|
177
212
|
f"Public Key: {bytes48([5] * 48).hex()}",
|
|
178
213
|
f"Launcher ID: {get_bytes32(6).hex()}",
|
|
179
|
-
"DID Metadata: did metadata",
|
|
214
|
+
"DID Metadata: {'did metadata': 'yes'}",
|
|
180
215
|
f"Recovery List Hash: {get_bytes32(7).hex()}",
|
|
181
216
|
"Recovery Required Verifications: 8",
|
|
182
|
-
|
|
183
|
-
"Last Spend Solution:
|
|
217
|
+
"Last Spend Puzzle: 09",
|
|
218
|
+
"Last Spend Solution: 0a",
|
|
184
219
|
"Last Spend Hints: ['0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b', "
|
|
185
220
|
"'0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c']",
|
|
186
221
|
]
|
|
@@ -198,19 +233,23 @@ def test_did_update_metadata(capsys: object, get_test_cli_clients: tuple[TestRpc
|
|
|
198
233
|
class DidUpdateMetadataRpcClient(TestWalletRpcClient):
|
|
199
234
|
async def update_did_metadata(
|
|
200
235
|
self,
|
|
201
|
-
|
|
202
|
-
metadata: dict[str, object],
|
|
236
|
+
request: DIDUpdateMetadata,
|
|
203
237
|
tx_config: TXConfig,
|
|
204
|
-
|
|
238
|
+
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
205
239
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
206
240
|
) -> DIDUpdateMetadataResponse:
|
|
207
|
-
self.add_to_log(
|
|
208
|
-
|
|
241
|
+
self.add_to_log(
|
|
242
|
+
"update_did_metadata",
|
|
243
|
+
(request.wallet_id, request.metadata, tx_config, request.push, extra_conditions, timelock_info),
|
|
244
|
+
)
|
|
245
|
+
return DIDUpdateMetadataResponse(
|
|
246
|
+
[STD_UTX], [STD_TX], WalletSpendBundle([], G2Element()), uint32(request.wallet_id)
|
|
247
|
+
)
|
|
209
248
|
|
|
210
249
|
inst_rpc_client = DidUpdateMetadataRpcClient()
|
|
211
250
|
test_rpc_clients.wallet_rpc_client = inst_rpc_client
|
|
212
251
|
w_id = 3
|
|
213
|
-
json_mdata = '{"
|
|
252
|
+
json_mdata = '{"foo": "bar"}'
|
|
214
253
|
command_args = [
|
|
215
254
|
"wallet",
|
|
216
255
|
"did",
|
|
@@ -231,7 +270,7 @@ def test_did_update_metadata(capsys: object, get_test_cli_clients: tuple[TestRpc
|
|
|
231
270
|
run_cli_command_and_assert(capsys, root_dir, command_args, assert_list)
|
|
232
271
|
expected_calls: logType = {
|
|
233
272
|
"update_did_metadata": [
|
|
234
|
-
(w_id, {"
|
|
273
|
+
(w_id, {"foo": "bar"}, DEFAULT_TX_CONFIG.override(reuse_puzhash=True), True, (), test_condition_valid_times)
|
|
235
274
|
],
|
|
236
275
|
}
|
|
237
276
|
test_rpc_clients.wallet_rpc_client.check_log(expected_calls)
|
|
@@ -242,20 +281,17 @@ def test_did_find_lost(capsys: object, get_test_cli_clients: tuple[TestRpcClient
|
|
|
242
281
|
|
|
243
282
|
# set RPC Client
|
|
244
283
|
class DidFindLostRpcClient(TestWalletRpcClient):
|
|
245
|
-
async def find_lost_did(
|
|
246
|
-
self
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
) -> dict[str, Union[bool, str]]:
|
|
252
|
-
self.add_to_log("find_lost_did", (coin_id, recovery_list_hash, metadata, num_verification))
|
|
253
|
-
return {"success": True, "latest_coin_id": get_bytes32(2).hex()}
|
|
284
|
+
async def find_lost_did(self, request: DIDFindLostDID) -> DIDFindLostDIDResponse:
|
|
285
|
+
self.add_to_log(
|
|
286
|
+
"find_lost_did",
|
|
287
|
+
(request.coin_id, request.recovery_list_hash, request.metadata, request.num_verification),
|
|
288
|
+
)
|
|
289
|
+
return DIDFindLostDIDResponse(get_bytes32(2))
|
|
254
290
|
|
|
255
291
|
inst_rpc_client = DidFindLostRpcClient()
|
|
256
292
|
test_rpc_clients.wallet_rpc_client = inst_rpc_client
|
|
257
293
|
c_id = get_bytes32(1)
|
|
258
|
-
json_mdata = '{"
|
|
294
|
+
json_mdata = '{"foo": "bar"}'
|
|
259
295
|
command_args = [
|
|
260
296
|
"wallet",
|
|
261
297
|
"did",
|
|
@@ -270,7 +306,7 @@ def test_did_find_lost(capsys: object, get_test_cli_clients: tuple[TestRpcClient
|
|
|
270
306
|
assert_list = [f"Successfully found lost DID {c_id.hex()}, latest coin ID: {get_bytes32(2).hex()}"]
|
|
271
307
|
run_cli_command_and_assert(capsys, root_dir, command_args, assert_list)
|
|
272
308
|
expected_calls: logType = {
|
|
273
|
-
"find_lost_did": [(c_id.hex(), None,
|
|
309
|
+
"find_lost_did": [(c_id.hex(), None, {"foo": "bar"}, None)],
|
|
274
310
|
}
|
|
275
311
|
test_rpc_clients.wallet_rpc_client.check_log(expected_calls)
|
|
276
312
|
|
|
@@ -282,13 +318,14 @@ def test_did_message_spend(capsys: object, get_test_cli_clients: tuple[TestRpcCl
|
|
|
282
318
|
class DidMessageSpendRpcClient(TestWalletRpcClient):
|
|
283
319
|
async def did_message_spend(
|
|
284
320
|
self,
|
|
285
|
-
|
|
321
|
+
request: DIDMessageSpend,
|
|
286
322
|
tx_config: TXConfig,
|
|
287
|
-
extra_conditions: tuple[Condition, ...],
|
|
288
|
-
push: bool,
|
|
323
|
+
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
289
324
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
290
325
|
) -> DIDMessageSpendResponse:
|
|
291
|
-
self.add_to_log(
|
|
326
|
+
self.add_to_log(
|
|
327
|
+
"did_message_spend", (request.wallet_id, tx_config, extra_conditions, request.push, timelock_info)
|
|
328
|
+
)
|
|
292
329
|
return DIDMessageSpendResponse([STD_UTX], [STD_TX], WalletSpendBundle([], G2Element()))
|
|
293
330
|
|
|
294
331
|
inst_rpc_client = DidMessageSpendRpcClient()
|
|
@@ -339,16 +376,23 @@ def test_did_transfer(capsys: object, get_test_cli_clients: tuple[TestRpcClients
|
|
|
339
376
|
class DidTransferRpcClient(TestWalletRpcClient):
|
|
340
377
|
async def did_transfer_did(
|
|
341
378
|
self,
|
|
342
|
-
|
|
343
|
-
address: str,
|
|
344
|
-
fee: int,
|
|
345
|
-
with_recovery: bool,
|
|
379
|
+
request: DIDTransferDID,
|
|
346
380
|
tx_config: TXConfig,
|
|
347
|
-
|
|
381
|
+
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
348
382
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
349
383
|
) -> DIDTransferDIDResponse:
|
|
350
384
|
self.add_to_log(
|
|
351
|
-
"did_transfer_did",
|
|
385
|
+
"did_transfer_did",
|
|
386
|
+
(
|
|
387
|
+
request.wallet_id,
|
|
388
|
+
request.inner_address,
|
|
389
|
+
request.fee,
|
|
390
|
+
request.with_recovery_info,
|
|
391
|
+
tx_config,
|
|
392
|
+
request.push,
|
|
393
|
+
extra_conditions,
|
|
394
|
+
timelock_info,
|
|
395
|
+
),
|
|
352
396
|
)
|
|
353
397
|
return DIDTransferDIDResponse(
|
|
354
398
|
[STD_UTX],
|
|
@@ -396,6 +440,7 @@ def test_did_transfer(capsys: object, get_test_cli_clients: tuple[TestRpcClients
|
|
|
396
440
|
True,
|
|
397
441
|
DEFAULT_TX_CONFIG.override(reuse_puzhash=True),
|
|
398
442
|
True,
|
|
443
|
+
(),
|
|
399
444
|
test_condition_valid_times,
|
|
400
445
|
)
|
|
401
446
|
],
|
|
@@ -5,21 +5,29 @@ from typing import Any, Optional
|
|
|
5
5
|
|
|
6
6
|
from chia_rs import G2Element
|
|
7
7
|
from chia_rs.sized_bytes import bytes32
|
|
8
|
-
from chia_rs.sized_ints import
|
|
8
|
+
from chia_rs.sized_ints import uint16, uint32, uint64
|
|
9
9
|
|
|
10
10
|
from chia._tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, logType, run_cli_command_and_assert
|
|
11
11
|
from chia._tests.cmds.wallet.test_consts import FINGERPRINT, FINGERPRINT_ARG, STD_TX, STD_UTX, get_bytes32
|
|
12
|
-
from chia.
|
|
12
|
+
from chia.types.signing_mode import SigningMode
|
|
13
|
+
from chia.util.bech32m import encode_puzzle_hash
|
|
14
|
+
from chia.wallet.conditions import Condition, ConditionValidTimes
|
|
15
|
+
from chia.wallet.nft_wallet.nft_info import NFTInfo
|
|
16
|
+
from chia.wallet.util.tx_config import DEFAULT_TX_CONFIG, TXConfig
|
|
17
|
+
from chia.wallet.wallet_request_types import (
|
|
18
|
+
NFTAddURI,
|
|
13
19
|
NFTAddURIResponse,
|
|
20
|
+
NFTGetNFTs,
|
|
21
|
+
NFTGetNFTsResponse,
|
|
22
|
+
NFTGetWalletDID,
|
|
23
|
+
NFTGetWalletDIDResponse,
|
|
24
|
+
NFTMintNFTRequest,
|
|
14
25
|
NFTMintNFTResponse,
|
|
26
|
+
NFTSetNFTDID,
|
|
15
27
|
NFTSetNFTDIDResponse,
|
|
28
|
+
NFTTransferNFT,
|
|
16
29
|
NFTTransferNFTResponse,
|
|
17
30
|
)
|
|
18
|
-
from chia.types.signing_mode import SigningMode
|
|
19
|
-
from chia.util.bech32m import encode_puzzle_hash
|
|
20
|
-
from chia.wallet.conditions import ConditionValidTimes
|
|
21
|
-
from chia.wallet.nft_wallet.nft_info import NFTInfo
|
|
22
|
-
from chia.wallet.util.tx_config import DEFAULT_TX_CONFIG, TXConfig
|
|
23
31
|
from chia.wallet.wallet_spend_bundle import WalletSpendBundle
|
|
24
32
|
|
|
25
33
|
test_condition_valid_times: ConditionValidTimes = ConditionValidTimes(min_time=uint64(100), max_time=uint64(150))
|
|
@@ -78,56 +86,44 @@ def test_nft_mint(capsys: object, get_test_cli_clients: tuple[TestRpcClients, Pa
|
|
|
78
86
|
|
|
79
87
|
# set RPC Client
|
|
80
88
|
class NFTCreateRpcClient(TestWalletRpcClient):
|
|
81
|
-
async def get_nft_wallet_did(self,
|
|
82
|
-
self.add_to_log("get_nft_wallet_did", (wallet_id,))
|
|
83
|
-
return
|
|
89
|
+
async def get_nft_wallet_did(self, request: NFTGetWalletDID) -> NFTGetWalletDIDResponse:
|
|
90
|
+
self.add_to_log("get_nft_wallet_did", (request.wallet_id,))
|
|
91
|
+
return NFTGetWalletDIDResponse("did:chia:1qgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpq4msw0c")
|
|
84
92
|
|
|
85
93
|
async def mint_nft(
|
|
86
94
|
self,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
hash: str,
|
|
91
|
-
uris: list[str],
|
|
92
|
-
meta_hash: str = "",
|
|
93
|
-
meta_uris: Optional[list[str]] = None,
|
|
94
|
-
license_hash: str = "",
|
|
95
|
-
license_uris: Optional[list[str]] = None,
|
|
96
|
-
edition_total: uint8 = uint8(1),
|
|
97
|
-
edition_number: uint8 = uint8(1),
|
|
98
|
-
fee: uint64 = uint64(0),
|
|
99
|
-
royalty_percentage: int = 0,
|
|
100
|
-
did_id: Optional[str] = None,
|
|
101
|
-
reuse_puzhash: Optional[bool] = None,
|
|
102
|
-
push: bool = True,
|
|
95
|
+
request: NFTMintNFTRequest,
|
|
96
|
+
tx_config: TXConfig,
|
|
97
|
+
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
103
98
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
104
99
|
) -> NFTMintNFTResponse:
|
|
105
100
|
self.add_to_log(
|
|
106
101
|
"mint_nft",
|
|
107
102
|
(
|
|
108
|
-
wallet_id,
|
|
109
|
-
royalty_address,
|
|
110
|
-
target_address,
|
|
111
|
-
hash,
|
|
112
|
-
uris,
|
|
113
|
-
meta_hash,
|
|
114
|
-
meta_uris,
|
|
115
|
-
license_hash,
|
|
116
|
-
license_uris,
|
|
117
|
-
edition_total,
|
|
118
|
-
edition_number,
|
|
119
|
-
fee,
|
|
120
|
-
|
|
121
|
-
did_id,
|
|
122
|
-
|
|
123
|
-
|
|
103
|
+
request.wallet_id,
|
|
104
|
+
request.royalty_address,
|
|
105
|
+
request.target_address,
|
|
106
|
+
request.hash,
|
|
107
|
+
request.uris,
|
|
108
|
+
request.meta_hash,
|
|
109
|
+
request.meta_uris,
|
|
110
|
+
request.license_hash,
|
|
111
|
+
request.license_uris,
|
|
112
|
+
request.edition_total,
|
|
113
|
+
request.edition_number,
|
|
114
|
+
request.fee,
|
|
115
|
+
request.royalty_amount,
|
|
116
|
+
request.did_id,
|
|
117
|
+
request.push,
|
|
118
|
+
tx_config,
|
|
124
119
|
timelock_info,
|
|
120
|
+
extra_conditions,
|
|
125
121
|
),
|
|
126
122
|
)
|
|
127
123
|
return NFTMintNFTResponse(
|
|
128
124
|
[STD_UTX],
|
|
129
125
|
[STD_TX],
|
|
130
|
-
uint32(wallet_id),
|
|
126
|
+
uint32(request.wallet_id),
|
|
131
127
|
WalletSpendBundle([], G2Element()),
|
|
132
128
|
bytes32.zeros.hex(),
|
|
133
129
|
)
|
|
@@ -142,7 +138,7 @@ def test_nft_mint(capsys: object, get_test_cli_clients: tuple[TestRpcClients, Pa
|
|
|
142
138
|
FINGERPRINT_ARG,
|
|
143
139
|
"-i4",
|
|
144
140
|
"--hash",
|
|
145
|
-
|
|
141
|
+
bytes32.zeros.hex(),
|
|
146
142
|
"--uris",
|
|
147
143
|
"https://example.com",
|
|
148
144
|
"--target-address",
|
|
@@ -164,26 +160,27 @@ def test_nft_mint(capsys: object, get_test_cli_clients: tuple[TestRpcClients, Pa
|
|
|
164
160
|
4,
|
|
165
161
|
None,
|
|
166
162
|
"xch1qgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqzc0j4g",
|
|
167
|
-
|
|
163
|
+
bytes32.zeros,
|
|
168
164
|
["https://example.com"],
|
|
169
|
-
|
|
170
|
-
min_coin_amount=uint64(0),
|
|
171
|
-
max_coin_amount=uint64(18446744073709551615),
|
|
172
|
-
excluded_coin_amounts=[],
|
|
173
|
-
excluded_coin_ids=[],
|
|
174
|
-
reuse_puzhash=True,
|
|
175
|
-
),
|
|
176
|
-
"",
|
|
165
|
+
None,
|
|
177
166
|
[],
|
|
178
|
-
|
|
167
|
+
None,
|
|
179
168
|
[],
|
|
180
169
|
1,
|
|
181
170
|
1,
|
|
182
171
|
500000000000,
|
|
183
172
|
0,
|
|
184
|
-
"
|
|
173
|
+
"did:chia:1qgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpq4msw0c",
|
|
185
174
|
True,
|
|
175
|
+
TXConfig(
|
|
176
|
+
min_coin_amount=uint64(0),
|
|
177
|
+
max_coin_amount=uint64(18446744073709551615),
|
|
178
|
+
excluded_coin_amounts=[],
|
|
179
|
+
excluded_coin_ids=[],
|
|
180
|
+
reuse_puzhash=True,
|
|
181
|
+
),
|
|
186
182
|
test_condition_valid_times,
|
|
183
|
+
(),
|
|
187
184
|
)
|
|
188
185
|
],
|
|
189
186
|
}
|
|
@@ -197,17 +194,26 @@ def test_nft_add_uri(capsys: object, get_test_cli_clients: tuple[TestRpcClients,
|
|
|
197
194
|
class NFTAddUriRpcClient(TestWalletRpcClient):
|
|
198
195
|
async def add_uri_to_nft(
|
|
199
196
|
self,
|
|
200
|
-
|
|
201
|
-
nft_coin_id: str,
|
|
202
|
-
key: str,
|
|
203
|
-
uri: str,
|
|
204
|
-
fee: int,
|
|
197
|
+
request: NFTAddURI,
|
|
205
198
|
tx_config: TXConfig,
|
|
206
|
-
|
|
199
|
+
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
207
200
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
208
201
|
) -> NFTAddURIResponse:
|
|
209
|
-
self.add_to_log(
|
|
210
|
-
|
|
202
|
+
self.add_to_log(
|
|
203
|
+
"add_uri_to_nft",
|
|
204
|
+
(
|
|
205
|
+
request.wallet_id,
|
|
206
|
+
request.nft_coin_id,
|
|
207
|
+
request.key,
|
|
208
|
+
request.uri,
|
|
209
|
+
request.fee,
|
|
210
|
+
tx_config,
|
|
211
|
+
request.push,
|
|
212
|
+
timelock_info,
|
|
213
|
+
extra_conditions,
|
|
214
|
+
),
|
|
215
|
+
)
|
|
216
|
+
return NFTAddURIResponse([STD_UTX], [STD_TX], request.wallet_id, WalletSpendBundle([], G2Element()))
|
|
211
217
|
|
|
212
218
|
inst_rpc_client = NFTAddUriRpcClient()
|
|
213
219
|
nft_coin_id = get_bytes32(2).hex()
|
|
@@ -244,6 +250,7 @@ def test_nft_add_uri(capsys: object, get_test_cli_clients: tuple[TestRpcClients,
|
|
|
244
250
|
DEFAULT_TX_CONFIG.override(reuse_puzhash=True),
|
|
245
251
|
True,
|
|
246
252
|
test_condition_valid_times,
|
|
253
|
+
(),
|
|
247
254
|
)
|
|
248
255
|
],
|
|
249
256
|
}
|
|
@@ -257,21 +264,28 @@ def test_nft_transfer(capsys: object, get_test_cli_clients: tuple[TestRpcClients
|
|
|
257
264
|
class NFTTransferRpcClient(TestWalletRpcClient):
|
|
258
265
|
async def transfer_nft(
|
|
259
266
|
self,
|
|
260
|
-
|
|
261
|
-
nft_coin_id: str,
|
|
262
|
-
target_address: str,
|
|
263
|
-
fee: int,
|
|
267
|
+
request: NFTTransferNFT,
|
|
264
268
|
tx_config: TXConfig,
|
|
265
|
-
|
|
269
|
+
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
266
270
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
267
271
|
) -> NFTTransferNFTResponse:
|
|
268
272
|
self.add_to_log(
|
|
269
|
-
"transfer_nft",
|
|
273
|
+
"transfer_nft",
|
|
274
|
+
(
|
|
275
|
+
request.wallet_id,
|
|
276
|
+
request.nft_coin_id,
|
|
277
|
+
request.target_address,
|
|
278
|
+
request.fee,
|
|
279
|
+
tx_config,
|
|
280
|
+
request.push,
|
|
281
|
+
timelock_info,
|
|
282
|
+
extra_conditions,
|
|
283
|
+
),
|
|
270
284
|
)
|
|
271
285
|
return NFTTransferNFTResponse(
|
|
272
286
|
[STD_UTX],
|
|
273
287
|
[STD_TX],
|
|
274
|
-
|
|
288
|
+
request.wallet_id,
|
|
275
289
|
WalletSpendBundle([], G2Element()),
|
|
276
290
|
)
|
|
277
291
|
|
|
@@ -310,6 +324,7 @@ def test_nft_transfer(capsys: object, get_test_cli_clients: tuple[TestRpcClients
|
|
|
310
324
|
DEFAULT_TX_CONFIG.override(reuse_puzhash=True),
|
|
311
325
|
True,
|
|
312
326
|
test_condition_valid_times,
|
|
327
|
+
(),
|
|
313
328
|
)
|
|
314
329
|
],
|
|
315
330
|
}
|
|
@@ -321,10 +336,10 @@ def test_nft_list(capsys: object, get_test_cli_clients: tuple[TestRpcClients, Pa
|
|
|
321
336
|
|
|
322
337
|
# set RPC Client
|
|
323
338
|
class NFTListRpcClient(TestWalletRpcClient):
|
|
324
|
-
async def list_nfts(self,
|
|
325
|
-
self.add_to_log("list_nfts", (wallet_id, num, start_index))
|
|
339
|
+
async def list_nfts(self, request: NFTGetNFTs) -> NFTGetNFTsResponse:
|
|
340
|
+
self.add_to_log("list_nfts", (request.wallet_id, request.num, request.start_index))
|
|
326
341
|
nft_list = []
|
|
327
|
-
for i in range(start_index, start_index + num):
|
|
342
|
+
for i in range(request.start_index, request.start_index + request.num):
|
|
328
343
|
index_bytes = bytes32([i] * 32)
|
|
329
344
|
nft_list.append(
|
|
330
345
|
NFTInfo(
|
|
@@ -348,9 +363,9 @@ def test_nft_list(capsys: object, get_test_cli_clients: tuple[TestRpcClients, Pa
|
|
|
348
363
|
mint_height=uint32(1),
|
|
349
364
|
supports_did=True,
|
|
350
365
|
p2_address=get_bytes32(8),
|
|
351
|
-
)
|
|
366
|
+
)
|
|
352
367
|
)
|
|
353
|
-
return
|
|
368
|
+
return NFTGetNFTsResponse(request.wallet_id, nft_list)
|
|
354
369
|
|
|
355
370
|
inst_rpc_client = NFTListRpcClient()
|
|
356
371
|
launcher_ids = [bytes32([i] * 32).hex() for i in range(50, 60)]
|
|
@@ -386,24 +401,33 @@ def test_nft_set_did(capsys: object, get_test_cli_clients: tuple[TestRpcClients,
|
|
|
386
401
|
class NFTSetDidRpcClient(TestWalletRpcClient):
|
|
387
402
|
async def set_nft_did(
|
|
388
403
|
self,
|
|
389
|
-
|
|
390
|
-
did_id: str,
|
|
391
|
-
nft_coin_id: str,
|
|
392
|
-
fee: int,
|
|
404
|
+
request: NFTSetNFTDID,
|
|
393
405
|
tx_config: TXConfig,
|
|
394
|
-
|
|
406
|
+
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
395
407
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
396
408
|
) -> NFTSetNFTDIDResponse:
|
|
397
|
-
self.add_to_log(
|
|
409
|
+
self.add_to_log(
|
|
410
|
+
"set_nft_did",
|
|
411
|
+
(
|
|
412
|
+
request.wallet_id,
|
|
413
|
+
request.did_id,
|
|
414
|
+
request.nft_coin_id,
|
|
415
|
+
request.fee,
|
|
416
|
+
tx_config,
|
|
417
|
+
request.push,
|
|
418
|
+
timelock_info,
|
|
419
|
+
extra_conditions,
|
|
420
|
+
),
|
|
421
|
+
)
|
|
398
422
|
return NFTSetNFTDIDResponse(
|
|
399
423
|
[STD_UTX],
|
|
400
424
|
[STD_TX],
|
|
401
|
-
|
|
425
|
+
request.wallet_id,
|
|
402
426
|
WalletSpendBundle([], G2Element()),
|
|
403
427
|
)
|
|
404
428
|
|
|
405
429
|
inst_rpc_client = NFTSetDidRpcClient()
|
|
406
|
-
nft_coin_id = get_bytes32(2)
|
|
430
|
+
nft_coin_id = get_bytes32(2)
|
|
407
431
|
did_id = encode_puzzle_hash(get_bytes32(3), "did:chia:")
|
|
408
432
|
test_rpc_clients.wallet_rpc_client = inst_rpc_client
|
|
409
433
|
command_args = [
|
|
@@ -413,7 +437,7 @@ def test_nft_set_did(capsys: object, get_test_cli_clients: tuple[TestRpcClients,
|
|
|
413
437
|
FINGERPRINT_ARG,
|
|
414
438
|
"-i4",
|
|
415
439
|
"--nft-coin-id",
|
|
416
|
-
nft_coin_id,
|
|
440
|
+
nft_coin_id.hex(),
|
|
417
441
|
"--did-id",
|
|
418
442
|
did_id,
|
|
419
443
|
"-m0.5",
|
|
@@ -437,6 +461,7 @@ def test_nft_set_did(capsys: object, get_test_cli_clients: tuple[TestRpcClients,
|
|
|
437
461
|
DEFAULT_TX_CONFIG.override(reuse_puzhash=True),
|
|
438
462
|
True,
|
|
439
463
|
test_condition_valid_times,
|
|
464
|
+
(),
|
|
440
465
|
)
|
|
441
466
|
],
|
|
442
467
|
}
|
|
@@ -8,11 +8,11 @@ from chia_rs.sized_ints import uint32, uint64
|
|
|
8
8
|
|
|
9
9
|
from chia._tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, logType, run_cli_command_and_assert
|
|
10
10
|
from chia._tests.cmds.wallet.test_consts import FINGERPRINT, FINGERPRINT_ARG, get_bytes32
|
|
11
|
-
from chia.rpc.wallet_request_types import GetNotifications, GetNotificationsResponse
|
|
12
11
|
from chia.util.bech32m import encode_puzzle_hash
|
|
13
12
|
from chia.wallet.conditions import ConditionValidTimes
|
|
14
13
|
from chia.wallet.notification_store import Notification
|
|
15
14
|
from chia.wallet.transaction_record import TransactionRecord
|
|
15
|
+
from chia.wallet.wallet_request_types import GetNotifications, GetNotificationsResponse
|
|
16
16
|
|
|
17
17
|
test_condition_valid_times: ConditionValidTimes = ConditionValidTimes(min_time=uint64(100), max_time=uint64(150))
|
|
18
18
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
offer1qqr83wcuu2ryhmvu0yuff6cmcanm99pk8x5xxnvtksc4893xed58pjyez9xc5tp4gttzeyts6pyv453eyarm9pdhr2zyfy098qrk029yanzfz4z6k3yvny3daah3d744armmaea6wjh8aa0cca6u6aw070w08hh070xw07t7aaunzxxvfsxvyh6df8ahxz72a9mg6k0ax2za0j0en64v4u043a8gt4yaaj7r8w4g59ejyrjuwq2pw8yx58alrwx9aw8n508jr4fwxja693u7gwauakgy6gtekkrka9ykpt3uqujkpzc6dhj2fnt83s05dvh0duvd5g7mzza3vxdh66jn5uh4a43zk2jkz0murpde0a4rpjrrxr6jlkjg9k40434t3ksxuk95x9jrfdmvhjamcmwrek7rh089rg7em7hpfl4s0mhkslkq9yq5uzgvnjf07sa8s3ak7sc86ttku2det4mm0ld6qrlutdja0fz72dd5taxe2tqh4r0tyl5uawtsgs67y6th4246m4lrs33dzvv4cheyu924p448vvne22k70nnm4v779dk733wt0k9ltrtg5kaswhxhne36vp4gzg7hc27reue7553kxx40a5jgrw074hwdq0ur88l8qcq0anxha08hqmncpqeysvh3xg6xvyphuz95wr8g6dwgauyf5kn4s2uarlzpkkhjgsez04k98cuvhhkn60x5x9v8mwlhl0uzkk7c89vz3wkj0nnp3uwka4679vt3kpch8vw0k4tevatnk4c9puhnh4sv76nlrh36ft9qgfvj36fg4cs6ch6m5fyzxe0x00dwpfq4wj2t0x77ux5z7fzzycmpu3xh9femugxrft6kyag86m64mmur6tlnescl2x44k32g07hx7py4v0dsjm0zkt4sj6qttpyspux2cfd5wha80tp9am08ww0r4984vwjxcfvwurj52x34t622aqljfcfajnp6g7ss97mvkt0rsex7ccclnjdgq3gr9jdzlh4zs8l7t5cp2s788s7k6hdagjp5fxgk6k6yqj37kd26degv2z3t7skktuq772g4cnrq9hvruan67s8ev9ssjnl9wtd3d7mu3ztl2wjrzc23qjc7w3xjnl2zn4l9e6vutpc86shu7c3j54ha0nqgm54hwmn3ufs0ujythxg76n4q8uql6zgxltfn023lahj2j24yn3vtk5al97360vtwwerdx56njk6j8tcyv5jsuer6mzvgjq8ap85y76p9n0maxql6z0gflq87qn620z0apr5y78lxqvpl6ztdnkq0upqrlh53x3ef5qlh6dhadx9yup6q07pt7h0aa96ht0r6dkp9p7v4zhvl02u88fle02q2c8ma4hjuxpf9yx57xwq8kddflczt446p7uawshs8mh46q7cawjhmlvmlhn9kfle4yhsvl59aemvaegt4ck7mfmhqgrzmep8dvmrld9zmv2ece439v3hdu5dc8xkvsnm25hhh3xrsktpguy0fcueewh3r4v2tttkjcv04w4s34xhxx35xy7l6q3ttfw8h74gqnequkv6nsscyrkxrzp9g4wvltkhp2ve29yfr05jhz8444w85qwyfnp35qcrg8r0kj35lhjz900hlh9009dady8r8urkw3dxv85zhede2eyt5dqn95vzh8erh636evsdavkxr3qaw9kh85tvdg2f8juy80hzwevdyxvlekf70ux7f2veq4sq5x80wrqlh6sv7pzr0s7t9satxtgex3xplnwv646n5fvcue36teh20kqpd2cdgmmgjf4p9u88fe0jk70pj5rsxx2645vwssxtp0uu7rwuxnpv66lnmrg55yca0ywwhgrhre6vpf47zfpg3z547znfdmrav76uf2924aggrdtu5763f2zad6ghu4z6w66pkxest89j93fk2yhvqst7g6y5z2hveu8xzdvpuuflzx0g6hrqf32u07v4gnlh2v36ucshnz3jum9puy45k7sjnv7rw3ecmjzr004pg36y54cx3ng6s365vu24hds5xsv3aleyfksyjds98v890upr65zls4glhrnqqtc6lp2hp4lz6kanzxf8lkz0jzm08h69rtrl79m40u6y69wafvu7tt8wuftkm94t49rq2kpj774ruhu8rx7lm7fyp2u7k60x0kumn8u92mu7ufskq4vr9ud0s42q40rdkfe0eu4cdlhk6ema727s6tdjhatxdqnsdl7l836vaeu3vt2z363x5dfqtp6nn5fkey2qewrduajhu4ju75tfs8vh2eqynhz9fnrxvkpjj62n6tfzfn4k2f2kpzp68td88lwpnx6t7vk7tkn5fsccca3hjy36lcmdchfyatndslztlvcjwvekwnpynxzkqjsmh0564xgkuzh8xtfzcx3znnufd3tn9hw2wveadax28r07cmxmxj8zw389gczm2a649d5lkaraj69x4zueh8pt9qg899pp32wzyh9rxa0w8d7ueqx69pmdjt90jvp06ckltccz274ph3a9hntml7cy4cldj5nwt5uzh2waqkdl282h6ckmh0zffyhk63pjrh0rqgkgz8aje79l8ateleg7l27lv6wwmj5fld452eg428kddwt9d8hxelmlsnkc8ckjpzak0teysu0k4tnphlthdc28dl9gur3zsd2gd8f08jxptjxmdg3aylltk6m4a4ywj63e5ttmf4ky6e2xqq8mgwl0mjsfq36g3x2kxprj5pcshnawu3kqjmjnkjl0lgxgktxvt6u2q7tv7825hdae8gymcufdkac76dnjxv7z9j3wkz3ffyf8uctsgwfmp877hn0wy435j8a5rz6gfc86n77vety2unz4maggz6u8kkewcf4qxan47jx62jmgthtgj0hjp773u5ywk7g58ek34xh4emr69eerdl6jjpuz0ke6v34mlpa6p4qzwq0gxjvpe3jp5uq7sdyqgxn5r77yljzl2xns87g8vnjlu9g5tdfalnswfxfwy4h8nf60jmwz4lw6yalmqrwd2ezgml74qpdyf3cmt7ffgv3qekejgjef0lmwe8mrgkxgks28e83w57chz7dd89se56hu2r7wmrz233sfd43km92gtjrwawqrc2s7s37r83736cnt60kuz4m5cxsevjp98xdq5gmhcuje8s7ygduqy7m5ew72n4kt6vm4mxfrj3k6w7lgpp23et92ynpapvynlulnpywp8r8hxnegf9900kpyryvtnknj6nluusrw4k375amvmxejrvfvpss4zmzyan5yvs5m88a49gp9ruuvl0869cmxxlxxryhnuj73qjhzevnatf2uy4pk3kvsk04efhdex67dx04gj6q66q66q67q2uq2acwq2a0mzhgr8m0pglfudn7c2pgzpg288tc9vgfc7k9ppql6vcc0q6wvvn003gss5k36l2fvfspv4dv8gn2e42qc7qgfpkurmpxrtd3vm6gcjg7n4aapavjjyyezqszdnmzuyc3e4zgd0pe4zrafw96xs3a6a2q06q86q86q86q86q8cv6q86q8lmu4h33lgsru0npefsxa24qpxf9yet2mckt7u8t93unjhk433txw5zuf87h45n8jdq5fpa5fthc5qgeqhk2zsfcsperh25s6qqn29hy97nsmykdvwp52geg7meme6uj6c59mjx5r50s45kdt04hufr5zy9pw5s7zklpzge48msufj6s7rd5m89elrjm20uyx2fcud4xr8nuky8xx7fuxhcu2p942x5t7lf6nlvvkc42hfz47jv9mn0prhe9a4ule3sfhlqxezpumzsm3ayd8
|
|
@@ -8,7 +8,14 @@ from chia_rs.sized_ints import uint32, uint64
|
|
|
8
8
|
|
|
9
9
|
from chia._tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, logType, run_cli_command_and_assert
|
|
10
10
|
from chia._tests.cmds.wallet.test_consts import FINGERPRINT_ARG, STD_TX, STD_UTX, get_bytes32
|
|
11
|
-
from chia.
|
|
11
|
+
from chia.util.bech32m import encode_puzzle_hash
|
|
12
|
+
from chia.wallet.conditions import ConditionValidTimes
|
|
13
|
+
from chia.wallet.lineage_proof import LineageProof
|
|
14
|
+
from chia.wallet.transaction_record import TransactionRecord
|
|
15
|
+
from chia.wallet.util.tx_config import DEFAULT_TX_CONFIG, TXConfig
|
|
16
|
+
from chia.wallet.vc_wallet.vc_drivers import VCLineageProof, VerifiedCredential
|
|
17
|
+
from chia.wallet.vc_wallet.vc_store import VCRecord
|
|
18
|
+
from chia.wallet.wallet_request_types import (
|
|
12
19
|
VCAddProofs,
|
|
13
20
|
VCGet,
|
|
14
21
|
VCGetList,
|
|
@@ -26,13 +33,6 @@ from chia.rpc.wallet_request_types import (
|
|
|
26
33
|
VCSpend,
|
|
27
34
|
VCSpendResponse,
|
|
28
35
|
)
|
|
29
|
-
from chia.util.bech32m import encode_puzzle_hash
|
|
30
|
-
from chia.wallet.conditions import ConditionValidTimes
|
|
31
|
-
from chia.wallet.lineage_proof import LineageProof
|
|
32
|
-
from chia.wallet.transaction_record import TransactionRecord
|
|
33
|
-
from chia.wallet.util.tx_config import DEFAULT_TX_CONFIG, TXConfig
|
|
34
|
-
from chia.wallet.vc_wallet.vc_drivers import VCLineageProof, VerifiedCredential
|
|
35
|
-
from chia.wallet.vc_wallet.vc_store import VCRecord
|
|
36
36
|
|
|
37
37
|
test_condition_valid_times: ConditionValidTimes = ConditionValidTimes(min_time=uint64(100), max_time=uint64(150))
|
|
38
38
|
# VC Commands
|