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
|
@@ -4,14 +4,25 @@ from collections.abc import Sequence
|
|
|
4
4
|
from typing import Any, Optional, Union, cast
|
|
5
5
|
|
|
6
6
|
from chia_rs.sized_bytes import bytes32
|
|
7
|
-
from chia_rs.sized_ints import
|
|
7
|
+
from chia_rs.sized_ints import uint32, uint64
|
|
8
8
|
|
|
9
9
|
from chia.data_layer.data_layer_util import DLProof, VerifyProofResponse
|
|
10
|
-
from chia.data_layer.data_layer_wallet import Mirror
|
|
11
|
-
from chia.data_layer.singleton_record import SingletonRecord
|
|
12
|
-
from chia.pools.pool_wallet_info import PoolWalletInfo
|
|
13
10
|
from chia.rpc.rpc_client import RpcClient
|
|
14
|
-
from chia.
|
|
11
|
+
from chia.types.blockchain_format.coin import Coin
|
|
12
|
+
from chia.types.blockchain_format.program import Program
|
|
13
|
+
from chia.types.coin_record import CoinRecord
|
|
14
|
+
from chia.wallet.conditions import Condition, ConditionValidTimes, conditions_to_json_dicts
|
|
15
|
+
from chia.wallet.puzzles.clawback.metadata import AutoClaimSettings
|
|
16
|
+
from chia.wallet.trade_record import TradeRecord
|
|
17
|
+
from chia.wallet.trading.offer import Offer
|
|
18
|
+
from chia.wallet.transaction_record import TransactionRecord
|
|
19
|
+
from chia.wallet.transaction_sorting import SortKey
|
|
20
|
+
from chia.wallet.util.clvm_streamable import json_deserialize_with_clvm_streamable
|
|
21
|
+
from chia.wallet.util.query_filter import TransactionTypeFilter
|
|
22
|
+
from chia.wallet.util.tx_config import CoinSelectionConfig, TXConfig
|
|
23
|
+
from chia.wallet.util.wallet_types import WalletType
|
|
24
|
+
from chia.wallet.wallet_coin_store import GetCoinRecords
|
|
25
|
+
from chia.wallet.wallet_request_types import (
|
|
15
26
|
AddKey,
|
|
16
27
|
AddKeyResponse,
|
|
17
28
|
ApplySignatures,
|
|
@@ -23,19 +34,60 @@ from chia.rpc.wallet_request_types import (
|
|
|
23
34
|
CheckDeleteKeyResponse,
|
|
24
35
|
CombineCoins,
|
|
25
36
|
CombineCoinsResponse,
|
|
37
|
+
CreateNewDL,
|
|
38
|
+
CreateNewDLResponse,
|
|
26
39
|
CreateOfferForIDsResponse,
|
|
27
40
|
CreateSignedTransactionsResponse,
|
|
28
41
|
DeleteKey,
|
|
42
|
+
DIDCreateBackupFile,
|
|
43
|
+
DIDCreateBackupFileResponse,
|
|
44
|
+
DIDFindLostDID,
|
|
45
|
+
DIDFindLostDIDResponse,
|
|
29
46
|
DIDGetCurrentCoinInfo,
|
|
30
47
|
DIDGetCurrentCoinInfoResponse,
|
|
48
|
+
DIDGetDID,
|
|
49
|
+
DIDGetDIDResponse,
|
|
50
|
+
DIDGetInfo,
|
|
51
|
+
DIDGetInfoResponse,
|
|
52
|
+
DIDGetMetadata,
|
|
53
|
+
DIDGetMetadataResponse,
|
|
31
54
|
DIDGetPubkey,
|
|
32
55
|
DIDGetPubkeyResponse,
|
|
33
56
|
DIDGetRecoveryInfo,
|
|
34
57
|
DIDGetRecoveryInfoResponse,
|
|
58
|
+
DIDGetRecoveryList,
|
|
59
|
+
DIDGetRecoveryListResponse,
|
|
60
|
+
DIDGetWalletName,
|
|
61
|
+
DIDGetWalletNameResponse,
|
|
62
|
+
DIDMessageSpend,
|
|
35
63
|
DIDMessageSpendResponse,
|
|
64
|
+
DIDSetWalletName,
|
|
65
|
+
DIDSetWalletNameResponse,
|
|
66
|
+
DIDTransferDID,
|
|
36
67
|
DIDTransferDIDResponse,
|
|
68
|
+
DIDUpdateMetadata,
|
|
37
69
|
DIDUpdateMetadataResponse,
|
|
70
|
+
DIDUpdateRecoveryIDs,
|
|
38
71
|
DIDUpdateRecoveryIDsResponse,
|
|
72
|
+
DLDeleteMirror,
|
|
73
|
+
DLDeleteMirrorResponse,
|
|
74
|
+
DLGetMirrors,
|
|
75
|
+
DLGetMirrorsResponse,
|
|
76
|
+
DLHistory,
|
|
77
|
+
DLHistoryResponse,
|
|
78
|
+
DLLatestSingleton,
|
|
79
|
+
DLLatestSingletonResponse,
|
|
80
|
+
DLNewMirror,
|
|
81
|
+
DLNewMirrorResponse,
|
|
82
|
+
DLOwnedSingletonsResponse,
|
|
83
|
+
DLSingletonsByRoot,
|
|
84
|
+
DLSingletonsByRootResponse,
|
|
85
|
+
DLStopTracking,
|
|
86
|
+
DLTrackNew,
|
|
87
|
+
DLUpdateMultiple,
|
|
88
|
+
DLUpdateMultipleResponse,
|
|
89
|
+
DLUpdateRoot,
|
|
90
|
+
DLUpdateRootResponse,
|
|
39
91
|
ExecuteSigningInstructions,
|
|
40
92
|
ExecuteSigningInstructionsResponse,
|
|
41
93
|
GatherSigningInfo,
|
|
@@ -57,22 +109,45 @@ from chia.rpc.wallet_request_types import (
|
|
|
57
109
|
GetTransactionMemoResponse,
|
|
58
110
|
LogIn,
|
|
59
111
|
LogInResponse,
|
|
112
|
+
NFTAddURI,
|
|
60
113
|
NFTAddURIResponse,
|
|
114
|
+
NFTCalculateRoyalties,
|
|
115
|
+
NFTCalculateRoyaltiesResponse,
|
|
116
|
+
NFTCountNFTs,
|
|
117
|
+
NFTCountNFTsResponse,
|
|
61
118
|
NFTGetByDID,
|
|
62
119
|
NFTGetByDIDResponse,
|
|
120
|
+
NFTGetInfo,
|
|
121
|
+
NFTGetInfoResponse,
|
|
122
|
+
NFTGetNFTs,
|
|
123
|
+
NFTGetNFTsResponse,
|
|
124
|
+
NFTGetWalletDID,
|
|
125
|
+
NFTGetWalletDIDResponse,
|
|
63
126
|
NFTGetWalletsWithDIDsResponse,
|
|
127
|
+
NFTMintBulk,
|
|
64
128
|
NFTMintBulkResponse,
|
|
129
|
+
NFTMintNFTRequest,
|
|
65
130
|
NFTMintNFTResponse,
|
|
66
131
|
NFTSetDIDBulk,
|
|
67
132
|
NFTSetDIDBulkResponse,
|
|
133
|
+
NFTSetNFTDID,
|
|
68
134
|
NFTSetNFTDIDResponse,
|
|
69
135
|
NFTSetNFTStatus,
|
|
70
136
|
NFTTransferBulk,
|
|
71
137
|
NFTTransferBulkResponse,
|
|
138
|
+
NFTTransferNFT,
|
|
72
139
|
NFTTransferNFTResponse,
|
|
73
140
|
PushTransactions,
|
|
74
141
|
PushTransactionsResponse,
|
|
75
142
|
PushTX,
|
|
143
|
+
PWAbsorbRewards,
|
|
144
|
+
PWAbsorbRewardsResponse,
|
|
145
|
+
PWJoinPool,
|
|
146
|
+
PWJoinPoolResponse,
|
|
147
|
+
PWSelfPool,
|
|
148
|
+
PWSelfPoolResponse,
|
|
149
|
+
PWStatus,
|
|
150
|
+
PWStatusResponse,
|
|
76
151
|
SendTransactionMultiResponse,
|
|
77
152
|
SendTransactionResponse,
|
|
78
153
|
SetWalletResyncOnStartup,
|
|
@@ -97,20 +172,6 @@ from chia.rpc.wallet_request_types import (
|
|
|
97
172
|
VerifySignature,
|
|
98
173
|
VerifySignatureResponse,
|
|
99
174
|
)
|
|
100
|
-
from chia.types.blockchain_format.coin import Coin
|
|
101
|
-
from chia.types.blockchain_format.program import Program
|
|
102
|
-
from chia.types.coin_record import CoinRecord
|
|
103
|
-
from chia.wallet.conditions import Condition, ConditionValidTimes, conditions_to_json_dicts
|
|
104
|
-
from chia.wallet.puzzles.clawback.metadata import AutoClaimSettings
|
|
105
|
-
from chia.wallet.trade_record import TradeRecord
|
|
106
|
-
from chia.wallet.trading.offer import Offer
|
|
107
|
-
from chia.wallet.transaction_record import TransactionRecord
|
|
108
|
-
from chia.wallet.transaction_sorting import SortKey
|
|
109
|
-
from chia.wallet.util.clvm_streamable import json_deserialize_with_clvm_streamable
|
|
110
|
-
from chia.wallet.util.query_filter import TransactionTypeFilter
|
|
111
|
-
from chia.wallet.util.tx_config import CoinSelectionConfig, TXConfig
|
|
112
|
-
from chia.wallet.util.wallet_types import WalletType
|
|
113
|
-
from chia.wallet.wallet_coin_store import GetCoinRecords
|
|
114
175
|
|
|
115
176
|
|
|
116
177
|
def parse_result_transactions(result: dict[str, Any]) -> dict[str, Any]:
|
|
@@ -476,110 +537,72 @@ class WalletRpcClient(RpcClient):
|
|
|
476
537
|
response = await self.fetch("create_new_wallet", request)
|
|
477
538
|
return response
|
|
478
539
|
|
|
479
|
-
async def get_did_id(self,
|
|
480
|
-
|
|
481
|
-
response = await self.fetch("did_get_did", request)
|
|
482
|
-
return response
|
|
540
|
+
async def get_did_id(self, request: DIDGetDID) -> DIDGetDIDResponse:
|
|
541
|
+
return DIDGetDIDResponse.from_json_dict(await self.fetch("did_get_did", request.to_json_dict()))
|
|
483
542
|
|
|
484
|
-
async def get_did_info(self,
|
|
485
|
-
|
|
486
|
-
response = await self.fetch("did_get_info", request)
|
|
487
|
-
return response
|
|
543
|
+
async def get_did_info(self, request: DIDGetInfo) -> DIDGetInfoResponse:
|
|
544
|
+
return DIDGetInfoResponse.from_json_dict(await self.fetch("did_get_info", request.to_json_dict()))
|
|
488
545
|
|
|
489
|
-
async def create_did_backup_file(self,
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
546
|
+
async def create_did_backup_file(self, request: DIDCreateBackupFile) -> DIDCreateBackupFileResponse:
|
|
547
|
+
return DIDCreateBackupFileResponse.from_json_dict(
|
|
548
|
+
await self.fetch("did_create_backup_file", request.to_json_dict())
|
|
549
|
+
)
|
|
493
550
|
|
|
494
551
|
async def update_did_recovery_list(
|
|
495
552
|
self,
|
|
496
|
-
|
|
497
|
-
recovery_list: list[str],
|
|
498
|
-
num_verification: int,
|
|
553
|
+
request: DIDUpdateRecoveryIDs,
|
|
499
554
|
tx_config: TXConfig,
|
|
500
555
|
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
501
556
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
502
|
-
push: bool = True,
|
|
503
557
|
) -> DIDUpdateRecoveryIDsResponse:
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
**tx_config.to_json_dict(),
|
|
511
|
-
**timelock_info.to_json_dict(),
|
|
512
|
-
}
|
|
513
|
-
response = await self.fetch("did_update_recovery_ids", request)
|
|
514
|
-
return json_deserialize_with_clvm_streamable(response, DIDUpdateRecoveryIDsResponse)
|
|
558
|
+
return DIDUpdateRecoveryIDsResponse.from_json_dict(
|
|
559
|
+
await self.fetch(
|
|
560
|
+
"did_update_recovery_ids",
|
|
561
|
+
request.json_serialize_for_transport(tx_config, extra_conditions, timelock_info),
|
|
562
|
+
)
|
|
563
|
+
)
|
|
515
564
|
|
|
516
|
-
async def get_did_recovery_list(self,
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
565
|
+
async def get_did_recovery_list(self, request: DIDGetRecoveryList) -> DIDGetRecoveryListResponse:
|
|
566
|
+
return DIDGetRecoveryListResponse.from_json_dict(
|
|
567
|
+
await self.fetch("did_get_recovery_list", request.to_json_dict())
|
|
568
|
+
)
|
|
520
569
|
|
|
521
570
|
async def did_message_spend(
|
|
522
571
|
self,
|
|
523
|
-
|
|
572
|
+
request: DIDMessageSpend,
|
|
524
573
|
tx_config: TXConfig,
|
|
525
574
|
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
526
575
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
527
|
-
push: bool = False,
|
|
528
576
|
) -> DIDMessageSpendResponse:
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
}
|
|
536
|
-
response = await self.fetch("did_message_spend", request)
|
|
537
|
-
return json_deserialize_with_clvm_streamable(response, DIDMessageSpendResponse)
|
|
577
|
+
return DIDMessageSpendResponse.from_json_dict(
|
|
578
|
+
await self.fetch(
|
|
579
|
+
"did_message_spend",
|
|
580
|
+
request.json_serialize_for_transport(tx_config, extra_conditions, timelock_info),
|
|
581
|
+
)
|
|
582
|
+
)
|
|
538
583
|
|
|
539
584
|
async def update_did_metadata(
|
|
540
585
|
self,
|
|
541
|
-
|
|
542
|
-
metadata: dict[str, Any],
|
|
586
|
+
request: DIDUpdateMetadata,
|
|
543
587
|
tx_config: TXConfig,
|
|
544
588
|
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
545
589
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
546
|
-
push: bool = True,
|
|
547
590
|
) -> DIDUpdateMetadataResponse:
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
**timelock_info.to_json_dict(),
|
|
555
|
-
}
|
|
556
|
-
response = await self.fetch("did_update_metadata", request)
|
|
557
|
-
return json_deserialize_with_clvm_streamable(response, DIDUpdateMetadataResponse)
|
|
591
|
+
return DIDUpdateMetadataResponse.from_json_dict(
|
|
592
|
+
await self.fetch(
|
|
593
|
+
"did_update_metadata",
|
|
594
|
+
request.json_serialize_for_transport(tx_config, extra_conditions, timelock_info),
|
|
595
|
+
)
|
|
596
|
+
)
|
|
558
597
|
|
|
559
598
|
async def get_did_pubkey(self, request: DIDGetPubkey) -> DIDGetPubkeyResponse:
|
|
560
599
|
return DIDGetPubkeyResponse.from_json_dict(await self.fetch("did_get_pubkey", request.to_json_dict()))
|
|
561
600
|
|
|
562
|
-
async def get_did_metadata(self,
|
|
563
|
-
|
|
564
|
-
response = await self.fetch("did_get_metadata", request)
|
|
565
|
-
return response
|
|
601
|
+
async def get_did_metadata(self, request: DIDGetMetadata) -> DIDGetMetadataResponse:
|
|
602
|
+
return DIDGetMetadataResponse.from_json_dict(await self.fetch("did_get_metadata", request.to_json_dict()))
|
|
566
603
|
|
|
567
|
-
async def find_lost_did(
|
|
568
|
-
self,
|
|
569
|
-
coin_id: str,
|
|
570
|
-
recovery_list_hash: Optional[str],
|
|
571
|
-
metadata: Optional[dict[str, Any]],
|
|
572
|
-
num_verification: Optional[int],
|
|
573
|
-
) -> dict[str, Any]:
|
|
574
|
-
request: dict[str, Any] = {"coin_id": coin_id}
|
|
575
|
-
if recovery_list_hash is not None:
|
|
576
|
-
request["recovery_list_hash"] = recovery_list_hash
|
|
577
|
-
if metadata is not None:
|
|
578
|
-
request["metadata"] = (metadata,)
|
|
579
|
-
if num_verification is not None:
|
|
580
|
-
request["num_verification"] = num_verification
|
|
581
|
-
response = await self.fetch("did_find_lost_did", request)
|
|
582
|
-
return response
|
|
604
|
+
async def find_lost_did(self, request: DIDFindLostDID) -> DIDFindLostDIDResponse:
|
|
605
|
+
return DIDFindLostDIDResponse.from_json_dict(await self.fetch("did_find_lost_did", request.to_json_dict()))
|
|
583
606
|
|
|
584
607
|
async def create_new_did_wallet_from_recovery(self, filename: str) -> dict[str, Any]:
|
|
585
608
|
request = {"wallet_type": "did_wallet", "did_type": "recovery", "filename": filename}
|
|
@@ -625,37 +648,23 @@ class WalletRpcClient(RpcClient):
|
|
|
625
648
|
|
|
626
649
|
async def did_transfer_did(
|
|
627
650
|
self,
|
|
628
|
-
|
|
629
|
-
address: str,
|
|
630
|
-
fee: int,
|
|
631
|
-
with_recovery: bool,
|
|
651
|
+
request: DIDTransferDID,
|
|
632
652
|
tx_config: TXConfig,
|
|
633
653
|
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
634
654
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
635
|
-
push: bool = True,
|
|
636
655
|
) -> DIDTransferDIDResponse:
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
"push": push,
|
|
644
|
-
**tx_config.to_json_dict(),
|
|
645
|
-
**timelock_info.to_json_dict(),
|
|
646
|
-
}
|
|
647
|
-
response = await self.fetch("did_transfer_did", request)
|
|
648
|
-
return json_deserialize_with_clvm_streamable(response, DIDTransferDIDResponse)
|
|
656
|
+
return DIDTransferDIDResponse.from_json_dict(
|
|
657
|
+
await self.fetch(
|
|
658
|
+
"did_transfer_did",
|
|
659
|
+
request.json_serialize_for_transport(tx_config, extra_conditions, timelock_info),
|
|
660
|
+
)
|
|
661
|
+
)
|
|
649
662
|
|
|
650
|
-
async def did_set_wallet_name(self,
|
|
651
|
-
|
|
652
|
-
response = await self.fetch("did_set_wallet_name", request)
|
|
653
|
-
return response
|
|
663
|
+
async def did_set_wallet_name(self, request: DIDSetWalletName) -> DIDSetWalletNameResponse:
|
|
664
|
+
return DIDSetWalletNameResponse.from_json_dict(await self.fetch("did_set_wallet_name", request.to_json_dict()))
|
|
654
665
|
|
|
655
|
-
async def did_get_wallet_name(self,
|
|
656
|
-
|
|
657
|
-
response = await self.fetch("did_get_wallet_name", request)
|
|
658
|
-
return response
|
|
666
|
+
async def did_get_wallet_name(self, request: DIDGetWalletName) -> DIDGetWalletNameResponse:
|
|
667
|
+
return DIDGetWalletNameResponse.from_json_dict(await self.fetch("did_get_wallet_name", request.to_json_dict()))
|
|
659
668
|
|
|
660
669
|
# TODO: test all invocations of create_new_pool_wallet with new fee arg.
|
|
661
670
|
async def create_new_pool_wallet(
|
|
@@ -692,42 +701,48 @@ class WalletRpcClient(RpcClient):
|
|
|
692
701
|
res = await self.fetch("create_new_wallet", request)
|
|
693
702
|
return TransactionRecord.from_json_dict(res["transaction"])
|
|
694
703
|
|
|
695
|
-
async def pw_self_pool(
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
704
|
+
async def pw_self_pool(
|
|
705
|
+
self,
|
|
706
|
+
request: PWSelfPool,
|
|
707
|
+
tx_config: TXConfig,
|
|
708
|
+
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
709
|
+
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
710
|
+
) -> PWSelfPoolResponse:
|
|
711
|
+
return PWSelfPoolResponse.from_json_dict(
|
|
712
|
+
await self.fetch(
|
|
713
|
+
"pw_self_pool", request.json_serialize_for_transport(tx_config, extra_conditions, timelock_info)
|
|
714
|
+
)
|
|
715
|
+
)
|
|
699
716
|
|
|
700
717
|
async def pw_join_pool(
|
|
701
|
-
self,
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
return reply
|
|
718
|
+
self,
|
|
719
|
+
request: PWJoinPool,
|
|
720
|
+
tx_config: TXConfig,
|
|
721
|
+
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
722
|
+
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
723
|
+
) -> PWJoinPoolResponse:
|
|
724
|
+
return PWJoinPoolResponse.from_json_dict(
|
|
725
|
+
await self.fetch(
|
|
726
|
+
"pw_join_pool", request.json_serialize_for_transport(tx_config, extra_conditions, timelock_info)
|
|
727
|
+
)
|
|
728
|
+
)
|
|
713
729
|
|
|
714
730
|
async def pw_absorb_rewards(
|
|
715
|
-
self,
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
)
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
json_dict = await self.fetch("pw_status", {"wallet_id": wallet_id})
|
|
726
|
-
return (
|
|
727
|
-
PoolWalletInfo.from_json_dict(json_dict["state"]),
|
|
728
|
-
[TransactionRecord.from_json_dict(tr) for tr in json_dict["unconfirmed_transactions"]],
|
|
731
|
+
self,
|
|
732
|
+
request: PWAbsorbRewards,
|
|
733
|
+
tx_config: TXConfig,
|
|
734
|
+
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
735
|
+
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
736
|
+
) -> PWAbsorbRewardsResponse:
|
|
737
|
+
return PWAbsorbRewardsResponse.from_json_dict(
|
|
738
|
+
await self.fetch(
|
|
739
|
+
"pw_absorb_rewards", request.json_serialize_for_transport(tx_config, extra_conditions, timelock_info)
|
|
740
|
+
)
|
|
729
741
|
)
|
|
730
742
|
|
|
743
|
+
async def pw_status(self, request: PWStatus) -> PWStatusResponse:
|
|
744
|
+
return PWStatusResponse.from_json_dict(await self.fetch("pw_status", request.to_json_dict()))
|
|
745
|
+
|
|
731
746
|
# CATS
|
|
732
747
|
async def create_new_cat_and_wallet(
|
|
733
748
|
self, amount: uint64, fee: uint64 = uint64(0), test: bool = False
|
|
@@ -986,211 +1001,97 @@ class WalletRpcClient(RpcClient):
|
|
|
986
1001
|
|
|
987
1002
|
async def mint_nft(
|
|
988
1003
|
self,
|
|
989
|
-
|
|
990
|
-
royalty_address: Optional[str],
|
|
991
|
-
target_address: Optional[str],
|
|
992
|
-
hash: str,
|
|
993
|
-
uris: list[str],
|
|
1004
|
+
request: NFTMintNFTRequest,
|
|
994
1005
|
tx_config: TXConfig,
|
|
995
|
-
meta_hash: Optional[str] = "",
|
|
996
|
-
meta_uris: list[str] = [],
|
|
997
|
-
license_hash: Optional[str] = "",
|
|
998
|
-
license_uris: list[str] = [],
|
|
999
|
-
edition_total: Optional[int] = 1,
|
|
1000
|
-
edition_number: Optional[int] = 1,
|
|
1001
|
-
fee: int = 0,
|
|
1002
|
-
royalty_percentage: int = 0,
|
|
1003
|
-
did_id: Optional[str] = None,
|
|
1004
1006
|
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1005
1007
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1006
|
-
push: bool = True,
|
|
1007
1008
|
) -> NFTMintNFTResponse:
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
"uris": uris,
|
|
1014
|
-
"meta_hash": meta_hash,
|
|
1015
|
-
"meta_uris": meta_uris,
|
|
1016
|
-
"license_hash": license_hash,
|
|
1017
|
-
"license_uris": license_uris,
|
|
1018
|
-
"edition_number": edition_number,
|
|
1019
|
-
"edition_total": edition_total,
|
|
1020
|
-
"royalty_percentage": royalty_percentage,
|
|
1021
|
-
"did_id": did_id,
|
|
1022
|
-
"fee": fee,
|
|
1023
|
-
"extra_conditions": conditions_to_json_dicts(extra_conditions),
|
|
1024
|
-
"push": push,
|
|
1025
|
-
**tx_config.to_json_dict(),
|
|
1026
|
-
**timelock_info.to_json_dict(),
|
|
1027
|
-
}
|
|
1028
|
-
response = await self.fetch("nft_mint_nft", request)
|
|
1029
|
-
return json_deserialize_with_clvm_streamable(response, NFTMintNFTResponse)
|
|
1009
|
+
return NFTMintNFTResponse.from_json_dict(
|
|
1010
|
+
await self.fetch(
|
|
1011
|
+
"nft_mint_nft", request.json_serialize_for_transport(tx_config, extra_conditions, timelock_info)
|
|
1012
|
+
)
|
|
1013
|
+
)
|
|
1030
1014
|
|
|
1031
1015
|
async def add_uri_to_nft(
|
|
1032
1016
|
self,
|
|
1033
|
-
|
|
1034
|
-
nft_coin_id: str,
|
|
1035
|
-
key: str,
|
|
1036
|
-
uri: str,
|
|
1037
|
-
fee: int,
|
|
1017
|
+
request: NFTAddURI,
|
|
1038
1018
|
tx_config: TXConfig,
|
|
1039
1019
|
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1040
1020
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1041
|
-
push: bool = True,
|
|
1042
1021
|
) -> NFTAddURIResponse:
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
"fee": fee,
|
|
1049
|
-
"extra_conditions": conditions_to_json_dicts(extra_conditions),
|
|
1050
|
-
"push": push,
|
|
1051
|
-
**tx_config.to_json_dict(),
|
|
1052
|
-
**timelock_info.to_json_dict(),
|
|
1053
|
-
}
|
|
1054
|
-
response = await self.fetch("nft_add_uri", request)
|
|
1055
|
-
return json_deserialize_with_clvm_streamable(response, NFTAddURIResponse)
|
|
1022
|
+
return NFTAddURIResponse.from_json_dict(
|
|
1023
|
+
await self.fetch(
|
|
1024
|
+
"nft_add_uri", request.json_serialize_for_transport(tx_config, extra_conditions, timelock_info)
|
|
1025
|
+
)
|
|
1026
|
+
)
|
|
1056
1027
|
|
|
1057
1028
|
async def nft_calculate_royalties(
|
|
1058
1029
|
self,
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
{"asset": id, "royalty_address": royalty_info[0], "royalty_percentage": royalty_info[1]}
|
|
1065
|
-
for id, royalty_info in royalty_assets_dict.items()
|
|
1066
|
-
],
|
|
1067
|
-
"fungible_assets": [{"asset": name, "amount": amount} for name, amount in fungible_asset_dict.items()],
|
|
1068
|
-
}
|
|
1069
|
-
response = await self.fetch("nft_calculate_royalties", request)
|
|
1070
|
-
del response["success"]
|
|
1071
|
-
return response
|
|
1030
|
+
request: NFTCalculateRoyalties,
|
|
1031
|
+
) -> NFTCalculateRoyaltiesResponse:
|
|
1032
|
+
return NFTCalculateRoyaltiesResponse.from_json_dict(
|
|
1033
|
+
await self.fetch("nft_calculate_royalties", request.to_json_dict())
|
|
1034
|
+
)
|
|
1072
1035
|
|
|
1073
|
-
async def get_nft_info(self,
|
|
1074
|
-
|
|
1075
|
-
response = await self.fetch("nft_get_info", request)
|
|
1076
|
-
return response
|
|
1036
|
+
async def get_nft_info(self, request: NFTGetInfo) -> NFTGetInfoResponse:
|
|
1037
|
+
return NFTGetInfoResponse.from_json_dict(await self.fetch("nft_get_info", request.to_json_dict()))
|
|
1077
1038
|
|
|
1078
1039
|
async def transfer_nft(
|
|
1079
1040
|
self,
|
|
1080
|
-
|
|
1081
|
-
nft_coin_id: str,
|
|
1082
|
-
target_address: str,
|
|
1083
|
-
fee: int,
|
|
1041
|
+
request: NFTTransferNFT,
|
|
1084
1042
|
tx_config: TXConfig,
|
|
1085
1043
|
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1086
1044
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1087
|
-
push: bool = True,
|
|
1088
1045
|
) -> NFTTransferNFTResponse:
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
"extra_conditions": conditions_to_json_dicts(extra_conditions),
|
|
1095
|
-
"push": push,
|
|
1096
|
-
**tx_config.to_json_dict(),
|
|
1097
|
-
**timelock_info.to_json_dict(),
|
|
1098
|
-
}
|
|
1099
|
-
response = await self.fetch("nft_transfer_nft", request)
|
|
1100
|
-
return json_deserialize_with_clvm_streamable(response, NFTTransferNFTResponse)
|
|
1046
|
+
return NFTTransferNFTResponse.from_json_dict(
|
|
1047
|
+
await self.fetch(
|
|
1048
|
+
"nft_transfer_nft", request.json_serialize_for_transport(tx_config, extra_conditions, timelock_info)
|
|
1049
|
+
)
|
|
1050
|
+
)
|
|
1101
1051
|
|
|
1102
|
-
async def count_nfts(self,
|
|
1103
|
-
|
|
1104
|
-
response = await self.fetch("nft_count_nfts", request)
|
|
1105
|
-
return response
|
|
1052
|
+
async def count_nfts(self, request: NFTCountNFTs) -> NFTCountNFTsResponse:
|
|
1053
|
+
return NFTCountNFTsResponse.from_json_dict(await self.fetch("nft_count_nfts", request.to_json_dict()))
|
|
1106
1054
|
|
|
1107
|
-
async def list_nfts(self,
|
|
1108
|
-
|
|
1109
|
-
response = await self.fetch("nft_get_nfts", request)
|
|
1110
|
-
return response
|
|
1055
|
+
async def list_nfts(self, request: NFTGetNFTs) -> NFTGetNFTsResponse:
|
|
1056
|
+
return NFTGetNFTsResponse.from_json_dict(await self.fetch("nft_get_nfts", request.to_json_dict()))
|
|
1111
1057
|
|
|
1112
1058
|
async def get_nft_wallet_by_did(self, request: NFTGetByDID) -> NFTGetByDIDResponse:
|
|
1113
1059
|
return NFTGetByDIDResponse.from_json_dict(await self.fetch("nft_get_by_did", request.to_json_dict()))
|
|
1114
1060
|
|
|
1115
1061
|
async def set_nft_did(
|
|
1116
1062
|
self,
|
|
1117
|
-
|
|
1118
|
-
did_id: Optional[str],
|
|
1119
|
-
nft_coin_id: str,
|
|
1120
|
-
fee: int,
|
|
1063
|
+
request: NFTSetNFTDID,
|
|
1121
1064
|
tx_config: TXConfig,
|
|
1122
1065
|
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1123
1066
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1124
|
-
push: bool = True,
|
|
1125
1067
|
) -> NFTSetNFTDIDResponse:
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
"push": push,
|
|
1132
|
-
**tx_config.to_json_dict(),
|
|
1133
|
-
**timelock_info.to_json_dict(),
|
|
1134
|
-
}
|
|
1135
|
-
if did_id is not None:
|
|
1136
|
-
request["did_id"] = did_id
|
|
1137
|
-
response = await self.fetch("nft_set_nft_did", request)
|
|
1138
|
-
return json_deserialize_with_clvm_streamable(response, NFTSetNFTDIDResponse)
|
|
1068
|
+
return NFTSetNFTDIDResponse.from_json_dict(
|
|
1069
|
+
await self.fetch(
|
|
1070
|
+
"nft_set_nft_did", request.json_serialize_for_transport(tx_config, extra_conditions, timelock_info)
|
|
1071
|
+
)
|
|
1072
|
+
)
|
|
1139
1073
|
|
|
1140
1074
|
async def set_nft_status(self, request: NFTSetNFTStatus) -> None:
|
|
1141
1075
|
await self.fetch("nft_set_nft_status", request.to_json_dict())
|
|
1142
1076
|
|
|
1143
|
-
async def get_nft_wallet_did(self,
|
|
1144
|
-
|
|
1145
|
-
response = await self.fetch("nft_get_wallet_did", request)
|
|
1146
|
-
return response
|
|
1077
|
+
async def get_nft_wallet_did(self, request: NFTGetWalletDID) -> NFTGetWalletDIDResponse:
|
|
1078
|
+
return NFTGetWalletDIDResponse.from_json_dict(await self.fetch("nft_get_wallet_did", request.to_json_dict()))
|
|
1147
1079
|
|
|
1148
1080
|
async def get_nft_wallets_with_dids(self) -> NFTGetWalletsWithDIDsResponse:
|
|
1149
1081
|
return NFTGetWalletsWithDIDsResponse.from_json_dict(await self.fetch("nft_get_wallets_with_dids", {}))
|
|
1150
1082
|
|
|
1151
1083
|
async def nft_mint_bulk(
|
|
1152
1084
|
self,
|
|
1153
|
-
|
|
1154
|
-
metadata_list: list[dict[str, Any]],
|
|
1155
|
-
royalty_percentage: Optional[int],
|
|
1156
|
-
royalty_address: Optional[str],
|
|
1085
|
+
request: NFTMintBulk,
|
|
1157
1086
|
tx_config: TXConfig,
|
|
1158
|
-
target_list: Optional[list[str]] = None,
|
|
1159
|
-
mint_number_start: Optional[int] = 1,
|
|
1160
|
-
mint_total: Optional[int] = None,
|
|
1161
|
-
xch_coins: Optional[list[dict[str, Any]]] = None,
|
|
1162
|
-
xch_change_target: Optional[str] = None,
|
|
1163
|
-
new_innerpuzhash: Optional[str] = None,
|
|
1164
|
-
did_coin: Optional[dict[str, Any]] = None,
|
|
1165
|
-
did_lineage_parent: Optional[str] = None,
|
|
1166
|
-
mint_from_did: Optional[bool] = False,
|
|
1167
|
-
fee: Optional[int] = 0,
|
|
1168
1087
|
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1169
1088
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1170
|
-
push: bool = False,
|
|
1171
1089
|
) -> NFTMintBulkResponse:
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
"royalty_address": royalty_address,
|
|
1178
|
-
"mint_number_start": mint_number_start,
|
|
1179
|
-
"mint_total": mint_total,
|
|
1180
|
-
"xch_coins": xch_coins,
|
|
1181
|
-
"xch_change_target": xch_change_target,
|
|
1182
|
-
"new_innerpuzhash": new_innerpuzhash,
|
|
1183
|
-
"did_coin": did_coin,
|
|
1184
|
-
"did_lineage_parent": did_lineage_parent,
|
|
1185
|
-
"mint_from_did": mint_from_did,
|
|
1186
|
-
"fee": fee,
|
|
1187
|
-
"extra_conditions": conditions_to_json_dicts(extra_conditions),
|
|
1188
|
-
"push": push,
|
|
1189
|
-
**tx_config.to_json_dict(),
|
|
1190
|
-
**timelock_info.to_json_dict(),
|
|
1191
|
-
}
|
|
1192
|
-
response = await self.fetch("nft_mint_bulk", request)
|
|
1193
|
-
return json_deserialize_with_clvm_streamable(response, NFTMintBulkResponse)
|
|
1090
|
+
return NFTMintBulkResponse.from_json_dict(
|
|
1091
|
+
await self.fetch(
|
|
1092
|
+
"nft_mint_bulk", request.json_serialize_for_transport(tx_config, extra_conditions, timelock_info)
|
|
1093
|
+
)
|
|
1094
|
+
)
|
|
1194
1095
|
|
|
1195
1096
|
async def set_nft_did_bulk(
|
|
1196
1097
|
self,
|
|
@@ -1221,147 +1122,94 @@ class WalletRpcClient(RpcClient):
|
|
|
1221
1122
|
# DataLayer
|
|
1222
1123
|
async def create_new_dl(
|
|
1223
1124
|
self,
|
|
1224
|
-
|
|
1225
|
-
|
|
1125
|
+
request: CreateNewDL,
|
|
1126
|
+
tx_config: TXConfig,
|
|
1226
1127
|
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1227
1128
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1228
|
-
) ->
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
await self.fetch("
|
|
1243
|
-
|
|
1244
|
-
async def
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
async def dl_latest_singleton(
|
|
1249
|
-
self, launcher_id: bytes32, only_confirmed: bool = False
|
|
1250
|
-
) -> Optional[SingletonRecord]:
|
|
1251
|
-
request = {"launcher_id": launcher_id.hex(), "only_confirmed": only_confirmed}
|
|
1252
|
-
response = await self.fetch("dl_latest_singleton", request)
|
|
1253
|
-
return None if response["singleton"] is None else SingletonRecord.from_json_dict(response["singleton"])
|
|
1254
|
-
|
|
1255
|
-
async def dl_singletons_by_root(self, launcher_id: bytes32, root: bytes32) -> list[SingletonRecord]:
|
|
1256
|
-
request = {"launcher_id": launcher_id.hex(), "root": root.hex()}
|
|
1257
|
-
response = await self.fetch("dl_singletons_by_root", request)
|
|
1258
|
-
return [SingletonRecord.from_json_dict(single) for single in response["singletons"]]
|
|
1129
|
+
) -> CreateNewDLResponse:
|
|
1130
|
+
return CreateNewDLResponse.from_json_dict(
|
|
1131
|
+
await self.fetch(
|
|
1132
|
+
"create_new_dl", request.json_serialize_for_transport(tx_config, extra_conditions, timelock_info)
|
|
1133
|
+
)
|
|
1134
|
+
)
|
|
1135
|
+
|
|
1136
|
+
async def dl_track_new(self, request: DLTrackNew) -> None:
|
|
1137
|
+
await self.fetch("dl_track_new", request.to_json_dict())
|
|
1138
|
+
|
|
1139
|
+
async def dl_stop_tracking(self, request: DLStopTracking) -> None:
|
|
1140
|
+
await self.fetch("dl_stop_tracking", request.to_json_dict())
|
|
1141
|
+
|
|
1142
|
+
async def dl_latest_singleton(self, request: DLLatestSingleton) -> DLLatestSingletonResponse:
|
|
1143
|
+
return DLLatestSingletonResponse.from_json_dict(await self.fetch("dl_latest_singleton", request.to_json_dict()))
|
|
1144
|
+
|
|
1145
|
+
async def dl_singletons_by_root(self, request: DLSingletonsByRoot) -> DLSingletonsByRootResponse:
|
|
1146
|
+
return DLSingletonsByRootResponse.from_json_dict(
|
|
1147
|
+
await self.fetch("dl_singletons_by_root", request.to_json_dict())
|
|
1148
|
+
)
|
|
1259
1149
|
|
|
1260
1150
|
async def dl_update_root(
|
|
1261
1151
|
self,
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
fee: uint64,
|
|
1152
|
+
request: DLUpdateRoot,
|
|
1153
|
+
tx_config: TXConfig,
|
|
1265
1154
|
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1266
1155
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1267
|
-
) ->
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
**timelock_info.to_json_dict(),
|
|
1274
|
-
}
|
|
1275
|
-
response = await self.fetch("dl_update_root", request)
|
|
1276
|
-
return TransactionRecord.from_json_dict_convenience(response["tx_record"])
|
|
1156
|
+
) -> DLUpdateRootResponse:
|
|
1157
|
+
return DLUpdateRootResponse.from_json_dict(
|
|
1158
|
+
await self.fetch(
|
|
1159
|
+
"dl_update_root", request.json_serialize_for_transport(tx_config, extra_conditions, timelock_info)
|
|
1160
|
+
)
|
|
1161
|
+
)
|
|
1277
1162
|
|
|
1278
1163
|
async def dl_update_multiple(
|
|
1279
1164
|
self,
|
|
1280
|
-
|
|
1281
|
-
|
|
1165
|
+
request: DLUpdateMultiple,
|
|
1166
|
+
tx_config: TXConfig,
|
|
1282
1167
|
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1283
1168
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1284
|
-
) ->
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
**timelock_info.to_json_dict(),
|
|
1291
|
-
}
|
|
1292
|
-
response = await self.fetch("dl_update_multiple", request)
|
|
1293
|
-
return [TransactionRecord.from_json_dict_convenience(tx) for tx in response["transactions"]]
|
|
1169
|
+
) -> DLUpdateMultipleResponse:
|
|
1170
|
+
return DLUpdateMultipleResponse.from_json_dict(
|
|
1171
|
+
await self.fetch(
|
|
1172
|
+
"dl_update_multiple", request.json_serialize_for_transport(tx_config, extra_conditions, timelock_info)
|
|
1173
|
+
)
|
|
1174
|
+
)
|
|
1294
1175
|
|
|
1295
|
-
async def dl_history(
|
|
1296
|
-
self,
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
) ->
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
if min_generation is not None:
|
|
1305
|
-
request["min_generation"] = str(min_generation)
|
|
1306
|
-
if max_generation is not None:
|
|
1307
|
-
request["max_generation"] = str(max_generation)
|
|
1308
|
-
if num_results is not None:
|
|
1309
|
-
request["num_results"] = str(num_results)
|
|
1310
|
-
|
|
1311
|
-
response = await self.fetch("dl_history", request)
|
|
1312
|
-
return [SingletonRecord.from_json_dict(single) for single in response["history"]]
|
|
1313
|
-
|
|
1314
|
-
async def dl_owned_singletons(self) -> list[SingletonRecord]:
|
|
1315
|
-
response = await self.fetch(path="dl_owned_singletons", request_json={})
|
|
1316
|
-
return [SingletonRecord.from_json_dict(singleton) for singleton in response["singletons"]]
|
|
1317
|
-
|
|
1318
|
-
async def dl_get_mirrors(self, launcher_id: bytes32) -> list[Mirror]:
|
|
1319
|
-
response = await self.fetch(path="dl_get_mirrors", request_json={"launcher_id": launcher_id.hex()})
|
|
1320
|
-
return [Mirror.from_json_dict(mirror) for mirror in response["mirrors"]]
|
|
1176
|
+
async def dl_history(self, request: DLHistory) -> DLHistoryResponse:
|
|
1177
|
+
return DLHistoryResponse.from_json_dict(await self.fetch("dl_history", request.to_json_dict()))
|
|
1178
|
+
|
|
1179
|
+
async def dl_owned_singletons(self) -> DLOwnedSingletonsResponse:
|
|
1180
|
+
return DLOwnedSingletonsResponse.from_json_dict(await self.fetch("dl_owned_singletons", {}))
|
|
1181
|
+
|
|
1182
|
+
async def dl_get_mirrors(self, request: DLGetMirrors) -> DLGetMirrorsResponse:
|
|
1183
|
+
return DLGetMirrorsResponse.from_json_dict(await self.fetch("dl_get_mirrors", request.to_json_dict()))
|
|
1321
1184
|
|
|
1322
1185
|
async def dl_new_mirror(
|
|
1323
1186
|
self,
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
urls: list[bytes],
|
|
1327
|
-
fee: uint64 = uint64(0),
|
|
1187
|
+
request: DLNewMirror,
|
|
1188
|
+
tx_config: TXConfig,
|
|
1328
1189
|
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1329
1190
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1330
|
-
) ->
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
"amount": amount,
|
|
1336
|
-
"urls": [url.decode("utf8") for url in urls],
|
|
1337
|
-
"fee": fee,
|
|
1338
|
-
"extra_conditions": conditions_to_json_dicts(extra_conditions),
|
|
1339
|
-
**timelock_info.to_json_dict(),
|
|
1340
|
-
},
|
|
1191
|
+
) -> DLNewMirrorResponse:
|
|
1192
|
+
return DLNewMirrorResponse.from_json_dict(
|
|
1193
|
+
await self.fetch(
|
|
1194
|
+
"dl_new_mirror", request.json_serialize_for_transport(tx_config, extra_conditions, timelock_info)
|
|
1195
|
+
)
|
|
1341
1196
|
)
|
|
1342
|
-
return [TransactionRecord.from_json_dict_convenience(tx) for tx in response["transactions"]]
|
|
1343
1197
|
|
|
1344
1198
|
async def dl_delete_mirror(
|
|
1345
1199
|
self,
|
|
1346
|
-
|
|
1347
|
-
|
|
1200
|
+
request: DLDeleteMirror,
|
|
1201
|
+
tx_config: TXConfig,
|
|
1348
1202
|
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1349
1203
|
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1350
|
-
) ->
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
"fee": fee,
|
|
1356
|
-
"extra_conditions": conditions_to_json_dicts(extra_conditions),
|
|
1357
|
-
**timelock_info.to_json_dict(),
|
|
1358
|
-
},
|
|
1204
|
+
) -> DLDeleteMirrorResponse:
|
|
1205
|
+
return DLDeleteMirrorResponse.from_json_dict(
|
|
1206
|
+
await self.fetch(
|
|
1207
|
+
"dl_delete_mirror", request.json_serialize_for_transport(tx_config, extra_conditions, timelock_info)
|
|
1208
|
+
)
|
|
1359
1209
|
)
|
|
1360
|
-
return [TransactionRecord.from_json_dict_convenience(tx) for tx in response["transactions"]]
|
|
1361
1210
|
|
|
1362
1211
|
async def dl_verify_proof(self, request: DLProof) -> VerifyProofResponse:
|
|
1363
|
-
|
|
1364
|
-
return json_deserialize_with_clvm_streamable(response, VerifyProofResponse)
|
|
1212
|
+
return VerifyProofResponse.from_json_dict(await self.fetch("dl_verify_proof", request.to_json_dict()))
|
|
1365
1213
|
|
|
1366
1214
|
async def get_notifications(self, request: GetNotifications) -> GetNotificationsResponse:
|
|
1367
1215
|
response = await self.fetch("get_notifications", request.to_json_dict())
|