chia-blockchain 2.5.4rc2__py3-none-any.whl → 2.5.5rc2__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 +495 -265
- 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 +274 -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.5rc2.dist-info}/METADATA +7 -7
- {chia_blockchain-2.5.4rc2.dist-info → chia_blockchain-2.5.5rc2.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.5rc2.dist-info}/LICENSE +0 -0
- {chia_blockchain-2.5.4rc2.dist-info → chia_blockchain-2.5.5rc2.dist-info}/WHEEL +0 -0
- {chia_blockchain-2.5.4rc2.dist-info → chia_blockchain-2.5.5rc2.dist-info}/entry_points.txt +0 -0
|
@@ -2,16 +2,21 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import sys
|
|
4
4
|
from dataclasses import dataclass, field
|
|
5
|
-
from typing import Any, Optional,
|
|
5
|
+
from typing import Any, Optional, final
|
|
6
6
|
|
|
7
|
-
from chia_rs import G1Element, G2Element, PrivateKey
|
|
7
|
+
from chia_rs import Coin, G1Element, G2Element, PrivateKey
|
|
8
8
|
from chia_rs.sized_bytes import bytes32
|
|
9
9
|
from chia_rs.sized_ints import uint16, uint32, uint64
|
|
10
|
-
from typing_extensions import dataclass_transform
|
|
10
|
+
from typing_extensions import Self, dataclass_transform
|
|
11
11
|
|
|
12
|
+
from chia.data_layer.data_layer_wallet import Mirror
|
|
13
|
+
from chia.data_layer.singleton_record import SingletonRecord
|
|
14
|
+
from chia.pools.pool_wallet_info import PoolWalletInfo
|
|
15
|
+
from chia.types.blockchain_format.program import Program
|
|
12
16
|
from chia.util.byte_types import hexstr_to_bytes
|
|
13
17
|
from chia.util.streamable import Streamable, streamable
|
|
14
18
|
from chia.wallet.conditions import Condition, ConditionValidTimes
|
|
19
|
+
from chia.wallet.nft_wallet.nft_info import NFTInfo
|
|
15
20
|
from chia.wallet.notification_store import Notification
|
|
16
21
|
from chia.wallet.signer_protocol import (
|
|
17
22
|
SignedTransaction,
|
|
@@ -28,15 +33,13 @@ from chia.wallet.util.tx_config import TXConfig
|
|
|
28
33
|
from chia.wallet.vc_wallet.vc_store import VCProofs, VCRecord
|
|
29
34
|
from chia.wallet.wallet_spend_bundle import WalletSpendBundle
|
|
30
35
|
|
|
31
|
-
_T_OfferEndpointResponse = TypeVar("_T_OfferEndpointResponse", bound="_OfferEndpointResponse")
|
|
32
|
-
|
|
33
36
|
|
|
34
37
|
@dataclass_transform(frozen_default=True, kw_only_default=True)
|
|
35
38
|
def kw_only_dataclass(cls: type[Any]) -> type[Any]:
|
|
36
|
-
if sys.version_info
|
|
37
|
-
return dataclass(frozen=True)(cls) # pragma: no cover
|
|
38
|
-
else:
|
|
39
|
+
if sys.version_info >= (3, 10):
|
|
39
40
|
return dataclass(frozen=True, kw_only=True)(cls)
|
|
41
|
+
else:
|
|
42
|
+
return dataclass(frozen=True)(cls) # pragma: no cover
|
|
40
43
|
|
|
41
44
|
|
|
42
45
|
def default_raise() -> Any: # pragma: no cover
|
|
@@ -287,6 +290,70 @@ class GetCATListResponse(Streamable):
|
|
|
287
290
|
cat_list: list[DefaultCAT]
|
|
288
291
|
|
|
289
292
|
|
|
293
|
+
@streamable
|
|
294
|
+
@dataclass(frozen=True)
|
|
295
|
+
class DIDSetWalletName(Streamable):
|
|
296
|
+
wallet_id: uint32
|
|
297
|
+
name: str
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
@streamable
|
|
301
|
+
@dataclass(frozen=True)
|
|
302
|
+
class DIDSetWalletNameResponse(Streamable):
|
|
303
|
+
wallet_id: uint32
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
@streamable
|
|
307
|
+
@dataclass(frozen=True)
|
|
308
|
+
class DIDGetWalletName(Streamable):
|
|
309
|
+
wallet_id: uint32
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
@streamable
|
|
313
|
+
@dataclass(frozen=True)
|
|
314
|
+
class DIDGetWalletNameResponse(Streamable):
|
|
315
|
+
wallet_id: uint32
|
|
316
|
+
name: str
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
@streamable
|
|
320
|
+
@dataclass(frozen=True)
|
|
321
|
+
class DIDGetInfo(Streamable):
|
|
322
|
+
coin_id: str
|
|
323
|
+
latest: bool = True
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
@streamable
|
|
327
|
+
@dataclass(frozen=True)
|
|
328
|
+
class DIDGetInfoResponse(Streamable):
|
|
329
|
+
did_id: str
|
|
330
|
+
latest_coin: bytes32
|
|
331
|
+
p2_address: str
|
|
332
|
+
public_key: bytes
|
|
333
|
+
recovery_list_hash: Optional[bytes32]
|
|
334
|
+
num_verification: uint16
|
|
335
|
+
metadata: dict[str, str]
|
|
336
|
+
launcher_id: bytes32
|
|
337
|
+
full_puzzle: Program
|
|
338
|
+
solution: Program
|
|
339
|
+
hints: list[bytes]
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
@streamable
|
|
343
|
+
@dataclass(frozen=True)
|
|
344
|
+
class DIDFindLostDID(Streamable):
|
|
345
|
+
coin_id: str
|
|
346
|
+
recovery_list_hash: Optional[bytes32] = None
|
|
347
|
+
num_verification: Optional[uint16] = None
|
|
348
|
+
metadata: Optional[dict[str, str]] = None
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
@streamable
|
|
352
|
+
@dataclass(frozen=True)
|
|
353
|
+
class DIDFindLostDIDResponse(Streamable):
|
|
354
|
+
latest_coin_id: bytes32
|
|
355
|
+
|
|
356
|
+
|
|
290
357
|
@streamable
|
|
291
358
|
@dataclass(frozen=True)
|
|
292
359
|
class DIDGetPubkey(Streamable):
|
|
@@ -311,8 +378,8 @@ class DIDGetRecoveryInfoResponse(Streamable):
|
|
|
311
378
|
wallet_id: uint32
|
|
312
379
|
my_did: str
|
|
313
380
|
coin_name: bytes32
|
|
314
|
-
newpuzhash: bytes32
|
|
315
|
-
pubkey: G1Element
|
|
381
|
+
newpuzhash: Optional[bytes32]
|
|
382
|
+
pubkey: Optional[G1Element]
|
|
316
383
|
backup_dids: list[bytes32]
|
|
317
384
|
|
|
318
385
|
|
|
@@ -332,6 +399,88 @@ class DIDGetCurrentCoinInfoResponse(Streamable):
|
|
|
332
399
|
did_amount: uint64
|
|
333
400
|
|
|
334
401
|
|
|
402
|
+
@streamable
|
|
403
|
+
@dataclass(frozen=True)
|
|
404
|
+
class DIDCreateBackupFile(Streamable):
|
|
405
|
+
wallet_id: uint32
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
@streamable
|
|
409
|
+
@dataclass(frozen=True)
|
|
410
|
+
class DIDCreateBackupFileResponse(Streamable):
|
|
411
|
+
wallet_id: uint32
|
|
412
|
+
backup_data: str
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
@streamable
|
|
416
|
+
@dataclass(frozen=True)
|
|
417
|
+
class DIDGetDID(Streamable):
|
|
418
|
+
wallet_id: uint32
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
@streamable
|
|
422
|
+
@dataclass(frozen=True)
|
|
423
|
+
class DIDGetDIDResponse(Streamable):
|
|
424
|
+
wallet_id: uint32
|
|
425
|
+
my_did: str
|
|
426
|
+
coin_id: Optional[bytes32] = None
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
@streamable
|
|
430
|
+
@dataclass(frozen=True)
|
|
431
|
+
class DIDGetRecoveryList(Streamable):
|
|
432
|
+
wallet_id: uint32
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
@streamable
|
|
436
|
+
@dataclass(frozen=True)
|
|
437
|
+
class DIDGetRecoveryListResponse(Streamable):
|
|
438
|
+
wallet_id: uint32
|
|
439
|
+
recovery_list: list[str]
|
|
440
|
+
num_required: uint16
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
@streamable
|
|
444
|
+
@dataclass(frozen=True)
|
|
445
|
+
class DIDGetMetadata(Streamable):
|
|
446
|
+
wallet_id: uint32
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
@streamable
|
|
450
|
+
@dataclass(frozen=True)
|
|
451
|
+
class DIDGetMetadataResponse(Streamable):
|
|
452
|
+
wallet_id: uint32
|
|
453
|
+
metadata: dict[str, str]
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
@streamable
|
|
457
|
+
@dataclass(frozen=True)
|
|
458
|
+
class NFTCountNFTs(Streamable):
|
|
459
|
+
wallet_id: Optional[uint32] = None
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
@streamable
|
|
463
|
+
@dataclass(frozen=True)
|
|
464
|
+
class NFTCountNFTsResponse(Streamable):
|
|
465
|
+
wallet_id: Optional[uint32]
|
|
466
|
+
count: uint64
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
@streamable
|
|
470
|
+
@dataclass(frozen=True)
|
|
471
|
+
class NFTGetNFTs(Streamable):
|
|
472
|
+
wallet_id: Optional[uint32] = None
|
|
473
|
+
start_index: uint32 = uint32(0)
|
|
474
|
+
num: uint32 = uint32(50)
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
@streamable
|
|
478
|
+
@dataclass(frozen=True)
|
|
479
|
+
class NFTGetNFTsResponse(Streamable):
|
|
480
|
+
wallet_id: Optional[uint32]
|
|
481
|
+
nft_list: list[NFTInfo]
|
|
482
|
+
|
|
483
|
+
|
|
335
484
|
@streamable
|
|
336
485
|
@dataclass(frozen=True)
|
|
337
486
|
class NFTGetByDID(Streamable):
|
|
@@ -344,6 +493,18 @@ class NFTGetByDIDResponse(Streamable):
|
|
|
344
493
|
wallet_id: uint32
|
|
345
494
|
|
|
346
495
|
|
|
496
|
+
@streamable
|
|
497
|
+
@dataclass(frozen=True)
|
|
498
|
+
class NFTGetWalletDID(Streamable):
|
|
499
|
+
wallet_id: uint32
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
@streamable
|
|
503
|
+
@dataclass(frozen=True)
|
|
504
|
+
class NFTGetWalletDIDResponse(Streamable):
|
|
505
|
+
did_id: Optional[str]
|
|
506
|
+
|
|
507
|
+
|
|
347
508
|
@streamable
|
|
348
509
|
@dataclass(frozen=True)
|
|
349
510
|
class NFTSetNFTStatus(Streamable):
|
|
@@ -367,6 +528,103 @@ class NFTGetWalletsWithDIDsResponse(Streamable):
|
|
|
367
528
|
nft_wallets: list[NFTWalletWithDID]
|
|
368
529
|
|
|
369
530
|
|
|
531
|
+
@streamable
|
|
532
|
+
@dataclass(frozen=True)
|
|
533
|
+
class NFTGetInfo(Streamable):
|
|
534
|
+
coin_id: str
|
|
535
|
+
latest: bool = True
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
@streamable
|
|
539
|
+
@dataclass(frozen=True)
|
|
540
|
+
class NFTGetInfoResponse(Streamable):
|
|
541
|
+
nft_info: NFTInfo
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
# utility for NFTCalculateRoyalties
|
|
545
|
+
@streamable
|
|
546
|
+
@dataclass(frozen=True)
|
|
547
|
+
class RoyaltyAsset(Streamable):
|
|
548
|
+
asset: str
|
|
549
|
+
royalty_address: str
|
|
550
|
+
royalty_percentage: uint16
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
# utility for NFTCalculateRoyalties
|
|
554
|
+
@streamable
|
|
555
|
+
@dataclass(frozen=True)
|
|
556
|
+
class FungibleAsset(Streamable):
|
|
557
|
+
asset: Optional[str]
|
|
558
|
+
amount: uint64
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
@streamable
|
|
562
|
+
@dataclass(frozen=True)
|
|
563
|
+
class NFTCalculateRoyalties(Streamable):
|
|
564
|
+
royalty_assets: list[RoyaltyAsset] = field(default_factory=list)
|
|
565
|
+
fungible_assets: list[FungibleAsset] = field(default_factory=list)
|
|
566
|
+
|
|
567
|
+
def __post_init__(self) -> None:
|
|
568
|
+
if len(set(a.asset for a in self.royalty_assets)) != len(self.royalty_assets):
|
|
569
|
+
raise ValueError("Multiple royalty assets with same name specified")
|
|
570
|
+
if len(set(a.asset for a in self.fungible_assets)) != len(self.fungible_assets):
|
|
571
|
+
raise ValueError("Multiple fungible assets with same name specified")
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
# utility for NFTCalculateRoyaltiesResponse
|
|
575
|
+
@streamable
|
|
576
|
+
@dataclass(frozen=True)
|
|
577
|
+
class RoyaltySummary(Streamable):
|
|
578
|
+
royalty_asset: str
|
|
579
|
+
fungible_asset: Optional[str]
|
|
580
|
+
royalty_address: str
|
|
581
|
+
royalty_amount: uint64
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
@streamable
|
|
585
|
+
@dataclass(frozen=True)
|
|
586
|
+
class NFTCalculateRoyaltiesResponse(Streamable):
|
|
587
|
+
nft_info: list[RoyaltySummary]
|
|
588
|
+
|
|
589
|
+
# old response is a dict with arbitrary keys so we must override serialization for backwards compatibility
|
|
590
|
+
def to_json_dict(self) -> dict[str, Any]:
|
|
591
|
+
summary_dict: dict[str, Any] = {}
|
|
592
|
+
for info in self.nft_info:
|
|
593
|
+
summary_dict.setdefault(info.royalty_asset, [])
|
|
594
|
+
summary_dict[info.royalty_asset].append(
|
|
595
|
+
{
|
|
596
|
+
"asset": info.fungible_asset,
|
|
597
|
+
"address": info.royalty_address,
|
|
598
|
+
"amount": info.royalty_amount,
|
|
599
|
+
}
|
|
600
|
+
)
|
|
601
|
+
|
|
602
|
+
return summary_dict
|
|
603
|
+
|
|
604
|
+
@classmethod
|
|
605
|
+
def from_json_dict(cls, json_dict: dict[str, Any]) -> NFTCalculateRoyaltiesResponse:
|
|
606
|
+
# There's some awkwardness here because the canonical format of this response
|
|
607
|
+
# returns all of the asset information on the same level as the "success"
|
|
608
|
+
# key that gets automatically returned by the RPC
|
|
609
|
+
#
|
|
610
|
+
# This is an unfortunate design choice, but one we must preserve for
|
|
611
|
+
# backwards compatibility. This means the code below has some logic it
|
|
612
|
+
# probably shouldn't have ignoring "assets" named "success".
|
|
613
|
+
return cls(
|
|
614
|
+
[
|
|
615
|
+
RoyaltySummary(
|
|
616
|
+
royalty_asset,
|
|
617
|
+
summary["asset"],
|
|
618
|
+
summary["address"],
|
|
619
|
+
uint64(summary["amount"]),
|
|
620
|
+
)
|
|
621
|
+
for royalty_asset, summaries in json_dict.items()
|
|
622
|
+
if royalty_asset != "success"
|
|
623
|
+
for summary in summaries
|
|
624
|
+
]
|
|
625
|
+
)
|
|
626
|
+
|
|
627
|
+
|
|
370
628
|
# utility for NFTSetDIDBulk
|
|
371
629
|
@streamable
|
|
372
630
|
@dataclass(frozen=True)
|
|
@@ -375,6 +633,92 @@ class NFTCoin(Streamable):
|
|
|
375
633
|
wallet_id: uint32
|
|
376
634
|
|
|
377
635
|
|
|
636
|
+
@streamable
|
|
637
|
+
@dataclass(frozen=True)
|
|
638
|
+
class PWStatus(Streamable):
|
|
639
|
+
wallet_id: uint32
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
@streamable
|
|
643
|
+
@dataclass(frozen=True)
|
|
644
|
+
class PWStatusResponse(Streamable):
|
|
645
|
+
state: PoolWalletInfo
|
|
646
|
+
unconfirmed_transactions: list[TransactionRecord]
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
@streamable
|
|
650
|
+
@dataclass(frozen=True)
|
|
651
|
+
class DLTrackNew(Streamable):
|
|
652
|
+
launcher_id: bytes32
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
@streamable
|
|
656
|
+
@dataclass(frozen=True)
|
|
657
|
+
class DLStopTracking(Streamable):
|
|
658
|
+
launcher_id: bytes32
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
@streamable
|
|
662
|
+
@dataclass(frozen=True)
|
|
663
|
+
class DLLatestSingleton(Streamable):
|
|
664
|
+
launcher_id: bytes32
|
|
665
|
+
only_confirmed: bool = False
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
@streamable
|
|
669
|
+
@dataclass(frozen=True)
|
|
670
|
+
class DLLatestSingletonResponse(Streamable):
|
|
671
|
+
singleton: Optional[SingletonRecord]
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
@streamable
|
|
675
|
+
@dataclass(frozen=True)
|
|
676
|
+
class DLSingletonsByRoot(Streamable):
|
|
677
|
+
launcher_id: bytes32
|
|
678
|
+
root: bytes32
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
@streamable
|
|
682
|
+
@dataclass(frozen=True)
|
|
683
|
+
class DLSingletonsByRootResponse(Streamable):
|
|
684
|
+
singletons: list[SingletonRecord]
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
@streamable
|
|
688
|
+
@dataclass(frozen=True)
|
|
689
|
+
class DLHistory(Streamable):
|
|
690
|
+
launcher_id: bytes32
|
|
691
|
+
min_generation: Optional[uint32] = None
|
|
692
|
+
max_generation: Optional[uint32] = None
|
|
693
|
+
num_results: Optional[uint32] = None
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
@streamable
|
|
697
|
+
@dataclass(frozen=True)
|
|
698
|
+
class DLHistoryResponse(Streamable):
|
|
699
|
+
history: list[SingletonRecord]
|
|
700
|
+
count: uint32
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
@streamable
|
|
704
|
+
@dataclass(frozen=True)
|
|
705
|
+
class DLOwnedSingletonsResponse(Streamable):
|
|
706
|
+
singletons: list[SingletonRecord]
|
|
707
|
+
count: uint32
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
@streamable
|
|
711
|
+
@dataclass(frozen=True)
|
|
712
|
+
class DLGetMirrors(Streamable):
|
|
713
|
+
launcher_id: bytes32
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
@streamable
|
|
717
|
+
@dataclass(frozen=True)
|
|
718
|
+
class DLGetMirrorsResponse(Streamable):
|
|
719
|
+
mirrors: list[Mirror]
|
|
720
|
+
|
|
721
|
+
|
|
378
722
|
@streamable
|
|
379
723
|
@dataclass(frozen=True)
|
|
380
724
|
class VCGet(Streamable):
|
|
@@ -404,13 +748,10 @@ class VCProofsRPC(Streamable):
|
|
|
404
748
|
return VCProofs({key: value for key, value in self.key_value_pairs})
|
|
405
749
|
|
|
406
750
|
@classmethod
|
|
407
|
-
def from_vc_proofs(cls
|
|
751
|
+
def from_vc_proofs(cls, vc_proofs: VCProofs) -> Self:
|
|
408
752
|
return cls([(key, value) for key, value in vc_proofs.key_value_pairs.items()])
|
|
409
753
|
|
|
410
754
|
|
|
411
|
-
_T_VCProofsRPC = TypeVar("_T_VCProofsRPC", bound=VCProofsRPC)
|
|
412
|
-
|
|
413
|
-
|
|
414
755
|
# utility for VCGetListResponse
|
|
415
756
|
@streamable
|
|
416
757
|
@dataclass(frozen=True)
|
|
@@ -471,13 +812,10 @@ class VCAddProofs(VCProofsRPC):
|
|
|
471
812
|
return {"proofs": self.to_vc_proofs().key_value_pairs}
|
|
472
813
|
|
|
473
814
|
@classmethod
|
|
474
|
-
def from_json_dict(cls
|
|
815
|
+
def from_json_dict(cls, json_dict: dict[str, Any]) -> Self:
|
|
475
816
|
return cls([(key, value) for key, value in json_dict["proofs"].items()])
|
|
476
817
|
|
|
477
818
|
|
|
478
|
-
_T_VCAddProofs = TypeVar("_T_VCAddProofs", bound=VCAddProofs)
|
|
479
|
-
|
|
480
|
-
|
|
481
819
|
@streamable
|
|
482
820
|
@dataclass(frozen=True)
|
|
483
821
|
class VCGetProofsForRoot(Streamable):
|
|
@@ -638,6 +976,104 @@ class CombineCoinsResponse(TransactionEndpointResponse):
|
|
|
638
976
|
pass
|
|
639
977
|
|
|
640
978
|
|
|
979
|
+
@streamable
|
|
980
|
+
@kw_only_dataclass
|
|
981
|
+
class DIDUpdateRecoveryIDs(TransactionEndpointRequest):
|
|
982
|
+
wallet_id: uint32 = field(default_factory=default_raise)
|
|
983
|
+
new_list: list[str] = field(default_factory=default_raise)
|
|
984
|
+
num_verifications_required: Optional[uint64] = None
|
|
985
|
+
|
|
986
|
+
|
|
987
|
+
@streamable
|
|
988
|
+
@dataclass(frozen=True)
|
|
989
|
+
class DIDUpdateRecoveryIDsResponse(TransactionEndpointResponse):
|
|
990
|
+
pass
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
@streamable
|
|
994
|
+
@kw_only_dataclass
|
|
995
|
+
class DIDMessageSpend(TransactionEndpointRequest):
|
|
996
|
+
wallet_id: uint32 = field(default_factory=default_raise)
|
|
997
|
+
coin_announcements: list[bytes] = field(default_factory=list)
|
|
998
|
+
puzzle_announcements: list[bytes] = field(default_factory=list)
|
|
999
|
+
|
|
1000
|
+
|
|
1001
|
+
@streamable
|
|
1002
|
+
@dataclass(frozen=True)
|
|
1003
|
+
class DIDMessageSpendResponse(TransactionEndpointResponse):
|
|
1004
|
+
spend_bundle: WalletSpendBundle
|
|
1005
|
+
|
|
1006
|
+
|
|
1007
|
+
@streamable
|
|
1008
|
+
@kw_only_dataclass
|
|
1009
|
+
class DIDUpdateMetadata(TransactionEndpointRequest):
|
|
1010
|
+
wallet_id: uint32 = field(default_factory=default_raise)
|
|
1011
|
+
metadata: dict[str, str] = field(default_factory=dict)
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
@streamable
|
|
1015
|
+
@dataclass(frozen=True)
|
|
1016
|
+
class DIDUpdateMetadataResponse(TransactionEndpointResponse):
|
|
1017
|
+
spend_bundle: WalletSpendBundle
|
|
1018
|
+
wallet_id: uint32
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
@streamable
|
|
1022
|
+
@kw_only_dataclass
|
|
1023
|
+
class DIDTransferDID(TransactionEndpointRequest):
|
|
1024
|
+
wallet_id: uint32 = field(default_factory=default_raise)
|
|
1025
|
+
inner_address: str = field(default_factory=default_raise)
|
|
1026
|
+
with_recovery_info: bool = True
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
@streamable
|
|
1030
|
+
@dataclass(frozen=True)
|
|
1031
|
+
class DIDTransferDIDResponse(TransactionEndpointResponse):
|
|
1032
|
+
transaction: TransactionRecord
|
|
1033
|
+
transaction_id: bytes32
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
@streamable
|
|
1037
|
+
@kw_only_dataclass
|
|
1038
|
+
class NFTMintNFTRequest(TransactionEndpointRequest):
|
|
1039
|
+
wallet_id: uint32 = field(default_factory=default_raise)
|
|
1040
|
+
royalty_address: Optional[str] = field(default_factory=default_raise)
|
|
1041
|
+
target_address: Optional[str] = field(default_factory=default_raise)
|
|
1042
|
+
uris: list[str] = field(default_factory=default_raise)
|
|
1043
|
+
hash: bytes32 = field(default_factory=default_raise)
|
|
1044
|
+
royalty_amount: uint16 = uint16(0)
|
|
1045
|
+
meta_uris: list[str] = field(default_factory=list)
|
|
1046
|
+
license_uris: list[str] = field(default_factory=list)
|
|
1047
|
+
edition_number: uint64 = uint64(1)
|
|
1048
|
+
edition_total: uint64 = uint64(1)
|
|
1049
|
+
meta_hash: Optional[bytes32] = None
|
|
1050
|
+
license_hash: Optional[bytes32] = None
|
|
1051
|
+
did_id: Optional[str] = None
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
@streamable
|
|
1055
|
+
@dataclass(frozen=True)
|
|
1056
|
+
class NFTMintNFTResponse(TransactionEndpointResponse):
|
|
1057
|
+
wallet_id: uint32
|
|
1058
|
+
spend_bundle: WalletSpendBundle
|
|
1059
|
+
nft_id: str
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
@streamable
|
|
1063
|
+
@kw_only_dataclass
|
|
1064
|
+
class NFTSetNFTDID(TransactionEndpointRequest):
|
|
1065
|
+
wallet_id: uint32 = field(default_factory=default_raise)
|
|
1066
|
+
nft_coin_id: bytes32 = field(default_factory=default_raise)
|
|
1067
|
+
did_id: Optional[str] = None
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
@streamable
|
|
1071
|
+
@dataclass(frozen=True)
|
|
1072
|
+
class NFTSetNFTDIDResponse(TransactionEndpointResponse):
|
|
1073
|
+
wallet_id: uint32
|
|
1074
|
+
spend_bundle: WalletSpendBundle
|
|
1075
|
+
|
|
1076
|
+
|
|
641
1077
|
@streamable
|
|
642
1078
|
@kw_only_dataclass
|
|
643
1079
|
class NFTSetDIDBulk(TransactionEndpointRequest):
|
|
@@ -668,6 +1104,221 @@ class NFTTransferBulkResponse(TransactionEndpointResponse):
|
|
|
668
1104
|
spend_bundle: WalletSpendBundle
|
|
669
1105
|
|
|
670
1106
|
|
|
1107
|
+
@streamable
|
|
1108
|
+
@kw_only_dataclass
|
|
1109
|
+
class CreateNewDL(TransactionEndpointRequest):
|
|
1110
|
+
root: bytes32 = field(default_factory=default_raise)
|
|
1111
|
+
|
|
1112
|
+
|
|
1113
|
+
@streamable
|
|
1114
|
+
@dataclass(frozen=True)
|
|
1115
|
+
class CreateNewDLResponse(TransactionEndpointResponse):
|
|
1116
|
+
launcher_id: bytes32
|
|
1117
|
+
|
|
1118
|
+
|
|
1119
|
+
@streamable
|
|
1120
|
+
@kw_only_dataclass
|
|
1121
|
+
class DLUpdateRoot(TransactionEndpointRequest):
|
|
1122
|
+
launcher_id: bytes32 = field(default_factory=default_raise)
|
|
1123
|
+
new_root: bytes32 = field(default_factory=default_raise)
|
|
1124
|
+
|
|
1125
|
+
|
|
1126
|
+
@streamable
|
|
1127
|
+
@dataclass(frozen=True)
|
|
1128
|
+
class DLUpdateRootResponse(TransactionEndpointResponse):
|
|
1129
|
+
tx_record: TransactionRecord
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
# utilities for DLUpdateMultiple
|
|
1133
|
+
@streamable
|
|
1134
|
+
@dataclass(frozen=True)
|
|
1135
|
+
class LauncherRootPair(Streamable):
|
|
1136
|
+
launcher_id: bytes32
|
|
1137
|
+
new_root: bytes32
|
|
1138
|
+
|
|
1139
|
+
|
|
1140
|
+
@streamable
|
|
1141
|
+
@dataclass(frozen=True)
|
|
1142
|
+
class DLUpdateMultipleUpdates(Streamable):
|
|
1143
|
+
launcher_root_pairs: list[LauncherRootPair]
|
|
1144
|
+
|
|
1145
|
+
def __post_init__(self) -> None:
|
|
1146
|
+
if len(set(pair.launcher_id for pair in self.launcher_root_pairs)) < len(self.launcher_root_pairs):
|
|
1147
|
+
raise ValueError("Multiple updates specified for a single launcher in `DLUpdateMultiple`")
|
|
1148
|
+
|
|
1149
|
+
# TODO: deprecate the kinda silly format of this RPC and delete this function
|
|
1150
|
+
@classmethod
|
|
1151
|
+
def from_json_dict(cls, json_dict: dict[str, Any]) -> Self:
|
|
1152
|
+
return cls(
|
|
1153
|
+
[
|
|
1154
|
+
LauncherRootPair(
|
|
1155
|
+
bytes32.from_hexstr(key),
|
|
1156
|
+
bytes32.from_hexstr(value),
|
|
1157
|
+
)
|
|
1158
|
+
for key, value in json_dict.items()
|
|
1159
|
+
]
|
|
1160
|
+
)
|
|
1161
|
+
|
|
1162
|
+
|
|
1163
|
+
@streamable
|
|
1164
|
+
@kw_only_dataclass
|
|
1165
|
+
class DLUpdateMultiple(TransactionEndpointRequest):
|
|
1166
|
+
updates: DLUpdateMultipleUpdates = field(default_factory=default_raise)
|
|
1167
|
+
|
|
1168
|
+
# TODO: deprecate the kinda silly format of this RPC and delete this function
|
|
1169
|
+
def to_json_dict(self, _avoid_ban: bool = False) -> dict[str, Any]:
|
|
1170
|
+
return {"updates": {pair.launcher_id.hex(): pair.new_root.hex() for pair in self.updates.launcher_root_pairs}}
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
@streamable
|
|
1174
|
+
@dataclass(frozen=True)
|
|
1175
|
+
class DLUpdateMultipleResponse(TransactionEndpointResponse):
|
|
1176
|
+
pass
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
@streamable
|
|
1180
|
+
@kw_only_dataclass
|
|
1181
|
+
class DLNewMirror(TransactionEndpointRequest):
|
|
1182
|
+
launcher_id: bytes32 = field(default_factory=default_raise)
|
|
1183
|
+
amount: uint64 = field(default_factory=default_raise)
|
|
1184
|
+
urls: list[str] = field(default_factory=default_raise)
|
|
1185
|
+
|
|
1186
|
+
|
|
1187
|
+
@streamable
|
|
1188
|
+
@dataclass(frozen=True)
|
|
1189
|
+
class DLNewMirrorResponse(TransactionEndpointResponse):
|
|
1190
|
+
pass
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
@streamable
|
|
1194
|
+
@kw_only_dataclass
|
|
1195
|
+
class DLDeleteMirror(TransactionEndpointRequest):
|
|
1196
|
+
coin_id: bytes32 = field(default_factory=default_raise)
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
@streamable
|
|
1200
|
+
@dataclass(frozen=True)
|
|
1201
|
+
class DLDeleteMirrorResponse(TransactionEndpointResponse):
|
|
1202
|
+
pass
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
@streamable
|
|
1206
|
+
@dataclass(frozen=True)
|
|
1207
|
+
class NFTTransferNFT(TransactionEndpointRequest):
|
|
1208
|
+
wallet_id: uint32 = field(default_factory=default_raise)
|
|
1209
|
+
target_address: str = field(default_factory=default_raise)
|
|
1210
|
+
nft_coin_id: str = field(default_factory=default_raise)
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
@streamable
|
|
1214
|
+
@dataclass(frozen=True)
|
|
1215
|
+
class NFTTransferNFTResponse(TransactionEndpointResponse):
|
|
1216
|
+
wallet_id: uint32
|
|
1217
|
+
spend_bundle: WalletSpendBundle
|
|
1218
|
+
|
|
1219
|
+
|
|
1220
|
+
@streamable
|
|
1221
|
+
@dataclass(frozen=True)
|
|
1222
|
+
class NFTAddURI(TransactionEndpointRequest):
|
|
1223
|
+
wallet_id: uint32 = field(default_factory=default_raise)
|
|
1224
|
+
uri: str = field(default_factory=default_raise)
|
|
1225
|
+
key: str = field(default_factory=default_raise)
|
|
1226
|
+
nft_coin_id: str = field(default_factory=default_raise)
|
|
1227
|
+
|
|
1228
|
+
|
|
1229
|
+
@streamable
|
|
1230
|
+
@dataclass(frozen=True)
|
|
1231
|
+
class NFTAddURIResponse(TransactionEndpointResponse):
|
|
1232
|
+
wallet_id: uint32
|
|
1233
|
+
spend_bundle: WalletSpendBundle
|
|
1234
|
+
|
|
1235
|
+
|
|
1236
|
+
# utility for NFTBulkMint
|
|
1237
|
+
@streamable
|
|
1238
|
+
@dataclass(frozen=True)
|
|
1239
|
+
class NFTMintMetadata(Streamable):
|
|
1240
|
+
uris: list[str]
|
|
1241
|
+
hash: bytes32
|
|
1242
|
+
meta_uris: list[str] = field(default_factory=list)
|
|
1243
|
+
license_uris: list[str] = field(default_factory=list)
|
|
1244
|
+
edition_number: uint64 = uint64(1)
|
|
1245
|
+
edition_total: uint64 = uint64(1)
|
|
1246
|
+
meta_hash: Optional[bytes32] = None
|
|
1247
|
+
license_hash: Optional[bytes32] = None
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
@streamable
|
|
1251
|
+
@dataclass(frozen=True)
|
|
1252
|
+
class NFTMintBulk(TransactionEndpointRequest):
|
|
1253
|
+
wallet_id: uint32 = field(default_factory=default_raise)
|
|
1254
|
+
metadata_list: list[NFTMintMetadata] = field(default_factory=default_raise)
|
|
1255
|
+
royalty_address: Optional[str] = None
|
|
1256
|
+
royalty_percentage: Optional[uint16] = None
|
|
1257
|
+
target_list: list[str] = field(default_factory=list)
|
|
1258
|
+
mint_number_start: uint16 = uint16(1)
|
|
1259
|
+
mint_total: Optional[uint16] = None
|
|
1260
|
+
xch_coins: Optional[list[Coin]] = None
|
|
1261
|
+
xch_change_target: Optional[str] = None
|
|
1262
|
+
new_innerpuzhash: Optional[bytes32] = None
|
|
1263
|
+
new_p2_puzhash: Optional[bytes32] = None
|
|
1264
|
+
did_coin: Optional[Coin] = None
|
|
1265
|
+
did_lineage_parent: Optional[bytes32] = None
|
|
1266
|
+
mint_from_did: bool = False
|
|
1267
|
+
|
|
1268
|
+
|
|
1269
|
+
@streamable
|
|
1270
|
+
@dataclass(frozen=True)
|
|
1271
|
+
class NFTMintBulkResponse(TransactionEndpointResponse):
|
|
1272
|
+
spend_bundle: WalletSpendBundle
|
|
1273
|
+
nft_id_list: list[str]
|
|
1274
|
+
|
|
1275
|
+
|
|
1276
|
+
@streamable
|
|
1277
|
+
@dataclass(frozen=True)
|
|
1278
|
+
class PWJoinPool(TransactionEndpointRequest):
|
|
1279
|
+
wallet_id: uint32 = field(default_factory=default_raise)
|
|
1280
|
+
pool_url: str = field(default_factory=default_raise)
|
|
1281
|
+
target_puzzlehash: bytes32 = field(default_factory=default_raise)
|
|
1282
|
+
relative_lock_height: uint32 = field(default_factory=default_raise)
|
|
1283
|
+
|
|
1284
|
+
|
|
1285
|
+
@streamable
|
|
1286
|
+
@dataclass(frozen=True)
|
|
1287
|
+
class PWJoinPoolResponse(TransactionEndpointResponse):
|
|
1288
|
+
total_fee: uint64
|
|
1289
|
+
transaction: TransactionRecord
|
|
1290
|
+
fee_transaction: Optional[TransactionRecord]
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
@streamable
|
|
1294
|
+
@dataclass(frozen=True)
|
|
1295
|
+
class PWSelfPool(TransactionEndpointRequest):
|
|
1296
|
+
wallet_id: uint32 = field(default_factory=default_raise)
|
|
1297
|
+
|
|
1298
|
+
|
|
1299
|
+
@streamable
|
|
1300
|
+
@dataclass(frozen=True)
|
|
1301
|
+
class PWSelfPoolResponse(TransactionEndpointResponse):
|
|
1302
|
+
total_fee: uint64
|
|
1303
|
+
transaction: TransactionRecord
|
|
1304
|
+
fee_transaction: Optional[TransactionRecord]
|
|
1305
|
+
|
|
1306
|
+
|
|
1307
|
+
@streamable
|
|
1308
|
+
@dataclass(frozen=True)
|
|
1309
|
+
class PWAbsorbRewards(TransactionEndpointRequest):
|
|
1310
|
+
wallet_id: uint32 = field(default_factory=default_raise)
|
|
1311
|
+
max_spends_in_tx: Optional[uint16] = None
|
|
1312
|
+
|
|
1313
|
+
|
|
1314
|
+
@streamable
|
|
1315
|
+
@dataclass(frozen=True)
|
|
1316
|
+
class PWAbsorbRewardsResponse(TransactionEndpointResponse):
|
|
1317
|
+
state: PoolWalletInfo
|
|
1318
|
+
transaction: TransactionRecord
|
|
1319
|
+
fee_transaction: Optional[TransactionRecord]
|
|
1320
|
+
|
|
1321
|
+
|
|
671
1322
|
@streamable
|
|
672
1323
|
@dataclass(frozen=True)
|
|
673
1324
|
class VCMint(TransactionEndpointRequest):
|
|
@@ -731,32 +1382,6 @@ class CreateSignedTransactionsResponse(TransactionEndpointResponse):
|
|
|
731
1382
|
signed_tx: TransactionRecord
|
|
732
1383
|
|
|
733
1384
|
|
|
734
|
-
@streamable
|
|
735
|
-
@dataclass(frozen=True)
|
|
736
|
-
class DIDUpdateRecoveryIDsResponse(TransactionEndpointResponse):
|
|
737
|
-
pass
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
@streamable
|
|
741
|
-
@dataclass(frozen=True)
|
|
742
|
-
class DIDMessageSpendResponse(TransactionEndpointResponse):
|
|
743
|
-
spend_bundle: WalletSpendBundle
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
@streamable
|
|
747
|
-
@dataclass(frozen=True)
|
|
748
|
-
class DIDUpdateMetadataResponse(TransactionEndpointResponse):
|
|
749
|
-
spend_bundle: WalletSpendBundle
|
|
750
|
-
wallet_id: uint32
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
@streamable
|
|
754
|
-
@dataclass(frozen=True)
|
|
755
|
-
class DIDTransferDIDResponse(TransactionEndpointResponse):
|
|
756
|
-
transaction: TransactionRecord
|
|
757
|
-
transaction_id: bytes32
|
|
758
|
-
|
|
759
|
-
|
|
760
1385
|
@streamable
|
|
761
1386
|
@dataclass(frozen=True)
|
|
762
1387
|
class CATSpendResponse(TransactionEndpointResponse):
|
|
@@ -771,7 +1396,7 @@ class _OfferEndpointResponse(TransactionEndpointResponse):
|
|
|
771
1396
|
trade_record: TradeRecord
|
|
772
1397
|
|
|
773
1398
|
@classmethod
|
|
774
|
-
def from_json_dict(cls
|
|
1399
|
+
def from_json_dict(cls, json_dict: dict[str, Any]) -> Self:
|
|
775
1400
|
tx_endpoint: TransactionEndpointResponse = json_deserialize_with_clvm_streamable(
|
|
776
1401
|
json_dict, TransactionEndpointResponse
|
|
777
1402
|
)
|
|
@@ -806,39 +1431,3 @@ class CancelOfferResponse(TransactionEndpointResponse):
|
|
|
806
1431
|
@dataclass(frozen=True)
|
|
807
1432
|
class CancelOffersResponse(TransactionEndpointResponse):
|
|
808
1433
|
pass
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
@streamable
|
|
812
|
-
@dataclass(frozen=True)
|
|
813
|
-
class NFTMintNFTResponse(TransactionEndpointResponse):
|
|
814
|
-
wallet_id: uint32
|
|
815
|
-
spend_bundle: WalletSpendBundle
|
|
816
|
-
nft_id: str
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
@streamable
|
|
820
|
-
@dataclass(frozen=True)
|
|
821
|
-
class NFTAddURIResponse(TransactionEndpointResponse):
|
|
822
|
-
wallet_id: uint32
|
|
823
|
-
spend_bundle: WalletSpendBundle
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
@streamable
|
|
827
|
-
@dataclass(frozen=True)
|
|
828
|
-
class NFTTransferNFTResponse(TransactionEndpointResponse):
|
|
829
|
-
wallet_id: uint32
|
|
830
|
-
spend_bundle: WalletSpendBundle
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
@streamable
|
|
834
|
-
@dataclass(frozen=True)
|
|
835
|
-
class NFTSetNFTDIDResponse(TransactionEndpointResponse):
|
|
836
|
-
wallet_id: uint32
|
|
837
|
-
spend_bundle: WalletSpendBundle
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
@streamable
|
|
841
|
-
@dataclass(frozen=True)
|
|
842
|
-
class NFTMintBulkResponse(TransactionEndpointResponse):
|
|
843
|
-
spend_bundle: WalletSpendBundle
|
|
844
|
-
nft_id_list: list[str]
|