near-jsonrpc-client 1.0.5__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.
- near_jsonrpc_client/__init__.py +27 -0
- near_jsonrpc_client/api_methods_async.py +450 -0
- near_jsonrpc_client/api_methods_sync.py +450 -0
- near_jsonrpc_client/base_client.py +148 -0
- near_jsonrpc_client/client.py +13 -0
- near_jsonrpc_client/errors.py +35 -0
- near_jsonrpc_client/transport.py +43 -0
- near_jsonrpc_client-1.0.5.dist-info/METADATA +10 -0
- near_jsonrpc_client-1.0.5.dist-info/RECORD +357 -0
- near_jsonrpc_client-1.0.5.dist-info/WHEEL +5 -0
- near_jsonrpc_client-1.0.5.dist-info/licenses/LICENSE +201 -0
- near_jsonrpc_client-1.0.5.dist-info/top_level.txt +2 -0
- near_jsonrpc_models/__init__.py +3378 -0
- near_jsonrpc_models/access_key.py +18 -0
- near_jsonrpc_models/access_key_creation_config_view.py +13 -0
- near_jsonrpc_models/access_key_info_view.py +10 -0
- near_jsonrpc_models/access_key_list.py +9 -0
- near_jsonrpc_models/access_key_permission.py +21 -0
- near_jsonrpc_models/access_key_permission_view.py +25 -0
- near_jsonrpc_models/access_key_view.py +10 -0
- near_jsonrpc_models/account_creation_config_view.py +13 -0
- near_jsonrpc_models/account_data_view.py +30 -0
- near_jsonrpc_models/account_id.py +25 -0
- near_jsonrpc_models/account_id_validity_rules_version.py +8 -0
- near_jsonrpc_models/account_info.py +12 -0
- near_jsonrpc_models/account_view.py +18 -0
- near_jsonrpc_models/account_with_public_key.py +10 -0
- near_jsonrpc_models/action_creation_config_view.py +32 -0
- near_jsonrpc_models/action_error.py +13 -0
- near_jsonrpc_models/action_error_kind.py +200 -0
- near_jsonrpc_models/action_view.py +133 -0
- near_jsonrpc_models/actions_validation_error.py +150 -0
- near_jsonrpc_models/add_gas_key_action.py +10 -0
- near_jsonrpc_models/add_key_action.py +12 -0
- near_jsonrpc_models/bandwidth_request.py +14 -0
- near_jsonrpc_models/bandwidth_request_bitmap.py +11 -0
- near_jsonrpc_models/bandwidth_requests.py +16 -0
- near_jsonrpc_models/bandwidth_requests_v1.py +9 -0
- near_jsonrpc_models/block_header_inner_lite_view.py +22 -0
- near_jsonrpc_models/block_header_view.py +53 -0
- near_jsonrpc_models/block_id.py +16 -0
- near_jsonrpc_models/block_reference.py +21 -0
- near_jsonrpc_models/block_status_view.py +10 -0
- near_jsonrpc_models/call_result.py +10 -0
- near_jsonrpc_models/catchup_status_view.py +28 -0
- near_jsonrpc_models/chunk_distribution_network_config.py +12 -0
- near_jsonrpc_models/chunk_distribution_uris.py +10 -0
- near_jsonrpc_models/chunk_hash.py +4 -0
- near_jsonrpc_models/chunk_header_view.py +39 -0
- near_jsonrpc_models/cloud_archival_writer_config.py +14 -0
- near_jsonrpc_models/compilation_error.py +29 -0
- near_jsonrpc_models/congestion_control_config_view.py +58 -0
- near_jsonrpc_models/congestion_info_view.py +11 -0
- near_jsonrpc_models/contract_code_view.py +9 -0
- near_jsonrpc_models/cost_gas_used.py +10 -0
- near_jsonrpc_models/create_account_action.py +7 -0
- near_jsonrpc_models/crypto_hash.py +7 -0
- near_jsonrpc_models/current_epoch_validator_info.py +35 -0
- near_jsonrpc_models/data_receipt_creation_config_view.py +20 -0
- near_jsonrpc_models/data_receiver_view.py +8 -0
- near_jsonrpc_models/delegate_action.py +28 -0
- near_jsonrpc_models/delete_account_action.py +6 -0
- near_jsonrpc_models/delete_gas_key_action.py +6 -0
- near_jsonrpc_models/delete_key_action.py +7 -0
- near_jsonrpc_models/deploy_contract_action.py +8 -0
- near_jsonrpc_models/deploy_global_contract_action.py +10 -0
- near_jsonrpc_models/detailed_debug_status.py +15 -0
- near_jsonrpc_models/deterministic_account_state_init.py +13 -0
- near_jsonrpc_models/deterministic_account_state_init_v1.py +8 -0
- near_jsonrpc_models/deterministic_state_init_action.py +8 -0
- near_jsonrpc_models/direction.py +7 -0
- near_jsonrpc_models/dump_config.py +20 -0
- near_jsonrpc_models/duration_as_std_schema_provider.py +7 -0
- near_jsonrpc_models/dynamic_resharding_config_view.py +23 -0
- near_jsonrpc_models/epoch_id.py +8 -0
- near_jsonrpc_models/epoch_sync_config.py +25 -0
- near_jsonrpc_models/error_wrapper_for_genesis_config_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_block_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_call_function_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_chunk_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_client_config_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_gas_price_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_light_client_next_block_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_light_client_proof_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_maintenance_windows_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_network_info_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_protocol_config_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_query_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_receipt_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_split_storage_info_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_state_changes_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_status_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_transaction_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_validator_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_view_access_key_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_view_access_key_list_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_view_account_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_view_code_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_view_gas_key_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_view_gas_key_list_error.py +24 -0
- near_jsonrpc_models/error_wrapper_for_rpc_view_state_error.py +24 -0
- near_jsonrpc_models/execution_metadata_view.py +9 -0
- near_jsonrpc_models/execution_outcome_view.py +31 -0
- near_jsonrpc_models/execution_outcome_with_id_view.py +12 -0
- near_jsonrpc_models/execution_status_view.py +29 -0
- near_jsonrpc_models/ext_costs_config_view.py +162 -0
- near_jsonrpc_models/external_storage_config.py +17 -0
- near_jsonrpc_models/external_storage_location.py +34 -0
- near_jsonrpc_models/fee.py +17 -0
- near_jsonrpc_models/final_execution_outcome_view.py +23 -0
- near_jsonrpc_models/final_execution_outcome_with_receipt_view.py +26 -0
- near_jsonrpc_models/final_execution_status.py +27 -0
- near_jsonrpc_models/finality.py +9 -0
- near_jsonrpc_models/function_args.py +13 -0
- near_jsonrpc_models/function_call_action.py +10 -0
- near_jsonrpc_models/function_call_error.py +52 -0
- near_jsonrpc_models/function_call_permission.py +24 -0
- near_jsonrpc_models/gas_key.py +17 -0
- near_jsonrpc_models/gas_key_info_view.py +8 -0
- near_jsonrpc_models/gas_key_list.py +7 -0
- near_jsonrpc_models/gas_key_view.py +12 -0
- near_jsonrpc_models/gcconfig.py +19 -0
- near_jsonrpc_models/genesis_config.py +121 -0
- near_jsonrpc_models/genesis_config_error.py +7 -0
- near_jsonrpc_models/genesis_config_request.py +7 -0
- near_jsonrpc_models/global_contract_deploy_mode.py +13 -0
- near_jsonrpc_models/global_contract_identifier.py +17 -0
- near_jsonrpc_models/global_contract_identifier_view.py +17 -0
- near_jsonrpc_models/host_error.py +212 -0
- near_jsonrpc_models/internal_error.py +16 -0
- near_jsonrpc_models/invalid_access_key_error.py +54 -0
- near_jsonrpc_models/invalid_tx_error.py +135 -0
- near_jsonrpc_models/json_rpc_request_for_block.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_block_effects.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_broadcast_tx_async.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_broadcast_tx_commit.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_changes.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_chunk.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_client_config.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_call_function.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_changes.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_changes_in_block.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_congestion_level.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_genesis_config.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_light_client_block_proof.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_light_client_proof.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_maintenance_windows.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_protocol_config.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_receipt.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_split_storage_info.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_tx_status.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_validators_ordered.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_view_access_key.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_view_access_key_list.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_view_account.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_view_code.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_view_gas_key.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_view_gas_key_list.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_experimental_view_state.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_gas_price.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_genesis_config.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_health.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_light_client_proof.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_maintenance_windows.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_network_info.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_next_light_client_block.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_query.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_send_tx.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_status.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_tx.py +10 -0
- near_jsonrpc_models/json_rpc_request_for_validators.py +10 -0
- near_jsonrpc_models/json_rpc_response_for_array_of_range_of_uint64_and_rpc_maintenance_windows_error.py +21 -0
- near_jsonrpc_models/json_rpc_response_for_array_of_validator_stake_view_and_rpc_validator_error.py +21 -0
- near_jsonrpc_models/json_rpc_response_for_crypto_hash_and_rpc_transaction_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_genesis_config_and_genesis_config_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_nullable_rpc_health_response_and_rpc_status_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_block_response_and_rpc_block_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_call_function_response_and_rpc_call_function_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_chunk_response_and_rpc_chunk_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_client_config_response_and_rpc_client_config_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_congestion_level_response_and_rpc_chunk_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_gas_price_response_and_rpc_gas_price_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_light_client_block_proof_response_and_rpc_light_client_proof_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_light_client_execution_proof_response_and_rpc_light_client_proof_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_light_client_next_block_response_and_rpc_light_client_next_block_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_network_info_response_and_rpc_network_info_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_protocol_config_response_and_rpc_protocol_config_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_query_response_and_rpc_query_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_receipt_response_and_rpc_receipt_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_split_storage_info_response_and_rpc_split_storage_info_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_state_changes_in_block_by_type_response_and_rpc_state_changes_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_state_changes_in_block_response_and_rpc_state_changes_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_status_response_and_rpc_status_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_transaction_response_and_rpc_transaction_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_validator_response_and_rpc_validator_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_view_access_key_list_response_and_rpc_view_access_key_list_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_view_access_key_response_and_rpc_view_access_key_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_view_account_response_and_rpc_view_account_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_view_code_response_and_rpc_view_code_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_view_gas_key_list_response_and_rpc_view_gas_key_list_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_view_gas_key_response_and_rpc_view_gas_key_error.py +20 -0
- near_jsonrpc_models/json_rpc_response_for_rpc_view_state_response_and_rpc_view_state_error.py +20 -0
- near_jsonrpc_models/known_producer_view.py +13 -0
- near_jsonrpc_models/light_client_block_lite_view.py +9 -0
- near_jsonrpc_models/limit_config.py +81 -0
- near_jsonrpc_models/log_summary_style.py +7 -0
- near_jsonrpc_models/merkle_path_item.py +8 -0
- near_jsonrpc_models/method_resolve_error.py +7 -0
- near_jsonrpc_models/missing_trie_value.py +8 -0
- near_jsonrpc_models/missing_trie_value_context.py +9 -0
- near_jsonrpc_models/mutable_config_value.py +7 -0
- near_jsonrpc_models/near_gas.py +8 -0
- near_jsonrpc_models/near_token.py +7 -0
- near_jsonrpc_models/network_info_view.py +17 -0
- near_jsonrpc_models/next_epoch_validator_info.py +13 -0
- near_jsonrpc_models/non_delegate_action.py +71 -0
- near_jsonrpc_models/peer_id.py +6 -0
- near_jsonrpc_models/peer_info_view.py +26 -0
- near_jsonrpc_models/prepare_error.py +16 -0
- near_jsonrpc_models/protocol_version_check_config.py +9 -0
- near_jsonrpc_models/public_key.py +7 -0
- near_jsonrpc_models/range_of_uint64.py +7 -0
- near_jsonrpc_models/receipt_enum_view.py +48 -0
- near_jsonrpc_models/receipt_validation_error.py +76 -0
- near_jsonrpc_models/receipt_view.py +13 -0
- near_jsonrpc_models/rpc_block_error.py +25 -0
- near_jsonrpc_models/rpc_block_request.py +20 -0
- near_jsonrpc_models/rpc_block_response.py +12 -0
- near_jsonrpc_models/rpc_call_function_error.py +64 -0
- near_jsonrpc_models/rpc_call_function_request.py +31 -0
- near_jsonrpc_models/rpc_call_function_response.py +13 -0
- near_jsonrpc_models/rpc_chunk_error.py +38 -0
- near_jsonrpc_models/rpc_chunk_request.py +18 -0
- near_jsonrpc_models/rpc_chunk_response.py +13 -0
- near_jsonrpc_models/rpc_client_config_error.py +16 -0
- near_jsonrpc_models/rpc_client_config_request.py +7 -0
- near_jsonrpc_models/rpc_client_config_response.py +185 -0
- near_jsonrpc_models/rpc_congestion_level_request.py +18 -0
- near_jsonrpc_models/rpc_congestion_level_response.py +5 -0
- near_jsonrpc_models/rpc_gas_price_error.py +22 -0
- near_jsonrpc_models/rpc_gas_price_request.py +6 -0
- near_jsonrpc_models/rpc_gas_price_response.py +6 -0
- near_jsonrpc_models/rpc_health_request.py +7 -0
- near_jsonrpc_models/rpc_health_response.py +7 -0
- near_jsonrpc_models/rpc_known_producer.py +9 -0
- near_jsonrpc_models/rpc_light_client_block_proof_request.py +7 -0
- near_jsonrpc_models/rpc_light_client_block_proof_response.py +9 -0
- near_jsonrpc_models/rpc_light_client_execution_proof_request.py +23 -0
- near_jsonrpc_models/rpc_light_client_execution_proof_response.py +12 -0
- near_jsonrpc_models/rpc_light_client_next_block_error.py +30 -0
- near_jsonrpc_models/rpc_light_client_next_block_request.py +6 -0
- near_jsonrpc_models/rpc_light_client_next_block_response.py +19 -0
- near_jsonrpc_models/rpc_light_client_proof_error.py +55 -0
- near_jsonrpc_models/rpc_maintenance_windows_error.py +16 -0
- near_jsonrpc_models/rpc_maintenance_windows_request.py +6 -0
- near_jsonrpc_models/rpc_network_info_error.py +16 -0
- near_jsonrpc_models/rpc_network_info_request.py +7 -0
- near_jsonrpc_models/rpc_network_info_response.py +15 -0
- near_jsonrpc_models/rpc_peer_info.py +9 -0
- near_jsonrpc_models/rpc_protocol_config_error.py +22 -0
- near_jsonrpc_models/rpc_protocol_config_request.py +20 -0
- near_jsonrpc_models/rpc_protocol_config_response.py +103 -0
- near_jsonrpc_models/rpc_query_error.py +122 -0
- near_jsonrpc_models/rpc_query_request.py +185 -0
- near_jsonrpc_models/rpc_query_response.py +50 -0
- near_jsonrpc_models/rpc_receipt_error.py +24 -0
- near_jsonrpc_models/rpc_receipt_request.py +6 -0
- near_jsonrpc_models/rpc_receipt_response.py +13 -0
- near_jsonrpc_models/rpc_request_validation_error_kind.py +23 -0
- near_jsonrpc_models/rpc_send_transaction_request.py +9 -0
- near_jsonrpc_models/rpc_split_storage_info_error.py +16 -0
- near_jsonrpc_models/rpc_split_storage_info_request.py +5 -0
- near_jsonrpc_models/rpc_split_storage_info_response.py +11 -0
- near_jsonrpc_models/rpc_state_changes_error.py +25 -0
- near_jsonrpc_models/rpc_state_changes_in_block_by_type_request.py +129 -0
- near_jsonrpc_models/rpc_state_changes_in_block_by_type_response.py +9 -0
- near_jsonrpc_models/rpc_state_changes_in_block_request.py +20 -0
- near_jsonrpc_models/rpc_state_changes_in_block_response.py +9 -0
- near_jsonrpc_models/rpc_status_error.py +37 -0
- near_jsonrpc_models/rpc_status_request.py +7 -0
- near_jsonrpc_models/rpc_status_response.py +41 -0
- near_jsonrpc_models/rpc_transaction_error.py +43 -0
- near_jsonrpc_models/rpc_transaction_response.py +17 -0
- near_jsonrpc_models/rpc_transaction_status_request.py +21 -0
- near_jsonrpc_models/rpc_validator_error.py +22 -0
- near_jsonrpc_models/rpc_validator_request.py +20 -0
- near_jsonrpc_models/rpc_validator_response.py +28 -0
- near_jsonrpc_models/rpc_validators_ordered_request.py +6 -0
- near_jsonrpc_models/rpc_view_access_key_error.py +55 -0
- near_jsonrpc_models/rpc_view_access_key_list_error.py +45 -0
- near_jsonrpc_models/rpc_view_access_key_list_request.py +24 -0
- near_jsonrpc_models/rpc_view_access_key_list_response.py +13 -0
- near_jsonrpc_models/rpc_view_access_key_request.py +28 -0
- near_jsonrpc_models/rpc_view_access_key_response.py +13 -0
- near_jsonrpc_models/rpc_view_account_error.py +45 -0
- near_jsonrpc_models/rpc_view_account_request.py +24 -0
- near_jsonrpc_models/rpc_view_account_response.py +20 -0
- near_jsonrpc_models/rpc_view_code_error.py +54 -0
- near_jsonrpc_models/rpc_view_code_request.py +24 -0
- near_jsonrpc_models/rpc_view_code_response.py +12 -0
- near_jsonrpc_models/rpc_view_gas_key_error.py +55 -0
- near_jsonrpc_models/rpc_view_gas_key_list_error.py +45 -0
- near_jsonrpc_models/rpc_view_gas_key_list_request.py +24 -0
- near_jsonrpc_models/rpc_view_gas_key_list_response.py +11 -0
- near_jsonrpc_models/rpc_view_gas_key_request.py +28 -0
- near_jsonrpc_models/rpc_view_gas_key_response.py +15 -0
- near_jsonrpc_models/rpc_view_state_error.py +54 -0
- near_jsonrpc_models/rpc_view_state_request.py +31 -0
- near_jsonrpc_models/rpc_view_state_response.py +14 -0
- near_jsonrpc_models/runtime_config_view.py +30 -0
- near_jsonrpc_models/runtime_fees_config_view.py +29 -0
- near_jsonrpc_models/shard_id.py +16 -0
- near_jsonrpc_models/shard_layout.py +34 -0
- near_jsonrpc_models/shard_layout_v0.py +15 -0
- near_jsonrpc_models/shard_layout_v1.py +22 -0
- near_jsonrpc_models/shard_layout_v2.py +19 -0
- near_jsonrpc_models/shard_layout_v3.py +17 -0
- near_jsonrpc_models/shard_uid.py +17 -0
- near_jsonrpc_models/signature.py +7 -0
- near_jsonrpc_models/signed_delegate_action.py +8 -0
- near_jsonrpc_models/signed_transaction.py +7 -0
- near_jsonrpc_models/signed_transaction_view.py +19 -0
- near_jsonrpc_models/slashed_validator.py +7 -0
- near_jsonrpc_models/stake_action.py +12 -0
- near_jsonrpc_models/state_change_cause_view.py +50 -0
- near_jsonrpc_models/state_change_kind_view.py +31 -0
- near_jsonrpc_models/state_change_with_cause_view.py +129 -0
- near_jsonrpc_models/state_item.py +10 -0
- near_jsonrpc_models/state_sync_config.py +14 -0
- near_jsonrpc_models/status_sync_info.py +17 -0
- near_jsonrpc_models/storage_error.py +46 -0
- near_jsonrpc_models/storage_get_mode.py +9 -0
- near_jsonrpc_models/storage_usage_config_view.py +11 -0
- near_jsonrpc_models/store_key.py +12 -0
- near_jsonrpc_models/store_value.py +12 -0
- near_jsonrpc_models/strict_model.py +5 -0
- near_jsonrpc_models/sync_checkpoint.py +7 -0
- near_jsonrpc_models/sync_concurrency.py +19 -0
- near_jsonrpc_models/sync_config.py +23 -0
- near_jsonrpc_models/tier1proxy_view.py +7 -0
- near_jsonrpc_models/tracked_shards_config.py +42 -0
- near_jsonrpc_models/transfer_action.py +6 -0
- near_jsonrpc_models/transfer_to_gas_key_action.py +8 -0
- near_jsonrpc_models/tx_execution_error.py +21 -0
- near_jsonrpc_models/tx_execution_status.py +14 -0
- near_jsonrpc_models/use_global_contract_action.py +8 -0
- near_jsonrpc_models/validator_info.py +6 -0
- near_jsonrpc_models/validator_kickout_reason.py +67 -0
- near_jsonrpc_models/validator_kickout_view.py +8 -0
- near_jsonrpc_models/validator_stake_view.py +13 -0
- near_jsonrpc_models/validator_stake_view_v1.py +10 -0
- near_jsonrpc_models/version.py +10 -0
- near_jsonrpc_models/view_state_result.py +10 -0
- near_jsonrpc_models/vmconfig_view.py +44 -0
- near_jsonrpc_models/vmkind.py +9 -0
- near_jsonrpc_models/wasm_trap.py +9 -0
- near_jsonrpc_models/witness_config_view.py +17 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from near_jsonrpc_models.internal_error import InternalError
|
|
2
|
+
from near_jsonrpc_models.rpc_request_validation_error_kind import RpcRequestValidationErrorKind
|
|
3
|
+
from near_jsonrpc_models.rpc_state_changes_error import RpcStateChangesError
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
from pydantic import RootModel
|
|
6
|
+
from typing import Literal
|
|
7
|
+
from typing import Union
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ErrorWrapperForRpcStateChangesErrorRequestValidationError(BaseModel):
|
|
11
|
+
cause: RpcRequestValidationErrorKind
|
|
12
|
+
name: Literal['REQUEST_VALIDATION_ERROR']
|
|
13
|
+
|
|
14
|
+
class ErrorWrapperForRpcStateChangesErrorHandlerError(BaseModel):
|
|
15
|
+
cause: RpcStateChangesError
|
|
16
|
+
name: Literal['HANDLER_ERROR']
|
|
17
|
+
|
|
18
|
+
class ErrorWrapperForRpcStateChangesErrorInternalError(BaseModel):
|
|
19
|
+
cause: InternalError
|
|
20
|
+
name: Literal['INTERNAL_ERROR']
|
|
21
|
+
|
|
22
|
+
class ErrorWrapperForRpcStateChangesError(RootModel[Union[ErrorWrapperForRpcStateChangesErrorRequestValidationError, ErrorWrapperForRpcStateChangesErrorHandlerError, ErrorWrapperForRpcStateChangesErrorInternalError]]):
|
|
23
|
+
pass
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from near_jsonrpc_models.internal_error import InternalError
|
|
2
|
+
from near_jsonrpc_models.rpc_request_validation_error_kind import RpcRequestValidationErrorKind
|
|
3
|
+
from near_jsonrpc_models.rpc_status_error import RpcStatusError
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
from pydantic import RootModel
|
|
6
|
+
from typing import Literal
|
|
7
|
+
from typing import Union
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ErrorWrapperForRpcStatusErrorRequestValidationError(BaseModel):
|
|
11
|
+
cause: RpcRequestValidationErrorKind
|
|
12
|
+
name: Literal['REQUEST_VALIDATION_ERROR']
|
|
13
|
+
|
|
14
|
+
class ErrorWrapperForRpcStatusErrorHandlerError(BaseModel):
|
|
15
|
+
cause: RpcStatusError
|
|
16
|
+
name: Literal['HANDLER_ERROR']
|
|
17
|
+
|
|
18
|
+
class ErrorWrapperForRpcStatusErrorInternalError(BaseModel):
|
|
19
|
+
cause: InternalError
|
|
20
|
+
name: Literal['INTERNAL_ERROR']
|
|
21
|
+
|
|
22
|
+
class ErrorWrapperForRpcStatusError(RootModel[Union[ErrorWrapperForRpcStatusErrorRequestValidationError, ErrorWrapperForRpcStatusErrorHandlerError, ErrorWrapperForRpcStatusErrorInternalError]]):
|
|
23
|
+
pass
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from near_jsonrpc_models.internal_error import InternalError
|
|
2
|
+
from near_jsonrpc_models.rpc_request_validation_error_kind import RpcRequestValidationErrorKind
|
|
3
|
+
from near_jsonrpc_models.rpc_transaction_error import RpcTransactionError
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
from pydantic import RootModel
|
|
6
|
+
from typing import Literal
|
|
7
|
+
from typing import Union
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ErrorWrapperForRpcTransactionErrorRequestValidationError(BaseModel):
|
|
11
|
+
cause: RpcRequestValidationErrorKind
|
|
12
|
+
name: Literal['REQUEST_VALIDATION_ERROR']
|
|
13
|
+
|
|
14
|
+
class ErrorWrapperForRpcTransactionErrorHandlerError(BaseModel):
|
|
15
|
+
cause: RpcTransactionError
|
|
16
|
+
name: Literal['HANDLER_ERROR']
|
|
17
|
+
|
|
18
|
+
class ErrorWrapperForRpcTransactionErrorInternalError(BaseModel):
|
|
19
|
+
cause: InternalError
|
|
20
|
+
name: Literal['INTERNAL_ERROR']
|
|
21
|
+
|
|
22
|
+
class ErrorWrapperForRpcTransactionError(RootModel[Union[ErrorWrapperForRpcTransactionErrorRequestValidationError, ErrorWrapperForRpcTransactionErrorHandlerError, ErrorWrapperForRpcTransactionErrorInternalError]]):
|
|
23
|
+
pass
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from near_jsonrpc_models.internal_error import InternalError
|
|
2
|
+
from near_jsonrpc_models.rpc_request_validation_error_kind import RpcRequestValidationErrorKind
|
|
3
|
+
from near_jsonrpc_models.rpc_validator_error import RpcValidatorError
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
from pydantic import RootModel
|
|
6
|
+
from typing import Literal
|
|
7
|
+
from typing import Union
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ErrorWrapperForRpcValidatorErrorRequestValidationError(BaseModel):
|
|
11
|
+
cause: RpcRequestValidationErrorKind
|
|
12
|
+
name: Literal['REQUEST_VALIDATION_ERROR']
|
|
13
|
+
|
|
14
|
+
class ErrorWrapperForRpcValidatorErrorHandlerError(BaseModel):
|
|
15
|
+
cause: RpcValidatorError
|
|
16
|
+
name: Literal['HANDLER_ERROR']
|
|
17
|
+
|
|
18
|
+
class ErrorWrapperForRpcValidatorErrorInternalError(BaseModel):
|
|
19
|
+
cause: InternalError
|
|
20
|
+
name: Literal['INTERNAL_ERROR']
|
|
21
|
+
|
|
22
|
+
class ErrorWrapperForRpcValidatorError(RootModel[Union[ErrorWrapperForRpcValidatorErrorRequestValidationError, ErrorWrapperForRpcValidatorErrorHandlerError, ErrorWrapperForRpcValidatorErrorInternalError]]):
|
|
23
|
+
pass
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from near_jsonrpc_models.internal_error import InternalError
|
|
2
|
+
from near_jsonrpc_models.rpc_request_validation_error_kind import RpcRequestValidationErrorKind
|
|
3
|
+
from near_jsonrpc_models.rpc_view_access_key_error import RpcViewAccessKeyError
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
from pydantic import RootModel
|
|
6
|
+
from typing import Literal
|
|
7
|
+
from typing import Union
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ErrorWrapperForRpcViewAccessKeyErrorRequestValidationError(BaseModel):
|
|
11
|
+
cause: RpcRequestValidationErrorKind
|
|
12
|
+
name: Literal['REQUEST_VALIDATION_ERROR']
|
|
13
|
+
|
|
14
|
+
class ErrorWrapperForRpcViewAccessKeyErrorHandlerError(BaseModel):
|
|
15
|
+
cause: RpcViewAccessKeyError
|
|
16
|
+
name: Literal['HANDLER_ERROR']
|
|
17
|
+
|
|
18
|
+
class ErrorWrapperForRpcViewAccessKeyErrorInternalError(BaseModel):
|
|
19
|
+
cause: InternalError
|
|
20
|
+
name: Literal['INTERNAL_ERROR']
|
|
21
|
+
|
|
22
|
+
class ErrorWrapperForRpcViewAccessKeyError(RootModel[Union[ErrorWrapperForRpcViewAccessKeyErrorRequestValidationError, ErrorWrapperForRpcViewAccessKeyErrorHandlerError, ErrorWrapperForRpcViewAccessKeyErrorInternalError]]):
|
|
23
|
+
pass
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from near_jsonrpc_models.internal_error import InternalError
|
|
2
|
+
from near_jsonrpc_models.rpc_request_validation_error_kind import RpcRequestValidationErrorKind
|
|
3
|
+
from near_jsonrpc_models.rpc_view_access_key_list_error import RpcViewAccessKeyListError
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
from pydantic import RootModel
|
|
6
|
+
from typing import Literal
|
|
7
|
+
from typing import Union
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ErrorWrapperForRpcViewAccessKeyListErrorRequestValidationError(BaseModel):
|
|
11
|
+
cause: RpcRequestValidationErrorKind
|
|
12
|
+
name: Literal['REQUEST_VALIDATION_ERROR']
|
|
13
|
+
|
|
14
|
+
class ErrorWrapperForRpcViewAccessKeyListErrorHandlerError(BaseModel):
|
|
15
|
+
cause: RpcViewAccessKeyListError
|
|
16
|
+
name: Literal['HANDLER_ERROR']
|
|
17
|
+
|
|
18
|
+
class ErrorWrapperForRpcViewAccessKeyListErrorInternalError(BaseModel):
|
|
19
|
+
cause: InternalError
|
|
20
|
+
name: Literal['INTERNAL_ERROR']
|
|
21
|
+
|
|
22
|
+
class ErrorWrapperForRpcViewAccessKeyListError(RootModel[Union[ErrorWrapperForRpcViewAccessKeyListErrorRequestValidationError, ErrorWrapperForRpcViewAccessKeyListErrorHandlerError, ErrorWrapperForRpcViewAccessKeyListErrorInternalError]]):
|
|
23
|
+
pass
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from near_jsonrpc_models.internal_error import InternalError
|
|
2
|
+
from near_jsonrpc_models.rpc_request_validation_error_kind import RpcRequestValidationErrorKind
|
|
3
|
+
from near_jsonrpc_models.rpc_view_account_error import RpcViewAccountError
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
from pydantic import RootModel
|
|
6
|
+
from typing import Literal
|
|
7
|
+
from typing import Union
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ErrorWrapperForRpcViewAccountErrorRequestValidationError(BaseModel):
|
|
11
|
+
cause: RpcRequestValidationErrorKind
|
|
12
|
+
name: Literal['REQUEST_VALIDATION_ERROR']
|
|
13
|
+
|
|
14
|
+
class ErrorWrapperForRpcViewAccountErrorHandlerError(BaseModel):
|
|
15
|
+
cause: RpcViewAccountError
|
|
16
|
+
name: Literal['HANDLER_ERROR']
|
|
17
|
+
|
|
18
|
+
class ErrorWrapperForRpcViewAccountErrorInternalError(BaseModel):
|
|
19
|
+
cause: InternalError
|
|
20
|
+
name: Literal['INTERNAL_ERROR']
|
|
21
|
+
|
|
22
|
+
class ErrorWrapperForRpcViewAccountError(RootModel[Union[ErrorWrapperForRpcViewAccountErrorRequestValidationError, ErrorWrapperForRpcViewAccountErrorHandlerError, ErrorWrapperForRpcViewAccountErrorInternalError]]):
|
|
23
|
+
pass
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from near_jsonrpc_models.internal_error import InternalError
|
|
2
|
+
from near_jsonrpc_models.rpc_request_validation_error_kind import RpcRequestValidationErrorKind
|
|
3
|
+
from near_jsonrpc_models.rpc_view_code_error import RpcViewCodeError
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
from pydantic import RootModel
|
|
6
|
+
from typing import Literal
|
|
7
|
+
from typing import Union
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ErrorWrapperForRpcViewCodeErrorRequestValidationError(BaseModel):
|
|
11
|
+
cause: RpcRequestValidationErrorKind
|
|
12
|
+
name: Literal['REQUEST_VALIDATION_ERROR']
|
|
13
|
+
|
|
14
|
+
class ErrorWrapperForRpcViewCodeErrorHandlerError(BaseModel):
|
|
15
|
+
cause: RpcViewCodeError
|
|
16
|
+
name: Literal['HANDLER_ERROR']
|
|
17
|
+
|
|
18
|
+
class ErrorWrapperForRpcViewCodeErrorInternalError(BaseModel):
|
|
19
|
+
cause: InternalError
|
|
20
|
+
name: Literal['INTERNAL_ERROR']
|
|
21
|
+
|
|
22
|
+
class ErrorWrapperForRpcViewCodeError(RootModel[Union[ErrorWrapperForRpcViewCodeErrorRequestValidationError, ErrorWrapperForRpcViewCodeErrorHandlerError, ErrorWrapperForRpcViewCodeErrorInternalError]]):
|
|
23
|
+
pass
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from near_jsonrpc_models.internal_error import InternalError
|
|
2
|
+
from near_jsonrpc_models.rpc_request_validation_error_kind import RpcRequestValidationErrorKind
|
|
3
|
+
from near_jsonrpc_models.rpc_view_gas_key_error import RpcViewGasKeyError
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
from pydantic import RootModel
|
|
6
|
+
from typing import Literal
|
|
7
|
+
from typing import Union
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ErrorWrapperForRpcViewGasKeyErrorRequestValidationError(BaseModel):
|
|
11
|
+
cause: RpcRequestValidationErrorKind
|
|
12
|
+
name: Literal['REQUEST_VALIDATION_ERROR']
|
|
13
|
+
|
|
14
|
+
class ErrorWrapperForRpcViewGasKeyErrorHandlerError(BaseModel):
|
|
15
|
+
cause: RpcViewGasKeyError
|
|
16
|
+
name: Literal['HANDLER_ERROR']
|
|
17
|
+
|
|
18
|
+
class ErrorWrapperForRpcViewGasKeyErrorInternalError(BaseModel):
|
|
19
|
+
cause: InternalError
|
|
20
|
+
name: Literal['INTERNAL_ERROR']
|
|
21
|
+
|
|
22
|
+
class ErrorWrapperForRpcViewGasKeyError(RootModel[Union[ErrorWrapperForRpcViewGasKeyErrorRequestValidationError, ErrorWrapperForRpcViewGasKeyErrorHandlerError, ErrorWrapperForRpcViewGasKeyErrorInternalError]]):
|
|
23
|
+
pass
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from near_jsonrpc_models.internal_error import InternalError
|
|
2
|
+
from near_jsonrpc_models.rpc_request_validation_error_kind import RpcRequestValidationErrorKind
|
|
3
|
+
from near_jsonrpc_models.rpc_view_gas_key_list_error import RpcViewGasKeyListError
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
from pydantic import RootModel
|
|
6
|
+
from typing import Literal
|
|
7
|
+
from typing import Union
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ErrorWrapperForRpcViewGasKeyListErrorRequestValidationError(BaseModel):
|
|
11
|
+
cause: RpcRequestValidationErrorKind
|
|
12
|
+
name: Literal['REQUEST_VALIDATION_ERROR']
|
|
13
|
+
|
|
14
|
+
class ErrorWrapperForRpcViewGasKeyListErrorHandlerError(BaseModel):
|
|
15
|
+
cause: RpcViewGasKeyListError
|
|
16
|
+
name: Literal['HANDLER_ERROR']
|
|
17
|
+
|
|
18
|
+
class ErrorWrapperForRpcViewGasKeyListErrorInternalError(BaseModel):
|
|
19
|
+
cause: InternalError
|
|
20
|
+
name: Literal['INTERNAL_ERROR']
|
|
21
|
+
|
|
22
|
+
class ErrorWrapperForRpcViewGasKeyListError(RootModel[Union[ErrorWrapperForRpcViewGasKeyListErrorRequestValidationError, ErrorWrapperForRpcViewGasKeyListErrorHandlerError, ErrorWrapperForRpcViewGasKeyListErrorInternalError]]):
|
|
23
|
+
pass
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from near_jsonrpc_models.internal_error import InternalError
|
|
2
|
+
from near_jsonrpc_models.rpc_request_validation_error_kind import RpcRequestValidationErrorKind
|
|
3
|
+
from near_jsonrpc_models.rpc_view_state_error import RpcViewStateError
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
from pydantic import RootModel
|
|
6
|
+
from typing import Literal
|
|
7
|
+
from typing import Union
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ErrorWrapperForRpcViewStateErrorRequestValidationError(BaseModel):
|
|
11
|
+
cause: RpcRequestValidationErrorKind
|
|
12
|
+
name: Literal['REQUEST_VALIDATION_ERROR']
|
|
13
|
+
|
|
14
|
+
class ErrorWrapperForRpcViewStateErrorHandlerError(BaseModel):
|
|
15
|
+
cause: RpcViewStateError
|
|
16
|
+
name: Literal['HANDLER_ERROR']
|
|
17
|
+
|
|
18
|
+
class ErrorWrapperForRpcViewStateErrorInternalError(BaseModel):
|
|
19
|
+
cause: InternalError
|
|
20
|
+
name: Literal['INTERNAL_ERROR']
|
|
21
|
+
|
|
22
|
+
class ErrorWrapperForRpcViewStateError(RootModel[Union[ErrorWrapperForRpcViewStateErrorRequestValidationError, ErrorWrapperForRpcViewStateErrorHandlerError, ErrorWrapperForRpcViewStateErrorInternalError]]):
|
|
23
|
+
pass
|
|
24
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from near_jsonrpc_models.cost_gas_used import CostGasUsed
|
|
2
|
+
from pydantic import BaseModel
|
|
3
|
+
from pydantic import conint
|
|
4
|
+
from typing import List
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ExecutionMetadataView(BaseModel):
|
|
8
|
+
gas_profile: List[CostGasUsed] | None = None
|
|
9
|
+
version: conint(ge=0, le=4294967295)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from near_jsonrpc_models.account_id import AccountId
|
|
2
|
+
from near_jsonrpc_models.crypto_hash import CryptoHash
|
|
3
|
+
from near_jsonrpc_models.execution_metadata_view import ExecutionMetadataView
|
|
4
|
+
from near_jsonrpc_models.execution_status_view import ExecutionStatusView
|
|
5
|
+
from near_jsonrpc_models.near_gas import NearGas
|
|
6
|
+
from near_jsonrpc_models.near_token import NearToken
|
|
7
|
+
from pydantic import BaseModel
|
|
8
|
+
from pydantic import Field
|
|
9
|
+
from typing import List
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ExecutionOutcomeView(BaseModel):
|
|
13
|
+
# The id of the account on which the execution happens. For transaction this is signer_id,
|
|
14
|
+
# for receipt this is receiver_id.
|
|
15
|
+
executor_id: AccountId
|
|
16
|
+
# The amount of the gas burnt by the given transaction or receipt.
|
|
17
|
+
gas_burnt: NearGas
|
|
18
|
+
# Logs from this transaction or receipt.
|
|
19
|
+
logs: List[str]
|
|
20
|
+
# Execution metadata, versioned
|
|
21
|
+
metadata: ExecutionMetadataView = Field(default_factory=lambda: ExecutionMetadataView(**{'version': 1}))
|
|
22
|
+
# Receipt IDs generated by this transaction or receipt.
|
|
23
|
+
receipt_ids: List[CryptoHash]
|
|
24
|
+
# Execution status. Contains the result in case of successful execution.
|
|
25
|
+
status: ExecutionStatusView
|
|
26
|
+
# The amount of tokens burnt corresponding to the burnt gas amount.
|
|
27
|
+
# This value doesn't always equal to the `gas_burnt` multiplied by the gas price, because
|
|
28
|
+
# the prepaid gas price might be lower than the actual gas price and it creates a deficit.
|
|
29
|
+
# `tokens_burnt` also contains the penalty subtracted from refunds, while
|
|
30
|
+
# `gas_burnt` only contains the gas that we actually burn for the execution.
|
|
31
|
+
tokens_burnt: NearToken
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from near_jsonrpc_models.crypto_hash import CryptoHash
|
|
2
|
+
from near_jsonrpc_models.execution_outcome_view import ExecutionOutcomeView
|
|
3
|
+
from near_jsonrpc_models.merkle_path_item import MerklePathItem
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
from typing import List
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ExecutionOutcomeWithIdView(BaseModel):
|
|
9
|
+
block_hash: CryptoHash
|
|
10
|
+
id: CryptoHash
|
|
11
|
+
outcome: ExecutionOutcomeView
|
|
12
|
+
proof: List[MerklePathItem]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from near_jsonrpc_models.crypto_hash import CryptoHash
|
|
2
|
+
from near_jsonrpc_models.strict_model import StrictBaseModel
|
|
3
|
+
from near_jsonrpc_models.tx_execution_error import TxExecutionError
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
from pydantic import RootModel
|
|
6
|
+
from typing import Literal
|
|
7
|
+
from typing import Union
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
"""The execution is pending or unknown."""
|
|
11
|
+
class ExecutionStatusViewUnknown(RootModel[Literal['Unknown']]):
|
|
12
|
+
pass
|
|
13
|
+
|
|
14
|
+
class ExecutionStatusViewFailure(StrictBaseModel):
|
|
15
|
+
"""The execution has failed."""
|
|
16
|
+
Failure: TxExecutionError
|
|
17
|
+
|
|
18
|
+
class ExecutionStatusViewSuccessValue(StrictBaseModel):
|
|
19
|
+
"""The final action succeeded and returned some value or an empty vec encoded in base64."""
|
|
20
|
+
SuccessValue: str
|
|
21
|
+
|
|
22
|
+
class ExecutionStatusViewSuccessReceiptId(StrictBaseModel):
|
|
23
|
+
"""The final action of the receipt returned a promise or the signed transaction was converted
|
|
24
|
+
to a receipt. Contains the receipt_id of the generated receipt."""
|
|
25
|
+
SuccessReceiptId: CryptoHash
|
|
26
|
+
|
|
27
|
+
class ExecutionStatusView(RootModel[Union[ExecutionStatusViewUnknown, ExecutionStatusViewFailure, ExecutionStatusViewSuccessValue, ExecutionStatusViewSuccessReceiptId]]):
|
|
28
|
+
pass
|
|
29
|
+
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"""Typed view of ExtCostsConfig to preserve JSON output field names in protocol
|
|
2
|
+
config RPC output."""
|
|
3
|
+
|
|
4
|
+
from near_jsonrpc_models.near_gas import NearGas
|
|
5
|
+
from pydantic import BaseModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ExtCostsConfigView(BaseModel):
|
|
9
|
+
# Base cost for multiexp
|
|
10
|
+
alt_bn128_g1_multiexp_base: NearGas = None
|
|
11
|
+
# Per element cost for multiexp
|
|
12
|
+
alt_bn128_g1_multiexp_element: NearGas = None
|
|
13
|
+
# Base cost for sum
|
|
14
|
+
alt_bn128_g1_sum_base: NearGas = None
|
|
15
|
+
# Per element cost for sum
|
|
16
|
+
alt_bn128_g1_sum_element: NearGas = None
|
|
17
|
+
# Base cost for pairing check
|
|
18
|
+
alt_bn128_pairing_check_base: NearGas = None
|
|
19
|
+
# Per element cost for pairing check
|
|
20
|
+
alt_bn128_pairing_check_element: NearGas = None
|
|
21
|
+
# Base cost for calling a host function.
|
|
22
|
+
base: NearGas = None
|
|
23
|
+
bls12381_g1_multiexp_base: NearGas = None
|
|
24
|
+
bls12381_g1_multiexp_element: NearGas = None
|
|
25
|
+
bls12381_g2_multiexp_base: NearGas = None
|
|
26
|
+
bls12381_g2_multiexp_element: NearGas = None
|
|
27
|
+
bls12381_map_fp2_to_g2_base: NearGas = None
|
|
28
|
+
bls12381_map_fp2_to_g2_element: NearGas = None
|
|
29
|
+
bls12381_map_fp_to_g1_base: NearGas = None
|
|
30
|
+
bls12381_map_fp_to_g1_element: NearGas = None
|
|
31
|
+
bls12381_p1_decompress_base: NearGas = None
|
|
32
|
+
bls12381_p1_decompress_element: NearGas = None
|
|
33
|
+
bls12381_p1_sum_base: NearGas = None
|
|
34
|
+
bls12381_p1_sum_element: NearGas = None
|
|
35
|
+
bls12381_p2_decompress_base: NearGas = None
|
|
36
|
+
bls12381_p2_decompress_element: NearGas = None
|
|
37
|
+
bls12381_p2_sum_base: NearGas = None
|
|
38
|
+
bls12381_p2_sum_element: NearGas = None
|
|
39
|
+
bls12381_pairing_base: NearGas = None
|
|
40
|
+
bls12381_pairing_element: NearGas = None
|
|
41
|
+
contract_compile_base: NearGas = None
|
|
42
|
+
contract_compile_bytes: NearGas = None
|
|
43
|
+
# Base cost of loading a pre-compiled contract
|
|
44
|
+
contract_loading_base: NearGas = None
|
|
45
|
+
# Cost per byte of loading a pre-compiled contract
|
|
46
|
+
contract_loading_bytes: NearGas = None
|
|
47
|
+
# Cost of calling ecrecover
|
|
48
|
+
ecrecover_base: NearGas = None
|
|
49
|
+
# Cost of getting ed25519 base
|
|
50
|
+
ed25519_verify_base: NearGas = None
|
|
51
|
+
# Cost of getting ed25519 per byte
|
|
52
|
+
ed25519_verify_byte: NearGas = None
|
|
53
|
+
# Cost of getting sha256 base
|
|
54
|
+
keccak256_base: NearGas = None
|
|
55
|
+
# Cost of getting sha256 per byte
|
|
56
|
+
keccak256_byte: NearGas = None
|
|
57
|
+
# Cost of getting sha256 base
|
|
58
|
+
keccak512_base: NearGas = None
|
|
59
|
+
# Cost of getting sha256 per byte
|
|
60
|
+
keccak512_byte: NearGas = None
|
|
61
|
+
# Cost for calling logging.
|
|
62
|
+
log_base: NearGas = None
|
|
63
|
+
# Cost for logging per byte
|
|
64
|
+
log_byte: NearGas = None
|
|
65
|
+
# Cost for calling `promise_and`
|
|
66
|
+
promise_and_base: NearGas = None
|
|
67
|
+
# Cost for calling `promise_and` for each promise
|
|
68
|
+
promise_and_per_promise: NearGas = None
|
|
69
|
+
# Cost for calling `promise_return`
|
|
70
|
+
promise_return: NearGas = None
|
|
71
|
+
# Cost for reading trie node from memory
|
|
72
|
+
read_cached_trie_node: NearGas = None
|
|
73
|
+
# Base cost for guest memory read
|
|
74
|
+
read_memory_base: NearGas = None
|
|
75
|
+
# Cost for guest memory read
|
|
76
|
+
read_memory_byte: NearGas = None
|
|
77
|
+
# Base cost for reading from register
|
|
78
|
+
read_register_base: NearGas = None
|
|
79
|
+
# Cost for reading byte from register
|
|
80
|
+
read_register_byte: NearGas = None
|
|
81
|
+
# Cost of getting ripemd160 base
|
|
82
|
+
ripemd160_base: NearGas = None
|
|
83
|
+
# Cost of getting ripemd160 per message block
|
|
84
|
+
ripemd160_block: NearGas = None
|
|
85
|
+
# Cost of getting sha256 base
|
|
86
|
+
sha256_base: NearGas = None
|
|
87
|
+
# Cost of getting sha256 per byte
|
|
88
|
+
sha256_byte: NearGas = None
|
|
89
|
+
# Storage trie check for key existence cost base
|
|
90
|
+
storage_has_key_base: NearGas = None
|
|
91
|
+
# Storage trie check for key existence per key byte
|
|
92
|
+
storage_has_key_byte: NearGas = None
|
|
93
|
+
# Create trie range iterator cost per byte of from key.
|
|
94
|
+
storage_iter_create_from_byte: NearGas = None
|
|
95
|
+
# Create trie prefix iterator cost base
|
|
96
|
+
storage_iter_create_prefix_base: NearGas = None
|
|
97
|
+
# Create trie prefix iterator cost per byte.
|
|
98
|
+
storage_iter_create_prefix_byte: NearGas = None
|
|
99
|
+
# Create trie range iterator cost base
|
|
100
|
+
storage_iter_create_range_base: NearGas = None
|
|
101
|
+
# Create trie range iterator cost per byte of to key.
|
|
102
|
+
storage_iter_create_to_byte: NearGas = None
|
|
103
|
+
# Trie iterator per key base cost
|
|
104
|
+
storage_iter_next_base: NearGas = None
|
|
105
|
+
# Trie iterator next key byte cost
|
|
106
|
+
storage_iter_next_key_byte: NearGas = None
|
|
107
|
+
# Trie iterator next key byte cost
|
|
108
|
+
storage_iter_next_value_byte: NearGas = None
|
|
109
|
+
# Storage trie read key overhead base cost, when doing large reads
|
|
110
|
+
storage_large_read_overhead_base: NearGas = None
|
|
111
|
+
# Storage trie read key overhead per-byte cost, when doing large reads
|
|
112
|
+
storage_large_read_overhead_byte: NearGas = None
|
|
113
|
+
# Storage trie read key base cost
|
|
114
|
+
storage_read_base: NearGas = None
|
|
115
|
+
# Storage trie read key per byte cost
|
|
116
|
+
storage_read_key_byte: NearGas = None
|
|
117
|
+
# Storage trie read value cost per byte cost
|
|
118
|
+
storage_read_value_byte: NearGas = None
|
|
119
|
+
# Remove key from trie base cost
|
|
120
|
+
storage_remove_base: NearGas = None
|
|
121
|
+
# Remove key from trie per byte cost
|
|
122
|
+
storage_remove_key_byte: NearGas = None
|
|
123
|
+
# Remove key from trie ret value byte cost
|
|
124
|
+
storage_remove_ret_value_byte: NearGas = None
|
|
125
|
+
# Storage trie write key base cost
|
|
126
|
+
storage_write_base: NearGas = None
|
|
127
|
+
# Storage trie write cost per byte of evicted value.
|
|
128
|
+
storage_write_evicted_byte: NearGas = None
|
|
129
|
+
# Storage trie write key per byte cost
|
|
130
|
+
storage_write_key_byte: NearGas = None
|
|
131
|
+
# Storage trie write value per byte cost
|
|
132
|
+
storage_write_value_byte: NearGas = None
|
|
133
|
+
# Cost per reading trie node from DB
|
|
134
|
+
touching_trie_node: NearGas = None
|
|
135
|
+
# Base cost of decoding utf16. It's used for `log_utf16`.
|
|
136
|
+
utf16_decoding_base: NearGas = None
|
|
137
|
+
# Cost per byte of decoding utf16. It's used for `log_utf16`.
|
|
138
|
+
utf16_decoding_byte: NearGas = None
|
|
139
|
+
# Base cost of decoding utf8. It's used for `log_utf8` and `panic_utf8`.
|
|
140
|
+
utf8_decoding_base: NearGas = None
|
|
141
|
+
# Cost per byte of decoding utf8. It's used for `log_utf8` and `panic_utf8`.
|
|
142
|
+
utf8_decoding_byte: NearGas = None
|
|
143
|
+
# Cost of calling `validator_stake`.
|
|
144
|
+
validator_stake_base: NearGas = None
|
|
145
|
+
# Cost of calling `validator_total_stake`.
|
|
146
|
+
validator_total_stake_base: NearGas = None
|
|
147
|
+
# Base cost for guest memory write
|
|
148
|
+
write_memory_base: NearGas = None
|
|
149
|
+
# Cost for guest memory write per byte
|
|
150
|
+
write_memory_byte: NearGas = None
|
|
151
|
+
# Base cost for writing into register
|
|
152
|
+
write_register_base: NearGas = None
|
|
153
|
+
# Cost for writing byte into register
|
|
154
|
+
write_register_byte: NearGas = None
|
|
155
|
+
# Base cost for creating a yield promise.
|
|
156
|
+
yield_create_base: NearGas = None
|
|
157
|
+
# Per byte cost of arguments and method name.
|
|
158
|
+
yield_create_byte: NearGas = None
|
|
159
|
+
# Base cost for resuming a yield receipt.
|
|
160
|
+
yield_resume_base: NearGas = None
|
|
161
|
+
# Per byte cost of resume payload.
|
|
162
|
+
yield_resume_byte: NearGas = None
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from near_jsonrpc_models.external_storage_location import ExternalStorageLocation
|
|
2
|
+
from pydantic import BaseModel
|
|
3
|
+
from pydantic import conint
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ExternalStorageConfig(BaseModel):
|
|
7
|
+
# The number of attempts the node will make to obtain a part from peers in
|
|
8
|
+
# the network before it fetches from external storage.
|
|
9
|
+
external_storage_fallback_threshold: conint(ge=0, le=18446744073709551615) = 3
|
|
10
|
+
# Location of state parts.
|
|
11
|
+
location: ExternalStorageLocation = None
|
|
12
|
+
# When fetching state parts from external storage, throttle fetch requests
|
|
13
|
+
# to this many concurrent requests.
|
|
14
|
+
num_concurrent_requests: conint(ge=0, le=255) = 25
|
|
15
|
+
# During catchup, the node will use a different number of concurrent requests
|
|
16
|
+
# to reduce the performance impact of state sync.
|
|
17
|
+
num_concurrent_requests_during_catchup: conint(ge=0, le=255) = 5
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""Supported external storage backends and their minimal config."""
|
|
2
|
+
|
|
3
|
+
from near_jsonrpc_models.strict_model import StrictBaseModel
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
from pydantic import RootModel
|
|
6
|
+
from typing import Union
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ExternalStorageLocationS3Payload(BaseModel):
|
|
10
|
+
# Location on S3.
|
|
11
|
+
bucket: str
|
|
12
|
+
# Data may only be available in certain locations.
|
|
13
|
+
region: str
|
|
14
|
+
|
|
15
|
+
class ExternalStorageLocationS3(StrictBaseModel):
|
|
16
|
+
S3: ExternalStorageLocationS3Payload
|
|
17
|
+
|
|
18
|
+
class ExternalStorageLocationFilesystemPayload(BaseModel):
|
|
19
|
+
root_dir: str
|
|
20
|
+
|
|
21
|
+
class ExternalStorageLocationFilesystem(StrictBaseModel):
|
|
22
|
+
"""Local filesystem root for storing data."""
|
|
23
|
+
Filesystem: ExternalStorageLocationFilesystemPayload
|
|
24
|
+
|
|
25
|
+
class ExternalStorageLocationGcsPayload(BaseModel):
|
|
26
|
+
bucket: str
|
|
27
|
+
|
|
28
|
+
class ExternalStorageLocationGcs(StrictBaseModel):
|
|
29
|
+
"""Google Cloud Storage bucket name."""
|
|
30
|
+
GCS: ExternalStorageLocationGcsPayload
|
|
31
|
+
|
|
32
|
+
class ExternalStorageLocation(RootModel[Union[ExternalStorageLocationS3, ExternalStorageLocationFilesystem, ExternalStorageLocationGcs]]):
|
|
33
|
+
pass
|
|
34
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Costs associated with an object that can only be sent over the network (and executed
|
|
2
|
+
by the receiver).
|
|
3
|
+
NOTE: `send_sir` or `send_not_sir` fees are usually burned when the item is being created.
|
|
4
|
+
And `execution` fee is burned when the item is being executed."""
|
|
5
|
+
|
|
6
|
+
from near_jsonrpc_models.near_gas import NearGas
|
|
7
|
+
from pydantic import BaseModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Fee(BaseModel):
|
|
11
|
+
# Fee for executing the object.
|
|
12
|
+
execution: NearGas
|
|
13
|
+
# Fee for sending an object potentially across the shards.
|
|
14
|
+
send_not_sir: NearGas
|
|
15
|
+
# Fee for sending an object from the sender to itself, guaranteeing that it does not leave
|
|
16
|
+
# the shard.
|
|
17
|
+
send_sir: NearGas
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""Execution outcome of the transaction and all the subsequent receipts.
|
|
2
|
+
Could be not finalized yet"""
|
|
3
|
+
|
|
4
|
+
from near_jsonrpc_models.execution_outcome_with_id_view import ExecutionOutcomeWithIdView
|
|
5
|
+
from near_jsonrpc_models.final_execution_status import FinalExecutionStatus
|
|
6
|
+
from near_jsonrpc_models.signed_transaction_view import SignedTransactionView
|
|
7
|
+
from pydantic import BaseModel
|
|
8
|
+
from typing import List
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FinalExecutionOutcomeView(BaseModel):
|
|
12
|
+
# The execution outcome of receipts.
|
|
13
|
+
receipts_outcome: List[ExecutionOutcomeWithIdView]
|
|
14
|
+
# Execution status defined by chain.rs:get_final_transaction_result
|
|
15
|
+
# FinalExecutionStatus::NotStarted - the tx is not converted to the receipt yet
|
|
16
|
+
# FinalExecutionStatus::Started - we have at least 1 receipt, but the first leaf receipt_id (using dfs) hasn't finished the execution
|
|
17
|
+
# FinalExecutionStatus::Failure - the result of the first leaf receipt_id
|
|
18
|
+
# FinalExecutionStatus::SuccessValue - the result of the first leaf receipt_id
|
|
19
|
+
status: FinalExecutionStatus
|
|
20
|
+
# Signed Transaction
|
|
21
|
+
transaction: SignedTransactionView
|
|
22
|
+
# The execution outcome of the signed transaction.
|
|
23
|
+
transaction_outcome: ExecutionOutcomeWithIdView
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""Final execution outcome of the transaction and all of subsequent the receipts. Also includes
|
|
2
|
+
the generated receipt."""
|
|
3
|
+
|
|
4
|
+
from near_jsonrpc_models.execution_outcome_with_id_view import ExecutionOutcomeWithIdView
|
|
5
|
+
from near_jsonrpc_models.final_execution_status import FinalExecutionStatus
|
|
6
|
+
from near_jsonrpc_models.receipt_view import ReceiptView
|
|
7
|
+
from near_jsonrpc_models.signed_transaction_view import SignedTransactionView
|
|
8
|
+
from pydantic import BaseModel
|
|
9
|
+
from typing import List
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FinalExecutionOutcomeWithReceiptView(BaseModel):
|
|
13
|
+
# Receipts generated from the transaction
|
|
14
|
+
receipts: List[ReceiptView]
|
|
15
|
+
# The execution outcome of receipts.
|
|
16
|
+
receipts_outcome: List[ExecutionOutcomeWithIdView]
|
|
17
|
+
# Execution status defined by chain.rs:get_final_transaction_result
|
|
18
|
+
# FinalExecutionStatus::NotStarted - the tx is not converted to the receipt yet
|
|
19
|
+
# FinalExecutionStatus::Started - we have at least 1 receipt, but the first leaf receipt_id (using dfs) hasn't finished the execution
|
|
20
|
+
# FinalExecutionStatus::Failure - the result of the first leaf receipt_id
|
|
21
|
+
# FinalExecutionStatus::SuccessValue - the result of the first leaf receipt_id
|
|
22
|
+
status: FinalExecutionStatus
|
|
23
|
+
# Signed Transaction
|
|
24
|
+
transaction: SignedTransactionView
|
|
25
|
+
# The execution outcome of the signed transaction.
|
|
26
|
+
transaction_outcome: ExecutionOutcomeWithIdView
|