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.
Files changed (357) hide show
  1. near_jsonrpc_client/__init__.py +27 -0
  2. near_jsonrpc_client/api_methods_async.py +450 -0
  3. near_jsonrpc_client/api_methods_sync.py +450 -0
  4. near_jsonrpc_client/base_client.py +148 -0
  5. near_jsonrpc_client/client.py +13 -0
  6. near_jsonrpc_client/errors.py +35 -0
  7. near_jsonrpc_client/transport.py +43 -0
  8. near_jsonrpc_client-1.0.5.dist-info/METADATA +10 -0
  9. near_jsonrpc_client-1.0.5.dist-info/RECORD +357 -0
  10. near_jsonrpc_client-1.0.5.dist-info/WHEEL +5 -0
  11. near_jsonrpc_client-1.0.5.dist-info/licenses/LICENSE +201 -0
  12. near_jsonrpc_client-1.0.5.dist-info/top_level.txt +2 -0
  13. near_jsonrpc_models/__init__.py +3378 -0
  14. near_jsonrpc_models/access_key.py +18 -0
  15. near_jsonrpc_models/access_key_creation_config_view.py +13 -0
  16. near_jsonrpc_models/access_key_info_view.py +10 -0
  17. near_jsonrpc_models/access_key_list.py +9 -0
  18. near_jsonrpc_models/access_key_permission.py +21 -0
  19. near_jsonrpc_models/access_key_permission_view.py +25 -0
  20. near_jsonrpc_models/access_key_view.py +10 -0
  21. near_jsonrpc_models/account_creation_config_view.py +13 -0
  22. near_jsonrpc_models/account_data_view.py +30 -0
  23. near_jsonrpc_models/account_id.py +25 -0
  24. near_jsonrpc_models/account_id_validity_rules_version.py +8 -0
  25. near_jsonrpc_models/account_info.py +12 -0
  26. near_jsonrpc_models/account_view.py +18 -0
  27. near_jsonrpc_models/account_with_public_key.py +10 -0
  28. near_jsonrpc_models/action_creation_config_view.py +32 -0
  29. near_jsonrpc_models/action_error.py +13 -0
  30. near_jsonrpc_models/action_error_kind.py +200 -0
  31. near_jsonrpc_models/action_view.py +133 -0
  32. near_jsonrpc_models/actions_validation_error.py +150 -0
  33. near_jsonrpc_models/add_gas_key_action.py +10 -0
  34. near_jsonrpc_models/add_key_action.py +12 -0
  35. near_jsonrpc_models/bandwidth_request.py +14 -0
  36. near_jsonrpc_models/bandwidth_request_bitmap.py +11 -0
  37. near_jsonrpc_models/bandwidth_requests.py +16 -0
  38. near_jsonrpc_models/bandwidth_requests_v1.py +9 -0
  39. near_jsonrpc_models/block_header_inner_lite_view.py +22 -0
  40. near_jsonrpc_models/block_header_view.py +53 -0
  41. near_jsonrpc_models/block_id.py +16 -0
  42. near_jsonrpc_models/block_reference.py +21 -0
  43. near_jsonrpc_models/block_status_view.py +10 -0
  44. near_jsonrpc_models/call_result.py +10 -0
  45. near_jsonrpc_models/catchup_status_view.py +28 -0
  46. near_jsonrpc_models/chunk_distribution_network_config.py +12 -0
  47. near_jsonrpc_models/chunk_distribution_uris.py +10 -0
  48. near_jsonrpc_models/chunk_hash.py +4 -0
  49. near_jsonrpc_models/chunk_header_view.py +39 -0
  50. near_jsonrpc_models/cloud_archival_writer_config.py +14 -0
  51. near_jsonrpc_models/compilation_error.py +29 -0
  52. near_jsonrpc_models/congestion_control_config_view.py +58 -0
  53. near_jsonrpc_models/congestion_info_view.py +11 -0
  54. near_jsonrpc_models/contract_code_view.py +9 -0
  55. near_jsonrpc_models/cost_gas_used.py +10 -0
  56. near_jsonrpc_models/create_account_action.py +7 -0
  57. near_jsonrpc_models/crypto_hash.py +7 -0
  58. near_jsonrpc_models/current_epoch_validator_info.py +35 -0
  59. near_jsonrpc_models/data_receipt_creation_config_view.py +20 -0
  60. near_jsonrpc_models/data_receiver_view.py +8 -0
  61. near_jsonrpc_models/delegate_action.py +28 -0
  62. near_jsonrpc_models/delete_account_action.py +6 -0
  63. near_jsonrpc_models/delete_gas_key_action.py +6 -0
  64. near_jsonrpc_models/delete_key_action.py +7 -0
  65. near_jsonrpc_models/deploy_contract_action.py +8 -0
  66. near_jsonrpc_models/deploy_global_contract_action.py +10 -0
  67. near_jsonrpc_models/detailed_debug_status.py +15 -0
  68. near_jsonrpc_models/deterministic_account_state_init.py +13 -0
  69. near_jsonrpc_models/deterministic_account_state_init_v1.py +8 -0
  70. near_jsonrpc_models/deterministic_state_init_action.py +8 -0
  71. near_jsonrpc_models/direction.py +7 -0
  72. near_jsonrpc_models/dump_config.py +20 -0
  73. near_jsonrpc_models/duration_as_std_schema_provider.py +7 -0
  74. near_jsonrpc_models/dynamic_resharding_config_view.py +23 -0
  75. near_jsonrpc_models/epoch_id.py +8 -0
  76. near_jsonrpc_models/epoch_sync_config.py +25 -0
  77. near_jsonrpc_models/error_wrapper_for_genesis_config_error.py +24 -0
  78. near_jsonrpc_models/error_wrapper_for_rpc_block_error.py +24 -0
  79. near_jsonrpc_models/error_wrapper_for_rpc_call_function_error.py +24 -0
  80. near_jsonrpc_models/error_wrapper_for_rpc_chunk_error.py +24 -0
  81. near_jsonrpc_models/error_wrapper_for_rpc_client_config_error.py +24 -0
  82. near_jsonrpc_models/error_wrapper_for_rpc_gas_price_error.py +24 -0
  83. near_jsonrpc_models/error_wrapper_for_rpc_light_client_next_block_error.py +24 -0
  84. near_jsonrpc_models/error_wrapper_for_rpc_light_client_proof_error.py +24 -0
  85. near_jsonrpc_models/error_wrapper_for_rpc_maintenance_windows_error.py +24 -0
  86. near_jsonrpc_models/error_wrapper_for_rpc_network_info_error.py +24 -0
  87. near_jsonrpc_models/error_wrapper_for_rpc_protocol_config_error.py +24 -0
  88. near_jsonrpc_models/error_wrapper_for_rpc_query_error.py +24 -0
  89. near_jsonrpc_models/error_wrapper_for_rpc_receipt_error.py +24 -0
  90. near_jsonrpc_models/error_wrapper_for_rpc_split_storage_info_error.py +24 -0
  91. near_jsonrpc_models/error_wrapper_for_rpc_state_changes_error.py +24 -0
  92. near_jsonrpc_models/error_wrapper_for_rpc_status_error.py +24 -0
  93. near_jsonrpc_models/error_wrapper_for_rpc_transaction_error.py +24 -0
  94. near_jsonrpc_models/error_wrapper_for_rpc_validator_error.py +24 -0
  95. near_jsonrpc_models/error_wrapper_for_rpc_view_access_key_error.py +24 -0
  96. near_jsonrpc_models/error_wrapper_for_rpc_view_access_key_list_error.py +24 -0
  97. near_jsonrpc_models/error_wrapper_for_rpc_view_account_error.py +24 -0
  98. near_jsonrpc_models/error_wrapper_for_rpc_view_code_error.py +24 -0
  99. near_jsonrpc_models/error_wrapper_for_rpc_view_gas_key_error.py +24 -0
  100. near_jsonrpc_models/error_wrapper_for_rpc_view_gas_key_list_error.py +24 -0
  101. near_jsonrpc_models/error_wrapper_for_rpc_view_state_error.py +24 -0
  102. near_jsonrpc_models/execution_metadata_view.py +9 -0
  103. near_jsonrpc_models/execution_outcome_view.py +31 -0
  104. near_jsonrpc_models/execution_outcome_with_id_view.py +12 -0
  105. near_jsonrpc_models/execution_status_view.py +29 -0
  106. near_jsonrpc_models/ext_costs_config_view.py +162 -0
  107. near_jsonrpc_models/external_storage_config.py +17 -0
  108. near_jsonrpc_models/external_storage_location.py +34 -0
  109. near_jsonrpc_models/fee.py +17 -0
  110. near_jsonrpc_models/final_execution_outcome_view.py +23 -0
  111. near_jsonrpc_models/final_execution_outcome_with_receipt_view.py +26 -0
  112. near_jsonrpc_models/final_execution_status.py +27 -0
  113. near_jsonrpc_models/finality.py +9 -0
  114. near_jsonrpc_models/function_args.py +13 -0
  115. near_jsonrpc_models/function_call_action.py +10 -0
  116. near_jsonrpc_models/function_call_error.py +52 -0
  117. near_jsonrpc_models/function_call_permission.py +24 -0
  118. near_jsonrpc_models/gas_key.py +17 -0
  119. near_jsonrpc_models/gas_key_info_view.py +8 -0
  120. near_jsonrpc_models/gas_key_list.py +7 -0
  121. near_jsonrpc_models/gas_key_view.py +12 -0
  122. near_jsonrpc_models/gcconfig.py +19 -0
  123. near_jsonrpc_models/genesis_config.py +121 -0
  124. near_jsonrpc_models/genesis_config_error.py +7 -0
  125. near_jsonrpc_models/genesis_config_request.py +7 -0
  126. near_jsonrpc_models/global_contract_deploy_mode.py +13 -0
  127. near_jsonrpc_models/global_contract_identifier.py +17 -0
  128. near_jsonrpc_models/global_contract_identifier_view.py +17 -0
  129. near_jsonrpc_models/host_error.py +212 -0
  130. near_jsonrpc_models/internal_error.py +16 -0
  131. near_jsonrpc_models/invalid_access_key_error.py +54 -0
  132. near_jsonrpc_models/invalid_tx_error.py +135 -0
  133. near_jsonrpc_models/json_rpc_request_for_block.py +10 -0
  134. near_jsonrpc_models/json_rpc_request_for_block_effects.py +10 -0
  135. near_jsonrpc_models/json_rpc_request_for_broadcast_tx_async.py +10 -0
  136. near_jsonrpc_models/json_rpc_request_for_broadcast_tx_commit.py +10 -0
  137. near_jsonrpc_models/json_rpc_request_for_changes.py +10 -0
  138. near_jsonrpc_models/json_rpc_request_for_chunk.py +10 -0
  139. near_jsonrpc_models/json_rpc_request_for_client_config.py +10 -0
  140. near_jsonrpc_models/json_rpc_request_for_experimental_call_function.py +10 -0
  141. near_jsonrpc_models/json_rpc_request_for_experimental_changes.py +10 -0
  142. near_jsonrpc_models/json_rpc_request_for_experimental_changes_in_block.py +10 -0
  143. near_jsonrpc_models/json_rpc_request_for_experimental_congestion_level.py +10 -0
  144. near_jsonrpc_models/json_rpc_request_for_experimental_genesis_config.py +10 -0
  145. near_jsonrpc_models/json_rpc_request_for_experimental_light_client_block_proof.py +10 -0
  146. near_jsonrpc_models/json_rpc_request_for_experimental_light_client_proof.py +10 -0
  147. near_jsonrpc_models/json_rpc_request_for_experimental_maintenance_windows.py +10 -0
  148. near_jsonrpc_models/json_rpc_request_for_experimental_protocol_config.py +10 -0
  149. near_jsonrpc_models/json_rpc_request_for_experimental_receipt.py +10 -0
  150. near_jsonrpc_models/json_rpc_request_for_experimental_split_storage_info.py +10 -0
  151. near_jsonrpc_models/json_rpc_request_for_experimental_tx_status.py +10 -0
  152. near_jsonrpc_models/json_rpc_request_for_experimental_validators_ordered.py +10 -0
  153. near_jsonrpc_models/json_rpc_request_for_experimental_view_access_key.py +10 -0
  154. near_jsonrpc_models/json_rpc_request_for_experimental_view_access_key_list.py +10 -0
  155. near_jsonrpc_models/json_rpc_request_for_experimental_view_account.py +10 -0
  156. near_jsonrpc_models/json_rpc_request_for_experimental_view_code.py +10 -0
  157. near_jsonrpc_models/json_rpc_request_for_experimental_view_gas_key.py +10 -0
  158. near_jsonrpc_models/json_rpc_request_for_experimental_view_gas_key_list.py +10 -0
  159. near_jsonrpc_models/json_rpc_request_for_experimental_view_state.py +10 -0
  160. near_jsonrpc_models/json_rpc_request_for_gas_price.py +10 -0
  161. near_jsonrpc_models/json_rpc_request_for_genesis_config.py +10 -0
  162. near_jsonrpc_models/json_rpc_request_for_health.py +10 -0
  163. near_jsonrpc_models/json_rpc_request_for_light_client_proof.py +10 -0
  164. near_jsonrpc_models/json_rpc_request_for_maintenance_windows.py +10 -0
  165. near_jsonrpc_models/json_rpc_request_for_network_info.py +10 -0
  166. near_jsonrpc_models/json_rpc_request_for_next_light_client_block.py +10 -0
  167. near_jsonrpc_models/json_rpc_request_for_query.py +10 -0
  168. near_jsonrpc_models/json_rpc_request_for_send_tx.py +10 -0
  169. near_jsonrpc_models/json_rpc_request_for_status.py +10 -0
  170. near_jsonrpc_models/json_rpc_request_for_tx.py +10 -0
  171. near_jsonrpc_models/json_rpc_request_for_validators.py +10 -0
  172. near_jsonrpc_models/json_rpc_response_for_array_of_range_of_uint64_and_rpc_maintenance_windows_error.py +21 -0
  173. near_jsonrpc_models/json_rpc_response_for_array_of_validator_stake_view_and_rpc_validator_error.py +21 -0
  174. near_jsonrpc_models/json_rpc_response_for_crypto_hash_and_rpc_transaction_error.py +20 -0
  175. near_jsonrpc_models/json_rpc_response_for_genesis_config_and_genesis_config_error.py +20 -0
  176. near_jsonrpc_models/json_rpc_response_for_nullable_rpc_health_response_and_rpc_status_error.py +20 -0
  177. near_jsonrpc_models/json_rpc_response_for_rpc_block_response_and_rpc_block_error.py +20 -0
  178. near_jsonrpc_models/json_rpc_response_for_rpc_call_function_response_and_rpc_call_function_error.py +20 -0
  179. near_jsonrpc_models/json_rpc_response_for_rpc_chunk_response_and_rpc_chunk_error.py +20 -0
  180. near_jsonrpc_models/json_rpc_response_for_rpc_client_config_response_and_rpc_client_config_error.py +20 -0
  181. near_jsonrpc_models/json_rpc_response_for_rpc_congestion_level_response_and_rpc_chunk_error.py +20 -0
  182. near_jsonrpc_models/json_rpc_response_for_rpc_gas_price_response_and_rpc_gas_price_error.py +20 -0
  183. near_jsonrpc_models/json_rpc_response_for_rpc_light_client_block_proof_response_and_rpc_light_client_proof_error.py +20 -0
  184. near_jsonrpc_models/json_rpc_response_for_rpc_light_client_execution_proof_response_and_rpc_light_client_proof_error.py +20 -0
  185. near_jsonrpc_models/json_rpc_response_for_rpc_light_client_next_block_response_and_rpc_light_client_next_block_error.py +20 -0
  186. near_jsonrpc_models/json_rpc_response_for_rpc_network_info_response_and_rpc_network_info_error.py +20 -0
  187. near_jsonrpc_models/json_rpc_response_for_rpc_protocol_config_response_and_rpc_protocol_config_error.py +20 -0
  188. near_jsonrpc_models/json_rpc_response_for_rpc_query_response_and_rpc_query_error.py +20 -0
  189. near_jsonrpc_models/json_rpc_response_for_rpc_receipt_response_and_rpc_receipt_error.py +20 -0
  190. near_jsonrpc_models/json_rpc_response_for_rpc_split_storage_info_response_and_rpc_split_storage_info_error.py +20 -0
  191. near_jsonrpc_models/json_rpc_response_for_rpc_state_changes_in_block_by_type_response_and_rpc_state_changes_error.py +20 -0
  192. near_jsonrpc_models/json_rpc_response_for_rpc_state_changes_in_block_response_and_rpc_state_changes_error.py +20 -0
  193. near_jsonrpc_models/json_rpc_response_for_rpc_status_response_and_rpc_status_error.py +20 -0
  194. near_jsonrpc_models/json_rpc_response_for_rpc_transaction_response_and_rpc_transaction_error.py +20 -0
  195. near_jsonrpc_models/json_rpc_response_for_rpc_validator_response_and_rpc_validator_error.py +20 -0
  196. near_jsonrpc_models/json_rpc_response_for_rpc_view_access_key_list_response_and_rpc_view_access_key_list_error.py +20 -0
  197. near_jsonrpc_models/json_rpc_response_for_rpc_view_access_key_response_and_rpc_view_access_key_error.py +20 -0
  198. near_jsonrpc_models/json_rpc_response_for_rpc_view_account_response_and_rpc_view_account_error.py +20 -0
  199. near_jsonrpc_models/json_rpc_response_for_rpc_view_code_response_and_rpc_view_code_error.py +20 -0
  200. near_jsonrpc_models/json_rpc_response_for_rpc_view_gas_key_list_response_and_rpc_view_gas_key_list_error.py +20 -0
  201. near_jsonrpc_models/json_rpc_response_for_rpc_view_gas_key_response_and_rpc_view_gas_key_error.py +20 -0
  202. near_jsonrpc_models/json_rpc_response_for_rpc_view_state_response_and_rpc_view_state_error.py +20 -0
  203. near_jsonrpc_models/known_producer_view.py +13 -0
  204. near_jsonrpc_models/light_client_block_lite_view.py +9 -0
  205. near_jsonrpc_models/limit_config.py +81 -0
  206. near_jsonrpc_models/log_summary_style.py +7 -0
  207. near_jsonrpc_models/merkle_path_item.py +8 -0
  208. near_jsonrpc_models/method_resolve_error.py +7 -0
  209. near_jsonrpc_models/missing_trie_value.py +8 -0
  210. near_jsonrpc_models/missing_trie_value_context.py +9 -0
  211. near_jsonrpc_models/mutable_config_value.py +7 -0
  212. near_jsonrpc_models/near_gas.py +8 -0
  213. near_jsonrpc_models/near_token.py +7 -0
  214. near_jsonrpc_models/network_info_view.py +17 -0
  215. near_jsonrpc_models/next_epoch_validator_info.py +13 -0
  216. near_jsonrpc_models/non_delegate_action.py +71 -0
  217. near_jsonrpc_models/peer_id.py +6 -0
  218. near_jsonrpc_models/peer_info_view.py +26 -0
  219. near_jsonrpc_models/prepare_error.py +16 -0
  220. near_jsonrpc_models/protocol_version_check_config.py +9 -0
  221. near_jsonrpc_models/public_key.py +7 -0
  222. near_jsonrpc_models/range_of_uint64.py +7 -0
  223. near_jsonrpc_models/receipt_enum_view.py +48 -0
  224. near_jsonrpc_models/receipt_validation_error.py +76 -0
  225. near_jsonrpc_models/receipt_view.py +13 -0
  226. near_jsonrpc_models/rpc_block_error.py +25 -0
  227. near_jsonrpc_models/rpc_block_request.py +20 -0
  228. near_jsonrpc_models/rpc_block_response.py +12 -0
  229. near_jsonrpc_models/rpc_call_function_error.py +64 -0
  230. near_jsonrpc_models/rpc_call_function_request.py +31 -0
  231. near_jsonrpc_models/rpc_call_function_response.py +13 -0
  232. near_jsonrpc_models/rpc_chunk_error.py +38 -0
  233. near_jsonrpc_models/rpc_chunk_request.py +18 -0
  234. near_jsonrpc_models/rpc_chunk_response.py +13 -0
  235. near_jsonrpc_models/rpc_client_config_error.py +16 -0
  236. near_jsonrpc_models/rpc_client_config_request.py +7 -0
  237. near_jsonrpc_models/rpc_client_config_response.py +185 -0
  238. near_jsonrpc_models/rpc_congestion_level_request.py +18 -0
  239. near_jsonrpc_models/rpc_congestion_level_response.py +5 -0
  240. near_jsonrpc_models/rpc_gas_price_error.py +22 -0
  241. near_jsonrpc_models/rpc_gas_price_request.py +6 -0
  242. near_jsonrpc_models/rpc_gas_price_response.py +6 -0
  243. near_jsonrpc_models/rpc_health_request.py +7 -0
  244. near_jsonrpc_models/rpc_health_response.py +7 -0
  245. near_jsonrpc_models/rpc_known_producer.py +9 -0
  246. near_jsonrpc_models/rpc_light_client_block_proof_request.py +7 -0
  247. near_jsonrpc_models/rpc_light_client_block_proof_response.py +9 -0
  248. near_jsonrpc_models/rpc_light_client_execution_proof_request.py +23 -0
  249. near_jsonrpc_models/rpc_light_client_execution_proof_response.py +12 -0
  250. near_jsonrpc_models/rpc_light_client_next_block_error.py +30 -0
  251. near_jsonrpc_models/rpc_light_client_next_block_request.py +6 -0
  252. near_jsonrpc_models/rpc_light_client_next_block_response.py +19 -0
  253. near_jsonrpc_models/rpc_light_client_proof_error.py +55 -0
  254. near_jsonrpc_models/rpc_maintenance_windows_error.py +16 -0
  255. near_jsonrpc_models/rpc_maintenance_windows_request.py +6 -0
  256. near_jsonrpc_models/rpc_network_info_error.py +16 -0
  257. near_jsonrpc_models/rpc_network_info_request.py +7 -0
  258. near_jsonrpc_models/rpc_network_info_response.py +15 -0
  259. near_jsonrpc_models/rpc_peer_info.py +9 -0
  260. near_jsonrpc_models/rpc_protocol_config_error.py +22 -0
  261. near_jsonrpc_models/rpc_protocol_config_request.py +20 -0
  262. near_jsonrpc_models/rpc_protocol_config_response.py +103 -0
  263. near_jsonrpc_models/rpc_query_error.py +122 -0
  264. near_jsonrpc_models/rpc_query_request.py +185 -0
  265. near_jsonrpc_models/rpc_query_response.py +50 -0
  266. near_jsonrpc_models/rpc_receipt_error.py +24 -0
  267. near_jsonrpc_models/rpc_receipt_request.py +6 -0
  268. near_jsonrpc_models/rpc_receipt_response.py +13 -0
  269. near_jsonrpc_models/rpc_request_validation_error_kind.py +23 -0
  270. near_jsonrpc_models/rpc_send_transaction_request.py +9 -0
  271. near_jsonrpc_models/rpc_split_storage_info_error.py +16 -0
  272. near_jsonrpc_models/rpc_split_storage_info_request.py +5 -0
  273. near_jsonrpc_models/rpc_split_storage_info_response.py +11 -0
  274. near_jsonrpc_models/rpc_state_changes_error.py +25 -0
  275. near_jsonrpc_models/rpc_state_changes_in_block_by_type_request.py +129 -0
  276. near_jsonrpc_models/rpc_state_changes_in_block_by_type_response.py +9 -0
  277. near_jsonrpc_models/rpc_state_changes_in_block_request.py +20 -0
  278. near_jsonrpc_models/rpc_state_changes_in_block_response.py +9 -0
  279. near_jsonrpc_models/rpc_status_error.py +37 -0
  280. near_jsonrpc_models/rpc_status_request.py +7 -0
  281. near_jsonrpc_models/rpc_status_response.py +41 -0
  282. near_jsonrpc_models/rpc_transaction_error.py +43 -0
  283. near_jsonrpc_models/rpc_transaction_response.py +17 -0
  284. near_jsonrpc_models/rpc_transaction_status_request.py +21 -0
  285. near_jsonrpc_models/rpc_validator_error.py +22 -0
  286. near_jsonrpc_models/rpc_validator_request.py +20 -0
  287. near_jsonrpc_models/rpc_validator_response.py +28 -0
  288. near_jsonrpc_models/rpc_validators_ordered_request.py +6 -0
  289. near_jsonrpc_models/rpc_view_access_key_error.py +55 -0
  290. near_jsonrpc_models/rpc_view_access_key_list_error.py +45 -0
  291. near_jsonrpc_models/rpc_view_access_key_list_request.py +24 -0
  292. near_jsonrpc_models/rpc_view_access_key_list_response.py +13 -0
  293. near_jsonrpc_models/rpc_view_access_key_request.py +28 -0
  294. near_jsonrpc_models/rpc_view_access_key_response.py +13 -0
  295. near_jsonrpc_models/rpc_view_account_error.py +45 -0
  296. near_jsonrpc_models/rpc_view_account_request.py +24 -0
  297. near_jsonrpc_models/rpc_view_account_response.py +20 -0
  298. near_jsonrpc_models/rpc_view_code_error.py +54 -0
  299. near_jsonrpc_models/rpc_view_code_request.py +24 -0
  300. near_jsonrpc_models/rpc_view_code_response.py +12 -0
  301. near_jsonrpc_models/rpc_view_gas_key_error.py +55 -0
  302. near_jsonrpc_models/rpc_view_gas_key_list_error.py +45 -0
  303. near_jsonrpc_models/rpc_view_gas_key_list_request.py +24 -0
  304. near_jsonrpc_models/rpc_view_gas_key_list_response.py +11 -0
  305. near_jsonrpc_models/rpc_view_gas_key_request.py +28 -0
  306. near_jsonrpc_models/rpc_view_gas_key_response.py +15 -0
  307. near_jsonrpc_models/rpc_view_state_error.py +54 -0
  308. near_jsonrpc_models/rpc_view_state_request.py +31 -0
  309. near_jsonrpc_models/rpc_view_state_response.py +14 -0
  310. near_jsonrpc_models/runtime_config_view.py +30 -0
  311. near_jsonrpc_models/runtime_fees_config_view.py +29 -0
  312. near_jsonrpc_models/shard_id.py +16 -0
  313. near_jsonrpc_models/shard_layout.py +34 -0
  314. near_jsonrpc_models/shard_layout_v0.py +15 -0
  315. near_jsonrpc_models/shard_layout_v1.py +22 -0
  316. near_jsonrpc_models/shard_layout_v2.py +19 -0
  317. near_jsonrpc_models/shard_layout_v3.py +17 -0
  318. near_jsonrpc_models/shard_uid.py +17 -0
  319. near_jsonrpc_models/signature.py +7 -0
  320. near_jsonrpc_models/signed_delegate_action.py +8 -0
  321. near_jsonrpc_models/signed_transaction.py +7 -0
  322. near_jsonrpc_models/signed_transaction_view.py +19 -0
  323. near_jsonrpc_models/slashed_validator.py +7 -0
  324. near_jsonrpc_models/stake_action.py +12 -0
  325. near_jsonrpc_models/state_change_cause_view.py +50 -0
  326. near_jsonrpc_models/state_change_kind_view.py +31 -0
  327. near_jsonrpc_models/state_change_with_cause_view.py +129 -0
  328. near_jsonrpc_models/state_item.py +10 -0
  329. near_jsonrpc_models/state_sync_config.py +14 -0
  330. near_jsonrpc_models/status_sync_info.py +17 -0
  331. near_jsonrpc_models/storage_error.py +46 -0
  332. near_jsonrpc_models/storage_get_mode.py +9 -0
  333. near_jsonrpc_models/storage_usage_config_view.py +11 -0
  334. near_jsonrpc_models/store_key.py +12 -0
  335. near_jsonrpc_models/store_value.py +12 -0
  336. near_jsonrpc_models/strict_model.py +5 -0
  337. near_jsonrpc_models/sync_checkpoint.py +7 -0
  338. near_jsonrpc_models/sync_concurrency.py +19 -0
  339. near_jsonrpc_models/sync_config.py +23 -0
  340. near_jsonrpc_models/tier1proxy_view.py +7 -0
  341. near_jsonrpc_models/tracked_shards_config.py +42 -0
  342. near_jsonrpc_models/transfer_action.py +6 -0
  343. near_jsonrpc_models/transfer_to_gas_key_action.py +8 -0
  344. near_jsonrpc_models/tx_execution_error.py +21 -0
  345. near_jsonrpc_models/tx_execution_status.py +14 -0
  346. near_jsonrpc_models/use_global_contract_action.py +8 -0
  347. near_jsonrpc_models/validator_info.py +6 -0
  348. near_jsonrpc_models/validator_kickout_reason.py +67 -0
  349. near_jsonrpc_models/validator_kickout_view.py +8 -0
  350. near_jsonrpc_models/validator_stake_view.py +13 -0
  351. near_jsonrpc_models/validator_stake_view_v1.py +10 -0
  352. near_jsonrpc_models/version.py +10 -0
  353. near_jsonrpc_models/view_state_result.py +10 -0
  354. near_jsonrpc_models/vmconfig_view.py +44 -0
  355. near_jsonrpc_models/vmkind.py +9 -0
  356. near_jsonrpc_models/wasm_trap.py +9 -0
  357. near_jsonrpc_models/witness_config_view.py +17 -0
@@ -0,0 +1,18 @@
1
+ """Access key provides limited access to an account. Each access key belongs to some account and
2
+ is identified by a unique (within the account) public key. One account may have large number of
3
+ access keys. Access keys allow to act on behalf of the account by restricting transactions
4
+ that can be issued.
5
+ `account_id,public_key` is a key in the state"""
6
+
7
+ from near_jsonrpc_models.access_key_permission import AccessKeyPermission
8
+ from pydantic import BaseModel
9
+ from pydantic import conint
10
+
11
+
12
+ class AccessKey(BaseModel):
13
+ # Nonce for this access key, used for tx nonce generation. When access key is created, nonce
14
+ # is set to `(block_height - 1) * 1e6` to avoid tx hash collision on access key re-creation.
15
+ # See <https://github.com/near/nearcore/issues/3779> for more details.
16
+ nonce: conint(ge=0, le=18446744073709551615)
17
+ # Defines permissions for this access key.
18
+ permission: AccessKeyPermission
@@ -0,0 +1,13 @@
1
+ """Describes the cost of creating an access key."""
2
+
3
+ from near_jsonrpc_models.fee import Fee
4
+ from pydantic import BaseModel
5
+
6
+
7
+ class AccessKeyCreationConfigView(BaseModel):
8
+ # Base cost of creating a full access access-key.
9
+ full_access_cost: Fee
10
+ # Base cost of creating an access-key restricted to specific functions.
11
+ function_call_cost: Fee
12
+ # Cost per byte of method_names of creating a restricted access-key.
13
+ function_call_cost_per_byte: Fee
@@ -0,0 +1,10 @@
1
+ """Describes information about an access key including the public key."""
2
+
3
+ from near_jsonrpc_models.access_key_view import AccessKeyView
4
+ from near_jsonrpc_models.public_key import PublicKey
5
+ from pydantic import BaseModel
6
+
7
+
8
+ class AccessKeyInfoView(BaseModel):
9
+ access_key: AccessKeyView
10
+ public_key: PublicKey
@@ -0,0 +1,9 @@
1
+ """Lists access keys"""
2
+
3
+ from near_jsonrpc_models.access_key_info_view import AccessKeyInfoView
4
+ from pydantic import BaseModel
5
+ from typing import List
6
+
7
+
8
+ class AccessKeyList(BaseModel):
9
+ keys: List[AccessKeyInfoView]
@@ -0,0 +1,21 @@
1
+ """Defines permissions for AccessKey"""
2
+
3
+ from near_jsonrpc_models.function_call_permission import FunctionCallPermission
4
+ from near_jsonrpc_models.strict_model import StrictBaseModel
5
+ from pydantic import BaseModel
6
+ from pydantic import RootModel
7
+ from typing import Literal
8
+ from typing import Union
9
+
10
+
11
+ class AccessKeyPermissionFunctionCall(StrictBaseModel):
12
+ FunctionCall: FunctionCallPermission
13
+
14
+ """Grants full access to the account.
15
+ NOTE: It's used to replace account-level public keys."""
16
+ class AccessKeyPermissionFullAccess(RootModel[Literal['FullAccess']]):
17
+ pass
18
+
19
+ class AccessKeyPermission(RootModel[Union[AccessKeyPermissionFunctionCall, AccessKeyPermissionFullAccess]]):
20
+ pass
21
+
@@ -0,0 +1,25 @@
1
+ """Describes the permission scope for an access key. Whether it is a function call or a full access key."""
2
+
3
+ from near_jsonrpc_models.near_token import NearToken
4
+ from near_jsonrpc_models.strict_model import StrictBaseModel
5
+ from pydantic import BaseModel
6
+ from pydantic import RootModel
7
+ from typing import List
8
+ from typing import Literal
9
+ from typing import Union
10
+
11
+
12
+ class AccessKeyPermissionViewFullAccess(RootModel[Literal['FullAccess']]):
13
+ pass
14
+
15
+ class AccessKeyPermissionViewFunctionCallPayload(BaseModel):
16
+ allowance: NearToken | None = None
17
+ method_names: List[str]
18
+ receiver_id: str
19
+
20
+ class AccessKeyPermissionViewFunctionCall(StrictBaseModel):
21
+ FunctionCall: AccessKeyPermissionViewFunctionCallPayload
22
+
23
+ class AccessKeyPermissionView(RootModel[Union[AccessKeyPermissionViewFullAccess, AccessKeyPermissionViewFunctionCall]]):
24
+ pass
25
+
@@ -0,0 +1,10 @@
1
+ """Describes access key permission scope and nonce."""
2
+
3
+ from near_jsonrpc_models.access_key_permission_view import AccessKeyPermissionView
4
+ from pydantic import BaseModel
5
+ from pydantic import conint
6
+
7
+
8
+ class AccessKeyView(BaseModel):
9
+ nonce: conint(ge=0, le=18446744073709551615)
10
+ permission: AccessKeyPermissionView
@@ -0,0 +1,13 @@
1
+ """The structure describes configuration for creation of new accounts."""
2
+
3
+ from near_jsonrpc_models.account_id import AccountId
4
+ from pydantic import BaseModel
5
+ from pydantic import conint
6
+
7
+
8
+ class AccountCreationConfigView(BaseModel):
9
+ # The minimum length of the top-level account ID that is allowed to be created by any account.
10
+ min_allowed_top_level_account_length: conint(ge=0, le=255) = None
11
+ # The account ID of the account registrar. This account ID allowed to create top-level
12
+ # accounts of any valid length.
13
+ registrar_account_id: AccountId = None
@@ -0,0 +1,30 @@
1
+ """AccountData is a piece of global state that a validator
2
+ signs and broadcasts to the network.
3
+
4
+ It is essentially the data that a validator wants to share with the network.
5
+ All the nodes in the network are collecting the account data
6
+ broadcasted by the validators.
7
+ Since the number of the validators is bounded and their
8
+ identity is known (and the maximal size of allowed AccountData is bounded)
9
+ the global state that is distributed in the form of AccountData is bounded
10
+ as well.
11
+ Find more information in the docs [here](https://github.com/near/nearcore/blob/560f7fc8f4b3106e0d5d46050688610b1f104ac6/chain/client/src/client.rs#L2232)"""
12
+
13
+ from near_jsonrpc_models.public_key import PublicKey
14
+ from near_jsonrpc_models.tier1proxy_view import Tier1ProxyView
15
+ from pydantic import BaseModel
16
+ from typing import List
17
+
18
+
19
+ class AccountDataView(BaseModel):
20
+ # Account key of the validator signing this AccountData.
21
+ account_key: PublicKey
22
+ # ID of the node that handles the account key (aka validator key).
23
+ peer_id: PublicKey
24
+ # Proxy nodes that are directly connected to the validator node
25
+ # (this list may include the validator node itself).
26
+ # TIER1 nodes should connect to one of the proxies to sent TIER1
27
+ # messages to the validator.
28
+ proxies: List[Tier1ProxyView]
29
+ # UTC timestamp of when the AccountData has been signed.
30
+ timestamp: str
@@ -0,0 +1,25 @@
1
+ """NEAR Account Identifier.
2
+
3
+ This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
4
+
5
+ [See the crate-level docs for information about validation.](index.html#account-id-rules)
6
+
7
+ Also see [Error kind precedence](AccountId#error-kind-precedence).
8
+
9
+ ## Examples
10
+
11
+ ```
12
+ use near_account_id::AccountId;
13
+
14
+ let alice: AccountId = "alice.near".parse().unwrap();
15
+
16
+ assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f)
17
+ ```"""
18
+
19
+ from pydantic import BaseModel
20
+ from pydantic import RootModel
21
+
22
+
23
+ class AccountId(RootModel[str]):
24
+ pass
25
+
@@ -0,0 +1,8 @@
1
+ from pydantic import BaseModel
2
+ from pydantic import RootModel
3
+ from pydantic import conint
4
+
5
+
6
+ class AccountIdValidityRulesVersion(RootModel[conint(ge=0, le=255)]):
7
+ pass
8
+
@@ -0,0 +1,12 @@
1
+ """Account info for validators"""
2
+
3
+ from near_jsonrpc_models.account_id import AccountId
4
+ from near_jsonrpc_models.near_token import NearToken
5
+ from near_jsonrpc_models.public_key import PublicKey
6
+ from pydantic import BaseModel
7
+
8
+
9
+ class AccountInfo(BaseModel):
10
+ account_id: AccountId
11
+ amount: NearToken
12
+ public_key: PublicKey
@@ -0,0 +1,18 @@
1
+ """A view of the account"""
2
+
3
+ from near_jsonrpc_models.account_id import AccountId
4
+ from near_jsonrpc_models.crypto_hash import CryptoHash
5
+ from near_jsonrpc_models.near_token import NearToken
6
+ from pydantic import BaseModel
7
+ from pydantic import conint
8
+
9
+
10
+ class AccountView(BaseModel):
11
+ amount: NearToken
12
+ code_hash: CryptoHash
13
+ global_contract_account_id: AccountId | None = None
14
+ global_contract_hash: CryptoHash | None = None
15
+ locked: NearToken
16
+ # TODO(2271): deprecated.
17
+ storage_paid_at: conint(ge=0, le=18446744073709551615) = 0
18
+ storage_usage: conint(ge=0, le=18446744073709551615)
@@ -0,0 +1,10 @@
1
+ """Account ID with its public key."""
2
+
3
+ from near_jsonrpc_models.account_id import AccountId
4
+ from near_jsonrpc_models.public_key import PublicKey
5
+ from pydantic import BaseModel
6
+
7
+
8
+ class AccountWithPublicKey(BaseModel):
9
+ account_id: AccountId
10
+ public_key: PublicKey
@@ -0,0 +1,32 @@
1
+ """Describes the cost of creating a specific action, `Action`. Includes all variants."""
2
+
3
+ from near_jsonrpc_models.access_key_creation_config_view import AccessKeyCreationConfigView
4
+ from near_jsonrpc_models.fee import Fee
5
+ from pydantic import BaseModel
6
+
7
+
8
+ class ActionCreationConfigView(BaseModel):
9
+ # Base cost of adding a key.
10
+ add_key_cost: AccessKeyCreationConfigView = None
11
+ # Base cost of creating an account.
12
+ create_account_cost: Fee = None
13
+ # Base cost for processing a delegate action.
14
+ #
15
+ # This is on top of the costs for the actions inside the delegate action.
16
+ delegate_cost: Fee = None
17
+ # Base cost of deleting an account.
18
+ delete_account_cost: Fee = None
19
+ # Base cost of deleting a key.
20
+ delete_key_cost: Fee = None
21
+ # Base cost of deploying a contract.
22
+ deploy_contract_cost: Fee = None
23
+ # Cost per byte of deploying a contract.
24
+ deploy_contract_cost_per_byte: Fee = None
25
+ # Base cost of calling a function.
26
+ function_call_cost: Fee = None
27
+ # Cost per byte of method name and arguments of calling a function.
28
+ function_call_cost_per_byte: Fee = None
29
+ # Base cost of staking.
30
+ stake_cost: Fee = None
31
+ # Base cost of making a transfer.
32
+ transfer_cost: Fee = None
@@ -0,0 +1,13 @@
1
+ """An error happened during Action execution"""
2
+
3
+ from near_jsonrpc_models.action_error_kind import ActionErrorKind
4
+ from pydantic import BaseModel
5
+ from pydantic import conint
6
+
7
+
8
+ class ActionError(BaseModel):
9
+ # Index of the failed action in the transaction.
10
+ # Action index is not defined if ActionError.kind is `ActionErrorKind::LackBalanceForState`
11
+ index: conint(ge=0, le=18446744073709551615) | None = None
12
+ # The kind of ActionError happened
13
+ kind: ActionErrorKind
@@ -0,0 +1,200 @@
1
+ from near_jsonrpc_models.account_id import AccountId
2
+ from near_jsonrpc_models.function_call_error import FunctionCallError
3
+ from near_jsonrpc_models.global_contract_identifier import GlobalContractIdentifier
4
+ from near_jsonrpc_models.invalid_access_key_error import InvalidAccessKeyError
5
+ from near_jsonrpc_models.near_token import NearToken
6
+ from near_jsonrpc_models.public_key import PublicKey
7
+ from near_jsonrpc_models.receipt_validation_error import ReceiptValidationError
8
+ from near_jsonrpc_models.strict_model import StrictBaseModel
9
+ from pydantic import BaseModel
10
+ from pydantic import RootModel
11
+ from pydantic import conint
12
+ from typing import Literal
13
+ from typing import Union
14
+
15
+
16
+ class ActionErrorKindAccountAlreadyExistsPayload(BaseModel):
17
+ account_id: AccountId
18
+
19
+ class ActionErrorKindAccountAlreadyExists(StrictBaseModel):
20
+ """Happens when CreateAccount action tries to create an account with account_id which is already exists in the storage"""
21
+ AccountAlreadyExists: ActionErrorKindAccountAlreadyExistsPayload
22
+
23
+ class ActionErrorKindAccountDoesNotExistPayload(BaseModel):
24
+ account_id: AccountId
25
+
26
+ class ActionErrorKindAccountDoesNotExist(StrictBaseModel):
27
+ """Happens when TX receiver_id doesn't exist (but action is not Action::CreateAccount)"""
28
+ AccountDoesNotExist: ActionErrorKindAccountDoesNotExistPayload
29
+
30
+ class ActionErrorKindCreateAccountOnlyByRegistrarPayload(BaseModel):
31
+ account_id: AccountId
32
+ predecessor_id: AccountId
33
+ registrar_account_id: AccountId
34
+
35
+ class ActionErrorKindCreateAccountOnlyByRegistrar(StrictBaseModel):
36
+ """A top-level account ID can only be created by registrar."""
37
+ CreateAccountOnlyByRegistrar: ActionErrorKindCreateAccountOnlyByRegistrarPayload
38
+
39
+ class ActionErrorKindCreateAccountNotAllowedPayload(BaseModel):
40
+ account_id: AccountId
41
+ predecessor_id: AccountId
42
+
43
+ class ActionErrorKindCreateAccountNotAllowed(StrictBaseModel):
44
+ """A newly created account must be under a namespace of the creator account"""
45
+ CreateAccountNotAllowed: ActionErrorKindCreateAccountNotAllowedPayload
46
+
47
+ class ActionErrorKindActorNoPermissionPayload(BaseModel):
48
+ account_id: AccountId
49
+ actor_id: AccountId
50
+
51
+ class ActionErrorKindActorNoPermission(StrictBaseModel):
52
+ """Administrative actions like `DeployContract`, `Stake`, `AddKey`, `DeleteKey`. can be proceed only if sender=receiver
53
+ or the first TX action is a `CreateAccount` action"""
54
+ ActorNoPermission: ActionErrorKindActorNoPermissionPayload
55
+
56
+ class ActionErrorKindDeleteKeyDoesNotExistPayload(BaseModel):
57
+ account_id: AccountId
58
+ public_key: PublicKey
59
+
60
+ class ActionErrorKindDeleteKeyDoesNotExist(StrictBaseModel):
61
+ """Account tries to remove an access key that doesn't exist"""
62
+ DeleteKeyDoesNotExist: ActionErrorKindDeleteKeyDoesNotExistPayload
63
+
64
+ class ActionErrorKindAddKeyAlreadyExistsPayload(BaseModel):
65
+ account_id: AccountId
66
+ public_key: PublicKey
67
+
68
+ class ActionErrorKindAddKeyAlreadyExists(StrictBaseModel):
69
+ """The public key is already used for an existing access key"""
70
+ AddKeyAlreadyExists: ActionErrorKindAddKeyAlreadyExistsPayload
71
+
72
+ class ActionErrorKindDeleteAccountStakingPayload(BaseModel):
73
+ account_id: AccountId
74
+
75
+ class ActionErrorKindDeleteAccountStaking(StrictBaseModel):
76
+ """Account is staking and can not be deleted"""
77
+ DeleteAccountStaking: ActionErrorKindDeleteAccountStakingPayload
78
+
79
+ class ActionErrorKindLackBalanceForStatePayload(BaseModel):
80
+ # An account which needs balance
81
+ account_id: AccountId
82
+ # Balance required to complete an action.
83
+ amount: NearToken
84
+
85
+ class ActionErrorKindLackBalanceForState(StrictBaseModel):
86
+ """ActionReceipt can't be completed, because the remaining balance will not be enough to cover storage."""
87
+ LackBalanceForState: ActionErrorKindLackBalanceForStatePayload
88
+
89
+ class ActionErrorKindTriesToUnstakePayload(BaseModel):
90
+ account_id: AccountId
91
+
92
+ class ActionErrorKindTriesToUnstake(StrictBaseModel):
93
+ """Account is not yet staked, but tries to unstake"""
94
+ TriesToUnstake: ActionErrorKindTriesToUnstakePayload
95
+
96
+ class ActionErrorKindTriesToStakePayload(BaseModel):
97
+ account_id: AccountId
98
+ balance: NearToken
99
+ locked: NearToken
100
+ stake: NearToken
101
+
102
+ class ActionErrorKindTriesToStake(StrictBaseModel):
103
+ """The account doesn't have enough balance to increase the stake."""
104
+ TriesToStake: ActionErrorKindTriesToStakePayload
105
+
106
+ class ActionErrorKindInsufficientStakePayload(BaseModel):
107
+ account_id: AccountId
108
+ minimum_stake: NearToken
109
+ stake: NearToken
110
+
111
+ class ActionErrorKindInsufficientStake(StrictBaseModel):
112
+ InsufficientStake: ActionErrorKindInsufficientStakePayload
113
+
114
+ class ActionErrorKindFunctionCallError(StrictBaseModel):
115
+ """An error occurred during a `FunctionCall` Action, parameter is debug message."""
116
+ FunctionCallError: FunctionCallError
117
+
118
+ class ActionErrorKindNewReceiptValidationError(StrictBaseModel):
119
+ """Error occurs when a new `ActionReceipt` created by the `FunctionCall` action fails
120
+ receipt validation."""
121
+ NewReceiptValidationError: ReceiptValidationError
122
+
123
+ class ActionErrorKindOnlyImplicitAccountCreationAllowedPayload(BaseModel):
124
+ account_id: AccountId
125
+
126
+ class ActionErrorKindOnlyImplicitAccountCreationAllowed(StrictBaseModel):
127
+ """Error occurs when a `CreateAccount` action is called on a NEAR-implicit or ETH-implicit account.
128
+ See NEAR-implicit account creation NEP: <https://github.com/nearprotocol/NEPs/pull/71>.
129
+ Also, see ETH-implicit account creation NEP: <https://github.com/near/NEPs/issues/518>.
130
+
131
+ TODO(#8598): This error is named very poorly. A better name would be
132
+ `OnlyNamedAccountCreationAllowed`."""
133
+ OnlyImplicitAccountCreationAllowed: ActionErrorKindOnlyImplicitAccountCreationAllowedPayload
134
+
135
+ class ActionErrorKindDeleteAccountWithLargeStatePayload(BaseModel):
136
+ account_id: AccountId
137
+
138
+ class ActionErrorKindDeleteAccountWithLargeState(StrictBaseModel):
139
+ """Delete account whose state is large is temporarily banned."""
140
+ DeleteAccountWithLargeState: ActionErrorKindDeleteAccountWithLargeStatePayload
141
+
142
+ """Signature does not match the provided actions and given signer public key."""
143
+ class ActionErrorKindDelegateActionInvalidSignature(RootModel[Literal['DelegateActionInvalidSignature']]):
144
+ pass
145
+
146
+ class ActionErrorKindDelegateActionSenderDoesNotMatchTxReceiverPayload(BaseModel):
147
+ receiver_id: AccountId
148
+ sender_id: AccountId
149
+
150
+ class ActionErrorKindDelegateActionSenderDoesNotMatchTxReceiver(StrictBaseModel):
151
+ """Receiver of the transaction doesn't match Sender of the delegate action"""
152
+ DelegateActionSenderDoesNotMatchTxReceiver: ActionErrorKindDelegateActionSenderDoesNotMatchTxReceiverPayload
153
+
154
+ """Delegate action has expired. `max_block_height` is less than actual block height."""
155
+ class ActionErrorKindDelegateActionExpired(RootModel[Literal['DelegateActionExpired']]):
156
+ pass
157
+
158
+ class ActionErrorKindDelegateActionAccessKeyError(StrictBaseModel):
159
+ """The given public key doesn't exist for Sender account"""
160
+ DelegateActionAccessKeyError: InvalidAccessKeyError
161
+
162
+ class ActionErrorKindDelegateActionInvalidNoncePayload(BaseModel):
163
+ ak_nonce: conint(ge=0, le=18446744073709551615)
164
+ delegate_nonce: conint(ge=0, le=18446744073709551615)
165
+
166
+ class ActionErrorKindDelegateActionInvalidNonce(StrictBaseModel):
167
+ """DelegateAction nonce must be greater sender[public_key].nonce"""
168
+ DelegateActionInvalidNonce: ActionErrorKindDelegateActionInvalidNoncePayload
169
+
170
+ class ActionErrorKindDelegateActionNonceTooLargePayload(BaseModel):
171
+ delegate_nonce: conint(ge=0, le=18446744073709551615)
172
+ upper_bound: conint(ge=0, le=18446744073709551615)
173
+
174
+ class ActionErrorKindDelegateActionNonceTooLarge(StrictBaseModel):
175
+ """DelegateAction nonce is larger than the upper bound given by the block height"""
176
+ DelegateActionNonceTooLarge: ActionErrorKindDelegateActionNonceTooLargePayload
177
+
178
+ class ActionErrorKindGlobalContractDoesNotExistPayload(BaseModel):
179
+ identifier: GlobalContractIdentifier
180
+
181
+ class ActionErrorKindGlobalContractDoesNotExist(StrictBaseModel):
182
+ GlobalContractDoesNotExist: ActionErrorKindGlobalContractDoesNotExistPayload
183
+
184
+ class ActionErrorKindGasKeyDoesNotExistPayload(BaseModel):
185
+ account_id: AccountId
186
+ public_key: PublicKey
187
+
188
+ class ActionErrorKindGasKeyDoesNotExist(StrictBaseModel):
189
+ GasKeyDoesNotExist: ActionErrorKindGasKeyDoesNotExistPayload
190
+
191
+ class ActionErrorKindGasKeyAlreadyExistsPayload(BaseModel):
192
+ account_id: AccountId
193
+ public_key: PublicKey
194
+
195
+ class ActionErrorKindGasKeyAlreadyExists(StrictBaseModel):
196
+ GasKeyAlreadyExists: ActionErrorKindGasKeyAlreadyExistsPayload
197
+
198
+ class ActionErrorKind(RootModel[Union[ActionErrorKindAccountAlreadyExists, ActionErrorKindAccountDoesNotExist, ActionErrorKindCreateAccountOnlyByRegistrar, ActionErrorKindCreateAccountNotAllowed, ActionErrorKindActorNoPermission, ActionErrorKindDeleteKeyDoesNotExist, ActionErrorKindAddKeyAlreadyExists, ActionErrorKindDeleteAccountStaking, ActionErrorKindLackBalanceForState, ActionErrorKindTriesToUnstake, ActionErrorKindTriesToStake, ActionErrorKindInsufficientStake, ActionErrorKindFunctionCallError, ActionErrorKindNewReceiptValidationError, ActionErrorKindOnlyImplicitAccountCreationAllowed, ActionErrorKindDeleteAccountWithLargeState, ActionErrorKindDelegateActionInvalidSignature, ActionErrorKindDelegateActionSenderDoesNotMatchTxReceiver, ActionErrorKindDelegateActionExpired, ActionErrorKindDelegateActionAccessKeyError, ActionErrorKindDelegateActionInvalidNonce, ActionErrorKindDelegateActionNonceTooLarge, ActionErrorKindGlobalContractDoesNotExist, ActionErrorKindGasKeyDoesNotExist, ActionErrorKindGasKeyAlreadyExists]]):
199
+ pass
200
+
@@ -0,0 +1,133 @@
1
+ from near_jsonrpc_models.access_key_permission_view import AccessKeyPermissionView
2
+ from near_jsonrpc_models.access_key_view import AccessKeyView
3
+ from near_jsonrpc_models.account_id import AccountId
4
+ from near_jsonrpc_models.crypto_hash import CryptoHash
5
+ from near_jsonrpc_models.delegate_action import DelegateAction
6
+ from near_jsonrpc_models.function_args import FunctionArgs
7
+ from near_jsonrpc_models.global_contract_identifier_view import GlobalContractIdentifierView
8
+ from near_jsonrpc_models.near_gas import NearGas
9
+ from near_jsonrpc_models.near_token import NearToken
10
+ from near_jsonrpc_models.public_key import PublicKey
11
+ from near_jsonrpc_models.signature import Signature
12
+ from near_jsonrpc_models.strict_model import StrictBaseModel
13
+ from pydantic import BaseModel
14
+ from pydantic import RootModel
15
+ from pydantic import conint
16
+ from typing import Dict
17
+ from typing import Literal
18
+ from typing import Union
19
+
20
+
21
+ class ActionViewCreateAccount(RootModel[Literal['CreateAccount']]):
22
+ pass
23
+
24
+ class ActionViewDeployContractPayload(BaseModel):
25
+ code: str
26
+
27
+ class ActionViewDeployContract(StrictBaseModel):
28
+ DeployContract: ActionViewDeployContractPayload
29
+
30
+ class ActionViewFunctionCallPayload(BaseModel):
31
+ args: FunctionArgs
32
+ deposit: NearToken
33
+ gas: NearGas
34
+ method_name: str
35
+
36
+ class ActionViewFunctionCall(StrictBaseModel):
37
+ FunctionCall: ActionViewFunctionCallPayload
38
+
39
+ class ActionViewTransferPayload(BaseModel):
40
+ deposit: NearToken
41
+
42
+ class ActionViewTransfer(StrictBaseModel):
43
+ Transfer: ActionViewTransferPayload
44
+
45
+ class ActionViewStakePayload(BaseModel):
46
+ public_key: PublicKey
47
+ stake: NearToken
48
+
49
+ class ActionViewStake(StrictBaseModel):
50
+ Stake: ActionViewStakePayload
51
+
52
+ class ActionViewAddKeyPayload(BaseModel):
53
+ access_key: AccessKeyView
54
+ public_key: PublicKey
55
+
56
+ class ActionViewAddKey(StrictBaseModel):
57
+ AddKey: ActionViewAddKeyPayload
58
+
59
+ class ActionViewDeleteKeyPayload(BaseModel):
60
+ public_key: PublicKey
61
+
62
+ class ActionViewDeleteKey(StrictBaseModel):
63
+ DeleteKey: ActionViewDeleteKeyPayload
64
+
65
+ class ActionViewDeleteAccountPayload(BaseModel):
66
+ beneficiary_id: AccountId
67
+
68
+ class ActionViewDeleteAccount(StrictBaseModel):
69
+ DeleteAccount: ActionViewDeleteAccountPayload
70
+
71
+ class ActionViewDelegatePayload(BaseModel):
72
+ delegate_action: DelegateAction
73
+ signature: Signature
74
+
75
+ class ActionViewDelegate(StrictBaseModel):
76
+ Delegate: ActionViewDelegatePayload
77
+
78
+ class ActionViewDeployGlobalContractPayload(BaseModel):
79
+ code: str
80
+
81
+ class ActionViewDeployGlobalContract(StrictBaseModel):
82
+ DeployGlobalContract: ActionViewDeployGlobalContractPayload
83
+
84
+ class ActionViewDeployGlobalContractByAccountIdPayload(BaseModel):
85
+ code: str
86
+
87
+ class ActionViewDeployGlobalContractByAccountId(StrictBaseModel):
88
+ DeployGlobalContractByAccountId: ActionViewDeployGlobalContractByAccountIdPayload
89
+
90
+ class ActionViewUseGlobalContractPayload(BaseModel):
91
+ code_hash: CryptoHash
92
+
93
+ class ActionViewUseGlobalContract(StrictBaseModel):
94
+ UseGlobalContract: ActionViewUseGlobalContractPayload
95
+
96
+ class ActionViewUseGlobalContractByAccountIdPayload(BaseModel):
97
+ account_id: AccountId
98
+
99
+ class ActionViewUseGlobalContractByAccountId(StrictBaseModel):
100
+ UseGlobalContractByAccountId: ActionViewUseGlobalContractByAccountIdPayload
101
+
102
+ class ActionViewDeterministicStateInitPayload(BaseModel):
103
+ code: GlobalContractIdentifierView
104
+ data: Dict[str, str]
105
+ deposit: NearToken
106
+
107
+ class ActionViewDeterministicStateInit(StrictBaseModel):
108
+ DeterministicStateInit: ActionViewDeterministicStateInitPayload
109
+
110
+ class ActionViewAddGasKeyPayload(BaseModel):
111
+ num_nonces: conint(ge=0, le=4294967295)
112
+ permission: AccessKeyPermissionView
113
+ public_key: PublicKey
114
+
115
+ class ActionViewAddGasKey(StrictBaseModel):
116
+ AddGasKey: ActionViewAddGasKeyPayload
117
+
118
+ class ActionViewDeleteGasKeyPayload(BaseModel):
119
+ public_key: PublicKey
120
+
121
+ class ActionViewDeleteGasKey(StrictBaseModel):
122
+ DeleteGasKey: ActionViewDeleteGasKeyPayload
123
+
124
+ class ActionViewTransferToGasKeyPayload(BaseModel):
125
+ amount: NearToken
126
+ public_key: PublicKey
127
+
128
+ class ActionViewTransferToGasKey(StrictBaseModel):
129
+ TransferToGasKey: ActionViewTransferToGasKeyPayload
130
+
131
+ class ActionView(RootModel[Union[ActionViewCreateAccount, ActionViewDeployContract, ActionViewFunctionCall, ActionViewTransfer, ActionViewStake, ActionViewAddKey, ActionViewDeleteKey, ActionViewDeleteAccount, ActionViewDelegate, ActionViewDeployGlobalContract, ActionViewDeployGlobalContractByAccountId, ActionViewUseGlobalContract, ActionViewUseGlobalContractByAccountId, ActionViewDeterministicStateInit, ActionViewAddGasKey, ActionViewDeleteGasKey, ActionViewTransferToGasKey]]):
132
+ pass
133
+