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,15 @@
|
|
|
1
|
+
from near_jsonrpc_models.rpc_known_producer import RpcKnownProducer
|
|
2
|
+
from near_jsonrpc_models.rpc_peer_info import RpcPeerInfo
|
|
3
|
+
from pydantic import BaseModel
|
|
4
|
+
from pydantic import conint
|
|
5
|
+
from typing import List
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class RpcNetworkInfoResponse(BaseModel):
|
|
9
|
+
active_peers: List[RpcPeerInfo]
|
|
10
|
+
# Accounts of known block and chunk producers from routing table.
|
|
11
|
+
known_producers: List[RpcKnownProducer]
|
|
12
|
+
num_active_peers: conint(ge=0, le=4294967295)
|
|
13
|
+
peer_max_count: conint(ge=0, le=4294967295)
|
|
14
|
+
received_bytes_per_sec: conint(ge=0, le=18446744073709551615)
|
|
15
|
+
sent_bytes_per_sec: conint(ge=0, le=18446744073709551615)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from pydantic import BaseModel
|
|
2
|
+
from pydantic import RootModel
|
|
3
|
+
from typing import Any
|
|
4
|
+
from typing import Dict
|
|
5
|
+
from typing import Literal
|
|
6
|
+
from typing import Union
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class RpcProtocolConfigErrorUnknownBlock(BaseModel):
|
|
10
|
+
info: Dict[str, Any]
|
|
11
|
+
name: Literal['UNKNOWN_BLOCK']
|
|
12
|
+
|
|
13
|
+
class RpcProtocolConfigErrorInternalErrorInfo(BaseModel):
|
|
14
|
+
error_message: str
|
|
15
|
+
|
|
16
|
+
class RpcProtocolConfigErrorInternalError(BaseModel):
|
|
17
|
+
info: RpcProtocolConfigErrorInternalErrorInfo
|
|
18
|
+
name: Literal['INTERNAL_ERROR']
|
|
19
|
+
|
|
20
|
+
class RpcProtocolConfigError(RootModel[Union[RpcProtocolConfigErrorUnknownBlock, RpcProtocolConfigErrorInternalError]]):
|
|
21
|
+
pass
|
|
22
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from near_jsonrpc_models.block_id import BlockId
|
|
2
|
+
from near_jsonrpc_models.finality import Finality
|
|
3
|
+
from near_jsonrpc_models.sync_checkpoint import SyncCheckpoint
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
from pydantic import RootModel
|
|
6
|
+
from typing import Union
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class RpcProtocolConfigRequestBlockId(BaseModel):
|
|
10
|
+
block_id: BlockId
|
|
11
|
+
|
|
12
|
+
class RpcProtocolConfigRequestFinality(BaseModel):
|
|
13
|
+
finality: Finality
|
|
14
|
+
|
|
15
|
+
class RpcProtocolConfigRequestSyncCheckpoint(BaseModel):
|
|
16
|
+
sync_checkpoint: SyncCheckpoint
|
|
17
|
+
|
|
18
|
+
class RpcProtocolConfigRequest(RootModel[Union[RpcProtocolConfigRequestBlockId, RpcProtocolConfigRequestFinality, RpcProtocolConfigRequestSyncCheckpoint]]):
|
|
19
|
+
pass
|
|
20
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from near_jsonrpc_models.account_id import AccountId
|
|
3
|
+
from near_jsonrpc_models.near_gas import NearGas
|
|
4
|
+
from near_jsonrpc_models.near_token import NearToken
|
|
5
|
+
from near_jsonrpc_models.runtime_config_view import RuntimeConfigView
|
|
6
|
+
from near_jsonrpc_models.shard_layout import ShardLayout
|
|
7
|
+
from pydantic import BaseModel
|
|
8
|
+
from pydantic import conint
|
|
9
|
+
from pydantic import conlist
|
|
10
|
+
from pydantic import field_validator
|
|
11
|
+
from typing import List
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class RpcProtocolConfigResponse(BaseModel):
|
|
15
|
+
# Expected number of hidden validators per shard.
|
|
16
|
+
avg_hidden_validator_seats_per_shard: List[conint(ge=0, le=18446744073709551615)] = None
|
|
17
|
+
# Threshold for kicking out block producers, between 0 and 100.
|
|
18
|
+
block_producer_kickout_threshold: conint(ge=0, le=255) = None
|
|
19
|
+
# ID of the blockchain. This must be unique for every blockchain.
|
|
20
|
+
# If your testnet blockchains do not have unique chain IDs, you will have a bad time.
|
|
21
|
+
chain_id: str = None
|
|
22
|
+
# Threshold for kicking out chunk producers, between 0 and 100.
|
|
23
|
+
chunk_producer_kickout_threshold: conint(ge=0, le=255) = None
|
|
24
|
+
# Threshold for kicking out nodes which are only chunk validators, between 0 and 100.
|
|
25
|
+
chunk_validator_only_kickout_threshold: conint(ge=0, le=255) = None
|
|
26
|
+
# Enable dynamic re-sharding.
|
|
27
|
+
dynamic_resharding: bool = None
|
|
28
|
+
# Epoch length counted in block heights.
|
|
29
|
+
epoch_length: conint(ge=0, le=18446744073709551615) = None
|
|
30
|
+
# Fishermen stake threshold.
|
|
31
|
+
fishermen_threshold: NearToken = None
|
|
32
|
+
# Initial gas limit.
|
|
33
|
+
gas_limit: NearGas = None
|
|
34
|
+
# Gas price adjustment rate
|
|
35
|
+
gas_price_adjustment_rate: conlist(conint(ge=-2147483648, le=2147483647), min_length=2, max_length=2) = None
|
|
36
|
+
# Height of genesis block.
|
|
37
|
+
genesis_height: conint(ge=0, le=18446744073709551615) = None
|
|
38
|
+
# Official time of blockchain start.
|
|
39
|
+
genesis_time: datetime = None
|
|
40
|
+
# Maximum gas price.
|
|
41
|
+
max_gas_price: NearToken = None
|
|
42
|
+
# Maximum inflation on the total supply every epoch.
|
|
43
|
+
max_inflation_rate: conlist(conint(ge=-2147483648, le=2147483647), min_length=2, max_length=2) = None
|
|
44
|
+
# Max stake percentage of the validators we will kick out.
|
|
45
|
+
max_kickout_stake_perc: conint(ge=0, le=255) = None
|
|
46
|
+
# Minimum gas price. It is also the initial gas price.
|
|
47
|
+
min_gas_price: NearToken = None
|
|
48
|
+
# The minimum stake required for staking is last seat price divided by this number.
|
|
49
|
+
minimum_stake_divisor: conint(ge=0, le=18446744073709551615) = None
|
|
50
|
+
# The lowest ratio s/s_total any block producer can have.
|
|
51
|
+
# See <https://github.com/near/NEPs/pull/167> for details
|
|
52
|
+
minimum_stake_ratio: conlist(conint(ge=-2147483648, le=2147483647), min_length=2, max_length=2) = None
|
|
53
|
+
# The minimum number of validators each shard must have
|
|
54
|
+
minimum_validators_per_shard: conint(ge=0, le=18446744073709551615) = None
|
|
55
|
+
# Number of block producer seats at genesis.
|
|
56
|
+
num_block_producer_seats: conint(ge=0, le=18446744073709551615) = None
|
|
57
|
+
# Defines number of shards and number of block producer seats per each shard at genesis.
|
|
58
|
+
num_block_producer_seats_per_shard: List[conint(ge=0, le=18446744073709551615)] = None
|
|
59
|
+
# Expected number of blocks per year
|
|
60
|
+
num_blocks_per_year: conint(ge=0, le=18446744073709551615) = None
|
|
61
|
+
# Online maximum threshold above which validator gets full reward.
|
|
62
|
+
online_max_threshold: conlist(conint(ge=-2147483648, le=2147483647), min_length=2, max_length=2) = None
|
|
63
|
+
# Online minimum threshold below which validator doesn't receive reward.
|
|
64
|
+
online_min_threshold: conlist(conint(ge=-2147483648, le=2147483647), min_length=2, max_length=2) = None
|
|
65
|
+
# Protocol treasury rate
|
|
66
|
+
protocol_reward_rate: conlist(conint(ge=-2147483648, le=2147483647), min_length=2, max_length=2) = None
|
|
67
|
+
# Protocol treasury account
|
|
68
|
+
protocol_treasury_account: AccountId = None
|
|
69
|
+
# Threshold of stake that needs to indicate that they ready for upgrade.
|
|
70
|
+
protocol_upgrade_stake_threshold: conlist(conint(ge=-2147483648, le=2147483647), min_length=2, max_length=2) = None
|
|
71
|
+
# Current Protocol Version
|
|
72
|
+
protocol_version: conint(ge=0, le=4294967295) = None
|
|
73
|
+
# Runtime configuration (mostly economics constants).
|
|
74
|
+
runtime_config: RuntimeConfigView = None
|
|
75
|
+
# Layout information regarding how to split accounts to shards
|
|
76
|
+
shard_layout: ShardLayout = None
|
|
77
|
+
# If true, shuffle the chunk producers across shards. In other words, if
|
|
78
|
+
# the shard assignments were `[S_0, S_1, S_2, S_3]` where `S_i` represents
|
|
79
|
+
# the set of chunk producers for shard `i`, if this flag were true, the
|
|
80
|
+
# shard assignments might become, for example, `[S_2, S_0, S_3, S_1]`.
|
|
81
|
+
shuffle_shard_assignment_for_chunk_producers: bool = None
|
|
82
|
+
# Number of target chunk validator mandates for each shard.
|
|
83
|
+
target_validator_mandates_per_shard: conint(ge=0, le=18446744073709551615) = None
|
|
84
|
+
# Number of blocks for which a given transaction is valid
|
|
85
|
+
transaction_validity_period: conint(ge=0, le=18446744073709551615) = None
|
|
86
|
+
|
|
87
|
+
@field_validator('genesis_time', mode='before')
|
|
88
|
+
def parse_genesis_time_to_datetime(cls, v):
|
|
89
|
+
from datetime import datetime
|
|
90
|
+
if v is None:
|
|
91
|
+
return v
|
|
92
|
+
if isinstance(v, datetime):
|
|
93
|
+
return v
|
|
94
|
+
if isinstance(v, str):
|
|
95
|
+
s = v
|
|
96
|
+
if s.endswith('Z'):
|
|
97
|
+
s = s[:-1] + '+00:00'
|
|
98
|
+
try:
|
|
99
|
+
return datetime.fromisoformat(s)
|
|
100
|
+
except Exception as e:
|
|
101
|
+
raise ValueError(f"genesis_time must be an ISO-8601 datetime string: {e}")
|
|
102
|
+
raise TypeError('genesis_time must be a datetime or ISO-8601 string')
|
|
103
|
+
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
from near_jsonrpc_models.account_id import AccountId
|
|
2
|
+
from near_jsonrpc_models.block_reference import BlockReference
|
|
3
|
+
from near_jsonrpc_models.crypto_hash import CryptoHash
|
|
4
|
+
from near_jsonrpc_models.function_call_error import FunctionCallError
|
|
5
|
+
from near_jsonrpc_models.global_contract_identifier import GlobalContractIdentifier
|
|
6
|
+
from near_jsonrpc_models.public_key import PublicKey
|
|
7
|
+
from near_jsonrpc_models.shard_id import ShardId
|
|
8
|
+
from pydantic import BaseModel
|
|
9
|
+
from pydantic import RootModel
|
|
10
|
+
from pydantic import conint
|
|
11
|
+
from typing import Literal
|
|
12
|
+
from typing import Union
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class RpcQueryErrorNoSyncedBlocks(BaseModel):
|
|
16
|
+
name: Literal['NO_SYNCED_BLOCKS']
|
|
17
|
+
|
|
18
|
+
class RpcQueryErrorUnavailableShardInfo(BaseModel):
|
|
19
|
+
requested_shard_id: ShardId
|
|
20
|
+
|
|
21
|
+
class RpcQueryErrorUnavailableShard(BaseModel):
|
|
22
|
+
info: RpcQueryErrorUnavailableShardInfo
|
|
23
|
+
name: Literal['UNAVAILABLE_SHARD']
|
|
24
|
+
|
|
25
|
+
class RpcQueryErrorGarbageCollectedBlockInfo(BaseModel):
|
|
26
|
+
block_hash: CryptoHash
|
|
27
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
28
|
+
|
|
29
|
+
class RpcQueryErrorGarbageCollectedBlock(BaseModel):
|
|
30
|
+
info: RpcQueryErrorGarbageCollectedBlockInfo
|
|
31
|
+
name: Literal['GARBAGE_COLLECTED_BLOCK']
|
|
32
|
+
|
|
33
|
+
class RpcQueryErrorUnknownBlockInfo(BaseModel):
|
|
34
|
+
block_reference: BlockReference
|
|
35
|
+
|
|
36
|
+
class RpcQueryErrorUnknownBlock(BaseModel):
|
|
37
|
+
info: RpcQueryErrorUnknownBlockInfo
|
|
38
|
+
name: Literal['UNKNOWN_BLOCK']
|
|
39
|
+
|
|
40
|
+
class RpcQueryErrorInvalidAccountInfo(BaseModel):
|
|
41
|
+
block_hash: CryptoHash
|
|
42
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
43
|
+
requested_account_id: AccountId
|
|
44
|
+
|
|
45
|
+
class RpcQueryErrorInvalidAccount(BaseModel):
|
|
46
|
+
info: RpcQueryErrorInvalidAccountInfo
|
|
47
|
+
name: Literal['INVALID_ACCOUNT']
|
|
48
|
+
|
|
49
|
+
class RpcQueryErrorUnknownAccountInfo(BaseModel):
|
|
50
|
+
block_hash: CryptoHash
|
|
51
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
52
|
+
requested_account_id: AccountId
|
|
53
|
+
|
|
54
|
+
class RpcQueryErrorUnknownAccount(BaseModel):
|
|
55
|
+
info: RpcQueryErrorUnknownAccountInfo
|
|
56
|
+
name: Literal['UNKNOWN_ACCOUNT']
|
|
57
|
+
|
|
58
|
+
class RpcQueryErrorNoContractCodeInfo(BaseModel):
|
|
59
|
+
block_hash: CryptoHash
|
|
60
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
61
|
+
contract_account_id: AccountId
|
|
62
|
+
|
|
63
|
+
class RpcQueryErrorNoContractCode(BaseModel):
|
|
64
|
+
info: RpcQueryErrorNoContractCodeInfo
|
|
65
|
+
name: Literal['NO_CONTRACT_CODE']
|
|
66
|
+
|
|
67
|
+
class RpcQueryErrorTooLargeContractStateInfo(BaseModel):
|
|
68
|
+
block_hash: CryptoHash
|
|
69
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
70
|
+
contract_account_id: AccountId
|
|
71
|
+
|
|
72
|
+
class RpcQueryErrorTooLargeContractState(BaseModel):
|
|
73
|
+
info: RpcQueryErrorTooLargeContractStateInfo
|
|
74
|
+
name: Literal['TOO_LARGE_CONTRACT_STATE']
|
|
75
|
+
|
|
76
|
+
class RpcQueryErrorUnknownAccessKeyInfo(BaseModel):
|
|
77
|
+
block_hash: CryptoHash
|
|
78
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
79
|
+
public_key: PublicKey
|
|
80
|
+
|
|
81
|
+
class RpcQueryErrorUnknownAccessKey(BaseModel):
|
|
82
|
+
info: RpcQueryErrorUnknownAccessKeyInfo
|
|
83
|
+
name: Literal['UNKNOWN_ACCESS_KEY']
|
|
84
|
+
|
|
85
|
+
class RpcQueryErrorUnknownGasKeyInfo(BaseModel):
|
|
86
|
+
block_hash: CryptoHash
|
|
87
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
88
|
+
public_key: PublicKey
|
|
89
|
+
|
|
90
|
+
class RpcQueryErrorUnknownGasKey(BaseModel):
|
|
91
|
+
info: RpcQueryErrorUnknownGasKeyInfo
|
|
92
|
+
name: Literal['UNKNOWN_GAS_KEY']
|
|
93
|
+
|
|
94
|
+
class RpcQueryErrorContractExecutionErrorInfo(BaseModel):
|
|
95
|
+
block_hash: CryptoHash
|
|
96
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
97
|
+
error: FunctionCallError
|
|
98
|
+
vm_error: str
|
|
99
|
+
|
|
100
|
+
class RpcQueryErrorContractExecutionError(BaseModel):
|
|
101
|
+
info: RpcQueryErrorContractExecutionErrorInfo
|
|
102
|
+
name: Literal['CONTRACT_EXECUTION_ERROR']
|
|
103
|
+
|
|
104
|
+
class RpcQueryErrorNoGlobalContractCodeInfo(BaseModel):
|
|
105
|
+
block_hash: CryptoHash
|
|
106
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
107
|
+
identifier: GlobalContractIdentifier
|
|
108
|
+
|
|
109
|
+
class RpcQueryErrorNoGlobalContractCode(BaseModel):
|
|
110
|
+
info: RpcQueryErrorNoGlobalContractCodeInfo
|
|
111
|
+
name: Literal['NO_GLOBAL_CONTRACT_CODE']
|
|
112
|
+
|
|
113
|
+
class RpcQueryErrorInternalErrorInfo(BaseModel):
|
|
114
|
+
error_message: str
|
|
115
|
+
|
|
116
|
+
class RpcQueryErrorInternalError(BaseModel):
|
|
117
|
+
info: RpcQueryErrorInternalErrorInfo
|
|
118
|
+
name: Literal['INTERNAL_ERROR']
|
|
119
|
+
|
|
120
|
+
class RpcQueryError(RootModel[Union[RpcQueryErrorNoSyncedBlocks, RpcQueryErrorUnavailableShard, RpcQueryErrorGarbageCollectedBlock, RpcQueryErrorUnknownBlock, RpcQueryErrorInvalidAccount, RpcQueryErrorUnknownAccount, RpcQueryErrorNoContractCode, RpcQueryErrorTooLargeContractState, RpcQueryErrorUnknownAccessKey, RpcQueryErrorUnknownGasKey, RpcQueryErrorContractExecutionError, RpcQueryErrorNoGlobalContractCode, RpcQueryErrorInternalError]]):
|
|
121
|
+
pass
|
|
122
|
+
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
from near_jsonrpc_models.account_id import AccountId
|
|
2
|
+
from near_jsonrpc_models.block_id import BlockId
|
|
3
|
+
from near_jsonrpc_models.crypto_hash import CryptoHash
|
|
4
|
+
from near_jsonrpc_models.finality import Finality
|
|
5
|
+
from near_jsonrpc_models.function_args import FunctionArgs
|
|
6
|
+
from near_jsonrpc_models.public_key import PublicKey
|
|
7
|
+
from near_jsonrpc_models.store_key import StoreKey
|
|
8
|
+
from near_jsonrpc_models.sync_checkpoint import SyncCheckpoint
|
|
9
|
+
from pydantic import BaseModel
|
|
10
|
+
from pydantic import RootModel
|
|
11
|
+
from typing import Literal
|
|
12
|
+
from typing import Union
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class RpcQueryRequestViewAccountByBlockId(BaseModel):
|
|
16
|
+
block_id: BlockId
|
|
17
|
+
account_id: AccountId
|
|
18
|
+
request_type: Literal['view_account']
|
|
19
|
+
|
|
20
|
+
class RpcQueryRequestViewCodeByBlockId(BaseModel):
|
|
21
|
+
block_id: BlockId
|
|
22
|
+
account_id: AccountId
|
|
23
|
+
request_type: Literal['view_code']
|
|
24
|
+
|
|
25
|
+
class RpcQueryRequestViewStateByBlockId(BaseModel):
|
|
26
|
+
block_id: BlockId
|
|
27
|
+
account_id: AccountId
|
|
28
|
+
include_proof: bool = None
|
|
29
|
+
prefix_base64: StoreKey
|
|
30
|
+
request_type: Literal['view_state']
|
|
31
|
+
|
|
32
|
+
class RpcQueryRequestViewAccessKeyByBlockId(BaseModel):
|
|
33
|
+
block_id: BlockId
|
|
34
|
+
account_id: AccountId
|
|
35
|
+
public_key: PublicKey
|
|
36
|
+
request_type: Literal['view_access_key']
|
|
37
|
+
|
|
38
|
+
class RpcQueryRequestViewAccessKeyListByBlockId(BaseModel):
|
|
39
|
+
block_id: BlockId
|
|
40
|
+
account_id: AccountId
|
|
41
|
+
request_type: Literal['view_access_key_list']
|
|
42
|
+
|
|
43
|
+
class RpcQueryRequestViewGasKeyByBlockId(BaseModel):
|
|
44
|
+
block_id: BlockId
|
|
45
|
+
account_id: AccountId
|
|
46
|
+
public_key: PublicKey
|
|
47
|
+
request_type: Literal['view_gas_key']
|
|
48
|
+
|
|
49
|
+
class RpcQueryRequestViewGasKeyListByBlockId(BaseModel):
|
|
50
|
+
block_id: BlockId
|
|
51
|
+
account_id: AccountId
|
|
52
|
+
request_type: Literal['view_gas_key_list']
|
|
53
|
+
|
|
54
|
+
class RpcQueryRequestCallFunctionByBlockId(BaseModel):
|
|
55
|
+
block_id: BlockId
|
|
56
|
+
account_id: AccountId
|
|
57
|
+
args_base64: FunctionArgs
|
|
58
|
+
method_name: str
|
|
59
|
+
request_type: Literal['call_function']
|
|
60
|
+
|
|
61
|
+
class RpcQueryRequestViewGlobalContractCodeByBlockId(BaseModel):
|
|
62
|
+
block_id: BlockId
|
|
63
|
+
code_hash: CryptoHash
|
|
64
|
+
request_type: Literal['view_global_contract_code']
|
|
65
|
+
|
|
66
|
+
class RpcQueryRequestViewGlobalContractCodeByAccountIdByBlockId(BaseModel):
|
|
67
|
+
block_id: BlockId
|
|
68
|
+
account_id: AccountId
|
|
69
|
+
request_type: Literal['view_global_contract_code_by_account_id']
|
|
70
|
+
|
|
71
|
+
class RpcQueryRequestViewAccountByFinality(BaseModel):
|
|
72
|
+
finality: Finality
|
|
73
|
+
account_id: AccountId
|
|
74
|
+
request_type: Literal['view_account']
|
|
75
|
+
|
|
76
|
+
class RpcQueryRequestViewCodeByFinality(BaseModel):
|
|
77
|
+
finality: Finality
|
|
78
|
+
account_id: AccountId
|
|
79
|
+
request_type: Literal['view_code']
|
|
80
|
+
|
|
81
|
+
class RpcQueryRequestViewStateByFinality(BaseModel):
|
|
82
|
+
finality: Finality
|
|
83
|
+
account_id: AccountId
|
|
84
|
+
include_proof: bool = None
|
|
85
|
+
prefix_base64: StoreKey
|
|
86
|
+
request_type: Literal['view_state']
|
|
87
|
+
|
|
88
|
+
class RpcQueryRequestViewAccessKeyByFinality(BaseModel):
|
|
89
|
+
finality: Finality
|
|
90
|
+
account_id: AccountId
|
|
91
|
+
public_key: PublicKey
|
|
92
|
+
request_type: Literal['view_access_key']
|
|
93
|
+
|
|
94
|
+
class RpcQueryRequestViewAccessKeyListByFinality(BaseModel):
|
|
95
|
+
finality: Finality
|
|
96
|
+
account_id: AccountId
|
|
97
|
+
request_type: Literal['view_access_key_list']
|
|
98
|
+
|
|
99
|
+
class RpcQueryRequestViewGasKeyByFinality(BaseModel):
|
|
100
|
+
finality: Finality
|
|
101
|
+
account_id: AccountId
|
|
102
|
+
public_key: PublicKey
|
|
103
|
+
request_type: Literal['view_gas_key']
|
|
104
|
+
|
|
105
|
+
class RpcQueryRequestViewGasKeyListByFinality(BaseModel):
|
|
106
|
+
finality: Finality
|
|
107
|
+
account_id: AccountId
|
|
108
|
+
request_type: Literal['view_gas_key_list']
|
|
109
|
+
|
|
110
|
+
class RpcQueryRequestCallFunctionByFinality(BaseModel):
|
|
111
|
+
finality: Finality
|
|
112
|
+
account_id: AccountId
|
|
113
|
+
args_base64: FunctionArgs
|
|
114
|
+
method_name: str
|
|
115
|
+
request_type: Literal['call_function']
|
|
116
|
+
|
|
117
|
+
class RpcQueryRequestViewGlobalContractCodeByFinality(BaseModel):
|
|
118
|
+
finality: Finality
|
|
119
|
+
code_hash: CryptoHash
|
|
120
|
+
request_type: Literal['view_global_contract_code']
|
|
121
|
+
|
|
122
|
+
class RpcQueryRequestViewGlobalContractCodeByAccountIdByFinality(BaseModel):
|
|
123
|
+
finality: Finality
|
|
124
|
+
account_id: AccountId
|
|
125
|
+
request_type: Literal['view_global_contract_code_by_account_id']
|
|
126
|
+
|
|
127
|
+
class RpcQueryRequestViewAccountBySyncCheckpoint(BaseModel):
|
|
128
|
+
sync_checkpoint: SyncCheckpoint
|
|
129
|
+
account_id: AccountId
|
|
130
|
+
request_type: Literal['view_account']
|
|
131
|
+
|
|
132
|
+
class RpcQueryRequestViewCodeBySyncCheckpoint(BaseModel):
|
|
133
|
+
sync_checkpoint: SyncCheckpoint
|
|
134
|
+
account_id: AccountId
|
|
135
|
+
request_type: Literal['view_code']
|
|
136
|
+
|
|
137
|
+
class RpcQueryRequestViewStateBySyncCheckpoint(BaseModel):
|
|
138
|
+
sync_checkpoint: SyncCheckpoint
|
|
139
|
+
account_id: AccountId
|
|
140
|
+
include_proof: bool = None
|
|
141
|
+
prefix_base64: StoreKey
|
|
142
|
+
request_type: Literal['view_state']
|
|
143
|
+
|
|
144
|
+
class RpcQueryRequestViewAccessKeyBySyncCheckpoint(BaseModel):
|
|
145
|
+
sync_checkpoint: SyncCheckpoint
|
|
146
|
+
account_id: AccountId
|
|
147
|
+
public_key: PublicKey
|
|
148
|
+
request_type: Literal['view_access_key']
|
|
149
|
+
|
|
150
|
+
class RpcQueryRequestViewAccessKeyListBySyncCheckpoint(BaseModel):
|
|
151
|
+
sync_checkpoint: SyncCheckpoint
|
|
152
|
+
account_id: AccountId
|
|
153
|
+
request_type: Literal['view_access_key_list']
|
|
154
|
+
|
|
155
|
+
class RpcQueryRequestViewGasKeyBySyncCheckpoint(BaseModel):
|
|
156
|
+
sync_checkpoint: SyncCheckpoint
|
|
157
|
+
account_id: AccountId
|
|
158
|
+
public_key: PublicKey
|
|
159
|
+
request_type: Literal['view_gas_key']
|
|
160
|
+
|
|
161
|
+
class RpcQueryRequestViewGasKeyListBySyncCheckpoint(BaseModel):
|
|
162
|
+
sync_checkpoint: SyncCheckpoint
|
|
163
|
+
account_id: AccountId
|
|
164
|
+
request_type: Literal['view_gas_key_list']
|
|
165
|
+
|
|
166
|
+
class RpcQueryRequestCallFunctionBySyncCheckpoint(BaseModel):
|
|
167
|
+
sync_checkpoint: SyncCheckpoint
|
|
168
|
+
account_id: AccountId
|
|
169
|
+
args_base64: FunctionArgs
|
|
170
|
+
method_name: str
|
|
171
|
+
request_type: Literal['call_function']
|
|
172
|
+
|
|
173
|
+
class RpcQueryRequestViewGlobalContractCodeBySyncCheckpoint(BaseModel):
|
|
174
|
+
sync_checkpoint: SyncCheckpoint
|
|
175
|
+
code_hash: CryptoHash
|
|
176
|
+
request_type: Literal['view_global_contract_code']
|
|
177
|
+
|
|
178
|
+
class RpcQueryRequestViewGlobalContractCodeByAccountIdBySyncCheckpoint(BaseModel):
|
|
179
|
+
sync_checkpoint: SyncCheckpoint
|
|
180
|
+
account_id: AccountId
|
|
181
|
+
request_type: Literal['view_global_contract_code_by_account_id']
|
|
182
|
+
|
|
183
|
+
class RpcQueryRequest(RootModel[Union[RpcQueryRequestViewAccountByBlockId, RpcQueryRequestViewCodeByBlockId, RpcQueryRequestViewStateByBlockId, RpcQueryRequestViewAccessKeyByBlockId, RpcQueryRequestViewAccessKeyListByBlockId, RpcQueryRequestViewGasKeyByBlockId, RpcQueryRequestViewGasKeyListByBlockId, RpcQueryRequestCallFunctionByBlockId, RpcQueryRequestViewGlobalContractCodeByBlockId, RpcQueryRequestViewGlobalContractCodeByAccountIdByBlockId, RpcQueryRequestViewAccountByFinality, RpcQueryRequestViewCodeByFinality, RpcQueryRequestViewStateByFinality, RpcQueryRequestViewAccessKeyByFinality, RpcQueryRequestViewAccessKeyListByFinality, RpcQueryRequestViewGasKeyByFinality, RpcQueryRequestViewGasKeyListByFinality, RpcQueryRequestCallFunctionByFinality, RpcQueryRequestViewGlobalContractCodeByFinality, RpcQueryRequestViewGlobalContractCodeByAccountIdByFinality, RpcQueryRequestViewAccountBySyncCheckpoint, RpcQueryRequestViewCodeBySyncCheckpoint, RpcQueryRequestViewStateBySyncCheckpoint, RpcQueryRequestViewAccessKeyBySyncCheckpoint, RpcQueryRequestViewAccessKeyListBySyncCheckpoint, RpcQueryRequestViewGasKeyBySyncCheckpoint, RpcQueryRequestViewGasKeyListBySyncCheckpoint, RpcQueryRequestCallFunctionBySyncCheckpoint, RpcQueryRequestViewGlobalContractCodeBySyncCheckpoint, RpcQueryRequestViewGlobalContractCodeByAccountIdBySyncCheckpoint]]):
|
|
184
|
+
pass
|
|
185
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
from near_jsonrpc_models.access_key_list import AccessKeyList
|
|
2
|
+
from near_jsonrpc_models.access_key_view import AccessKeyView
|
|
3
|
+
from near_jsonrpc_models.account_view import AccountView
|
|
4
|
+
from near_jsonrpc_models.call_result import CallResult
|
|
5
|
+
from near_jsonrpc_models.contract_code_view import ContractCodeView
|
|
6
|
+
from near_jsonrpc_models.crypto_hash import CryptoHash
|
|
7
|
+
from near_jsonrpc_models.gas_key_list import GasKeyList
|
|
8
|
+
from near_jsonrpc_models.gas_key_view import GasKeyView
|
|
9
|
+
from near_jsonrpc_models.view_state_result import ViewStateResult
|
|
10
|
+
from pydantic import BaseModel
|
|
11
|
+
from pydantic import RootModel
|
|
12
|
+
from pydantic import conint
|
|
13
|
+
from typing import Union
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class RpcQueryResponseAccountView(AccountView):
|
|
17
|
+
block_hash: CryptoHash
|
|
18
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
19
|
+
|
|
20
|
+
class RpcQueryResponseContractCodeView(ContractCodeView):
|
|
21
|
+
block_hash: CryptoHash
|
|
22
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
23
|
+
|
|
24
|
+
class RpcQueryResponseViewStateResult(ViewStateResult):
|
|
25
|
+
block_hash: CryptoHash
|
|
26
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
27
|
+
|
|
28
|
+
class RpcQueryResponseCallResult(CallResult):
|
|
29
|
+
block_hash: CryptoHash
|
|
30
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
31
|
+
|
|
32
|
+
class RpcQueryResponseAccessKeyView(AccessKeyView):
|
|
33
|
+
block_hash: CryptoHash
|
|
34
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
35
|
+
|
|
36
|
+
class RpcQueryResponseAccessKeyList(AccessKeyList):
|
|
37
|
+
block_hash: CryptoHash
|
|
38
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
39
|
+
|
|
40
|
+
class RpcQueryResponseGasKeyView(GasKeyView):
|
|
41
|
+
block_hash: CryptoHash
|
|
42
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
43
|
+
|
|
44
|
+
class RpcQueryResponseGasKeyList(GasKeyList):
|
|
45
|
+
block_hash: CryptoHash
|
|
46
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
47
|
+
|
|
48
|
+
class RpcQueryResponse(RootModel[Union[RpcQueryResponseAccountView, RpcQueryResponseContractCodeView, RpcQueryResponseViewStateResult, RpcQueryResponseCallResult, RpcQueryResponseAccessKeyView, RpcQueryResponseAccessKeyList, RpcQueryResponseGasKeyView, RpcQueryResponseGasKeyList]]):
|
|
49
|
+
pass
|
|
50
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from near_jsonrpc_models.crypto_hash import CryptoHash
|
|
2
|
+
from pydantic import BaseModel
|
|
3
|
+
from pydantic import RootModel
|
|
4
|
+
from typing import Literal
|
|
5
|
+
from typing import Union
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class RpcReceiptErrorInternalErrorInfo(BaseModel):
|
|
9
|
+
error_message: str
|
|
10
|
+
|
|
11
|
+
class RpcReceiptErrorInternalError(BaseModel):
|
|
12
|
+
info: RpcReceiptErrorInternalErrorInfo
|
|
13
|
+
name: Literal['INTERNAL_ERROR']
|
|
14
|
+
|
|
15
|
+
class RpcReceiptErrorUnknownReceiptInfo(BaseModel):
|
|
16
|
+
receipt_id: CryptoHash
|
|
17
|
+
|
|
18
|
+
class RpcReceiptErrorUnknownReceipt(BaseModel):
|
|
19
|
+
info: RpcReceiptErrorUnknownReceiptInfo
|
|
20
|
+
name: Literal['UNKNOWN_RECEIPT']
|
|
21
|
+
|
|
22
|
+
class RpcReceiptError(RootModel[Union[RpcReceiptErrorInternalError, RpcReceiptErrorUnknownReceipt]]):
|
|
23
|
+
pass
|
|
24
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from near_jsonrpc_models.account_id import AccountId
|
|
2
|
+
from near_jsonrpc_models.crypto_hash import CryptoHash
|
|
3
|
+
from near_jsonrpc_models.receipt_enum_view import ReceiptEnumView
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
from pydantic import conint
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class RpcReceiptResponse(BaseModel):
|
|
9
|
+
predecessor_id: AccountId
|
|
10
|
+
priority: conint(ge=0, le=18446744073709551615) = 0
|
|
11
|
+
receipt: ReceiptEnumView
|
|
12
|
+
receipt_id: CryptoHash
|
|
13
|
+
receiver_id: AccountId
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from pydantic import BaseModel
|
|
2
|
+
from pydantic import RootModel
|
|
3
|
+
from typing import Literal
|
|
4
|
+
from typing import Union
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class RpcRequestValidationErrorKindMethodNotFoundInfo(BaseModel):
|
|
8
|
+
method_name: str
|
|
9
|
+
|
|
10
|
+
class RpcRequestValidationErrorKindMethodNotFound(BaseModel):
|
|
11
|
+
info: RpcRequestValidationErrorKindMethodNotFoundInfo
|
|
12
|
+
name: Literal['METHOD_NOT_FOUND']
|
|
13
|
+
|
|
14
|
+
class RpcRequestValidationErrorKindParseErrorInfo(BaseModel):
|
|
15
|
+
error_message: str
|
|
16
|
+
|
|
17
|
+
class RpcRequestValidationErrorKindParseError(BaseModel):
|
|
18
|
+
info: RpcRequestValidationErrorKindParseErrorInfo
|
|
19
|
+
name: Literal['PARSE_ERROR']
|
|
20
|
+
|
|
21
|
+
class RpcRequestValidationErrorKind(RootModel[Union[RpcRequestValidationErrorKindMethodNotFound, RpcRequestValidationErrorKindParseError]]):
|
|
22
|
+
pass
|
|
23
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from near_jsonrpc_models.signed_transaction import SignedTransaction
|
|
2
|
+
from near_jsonrpc_models.tx_execution_status import TxExecutionStatus
|
|
3
|
+
from pydantic import BaseModel
|
|
4
|
+
from pydantic import Field
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class RpcSendTransactionRequest(BaseModel):
|
|
8
|
+
signed_tx_base64: SignedTransaction
|
|
9
|
+
wait_until: TxExecutionStatus = Field(default_factory=lambda: TxExecutionStatus('EXECUTED_OPTIMISTIC'))
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from pydantic import BaseModel
|
|
2
|
+
from pydantic import RootModel
|
|
3
|
+
from typing import Literal
|
|
4
|
+
from typing import Union
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class RpcSplitStorageInfoErrorInternalErrorInfo(BaseModel):
|
|
8
|
+
error_message: str
|
|
9
|
+
|
|
10
|
+
class RpcSplitStorageInfoErrorInternalError(BaseModel):
|
|
11
|
+
info: RpcSplitStorageInfoErrorInternalErrorInfo
|
|
12
|
+
name: Literal['INTERNAL_ERROR']
|
|
13
|
+
|
|
14
|
+
class RpcSplitStorageInfoError(RootModel[Union[RpcSplitStorageInfoErrorInternalError]]):
|
|
15
|
+
pass
|
|
16
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""Contains the split storage information."""
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel
|
|
4
|
+
from pydantic import conint
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class RpcSplitStorageInfoResponse(BaseModel):
|
|
8
|
+
cold_head_height: conint(ge=0, le=18446744073709551615) | None = None
|
|
9
|
+
final_head_height: conint(ge=0, le=18446744073709551615) | None = None
|
|
10
|
+
head_height: conint(ge=0, le=18446744073709551615) | None = None
|
|
11
|
+
hot_db_kind: str | None = None
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from pydantic import BaseModel
|
|
2
|
+
from pydantic import RootModel
|
|
3
|
+
from typing import Any
|
|
4
|
+
from typing import Dict
|
|
5
|
+
from typing import Literal
|
|
6
|
+
from typing import Union
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class RpcStateChangesErrorUnknownBlock(BaseModel):
|
|
10
|
+
info: Dict[str, Any]
|
|
11
|
+
name: Literal['UNKNOWN_BLOCK']
|
|
12
|
+
|
|
13
|
+
class RpcStateChangesErrorNotSyncedYet(BaseModel):
|
|
14
|
+
name: Literal['NOT_SYNCED_YET']
|
|
15
|
+
|
|
16
|
+
class RpcStateChangesErrorInternalErrorInfo(BaseModel):
|
|
17
|
+
error_message: str
|
|
18
|
+
|
|
19
|
+
class RpcStateChangesErrorInternalError(BaseModel):
|
|
20
|
+
info: RpcStateChangesErrorInternalErrorInfo
|
|
21
|
+
name: Literal['INTERNAL_ERROR']
|
|
22
|
+
|
|
23
|
+
class RpcStateChangesError(RootModel[Union[RpcStateChangesErrorUnknownBlock, RpcStateChangesErrorNotSyncedYet, RpcStateChangesErrorInternalError]]):
|
|
24
|
+
pass
|
|
25
|
+
|