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,20 @@
|
|
|
1
|
+
from near_jsonrpc_models.error_wrapper_for_rpc_view_state_error import ErrorWrapperForRpcViewStateError
|
|
2
|
+
from near_jsonrpc_models.rpc_view_state_response import RpcViewStateResponse
|
|
3
|
+
from pydantic import BaseModel
|
|
4
|
+
from pydantic import RootModel
|
|
5
|
+
from typing import Union
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class JsonRpcResponseForRpcViewStateResponseAndRpcViewStateErrorResult(BaseModel):
|
|
9
|
+
id: str
|
|
10
|
+
jsonrpc: str
|
|
11
|
+
result: RpcViewStateResponse
|
|
12
|
+
|
|
13
|
+
class JsonRpcResponseForRpcViewStateResponseAndRpcViewStateErrorError(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
jsonrpc: str
|
|
16
|
+
error: ErrorWrapperForRpcViewStateError
|
|
17
|
+
|
|
18
|
+
class JsonRpcResponseForRpcViewStateResponseAndRpcViewStateError(RootModel[Union[JsonRpcResponseForRpcViewStateResponseAndRpcViewStateErrorResult, JsonRpcResponseForRpcViewStateResponseAndRpcViewStateErrorError]]):
|
|
19
|
+
pass
|
|
20
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""Information about a Producer: its account name, peer_id and a list of connected peers that
|
|
2
|
+
the node can use to send message for this producer."""
|
|
3
|
+
|
|
4
|
+
from near_jsonrpc_models.account_id import AccountId
|
|
5
|
+
from near_jsonrpc_models.public_key import PublicKey
|
|
6
|
+
from pydantic import BaseModel
|
|
7
|
+
from typing import List
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class KnownProducerView(BaseModel):
|
|
11
|
+
account_id: AccountId
|
|
12
|
+
next_hops: List[PublicKey] | None = None
|
|
13
|
+
peer_id: PublicKey
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from near_jsonrpc_models.block_header_inner_lite_view import BlockHeaderInnerLiteView
|
|
2
|
+
from near_jsonrpc_models.crypto_hash import CryptoHash
|
|
3
|
+
from pydantic import BaseModel
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class LightClientBlockLiteView(BaseModel):
|
|
7
|
+
inner_lite: BlockHeaderInnerLiteView
|
|
8
|
+
inner_rest_hash: CryptoHash
|
|
9
|
+
prev_block_hash: CryptoHash
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"""Describes limits for VM and Runtime.
|
|
2
|
+
TODO #4139: consider switching to strongly-typed wrappers instead of raw quantities"""
|
|
3
|
+
|
|
4
|
+
from near_jsonrpc_models.account_id_validity_rules_version import AccountIdValidityRulesVersion
|
|
5
|
+
from near_jsonrpc_models.near_gas import NearGas
|
|
6
|
+
from pydantic import BaseModel
|
|
7
|
+
from pydantic import Field
|
|
8
|
+
from pydantic import conint
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class LimitConfig(BaseModel):
|
|
12
|
+
# Whether to enforce account_id well-formed-ness where it wasn't enforced
|
|
13
|
+
# historically.
|
|
14
|
+
account_id_validity_rules_version: AccountIdValidityRulesVersion = Field(default_factory=lambda: AccountIdValidityRulesVersion(0))
|
|
15
|
+
# The initial number of memory pages.
|
|
16
|
+
# NOTE: It's not a limiter itself, but it's a value we use for initial_memory_pages.
|
|
17
|
+
initial_memory_pages: conint(ge=0, le=4294967295) = None
|
|
18
|
+
# Max number of actions per receipt.
|
|
19
|
+
max_actions_per_receipt: conint(ge=0, le=18446744073709551615) = None
|
|
20
|
+
# Max length of arguments in a function call action.
|
|
21
|
+
max_arguments_length: conint(ge=0, le=18446744073709551615) = None
|
|
22
|
+
# Max contract size
|
|
23
|
+
max_contract_size: conint(ge=0, le=18446744073709551615) = None
|
|
24
|
+
# If present, stores max number of elements in a single contract's table
|
|
25
|
+
max_elements_per_contract_table: conint(ge=0, le=4294967295) | None = None
|
|
26
|
+
# If present, stores max number of functions in one contract
|
|
27
|
+
max_functions_number_per_contract: conint(ge=0, le=18446744073709551615) | None = None
|
|
28
|
+
# Max amount of gas that can be used, excluding gas attached to promises.
|
|
29
|
+
max_gas_burnt: NearGas = None
|
|
30
|
+
# Max length of any method name (without terminating character).
|
|
31
|
+
max_length_method_name: conint(ge=0, le=18446744073709551615) = None
|
|
32
|
+
# Max length of returned data
|
|
33
|
+
max_length_returned_data: conint(ge=0, le=18446744073709551615) = None
|
|
34
|
+
# Max storage key size
|
|
35
|
+
max_length_storage_key: conint(ge=0, le=18446744073709551615) = None
|
|
36
|
+
# Max storage value size
|
|
37
|
+
max_length_storage_value: conint(ge=0, le=18446744073709551615) = None
|
|
38
|
+
# If present, stores max number of locals declared globally in one contract
|
|
39
|
+
max_locals_per_contract: conint(ge=0, le=18446744073709551615) | None = None
|
|
40
|
+
# What is the maximal memory pages amount is allowed to have for a contract.
|
|
41
|
+
max_memory_pages: conint(ge=0, le=4294967295) = None
|
|
42
|
+
# Max total length of all method names (including terminating character) for a function call
|
|
43
|
+
# permission access key.
|
|
44
|
+
max_number_bytes_method_names: conint(ge=0, le=18446744073709551615) = None
|
|
45
|
+
# Max number of input data dependencies
|
|
46
|
+
max_number_input_data_dependencies: conint(ge=0, le=18446744073709551615) = None
|
|
47
|
+
# Maximum number of log entries.
|
|
48
|
+
max_number_logs: conint(ge=0, le=18446744073709551615) = None
|
|
49
|
+
# Maximum number of registers that can be used simultaneously.
|
|
50
|
+
#
|
|
51
|
+
# Note that due to an implementation quirk [read: a bug] in VMLogic, if we
|
|
52
|
+
# have this number of registers, no subsequent writes to the registers
|
|
53
|
+
# will succeed even if they replace an existing register.
|
|
54
|
+
max_number_registers: conint(ge=0, le=18446744073709551615) = None
|
|
55
|
+
# Max number of promises that a function call can create
|
|
56
|
+
max_promises_per_function_call_action: conint(ge=0, le=18446744073709551615) = None
|
|
57
|
+
# Max receipt size
|
|
58
|
+
max_receipt_size: conint(ge=0, le=18446744073709551615) = None
|
|
59
|
+
# Maximum number of bytes that can be stored in a single register.
|
|
60
|
+
max_register_size: conint(ge=0, le=18446744073709551615) = None
|
|
61
|
+
# How tall the stack is allowed to grow?
|
|
62
|
+
#
|
|
63
|
+
# See <https://wiki.parity.io/WebAssembly-StackHeight> to find out how the stack frame cost
|
|
64
|
+
# is calculated.
|
|
65
|
+
max_stack_height: conint(ge=0, le=4294967295) = None
|
|
66
|
+
# If present, stores max number of tables declared globally in one contract
|
|
67
|
+
max_tables_per_contract: conint(ge=0, le=4294967295) | None = None
|
|
68
|
+
# Maximum total length in bytes of all log messages.
|
|
69
|
+
max_total_log_length: conint(ge=0, le=18446744073709551615) = None
|
|
70
|
+
# Max total prepaid gas for all function call actions per receipt.
|
|
71
|
+
max_total_prepaid_gas: NearGas = None
|
|
72
|
+
# Max transaction size
|
|
73
|
+
max_transaction_size: conint(ge=0, le=18446744073709551615) = None
|
|
74
|
+
# Maximum number of bytes for payload passed over a yield resume.
|
|
75
|
+
max_yield_payload_size: conint(ge=0, le=18446744073709551615) = None
|
|
76
|
+
# Hard limit on the size of storage proof generated while executing a single receipt.
|
|
77
|
+
per_receipt_storage_proof_size_limit: conint(ge=0, le=4294967295) = None
|
|
78
|
+
# Limit of memory used by registers.
|
|
79
|
+
registers_memory_limit: conint(ge=0, le=18446744073709551615) = None
|
|
80
|
+
# Number of blocks after which a yielded promise times out.
|
|
81
|
+
yield_timeout_length_in_blocks: conint(ge=0, le=18446744073709551615) = None
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from near_jsonrpc_models.crypto_hash import CryptoHash
|
|
2
|
+
from near_jsonrpc_models.missing_trie_value_context import MissingTrieValueContext
|
|
3
|
+
from pydantic import BaseModel
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class MissingTrieValue(BaseModel):
|
|
7
|
+
context: MissingTrieValueContext
|
|
8
|
+
hash: CryptoHash
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""Contexts in which `StorageError::MissingTrieValue` error might occur.TrieIterator: Missing trie value when reading from TrieIterator.TriePrefetchingStorage: Missing trie value when reading from TriePrefetchingStorage.TrieMemoryPartialStorage: Missing trie value when reading from TrieMemoryPartialStorage.TrieStorage: Missing trie value when reading from TrieStorage."""
|
|
2
|
+
|
|
3
|
+
from pydantic import RootModel
|
|
4
|
+
from typing import Literal
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class MissingTrieValueContext(RootModel[Literal['TrieIterator', 'TriePrefetchingStorage', 'TrieMemoryPartialStorage', 'TrieStorage']]):
|
|
8
|
+
pass
|
|
9
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from near_jsonrpc_models.account_data_view import AccountDataView
|
|
2
|
+
from near_jsonrpc_models.known_producer_view import KnownProducerView
|
|
3
|
+
from near_jsonrpc_models.peer_info_view import PeerInfoView
|
|
4
|
+
from near_jsonrpc_models.public_key import PublicKey
|
|
5
|
+
from pydantic import BaseModel
|
|
6
|
+
from pydantic import conint
|
|
7
|
+
from typing import List
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class NetworkInfoView(BaseModel):
|
|
11
|
+
connected_peers: List[PeerInfoView]
|
|
12
|
+
known_producers: List[KnownProducerView]
|
|
13
|
+
num_connected_peers: conint(ge=0, le=4294967295)
|
|
14
|
+
peer_max_count: conint(ge=0, le=4294967295)
|
|
15
|
+
tier1_accounts_data: List[AccountDataView]
|
|
16
|
+
tier1_accounts_keys: List[PublicKey]
|
|
17
|
+
tier1_connections: List[PeerInfoView]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from near_jsonrpc_models.account_id import AccountId
|
|
2
|
+
from near_jsonrpc_models.near_token import NearToken
|
|
3
|
+
from near_jsonrpc_models.public_key import PublicKey
|
|
4
|
+
from near_jsonrpc_models.shard_id import ShardId
|
|
5
|
+
from pydantic import BaseModel
|
|
6
|
+
from typing import List
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class NextEpochValidatorInfo(BaseModel):
|
|
10
|
+
account_id: AccountId
|
|
11
|
+
public_key: PublicKey
|
|
12
|
+
shards: List[ShardId]
|
|
13
|
+
stake: NearToken
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"""An Action that can be included in a transaction or receipt, excluding delegate actions. This type represents all possible action types except DelegateAction to prevent infinite recursion in meta-transactions."""
|
|
2
|
+
|
|
3
|
+
from near_jsonrpc_models.add_gas_key_action import AddGasKeyAction
|
|
4
|
+
from near_jsonrpc_models.add_key_action import AddKeyAction
|
|
5
|
+
from near_jsonrpc_models.create_account_action import CreateAccountAction
|
|
6
|
+
from near_jsonrpc_models.delete_account_action import DeleteAccountAction
|
|
7
|
+
from near_jsonrpc_models.delete_gas_key_action import DeleteGasKeyAction
|
|
8
|
+
from near_jsonrpc_models.delete_key_action import DeleteKeyAction
|
|
9
|
+
from near_jsonrpc_models.deploy_contract_action import DeployContractAction
|
|
10
|
+
from near_jsonrpc_models.deploy_global_contract_action import DeployGlobalContractAction
|
|
11
|
+
from near_jsonrpc_models.deterministic_state_init_action import DeterministicStateInitAction
|
|
12
|
+
from near_jsonrpc_models.function_call_action import FunctionCallAction
|
|
13
|
+
from near_jsonrpc_models.stake_action import StakeAction
|
|
14
|
+
from near_jsonrpc_models.strict_model import StrictBaseModel
|
|
15
|
+
from near_jsonrpc_models.transfer_action import TransferAction
|
|
16
|
+
from near_jsonrpc_models.transfer_to_gas_key_action import TransferToGasKeyAction
|
|
17
|
+
from near_jsonrpc_models.use_global_contract_action import UseGlobalContractAction
|
|
18
|
+
from pydantic import BaseModel
|
|
19
|
+
from pydantic import RootModel
|
|
20
|
+
from typing import Union
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class NonDelegateActionCreateAccount(StrictBaseModel):
|
|
24
|
+
"""Create an (sub)account using a transaction `receiver_id` as an ID for
|
|
25
|
+
a new account ID must pass validation rules described here
|
|
26
|
+
<https://nomicon.io/DataStructures/Account>."""
|
|
27
|
+
CreateAccount: CreateAccountAction
|
|
28
|
+
|
|
29
|
+
class NonDelegateActionDeployContract(StrictBaseModel):
|
|
30
|
+
"""Sets a Wasm code to a receiver_id"""
|
|
31
|
+
DeployContract: DeployContractAction
|
|
32
|
+
|
|
33
|
+
class NonDelegateActionFunctionCall(StrictBaseModel):
|
|
34
|
+
FunctionCall: FunctionCallAction
|
|
35
|
+
|
|
36
|
+
class NonDelegateActionTransfer(StrictBaseModel):
|
|
37
|
+
Transfer: TransferAction
|
|
38
|
+
|
|
39
|
+
class NonDelegateActionStake(StrictBaseModel):
|
|
40
|
+
Stake: StakeAction
|
|
41
|
+
|
|
42
|
+
class NonDelegateActionAddKey(StrictBaseModel):
|
|
43
|
+
AddKey: AddKeyAction
|
|
44
|
+
|
|
45
|
+
class NonDelegateActionDeleteKey(StrictBaseModel):
|
|
46
|
+
DeleteKey: DeleteKeyAction
|
|
47
|
+
|
|
48
|
+
class NonDelegateActionDeleteAccount(StrictBaseModel):
|
|
49
|
+
DeleteAccount: DeleteAccountAction
|
|
50
|
+
|
|
51
|
+
class NonDelegateActionDeployGlobalContract(StrictBaseModel):
|
|
52
|
+
DeployGlobalContract: DeployGlobalContractAction
|
|
53
|
+
|
|
54
|
+
class NonDelegateActionUseGlobalContract(StrictBaseModel):
|
|
55
|
+
UseGlobalContract: UseGlobalContractAction
|
|
56
|
+
|
|
57
|
+
class NonDelegateActionDeterministicStateInit(StrictBaseModel):
|
|
58
|
+
DeterministicStateInit: DeterministicStateInitAction
|
|
59
|
+
|
|
60
|
+
class NonDelegateActionAddGasKey(StrictBaseModel):
|
|
61
|
+
AddGasKey: AddGasKeyAction
|
|
62
|
+
|
|
63
|
+
class NonDelegateActionDeleteGasKey(StrictBaseModel):
|
|
64
|
+
DeleteGasKey: DeleteGasKeyAction
|
|
65
|
+
|
|
66
|
+
class NonDelegateActionTransferToGasKey(StrictBaseModel):
|
|
67
|
+
TransferToGasKey: TransferToGasKeyAction
|
|
68
|
+
|
|
69
|
+
class NonDelegateAction(RootModel[Union[NonDelegateActionCreateAccount, NonDelegateActionDeployContract, NonDelegateActionFunctionCall, NonDelegateActionTransfer, NonDelegateActionStake, NonDelegateActionAddKey, NonDelegateActionDeleteKey, NonDelegateActionDeleteAccount, NonDelegateActionDeployGlobalContract, NonDelegateActionUseGlobalContract, NonDelegateActionDeterministicStateInit, NonDelegateActionAddGasKey, NonDelegateActionDeleteGasKey, NonDelegateActionTransferToGasKey]]):
|
|
70
|
+
pass
|
|
71
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from near_jsonrpc_models.account_id import AccountId
|
|
2
|
+
from near_jsonrpc_models.crypto_hash import CryptoHash
|
|
3
|
+
from near_jsonrpc_models.public_key import PublicKey
|
|
4
|
+
from near_jsonrpc_models.shard_id import ShardId
|
|
5
|
+
from pydantic import BaseModel
|
|
6
|
+
from pydantic import conint
|
|
7
|
+
from typing import List
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class PeerInfoView(BaseModel):
|
|
11
|
+
account_id: AccountId | None = None
|
|
12
|
+
addr: str
|
|
13
|
+
archival: bool
|
|
14
|
+
block_hash: CryptoHash | None = None
|
|
15
|
+
connection_established_time_millis: conint(ge=0, le=18446744073709551615)
|
|
16
|
+
height: conint(ge=0, le=18446744073709551615) | None = None
|
|
17
|
+
is_highest_block_invalid: bool
|
|
18
|
+
is_outbound_peer: bool
|
|
19
|
+
last_time_peer_requested_millis: conint(ge=0, le=18446744073709551615)
|
|
20
|
+
last_time_received_message_millis: conint(ge=0, le=18446744073709551615)
|
|
21
|
+
# Connection nonce.
|
|
22
|
+
nonce: conint(ge=0, le=18446744073709551615)
|
|
23
|
+
peer_id: PublicKey
|
|
24
|
+
received_bytes_per_sec: conint(ge=0, le=18446744073709551615)
|
|
25
|
+
sent_bytes_per_sec: conint(ge=0, le=18446744073709551615)
|
|
26
|
+
tracked_shards: List[ShardId]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Error that can occur while preparing or executing Wasm smart-contract.Serialization: Error happened while serializing the module.Deserialization: Error happened while deserializing the module.InternalMemoryDeclared: Internal memory declaration has been found in the module.GasInstrumentation: Gas instrumentation failed.
|
|
2
|
+
|
|
3
|
+
This most likely indicates the module isn't valid.StackHeightInstrumentation: Stack instrumentation failed.
|
|
4
|
+
|
|
5
|
+
This most likely indicates the module isn't valid.Instantiate: Error happened during instantiation.
|
|
6
|
+
|
|
7
|
+
This might indicate that `start` function trapped, or module isn't
|
|
8
|
+
instantiable and/or un-linkable.Memory: Error creating memory.TooManyFunctions: Contract contains too many functions.TooManyLocals: Contract contains too many locals.TooManyTables: Contract contains too many tables.TooManyTableElements: Contract contains too many table elements."""
|
|
9
|
+
|
|
10
|
+
from pydantic import RootModel
|
|
11
|
+
from typing import Literal
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class PrepareError(RootModel[Literal['Serialization', 'Deserialization', 'InternalMemoryDeclared', 'GasInstrumentation', 'StackHeightInstrumentation', 'Instantiate', 'Memory', 'TooManyFunctions', 'TooManyLocals', 'TooManyTables', 'TooManyTableElements']]):
|
|
15
|
+
pass
|
|
16
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from near_jsonrpc_models.account_id import AccountId
|
|
2
|
+
from near_jsonrpc_models.action_view import ActionView
|
|
3
|
+
from near_jsonrpc_models.crypto_hash import CryptoHash
|
|
4
|
+
from near_jsonrpc_models.data_receiver_view import DataReceiverView
|
|
5
|
+
from near_jsonrpc_models.global_contract_identifier import GlobalContractIdentifier
|
|
6
|
+
from near_jsonrpc_models.near_token import NearToken
|
|
7
|
+
from near_jsonrpc_models.public_key import PublicKey
|
|
8
|
+
from near_jsonrpc_models.shard_id import ShardId
|
|
9
|
+
from near_jsonrpc_models.strict_model import StrictBaseModel
|
|
10
|
+
from pydantic import BaseModel
|
|
11
|
+
from pydantic import RootModel
|
|
12
|
+
from typing import List
|
|
13
|
+
from typing import Union
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ReceiptEnumViewActionPayload(BaseModel):
|
|
17
|
+
actions: List[ActionView]
|
|
18
|
+
gas_price: NearToken
|
|
19
|
+
input_data_ids: List[CryptoHash]
|
|
20
|
+
is_promise_yield: bool = False
|
|
21
|
+
output_data_receivers: List[DataReceiverView]
|
|
22
|
+
refund_to: AccountId | None = None
|
|
23
|
+
signer_id: AccountId
|
|
24
|
+
signer_public_key: PublicKey
|
|
25
|
+
|
|
26
|
+
class ReceiptEnumViewAction(StrictBaseModel):
|
|
27
|
+
Action: ReceiptEnumViewActionPayload
|
|
28
|
+
|
|
29
|
+
class ReceiptEnumViewDataPayload(BaseModel):
|
|
30
|
+
data: str | None = None
|
|
31
|
+
data_id: CryptoHash
|
|
32
|
+
is_promise_resume: bool = False
|
|
33
|
+
|
|
34
|
+
class ReceiptEnumViewData(StrictBaseModel):
|
|
35
|
+
Data: ReceiptEnumViewDataPayload
|
|
36
|
+
|
|
37
|
+
class ReceiptEnumViewGlobalContractDistributionPayload(BaseModel):
|
|
38
|
+
already_delivered_shards: List[ShardId]
|
|
39
|
+
code: str
|
|
40
|
+
id: GlobalContractIdentifier
|
|
41
|
+
target_shard: ShardId
|
|
42
|
+
|
|
43
|
+
class ReceiptEnumViewGlobalContractDistribution(StrictBaseModel):
|
|
44
|
+
GlobalContractDistribution: ReceiptEnumViewGlobalContractDistributionPayload
|
|
45
|
+
|
|
46
|
+
class ReceiptEnumView(RootModel[Union[ReceiptEnumViewAction, ReceiptEnumViewData, ReceiptEnumViewGlobalContractDistribution]]):
|
|
47
|
+
pass
|
|
48
|
+
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""Describes the error for validating a receipt."""
|
|
2
|
+
|
|
3
|
+
from near_jsonrpc_models.actions_validation_error import ActionsValidationError
|
|
4
|
+
from near_jsonrpc_models.strict_model import StrictBaseModel
|
|
5
|
+
from pydantic import BaseModel
|
|
6
|
+
from pydantic import RootModel
|
|
7
|
+
from pydantic import conint
|
|
8
|
+
from typing import Union
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ReceiptValidationErrorInvalidPredecessorIdPayload(BaseModel):
|
|
12
|
+
account_id: str
|
|
13
|
+
|
|
14
|
+
class ReceiptValidationErrorInvalidPredecessorId(StrictBaseModel):
|
|
15
|
+
"""The `predecessor_id` of a Receipt is not valid."""
|
|
16
|
+
InvalidPredecessorId: ReceiptValidationErrorInvalidPredecessorIdPayload
|
|
17
|
+
|
|
18
|
+
class ReceiptValidationErrorInvalidReceiverIdPayload(BaseModel):
|
|
19
|
+
account_id: str
|
|
20
|
+
|
|
21
|
+
class ReceiptValidationErrorInvalidReceiverId(StrictBaseModel):
|
|
22
|
+
"""The `receiver_id` of a Receipt is not valid."""
|
|
23
|
+
InvalidReceiverId: ReceiptValidationErrorInvalidReceiverIdPayload
|
|
24
|
+
|
|
25
|
+
class ReceiptValidationErrorInvalidSignerIdPayload(BaseModel):
|
|
26
|
+
account_id: str
|
|
27
|
+
|
|
28
|
+
class ReceiptValidationErrorInvalidSignerId(StrictBaseModel):
|
|
29
|
+
"""The `signer_id` of an ActionReceipt is not valid."""
|
|
30
|
+
InvalidSignerId: ReceiptValidationErrorInvalidSignerIdPayload
|
|
31
|
+
|
|
32
|
+
class ReceiptValidationErrorInvalidDataReceiverIdPayload(BaseModel):
|
|
33
|
+
account_id: str
|
|
34
|
+
|
|
35
|
+
class ReceiptValidationErrorInvalidDataReceiverId(StrictBaseModel):
|
|
36
|
+
"""The `receiver_id` of a DataReceiver within an ActionReceipt is not valid."""
|
|
37
|
+
InvalidDataReceiverId: ReceiptValidationErrorInvalidDataReceiverIdPayload
|
|
38
|
+
|
|
39
|
+
class ReceiptValidationErrorReturnedValueLengthExceededPayload(BaseModel):
|
|
40
|
+
length: conint(ge=0, le=18446744073709551615)
|
|
41
|
+
limit: conint(ge=0, le=18446744073709551615)
|
|
42
|
+
|
|
43
|
+
class ReceiptValidationErrorReturnedValueLengthExceeded(StrictBaseModel):
|
|
44
|
+
"""The length of the returned data exceeded the limit in a DataReceipt."""
|
|
45
|
+
ReturnedValueLengthExceeded: ReceiptValidationErrorReturnedValueLengthExceededPayload
|
|
46
|
+
|
|
47
|
+
class ReceiptValidationErrorNumberInputDataDependenciesExceededPayload(BaseModel):
|
|
48
|
+
limit: conint(ge=0, le=18446744073709551615)
|
|
49
|
+
number_of_input_data_dependencies: conint(ge=0, le=18446744073709551615)
|
|
50
|
+
|
|
51
|
+
class ReceiptValidationErrorNumberInputDataDependenciesExceeded(StrictBaseModel):
|
|
52
|
+
"""The number of input data dependencies exceeds the limit in an ActionReceipt."""
|
|
53
|
+
NumberInputDataDependenciesExceeded: ReceiptValidationErrorNumberInputDataDependenciesExceededPayload
|
|
54
|
+
|
|
55
|
+
class ReceiptValidationErrorActionsValidation(StrictBaseModel):
|
|
56
|
+
"""An error occurred while validating actions of an ActionReceipt."""
|
|
57
|
+
ActionsValidation: ActionsValidationError
|
|
58
|
+
|
|
59
|
+
class ReceiptValidationErrorReceiptSizeExceededPayload(BaseModel):
|
|
60
|
+
limit: conint(ge=0, le=18446744073709551615)
|
|
61
|
+
size: conint(ge=0, le=18446744073709551615)
|
|
62
|
+
|
|
63
|
+
class ReceiptValidationErrorReceiptSizeExceeded(StrictBaseModel):
|
|
64
|
+
"""Receipt is bigger than the limit."""
|
|
65
|
+
ReceiptSizeExceeded: ReceiptValidationErrorReceiptSizeExceededPayload
|
|
66
|
+
|
|
67
|
+
class ReceiptValidationErrorInvalidRefundToPayload(BaseModel):
|
|
68
|
+
account_id: str
|
|
69
|
+
|
|
70
|
+
class ReceiptValidationErrorInvalidRefundTo(StrictBaseModel):
|
|
71
|
+
"""The `refund_to` of an ActionReceipt is not valid."""
|
|
72
|
+
InvalidRefundTo: ReceiptValidationErrorInvalidRefundToPayload
|
|
73
|
+
|
|
74
|
+
class ReceiptValidationError(RootModel[Union[ReceiptValidationErrorInvalidPredecessorId, ReceiptValidationErrorInvalidReceiverId, ReceiptValidationErrorInvalidSignerId, ReceiptValidationErrorInvalidDataReceiverId, ReceiptValidationErrorReturnedValueLengthExceeded, ReceiptValidationErrorNumberInputDataDependenciesExceeded, ReceiptValidationErrorActionsValidation, ReceiptValidationErrorReceiptSizeExceeded, ReceiptValidationErrorInvalidRefundTo]]):
|
|
75
|
+
pass
|
|
76
|
+
|
|
@@ -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 ReceiptView(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,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 RpcBlockErrorUnknownBlock(BaseModel):
|
|
10
|
+
info: Dict[str, Any]
|
|
11
|
+
name: Literal['UNKNOWN_BLOCK']
|
|
12
|
+
|
|
13
|
+
class RpcBlockErrorNotSyncedYet(BaseModel):
|
|
14
|
+
name: Literal['NOT_SYNCED_YET']
|
|
15
|
+
|
|
16
|
+
class RpcBlockErrorInternalErrorInfo(BaseModel):
|
|
17
|
+
error_message: str
|
|
18
|
+
|
|
19
|
+
class RpcBlockErrorInternalError(BaseModel):
|
|
20
|
+
info: RpcBlockErrorInternalErrorInfo
|
|
21
|
+
name: Literal['INTERNAL_ERROR']
|
|
22
|
+
|
|
23
|
+
class RpcBlockError(RootModel[Union[RpcBlockErrorUnknownBlock, RpcBlockErrorNotSyncedYet, RpcBlockErrorInternalError]]):
|
|
24
|
+
pass
|
|
25
|
+
|
|
@@ -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 RpcBlockRequestBlockId(BaseModel):
|
|
10
|
+
block_id: BlockId
|
|
11
|
+
|
|
12
|
+
class RpcBlockRequestFinality(BaseModel):
|
|
13
|
+
finality: Finality
|
|
14
|
+
|
|
15
|
+
class RpcBlockRequestSyncCheckpoint(BaseModel):
|
|
16
|
+
sync_checkpoint: SyncCheckpoint
|
|
17
|
+
|
|
18
|
+
class RpcBlockRequest(RootModel[Union[RpcBlockRequestBlockId, RpcBlockRequestFinality, RpcBlockRequestSyncCheckpoint]]):
|
|
19
|
+
pass
|
|
20
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from near_jsonrpc_models.account_id import AccountId
|
|
2
|
+
from near_jsonrpc_models.block_header_view import BlockHeaderView
|
|
3
|
+
from near_jsonrpc_models.chunk_header_view import ChunkHeaderView
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
from typing import List
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class RpcBlockResponse(BaseModel):
|
|
9
|
+
# The AccountId of the author of the Block
|
|
10
|
+
author: AccountId
|
|
11
|
+
chunks: List[ChunkHeaderView]
|
|
12
|
+
header: BlockHeaderView
|
|
@@ -0,0 +1,64 @@
|
|
|
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 pydantic import BaseModel
|
|
6
|
+
from pydantic import RootModel
|
|
7
|
+
from pydantic import conint
|
|
8
|
+
from typing import Literal
|
|
9
|
+
from typing import Union
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class RpcCallFunctionErrorUnknownBlockInfo(BaseModel):
|
|
13
|
+
block_reference: BlockReference
|
|
14
|
+
|
|
15
|
+
class RpcCallFunctionErrorUnknownBlock(BaseModel):
|
|
16
|
+
info: RpcCallFunctionErrorUnknownBlockInfo
|
|
17
|
+
name: Literal['UNKNOWN_BLOCK']
|
|
18
|
+
|
|
19
|
+
class RpcCallFunctionErrorInvalidAccountInfo(BaseModel):
|
|
20
|
+
block_hash: CryptoHash
|
|
21
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
22
|
+
requested_account_id: AccountId
|
|
23
|
+
|
|
24
|
+
class RpcCallFunctionErrorInvalidAccount(BaseModel):
|
|
25
|
+
info: RpcCallFunctionErrorInvalidAccountInfo
|
|
26
|
+
name: Literal['INVALID_ACCOUNT']
|
|
27
|
+
|
|
28
|
+
class RpcCallFunctionErrorUnknownAccountInfo(BaseModel):
|
|
29
|
+
block_hash: CryptoHash
|
|
30
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
31
|
+
requested_account_id: AccountId
|
|
32
|
+
|
|
33
|
+
class RpcCallFunctionErrorUnknownAccount(BaseModel):
|
|
34
|
+
info: RpcCallFunctionErrorUnknownAccountInfo
|
|
35
|
+
name: Literal['UNKNOWN_ACCOUNT']
|
|
36
|
+
|
|
37
|
+
class RpcCallFunctionErrorNoContractCodeInfo(BaseModel):
|
|
38
|
+
block_hash: CryptoHash
|
|
39
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
40
|
+
contract_account_id: AccountId
|
|
41
|
+
|
|
42
|
+
class RpcCallFunctionErrorNoContractCode(BaseModel):
|
|
43
|
+
info: RpcCallFunctionErrorNoContractCodeInfo
|
|
44
|
+
name: Literal['NO_CONTRACT_CODE']
|
|
45
|
+
|
|
46
|
+
class RpcCallFunctionErrorContractExecutionErrorInfo(BaseModel):
|
|
47
|
+
block_hash: CryptoHash
|
|
48
|
+
block_height: conint(ge=0, le=18446744073709551615)
|
|
49
|
+
vm_error: FunctionCallError
|
|
50
|
+
|
|
51
|
+
class RpcCallFunctionErrorContractExecutionError(BaseModel):
|
|
52
|
+
info: RpcCallFunctionErrorContractExecutionErrorInfo
|
|
53
|
+
name: Literal['CONTRACT_EXECUTION_ERROR']
|
|
54
|
+
|
|
55
|
+
class RpcCallFunctionErrorInternalErrorInfo(BaseModel):
|
|
56
|
+
error_message: str
|
|
57
|
+
|
|
58
|
+
class RpcCallFunctionErrorInternalError(BaseModel):
|
|
59
|
+
info: RpcCallFunctionErrorInternalErrorInfo
|
|
60
|
+
name: Literal['INTERNAL_ERROR']
|
|
61
|
+
|
|
62
|
+
class RpcCallFunctionError(RootModel[Union[RpcCallFunctionErrorUnknownBlock, RpcCallFunctionErrorInvalidAccount, RpcCallFunctionErrorUnknownAccount, RpcCallFunctionErrorNoContractCode, RpcCallFunctionErrorContractExecutionError, RpcCallFunctionErrorInternalError]]):
|
|
63
|
+
pass
|
|
64
|
+
|