From 661c58039f9f6c4ed7e0f71f67a0022e7991ec75 Mon Sep 17 00:00:00 2001 From: Jacek Malec <145967538+jacek-casper@users.noreply.github.com> Date: Wed, 28 Aug 2024 17:20:37 +0100 Subject: [PATCH 1/2] Add package and amend get entity endpoint --- Cargo.lock | 4 +- Cargo.toml | 4 +- resources/test/rpc_schema.json | 1589 +++++++++++--------------------- rpc_sidecar/src/http_server.rs | 3 +- rpc_sidecar/src/node_client.rs | 80 +- rpc_sidecar/src/rpcs/common.rs | 155 ++-- rpc_sidecar/src/rpcs/docs.rs | 3 +- rpc_sidecar/src/rpcs/state.rs | 536 +++++++++-- 8 files changed, 1119 insertions(+), 1255 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6fd7ebc1..9392bc35 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -471,7 +471,7 @@ dependencies = [ [[package]] name = "casper-binary-port" version = "1.0.0" -source = "git+https://github.com/casper-network/casper-node.git?branch=feat-2.0#b92f881b8351d88082e90a3addebc84ada87bcd8" +source = "git+https://github.com/jacek-casper/casper-node.git?branch=get-entity-get-package-binary-port#cc38fde731c3502bb790d05b5a15fcaf9daa1ffe" dependencies = [ "bincode", "bytes", @@ -673,7 +673,7 @@ dependencies = [ [[package]] name = "casper-types" version = "5.0.0" -source = "git+https://github.com/casper-network/casper-node.git?branch=feat-2.0#b92f881b8351d88082e90a3addebc84ada87bcd8" +source = "git+https://github.com/jacek-casper/casper-node.git?branch=get-entity-get-package-binary-port#cc38fde731c3502bb790d05b5a15fcaf9daa1ffe" dependencies = [ "base16", "base64 0.13.1", diff --git a/Cargo.toml b/Cargo.toml index 0c64330a..0906ae11 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,8 +14,8 @@ members = [ anyhow = "1" async-stream = "0.3.4" async-trait = "0.1.77" -casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "feat-2.0" } -casper-binary-port = { git = "https://github.com/casper-network/casper-node.git", branch = "feat-2.0" } +casper-types = { git = "https://github.com/jacek-casper/casper-node.git", branch = "get-entity-get-package-binary-port" } +casper-binary-port = { git = "https://github.com/jacek-casper/casper-node.git", branch = "get-entity-get-package-binary-port" } casper-event-sidecar = { path = "./event_sidecar", version = "1.0.0" } casper-event-types = { path = "./types", version = "1.0.0" } casper-rpc-sidecar = { path = "./rpc_sidecar", version = "1.0.0" } diff --git a/resources/test/rpc_schema.json b/resources/test/rpc_schema.json index 3182679a..5d781393 100644 --- a/resources/test/rpc_schema.json +++ b/resources/test/rpc_schema.json @@ -38,10 +38,7 @@ "schema": { "description": "Result for \"account_put_deploy\" RPC response.", "type": "object", - "required": [ - "api_version", - "deploy_hash" - ], + "required": ["api_version", "deploy_hash"], "properties": { "api_version": { "description": "The RPC API version.", @@ -141,10 +138,7 @@ "schema": { "description": "Result for \"account_put_transaction\" RPC response.", "type": "object", - "required": [ - "api_version", - "transaction_hash" - ], + "required": ["api_version", "transaction_hash"], "properties": { "api_version": { "description": "The RPC API version.", @@ -274,10 +268,7 @@ "schema": { "description": "Result for \"info_get_deploy\" RPC response.", "type": "object", - "required": [ - "api_version", - "deploy" - ], + "required": ["api_version", "deploy"], "properties": { "api_version": { "description": "The RPC API version.", @@ -452,10 +443,7 @@ "schema": { "description": "Result for \"info_get_transaction\" RPC response.", "type": "object", - "required": [ - "api_version", - "transaction" - ], + "required": ["api_version", "transaction"], "properties": { "api_version": { "description": "The RPC API version.", @@ -657,11 +645,7 @@ "schema": { "description": "Result for \"state_get_account_info\" RPC response.", "type": "object", - "required": [ - "account", - "api_version", - "merkle_proof" - ], + "required": ["account", "api_version", "merkle_proof"], "properties": { "api_version": { "description": "The RPC API version.", @@ -750,6 +734,14 @@ ] }, "required": false + }, + { + "name": "include_bytecode", + "schema": { + "description": "Whether to include the entity's bytecode in the response.", + "type": ["boolean", "null"] + }, + "required": false } ], "result": { @@ -757,11 +749,7 @@ "schema": { "description": "Result for \"state_get_entity\" RPC response.", "type": "object", - "required": [ - "api_version", - "entity", - "merkle_proof" - ], + "required": ["api_version", "entity", "merkle_proof"], "properties": { "api_version": { "description": "The RPC API version.", @@ -769,7 +757,7 @@ }, "entity": { "description": "The addressable entity or a legacy account.", - "$ref": "#/components/schemas/EntityOrAccount" + "$ref": "#/components/schemas/EntityWithBackwardCompat" }, "merkle_proof": { "description": "The Merkle proof.", @@ -794,6 +782,10 @@ "value": { "Hash": "0707070707070707070707070707070707070707070707070707070707070707" } + }, + { + "name": "include_bytecode", + "value": null } ], "result": { @@ -845,7 +837,94 @@ "entry_point_payment": "Caller" } } - ] + ], + "bytecode": null + } + }, + "merkle_proof": "01000000006ef2e0949ac76e55812421f755abe129b6244fe7168b77f47a72536147614625016ef2e0949ac76e55812421f755abe129b6244fe7168b77f47a72536147614625000000003529cde5c621f857f75f3810611eb4af3f998caaa9d4a3413cf799f99c67db0307010000006ef2e0949ac76e55812421f755abe129b6244fe7168b77f47a7253614761462501010102000000006e06000000000074769d28aac597a36a03a932d4b43e4f10bf0403ee5c41dd035102553f5773631200b9e173e8f05361b681513c14e25e3138639eb03232581db7557c9e8dbbc83ce94500226a9a7fe4f2b7b88d5103a4fc7400f02bf89c860c9ccdd56951a2afe9be0e0267006d820fb5676eb2960e15722f7725f3f8f41030078f8b2e44bf0dc03f71b176d6e800dc5ae9805068c5be6da1a90b2528ee85db0609cc0fb4bd60bbd559f497a98b67f500e1e3e846592f4918234647fca39830b7e1e6ad6f5b7a99b39af823d82ba1873d000003000000010186ff500f287e9b53f823ae1582b1fa429dfede28015125fd233a31ca04d5012002015cc42669a55467a1fdf49750772bfc1aed59b9b085558eb81510e9b015a7c83b0301e3cf4a34b1db6bfa58808b686cb8fe21ebe0c1bcbcee522649d2b135fe510fe3" + } + } + } + ] + }, + { + "name": "state_get_package", + "summary": "returns a Package from the network", + "params": [ + { + "name": "package_identifier", + "schema": { + "description": "The identifier of the package.", + "$ref": "#/components/schemas/PackageIdentifier" + }, + "required": true + }, + { + "name": "block_identifier", + "schema": { + "description": "The block identifier.", + "anyOf": [ + { + "$ref": "#/components/schemas/BlockIdentifier" + }, + { + "type": "null" + } + ] + }, + "required": false + } + ], + "result": { + "name": "state_get_package_result", + "schema": { + "description": "Result for \"state_get_entity\" RPC response.", + "type": "object", + "required": ["api_version", "merkle_proof", "package"], + "properties": { + "api_version": { + "description": "The RPC API version.", + "type": "string" + }, + "package": { + "description": "The addressable entity or a legacy account.", + "$ref": "#/components/schemas/PackageWithBackwardCompat" + }, + "merkle_proof": { + "description": "The Merkle proof.", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "examples": [ + { + "name": "state_get_package_example", + "params": [ + { + "name": "package_identifier", + "value": { + "ContractPackageHash": "contract-package-0000000000000000000000000000000000000000000000000000000000000000" + } + }, + { + "name": "block_identifier", + "value": { + "Hash": "0707070707070707070707070707070707070707070707070707070707070707" + } + } + ], + "result": { + "name": "state_get_package_example_result", + "value": { + "api_version": "2.0.0", + "package": { + "Package": { + "versions": [], + "disabled_versions": [], + "groups": [], + "lock_status": "Unlocked" } }, "merkle_proof": "01000000006ef2e0949ac76e55812421f755abe129b6244fe7168b77f47a72536147614625016ef2e0949ac76e55812421f755abe129b6244fe7168b77f47a72536147614625000000003529cde5c621f857f75f3810611eb4af3f998caaa9d4a3413cf799f99c67db0307010000006ef2e0949ac76e55812421f755abe129b6244fe7168b77f47a7253614761462501010102000000006e06000000000074769d28aac597a36a03a932d4b43e4f10bf0403ee5c41dd035102553f5773631200b9e173e8f05361b681513c14e25e3138639eb03232581db7557c9e8dbbc83ce94500226a9a7fe4f2b7b88d5103a4fc7400f02bf89c860c9ccdd56951a2afe9be0e0267006d820fb5676eb2960e15722f7725f3f8f41030078f8b2e44bf0dc03f71b176d6e800dc5ae9805068c5be6da1a90b2528ee85db0609cc0fb4bd60bbd559f497a98b67f500e1e3e846592f4918234647fca39830b7e1e6ad6f5b7a99b39af823d82ba1873d000003000000010186ff500f287e9b53f823ae1582b1fa429dfede28015125fd233a31ca04d5012002015cc42669a55467a1fdf49750772bfc1aed59b9b085558eb81510e9b015a7c83b0301e3cf4a34b1db6bfa58808b686cb8fe21ebe0c1bcbcee522649d2b135fe510fe3" @@ -988,11 +1067,7 @@ "schema": { "description": "Result for \"query_global_state\" RPC response.", "type": "object", - "required": [ - "api_version", - "merkle_proof", - "stored_value" - ], + "required": ["api_version", "merkle_proof", "stored_value"], "properties": { "api_version": { "description": "The RPC API version.", @@ -1145,10 +1220,7 @@ "schema": { "description": "Result for \"query_balance\" RPC response.", "type": "object", - "required": [ - "api_version", - "balance" - ], + "required": ["api_version", "balance"], "properties": { "api_version": { "description": "The RPC API version.", @@ -1300,10 +1372,7 @@ "schema": { "description": "Result for \"info_get_peers\" RPC response.", "type": "object", - "required": [ - "api_version", - "peers" - ], + "required": ["api_version", "peers"], "properties": { "api_version": { "description": "The RPC API version.", @@ -1642,10 +1711,7 @@ "schema": { "description": "Result for the \"info_get_validator_changes\" RPC.", "type": "object", - "required": [ - "api_version", - "changes" - ], + "required": ["api_version", "changes"], "properties": { "api_version": { "description": "The RPC API version.", @@ -1695,10 +1761,7 @@ "schema": { "description": "Result for the \"info_get_chainspec\" RPC.", "type": "object", - "required": [ - "api_version", - "chainspec_bytes" - ], + "required": ["api_version", "chainspec_bytes"], "properties": { "api_version": { "description": "The RPC API version.", @@ -1747,9 +1810,7 @@ "schema": { "description": "Result for \"chain_get_block\" RPC response.", "type": "object", - "required": [ - "api_version" - ], + "required": ["api_version"], "properties": { "api_version": { "description": "The RPC API version.", @@ -1884,9 +1945,7 @@ "schema": { "description": "Result for \"chain_get_block_transfers\" RPC response.", "type": "object", - "required": [ - "api_version" - ], + "required": ["api_version"], "properties": { "api_version": { "description": "The RPC API version.", @@ -1905,10 +1964,7 @@ }, "transfers": { "description": "The block's transfers, if found.", - "type": [ - "array", - "null" - ], + "type": ["array", "null"], "items": { "$ref": "#/components/schemas/Transfer" } @@ -1974,9 +2030,7 @@ "schema": { "description": "Result for \"chain_get_state_root_hash\" RPC response.", "type": "object", - "required": [ - "api_version" - ], + "required": ["api_version"], "properties": { "api_version": { "description": "The RPC API version.", @@ -2056,11 +2110,7 @@ "schema": { "description": "Result for \"state_get_item\" RPC response.", "type": "object", - "required": [ - "api_version", - "merkle_proof", - "stored_value" - ], + "required": ["api_version", "merkle_proof", "stored_value"], "properties": { "api_version": { "description": "The RPC API version.", @@ -2092,9 +2142,7 @@ }, { "name": "path", - "value": [ - "inner" - ] + "value": ["inner"] } ], "result": { @@ -2140,11 +2188,7 @@ "schema": { "description": "Result for \"state_get_balance\" RPC response.", "type": "object", - "required": [ - "api_version", - "balance_value", - "merkle_proof" - ], + "required": ["api_version", "balance_value", "merkle_proof"], "properties": { "api_version": { "description": "The RPC API version.", @@ -2204,9 +2248,7 @@ "schema": { "description": "Result for \"chain_get_era_info\" RPC response.", "type": "object", - "required": [ - "api_version" - ], + "required": ["api_version"], "properties": { "api_version": { "description": "The RPC API version.", @@ -2290,10 +2332,7 @@ "schema": { "description": "Result for \"state_get_auction_info\" RPC response.", "type": "object", - "required": [ - "api_version", - "auction_state" - ], + "required": ["api_version", "auction_state"], "properties": { "api_version": { "description": "The RPC API version.", @@ -2385,10 +2424,7 @@ "schema": { "description": "Result for \"chain_get_era_summary\" RPC response.", "type": "object", - "required": [ - "api_version", - "era_summary" - ], + "required": ["api_version", "era_summary"], "properties": { "api_version": { "description": "The RPC API version.", @@ -2453,13 +2489,7 @@ "Deploy": { "description": "A signed smart contract.", "type": "object", - "required": [ - "approvals", - "hash", - "header", - "payment", - "session" - ], + "required": ["approvals", "hash", "header", "payment", "session"], "properties": { "hash": { "$ref": "#/components/schemas/DeployHash" @@ -2572,16 +2602,11 @@ { "description": "Executable specified as raw bytes that represent Wasm code and an instance of [`RuntimeArgs`].", "type": "object", - "required": [ - "ModuleBytes" - ], + "required": ["ModuleBytes"], "properties": { "ModuleBytes": { "type": "object", - "required": [ - "args", - "module_bytes" - ], + "required": ["args", "module_bytes"], "properties": { "module_bytes": { "description": "Hex-encoded raw Wasm bytes.", @@ -2608,17 +2633,11 @@ { "description": "Stored contract referenced by its [`AddressableEntityHash`], entry point and an instance of [`RuntimeArgs`].", "type": "object", - "required": [ - "StoredContractByHash" - ], + "required": ["StoredContractByHash"], "properties": { "StoredContractByHash": { "type": "object", - "required": [ - "args", - "entry_point", - "hash" - ], + "required": ["args", "entry_point", "hash"], "properties": { "hash": { "description": "Hex-encoded contract hash.", @@ -2649,17 +2668,11 @@ { "description": "Stored contract referenced by a named key existing in the signer's account context, entry point and an instance of [`RuntimeArgs`].", "type": "object", - "required": [ - "StoredContractByName" - ], + "required": ["StoredContractByName"], "properties": { "StoredContractByName": { "type": "object", - "required": [ - "args", - "entry_point", - "name" - ], + "required": ["args", "entry_point", "name"], "properties": { "name": { "description": "Named key.", @@ -2686,17 +2699,11 @@ { "description": "Stored versioned contract referenced by its [`PackageHash`], entry point and an instance of [`RuntimeArgs`].", "type": "object", - "required": [ - "StoredVersionedContractByHash" - ], + "required": ["StoredVersionedContractByHash"], "properties": { "StoredVersionedContractByHash": { "type": "object", - "required": [ - "args", - "entry_point", - "hash" - ], + "required": ["args", "entry_point", "hash"], "properties": { "hash": { "description": "Hex-encoded contract package hash.", @@ -2708,10 +2715,7 @@ }, "version": { "description": "An optional version of the contract to call. It will default to the highest enabled version if no value is specified.", - "type": [ - "integer", - "null" - ], + "type": ["integer", "null"], "format": "uint32", "minimum": 0.0 }, @@ -2736,17 +2740,11 @@ { "description": "Stored versioned contract referenced by a named key existing in the signer's account context, entry point and an instance of [`RuntimeArgs`].", "type": "object", - "required": [ - "StoredVersionedContractByName" - ], + "required": ["StoredVersionedContractByName"], "properties": { "StoredVersionedContractByName": { "type": "object", - "required": [ - "args", - "entry_point", - "name" - ], + "required": ["args", "entry_point", "name"], "properties": { "name": { "description": "Named key.", @@ -2754,10 +2752,7 @@ }, "version": { "description": "An optional version of the contract to call. It will default to the highest enabled version if no value is specified.", - "type": [ - "integer", - "null" - ], + "type": ["integer", "null"], "format": "uint32", "minimum": 0.0 }, @@ -2782,15 +2777,11 @@ { "description": "A native transfer which does not contain or reference a Wasm code.", "type": "object", - "required": [ - "Transfer" - ], + "required": ["Transfer"], "properties": { "Transfer": { "type": "object", - "required": [ - "args" - ], + "required": ["args"], "properties": { "args": { "description": "Runtime arguments.", @@ -2836,10 +2827,7 @@ "CLValue": { "description": "A Casper value, i.e. a value which can be stored and manipulated by smart contracts.\n\nIt holds the underlying data as a type-erased, serialized `Vec` and also holds the CLType of the underlying data as a separate member.\n\nThe `parsed` field, representing the original value, is a convenience only available when a CLValue is encoded to JSON, and can always be set to null if preferred.", "type": "object", - "required": [ - "bytes", - "cl_type" - ], + "required": ["bytes", "cl_type"], "properties": { "cl_type": { "$ref": "#/components/schemas/CLType" @@ -2857,107 +2845,77 @@ { "description": "`bool` primitive.", "type": "string", - "enum": [ - "Bool" - ] + "enum": ["Bool"] }, { "description": "`i32` primitive.", "type": "string", - "enum": [ - "I32" - ] + "enum": ["I32"] }, { "description": "`i64` primitive.", "type": "string", - "enum": [ - "I64" - ] + "enum": ["I64"] }, { "description": "`u8` primitive.", "type": "string", - "enum": [ - "U8" - ] + "enum": ["U8"] }, { "description": "`u32` primitive.", "type": "string", - "enum": [ - "U32" - ] + "enum": ["U32"] }, { "description": "`u64` primitive.", "type": "string", - "enum": [ - "U64" - ] + "enum": ["U64"] }, { "description": "[`U128`] large unsigned integer type.", "type": "string", - "enum": [ - "U128" - ] + "enum": ["U128"] }, { "description": "[`U256`] large unsigned integer type.", "type": "string", - "enum": [ - "U256" - ] + "enum": ["U256"] }, { "description": "[`U512`] large unsigned integer type.", "type": "string", - "enum": [ - "U512" - ] + "enum": ["U512"] }, { "description": "`()` primitive.", "type": "string", - "enum": [ - "Unit" - ] + "enum": ["Unit"] }, { "description": "`String` primitive.", "type": "string", - "enum": [ - "String" - ] + "enum": ["String"] }, { "description": "[`Key`] system type.", "type": "string", - "enum": [ - "Key" - ] + "enum": ["Key"] }, { "description": "[`URef`] system type.", "type": "string", - "enum": [ - "URef" - ] + "enum": ["URef"] }, { "description": "[`PublicKey`](crate::PublicKey) system type.", "type": "string", - "enum": [ - "PublicKey" - ] + "enum": ["PublicKey"] }, { "description": "`Option` of a `CLType`.", "type": "object", - "required": [ - "Option" - ], + "required": ["Option"], "properties": { "Option": { "$ref": "#/components/schemas/CLType" @@ -2968,9 +2926,7 @@ { "description": "Variable-length list of a single `CLType` (comparable to a `Vec`).", "type": "object", - "required": [ - "List" - ], + "required": ["List"], "properties": { "List": { "$ref": "#/components/schemas/CLType" @@ -2981,9 +2937,7 @@ { "description": "Fixed-length list of a single `CLType` (comparable to a Rust array).", "type": "object", - "required": [ - "ByteArray" - ], + "required": ["ByteArray"], "properties": { "ByteArray": { "type": "integer", @@ -2996,16 +2950,11 @@ { "description": "`Result` with `Ok` and `Err` variants of `CLType`s.", "type": "object", - "required": [ - "Result" - ], + "required": ["Result"], "properties": { "Result": { "type": "object", - "required": [ - "err", - "ok" - ], + "required": ["err", "ok"], "properties": { "ok": { "$ref": "#/components/schemas/CLType" @@ -3022,16 +2971,11 @@ { "description": "Map with keys of a single `CLType` and values of a single `CLType`.", "type": "object", - "required": [ - "Map" - ], + "required": ["Map"], "properties": { "Map": { "type": "object", - "required": [ - "key", - "value" - ], + "required": ["key", "value"], "properties": { "key": { "$ref": "#/components/schemas/CLType" @@ -3048,9 +2992,7 @@ { "description": "1-ary tuple of a `CLType`.", "type": "object", - "required": [ - "Tuple1" - ], + "required": ["Tuple1"], "properties": { "Tuple1": { "type": "array", @@ -3066,9 +3008,7 @@ { "description": "2-ary tuple of `CLType`s.", "type": "object", - "required": [ - "Tuple2" - ], + "required": ["Tuple2"], "properties": { "Tuple2": { "type": "array", @@ -3084,9 +3024,7 @@ { "description": "3-ary tuple of `CLType`s.", "type": "object", - "required": [ - "Tuple3" - ], + "required": ["Tuple3"], "properties": { "Tuple3": { "type": "array", @@ -3102,9 +3040,7 @@ { "description": "Unspecified type.", "type": "string", - "enum": [ - "Any" - ] + "enum": ["Any"] } ] }, @@ -3119,10 +3055,7 @@ "Approval": { "description": "A struct containing a signature of a transaction hash and the public key of the signer.", "type": "object", - "required": [ - "signature", - "signer" - ], + "required": ["signature", "signer"], "properties": { "signer": { "$ref": "#/components/schemas/PublicKey" @@ -3143,9 +3076,7 @@ { "description": "A deploy.", "type": "object", - "required": [ - "Deploy" - ], + "required": ["Deploy"], "properties": { "Deploy": { "$ref": "#/components/schemas/Deploy" @@ -3156,9 +3087,7 @@ { "description": "A version 1 transaction.", "type": "object", - "required": [ - "Version1" - ], + "required": ["Version1"], "properties": { "Version1": { "$ref": "#/components/schemas/TransactionV1" @@ -3171,12 +3100,7 @@ "TransactionV1": { "description": "A unit of work sent by a client to the network, which when executed can cause global state to be altered.", "type": "object", - "required": [ - "approvals", - "body", - "hash", - "header" - ], + "required": ["approvals", "body", "hash", "header"], "properties": { "hash": { "$ref": "#/components/schemas/TransactionV1Hash" @@ -3244,9 +3168,7 @@ { "description": "The original payment model, where the creator of the transaction specifies how much they will pay, at what gas price.", "type": "object", - "required": [ - "Classic" - ], + "required": ["Classic"], "properties": { "Classic": { "type": "object", @@ -3281,15 +3203,11 @@ { "description": "The cost of the transaction is determined by the cost table, per the transaction category.", "type": "object", - "required": [ - "Fixed" - ], + "required": ["Fixed"], "properties": { "Fixed": { "type": "object", - "required": [ - "gas_price_tolerance" - ], + "required": ["gas_price_tolerance"], "properties": { "gas_price_tolerance": { "description": "User-specified gas_price tolerance (minimum 1). This is interpreted to mean \"do not include this transaction in a block if the current gas price is greater than this number\"", @@ -3306,15 +3224,11 @@ { "description": "The payment for this transaction was previously reserved, as proven by the receipt hash (this is for future use, not currently implemented).", "type": "object", - "required": [ - "Reserved" - ], + "required": ["Reserved"], "properties": { "Reserved": { "type": "object", - "required": [ - "receipt" - ], + "required": ["receipt"], "properties": { "receipt": { "description": "Pre-paid receipt.", @@ -3338,9 +3252,7 @@ { "description": "The public key of the initiator.", "type": "object", - "required": [ - "PublicKey" - ], + "required": ["PublicKey"], "properties": { "PublicKey": { "$ref": "#/components/schemas/PublicKey" @@ -3351,9 +3263,7 @@ { "description": "The account hash derived from the public key of the initiator.", "type": "object", - "required": [ - "AccountHash" - ], + "required": ["AccountHash"], "properties": { "AccountHash": { "$ref": "#/components/schemas/AccountHash" @@ -3404,23 +3314,16 @@ { "description": "The execution target is a native operation (e.g. a transfer).", "type": "string", - "enum": [ - "Native" - ] + "enum": ["Native"] }, { "description": "The execution target is a stored entity or package.", "type": "object", - "required": [ - "Stored" - ], + "required": ["Stored"], "properties": { "Stored": { "type": "object", - "required": [ - "id", - "runtime" - ], + "required": ["id", "runtime"], "properties": { "id": { "description": "The identifier of the stored execution target.", @@ -3447,16 +3350,11 @@ { "description": "The execution target is the included module bytes, i.e. compiled Wasm.", "type": "object", - "required": [ - "Session" - ], + "required": ["Session"], "properties": { "Session": { "type": "object", - "required": [ - "module_bytes", - "runtime" - ], + "required": ["module_bytes", "runtime"], "properties": { "module_bytes": { "description": "The compiled Wasm.", @@ -3488,9 +3386,7 @@ { "description": "Hex-encoded entity address identifying the invocable entity.", "type": "object", - "required": [ - "ByHash" - ], + "required": ["ByHash"], "properties": { "ByHash": { "type": "string" @@ -3501,9 +3397,7 @@ { "description": "The alias identifying the invocable entity.", "type": "object", - "required": [ - "ByName" - ], + "required": ["ByName"], "properties": { "ByName": { "type": "string" @@ -3514,15 +3408,11 @@ { "description": "The address and optional version identifying the package.", "type": "object", - "required": [ - "ByPackageHash" - ], + "required": ["ByPackageHash"], "properties": { "ByPackageHash": { "type": "object", - "required": [ - "addr" - ], + "required": ["addr"], "properties": { "addr": { "description": "Hex-encoded address of the package.", @@ -3530,10 +3420,7 @@ }, "version": { "description": "The package version.\n\nIf `None`, the latest enabled version is implied.", - "type": [ - "integer", - "null" - ], + "type": ["integer", "null"], "format": "uint32", "minimum": 0.0 } @@ -3546,15 +3433,11 @@ { "description": "The alias and optional version identifying the package.", "type": "object", - "required": [ - "ByPackageName" - ], + "required": ["ByPackageName"], "properties": { "ByPackageName": { "type": "object", - "required": [ - "name" - ], + "required": ["name"], "properties": { "name": { "description": "The package name.", @@ -3562,10 +3445,7 @@ }, "version": { "description": "The package version.\n\nIf `None`, the latest enabled version is implied.", - "type": [ - "integer", - "null" - ], + "type": ["integer", "null"], "format": "uint32", "minimum": 0.0 } @@ -3583,16 +3463,12 @@ { "description": "The Casper Version 1 Virtual Machine.", "type": "string", - "enum": [ - "VmCasperV1" - ] + "enum": ["VmCasperV1"] }, { "description": "The Casper Version 2 Virtual Machine.", "type": "string", - "enum": [ - "VmCasperV2" - ] + "enum": ["VmCasperV2"] } ] }, @@ -3602,16 +3478,12 @@ { "description": "The standard `call` entry point used in session code.", "type": "string", - "enum": [ - "Call" - ] + "enum": ["Call"] }, { "description": "A non-native, arbitrary entry point.", "type": "object", - "required": [ - "Custom" - ], + "required": ["Custom"], "properties": { "Custom": { "type": "string" @@ -3622,72 +3494,52 @@ { "description": "The `transfer` native entry point, used to transfer `Motes` from a source purse to a target purse.", "type": "string", - "enum": [ - "Transfer" - ] + "enum": ["Transfer"] }, { "description": "The `add_bid` native entry point, used to create or top off a bid purse.", "type": "string", - "enum": [ - "AddBid" - ] + "enum": ["AddBid"] }, { "description": "The `withdraw_bid` native entry point, used to decrease a stake.", "type": "string", - "enum": [ - "WithdrawBid" - ] + "enum": ["WithdrawBid"] }, { "description": "The `delegate` native entry point, used to add a new delegator or increase an existing delegator's stake.", "type": "string", - "enum": [ - "Delegate" - ] + "enum": ["Delegate"] }, { "description": "The `undelegate` native entry point, used to reduce a delegator's stake or remove the delegator if the remaining stake is 0.", "type": "string", - "enum": [ - "Undelegate" - ] + "enum": ["Undelegate"] }, { "description": "The `redelegate` native entry point, used to reduce a delegator's stake or remove the delegator if the remaining stake is 0, and after the unbonding delay, automatically delegate to a new validator.", "type": "string", - "enum": [ - "Redelegate" - ] + "enum": ["Redelegate"] }, { "description": "The `activate_bid` native entry point, used to used to reactivate an inactive bid.", "type": "string", - "enum": [ - "ActivateBid" - ] + "enum": ["ActivateBid"] }, { "description": "The `change_bid_public_key` native entry point, used to change a bid's public key.", "type": "string", - "enum": [ - "ChangeBidPublicKey" - ] + "enum": ["ChangeBidPublicKey"] }, { "description": "The `add_reservations` native entry point, used to add delegator to validator's reserve list", "type": "string", - "enum": [ - "AddReservations" - ] + "enum": ["AddReservations"] }, { "description": "The `cancel_reservations` native entry point, used to remove delegator from validator's reserve list", "type": "string", - "enum": [ - "CancelReservations" - ] + "enum": ["CancelReservations"] } ] }, @@ -3697,16 +3549,12 @@ { "description": "No special scheduling applied.", "type": "string", - "enum": [ - "Standard" - ] + "enum": ["Standard"] }, { "description": "Execution should be scheduled for the specified era.", "type": "object", - "required": [ - "FutureEra" - ], + "required": ["FutureEra"], "properties": { "FutureEra": { "$ref": "#/components/schemas/EraId" @@ -3717,9 +3565,7 @@ { "description": "Execution should be scheduled for the specified timestamp or later.", "type": "object", - "required": [ - "FutureTimestamp" - ], + "required": ["FutureTimestamp"], "properties": { "FutureTimestamp": { "$ref": "#/components/schemas/Timestamp" @@ -3741,9 +3587,7 @@ { "description": "A deploy hash.", "type": "object", - "required": [ - "Deploy" - ], + "required": ["Deploy"], "properties": { "Deploy": { "$ref": "#/components/schemas/DeployHash" @@ -3754,9 +3598,7 @@ { "description": "A version 1 transaction hash.", "type": "object", - "required": [ - "Version1" - ], + "required": ["Version1"], "properties": { "Version1": { "$ref": "#/components/schemas/TransactionV1Hash" @@ -3769,10 +3611,7 @@ "ExecutionInfo": { "description": "The block hash and height in which a given deploy was executed, along with the execution result if known.", "type": "object", - "required": [ - "block_hash", - "block_height" - ], + "required": ["block_hash", "block_height"], "properties": { "block_hash": { "description": "The hash of the block in which the deploy was executed.", @@ -3816,9 +3655,7 @@ { "description": "Version 1 of execution result type.", "type": "object", - "required": [ - "Version1" - ], + "required": ["Version1"], "properties": { "Version1": { "$ref": "#/components/schemas/ExecutionResultV1" @@ -3829,9 +3666,7 @@ { "description": "Version 2 of execution result type.", "type": "object", - "required": [ - "Version2" - ], + "required": ["Version2"], "properties": { "Version2": { "$ref": "#/components/schemas/ExecutionResultV2" @@ -3847,18 +3682,11 @@ { "description": "The result of a failed execution.", "type": "object", - "required": [ - "Failure" - ], + "required": ["Failure"], "properties": { "Failure": { "type": "object", - "required": [ - "cost", - "effect", - "error_message", - "transfers" - ], + "required": ["cost", "effect", "error_message", "transfers"], "properties": { "effect": { "description": "The effect of executing the deploy.", @@ -3896,17 +3724,11 @@ { "description": "The result of a successful execution.", "type": "object", - "required": [ - "Success" - ], + "required": ["Success"], "properties": { "Success": { "type": "object", - "required": [ - "cost", - "effect", - "transfers" - ], + "required": ["cost", "effect", "transfers"], "properties": { "effect": { "description": "The effect of executing the deploy.", @@ -3942,10 +3764,7 @@ "ExecutionEffect": { "description": "The sequence of execution transforms from a single deploy.", "type": "object", - "required": [ - "operations", - "transforms" - ], + "required": ["operations", "transforms"], "properties": { "operations": { "description": "The resulting operations.", @@ -3967,10 +3786,7 @@ "Operation": { "description": "An operation performed while executing a deploy.", "type": "object", - "required": [ - "key", - "kind" - ], + "required": ["key", "kind"], "properties": { "key": { "description": "The formatted string of the `Key`.", @@ -3993,47 +3809,34 @@ { "description": "A read operation.", "type": "string", - "enum": [ - "Read" - ] + "enum": ["Read"] }, { "description": "A write operation.", "type": "string", - "enum": [ - "Write" - ] + "enum": ["Write"] }, { "description": "An addition.", "type": "string", - "enum": [ - "Add" - ] + "enum": ["Add"] }, { "description": "An operation which has no effect.", "type": "string", - "enum": [ - "NoOp" - ] + "enum": ["NoOp"] }, { "description": "A prune operation.", "type": "string", - "enum": [ - "Prune" - ] + "enum": ["Prune"] } ] }, "TransformV1": { "description": "A transformation performed while executing a deploy.", "type": "object", - "required": [ - "key", - "transform" - ], + "required": ["key", "transform"], "properties": { "key": { "description": "The formatted string of the `Key`.", @@ -4056,16 +3859,12 @@ { "description": "A transform having no effect.", "type": "string", - "enum": [ - "Identity" - ] + "enum": ["Identity"] }, { "description": "Writes the given CLValue to global state.", "type": "object", - "required": [ - "WriteCLValue" - ], + "required": ["WriteCLValue"], "properties": { "WriteCLValue": { "$ref": "#/components/schemas/CLValue" @@ -4076,9 +3875,7 @@ { "description": "Writes the given Account to global state.", "type": "object", - "required": [ - "WriteAccount" - ], + "required": ["WriteAccount"], "properties": { "WriteAccount": { "$ref": "#/components/schemas/AccountHash" @@ -4089,30 +3886,22 @@ { "description": "Writes a smart contract as Wasm to global state.", "type": "string", - "enum": [ - "WriteContractWasm" - ] + "enum": ["WriteContractWasm"] }, { "description": "Writes a smart contract to global state.", "type": "string", - "enum": [ - "WriteContract" - ] + "enum": ["WriteContract"] }, { "description": "Writes a smart contract package to global state.", "type": "string", - "enum": [ - "WriteContractPackage" - ] + "enum": ["WriteContractPackage"] }, { "description": "Writes the given DeployInfo to global state.", "type": "object", - "required": [ - "WriteDeployInfo" - ], + "required": ["WriteDeployInfo"], "properties": { "WriteDeployInfo": { "$ref": "#/components/schemas/DeployInfo" @@ -4123,9 +3912,7 @@ { "description": "Writes the given EraInfo to global state.", "type": "object", - "required": [ - "WriteEraInfo" - ], + "required": ["WriteEraInfo"], "properties": { "WriteEraInfo": { "$ref": "#/components/schemas/EraInfo" @@ -4136,9 +3923,7 @@ { "description": "Writes the given version 1 Transfer to global state.", "type": "object", - "required": [ - "WriteTransfer" - ], + "required": ["WriteTransfer"], "properties": { "WriteTransfer": { "$ref": "#/components/schemas/TransferV1" @@ -4149,9 +3934,7 @@ { "description": "Writes the given Bid to global state.", "type": "object", - "required": [ - "WriteBid" - ], + "required": ["WriteBid"], "properties": { "WriteBid": { "$ref": "#/components/schemas/Bid" @@ -4162,9 +3945,7 @@ { "description": "Writes the given Withdraw to global state.", "type": "object", - "required": [ - "WriteWithdraw" - ], + "required": ["WriteWithdraw"], "properties": { "WriteWithdraw": { "type": "array", @@ -4178,9 +3959,7 @@ { "description": "Adds the given `i32`.", "type": "object", - "required": [ - "AddInt32" - ], + "required": ["AddInt32"], "properties": { "AddInt32": { "type": "integer", @@ -4192,9 +3971,7 @@ { "description": "Adds the given `u64`.", "type": "object", - "required": [ - "AddUInt64" - ], + "required": ["AddUInt64"], "properties": { "AddUInt64": { "type": "integer", @@ -4207,9 +3984,7 @@ { "description": "Adds the given `U128`.", "type": "object", - "required": [ - "AddUInt128" - ], + "required": ["AddUInt128"], "properties": { "AddUInt128": { "$ref": "#/components/schemas/U128" @@ -4220,9 +3995,7 @@ { "description": "Adds the given `U256`.", "type": "object", - "required": [ - "AddUInt256" - ], + "required": ["AddUInt256"], "properties": { "AddUInt256": { "$ref": "#/components/schemas/U256" @@ -4233,9 +4006,7 @@ { "description": "Adds the given `U512`.", "type": "object", - "required": [ - "AddUInt512" - ], + "required": ["AddUInt512"], "properties": { "AddUInt512": { "$ref": "#/components/schemas/U512" @@ -4246,9 +4017,7 @@ { "description": "Adds the given collection of named keys.", "type": "object", - "required": [ - "AddKeys" - ], + "required": ["AddKeys"], "properties": { "AddKeys": { "type": "array", @@ -4262,9 +4031,7 @@ { "description": "A failed transformation, containing an error message.", "type": "object", - "required": [ - "Failure" - ], + "required": ["Failure"], "properties": { "Failure": { "type": "string" @@ -4275,9 +4042,7 @@ { "description": "Writes the given Unbonding to global state.", "type": "object", - "required": [ - "WriteUnbonding" - ], + "required": ["WriteUnbonding"], "properties": { "WriteUnbonding": { "type": "array", @@ -4291,16 +4056,12 @@ { "description": "Writes the addressable entity to global state.", "type": "string", - "enum": [ - "WriteAddressableEntity" - ] + "enum": ["WriteAddressableEntity"] }, { "description": "Removes pathing to keyed value within global state. This is a form of soft delete; the underlying value remains in global state and is reachable from older global state root hashes where it was included in the hash up.", "type": "object", - "required": [ - "Prune" - ], + "required": ["Prune"], "properties": { "Prune": { "$ref": "#/components/schemas/Key" @@ -4311,9 +4072,7 @@ { "description": "Writes the given BidKind to global state.", "type": "object", - "required": [ - "WriteBidKind" - ], + "required": ["WriteBidKind"], "properties": { "WriteBidKind": { "$ref": "#/components/schemas/BidKind" @@ -4326,13 +4085,7 @@ "DeployInfo": { "description": "Information relating to the given Deploy.", "type": "object", - "required": [ - "deploy_hash", - "from", - "gas", - "source", - "transfers" - ], + "required": ["deploy_hash", "from", "gas", "source", "transfers"], "properties": { "deploy_hash": { "description": "Hex-encoded Deploy hash.", @@ -4391,9 +4144,7 @@ "EraInfo": { "description": "Auction metadata. Intended to be recorded at each era.", "type": "object", - "required": [ - "seigniorage_allocations" - ], + "required": ["seigniorage_allocations"], "properties": { "seigniorage_allocations": { "type": "array", @@ -4410,16 +4161,11 @@ { "description": "Info about a seigniorage allocation for a validator", "type": "object", - "required": [ - "Validator" - ], + "required": ["Validator"], "properties": { "Validator": { "type": "object", - "required": [ - "amount", - "validator_public_key" - ], + "required": ["amount", "validator_public_key"], "properties": { "validator_public_key": { "description": "Validator's public key", @@ -4446,9 +4192,7 @@ { "description": "Info about a seigniorage allocation for a delegator", "type": "object", - "required": [ - "Delegator" - ], + "required": ["Delegator"], "properties": { "Delegator": { "type": "object", @@ -4563,10 +4307,7 @@ }, "id": { "description": "User-defined id", - "type": [ - "integer", - "null" - ], + "type": ["integer", "null"], "format": "uint64", "minimum": 0.0 } @@ -4643,9 +4384,7 @@ }, "VestingSchedule": { "type": "object", - "required": [ - "initial_release_timestamp_millis" - ], + "required": ["initial_release_timestamp_millis"], "properties": { "initial_release_timestamp_millis": { "type": "integer", @@ -4653,10 +4392,7 @@ "minimum": 0.0 }, "locked_amounts": { - "type": [ - "array", - "null" - ], + "type": ["array", "null"], "items": { "$ref": "#/components/schemas/U512" }, @@ -4675,10 +4411,7 @@ "PublicKeyAndDelegator": { "description": "A delegator associated with the given validator.", "type": "object", - "required": [ - "delegator", - "delegator_public_key" - ], + "required": ["delegator", "delegator_public_key"], "properties": { "delegator_public_key": { "description": "The public key of the delegator.", @@ -4798,10 +4531,7 @@ "NamedKey": { "description": "A key with a name.", "type": "object", - "required": [ - "key", - "name" - ], + "required": ["key", "name"], "properties": { "name": { "description": "The name of the entry.", @@ -4893,9 +4623,7 @@ { "description": "A unified record indexed on validator data, with an embedded collection of all delegator bids assigned to that validator. The Unified variant is for legacy retrograde support, new instances will not be created going forward.", "type": "object", - "required": [ - "Unified" - ], + "required": ["Unified"], "properties": { "Unified": { "$ref": "#/components/schemas/Bid" @@ -4906,9 +4634,7 @@ { "description": "A bid record containing only validator data.", "type": "object", - "required": [ - "Validator" - ], + "required": ["Validator"], "properties": { "Validator": { "$ref": "#/components/schemas/ValidatorBid" @@ -4919,9 +4645,7 @@ { "description": "A bid record containing only delegator data.", "type": "object", - "required": [ - "Delegator" - ], + "required": ["Delegator"], "properties": { "Delegator": { "$ref": "#/components/schemas/Delegator" @@ -4932,9 +4656,7 @@ { "description": "A bridge record pointing to a new `ValidatorBid` after the public key was changed.", "type": "object", - "required": [ - "Bridge" - ], + "required": ["Bridge"], "properties": { "Bridge": { "$ref": "#/components/schemas/Bridge" @@ -4945,9 +4667,7 @@ { "description": "Credited amount.", "type": "object", - "required": [ - "Credit" - ], + "required": ["Credit"], "properties": { "Credit": { "$ref": "#/components/schemas/ValidatorCredit" @@ -4958,9 +4678,7 @@ { "description": "Reservation", "type": "object", - "required": [ - "Reservation" - ], + "required": ["Reservation"], "properties": { "Reservation": { "$ref": "#/components/schemas/Reservation" @@ -5089,11 +4807,7 @@ "ValidatorCredit": { "description": "Validator credit record.", "type": "object", - "required": [ - "amount", - "era_id", - "validator_public_key" - ], + "required": ["amount", "era_id", "validator_public_key"], "properties": { "validator_public_key": { "description": "Validator public key", @@ -5180,10 +4894,7 @@ }, "error_message": { "description": "If there is no error message, this execution was processed successfully. If there is an error message, this execution failed to fully process for the stated reason.", - "type": [ - "string", - "null" - ] + "type": ["string", "null"] }, "limit": { "description": "What was the maximum allowed gas limit for this transaction?.", @@ -5251,9 +4962,7 @@ "PaymentInfo": { "description": "Breakdown of payments made to cover the cost.", "type": "object", - "required": [ - "source" - ], + "required": ["source"], "properties": { "source": { "description": "Source purse used for payment of the transaction.", @@ -5271,9 +4980,7 @@ { "description": "A version 1 transfer.", "type": "object", - "required": [ - "Version1" - ], + "required": ["Version1"], "properties": { "Version1": { "$ref": "#/components/schemas/TransferV1" @@ -5284,9 +4991,7 @@ { "description": "A version 2 transfer.", "type": "object", - "required": [ - "Version2" - ], + "required": ["Version2"], "properties": { "Version2": { "$ref": "#/components/schemas/TransferV2" @@ -5369,10 +5074,7 @@ }, "id": { "description": "User-defined ID.", - "type": [ - "integer", - "null" - ], + "type": ["integer", "null"], "format": "uint64", "minimum": 0.0 } @@ -5389,10 +5091,7 @@ "TransformV2": { "description": "A transformation performed while executing a deploy.", "type": "object", - "required": [ - "key", - "kind" - ], + "required": ["key", "kind"], "properties": { "key": { "$ref": "#/components/schemas/Key" @@ -5409,16 +5108,12 @@ { "description": "An identity transformation that does not modify a value in the global state.\n\nCreated as a result of reading from the global state.", "type": "string", - "enum": [ - "Identity" - ] + "enum": ["Identity"] }, { "description": "Writes a new value in the global state.", "type": "object", - "required": [ - "Write" - ], + "required": ["Write"], "properties": { "Write": { "$ref": "#/components/schemas/StoredValue" @@ -5429,9 +5124,7 @@ { "description": "A wrapping addition of an `i32` to an existing numeric value (not necessarily an `i32`) in the global state.", "type": "object", - "required": [ - "AddInt32" - ], + "required": ["AddInt32"], "properties": { "AddInt32": { "type": "integer", @@ -5443,9 +5136,7 @@ { "description": "A wrapping addition of a `u64` to an existing numeric value (not necessarily an `u64`) in the global state.", "type": "object", - "required": [ - "AddUInt64" - ], + "required": ["AddUInt64"], "properties": { "AddUInt64": { "type": "integer", @@ -5458,9 +5149,7 @@ { "description": "A wrapping addition of a `U128` to an existing numeric value (not necessarily an `U128`) in the global state.", "type": "object", - "required": [ - "AddUInt128" - ], + "required": ["AddUInt128"], "properties": { "AddUInt128": { "$ref": "#/components/schemas/U128" @@ -5471,9 +5160,7 @@ { "description": "A wrapping addition of a `U256` to an existing numeric value (not necessarily an `U256`) in the global state.", "type": "object", - "required": [ - "AddUInt256" - ], + "required": ["AddUInt256"], "properties": { "AddUInt256": { "$ref": "#/components/schemas/U256" @@ -5484,9 +5171,7 @@ { "description": "A wrapping addition of a `U512` to an existing numeric value (not necessarily an `U512`) in the global state.", "type": "object", - "required": [ - "AddUInt512" - ], + "required": ["AddUInt512"], "properties": { "AddUInt512": { "$ref": "#/components/schemas/U512" @@ -5497,9 +5182,7 @@ { "description": "Adds new named keys to an existing entry in the global state.\n\nThis transform assumes that the existing stored value is either an Account or a Contract.", "type": "object", - "required": [ - "AddKeys" - ], + "required": ["AddKeys"], "properties": { "AddKeys": { "$ref": "#/components/schemas/NamedKeys" @@ -5510,9 +5193,7 @@ { "description": "Removes the pathing to the global state entry of the specified key. The pruned element remains reachable from previously generated global state root hashes, but will not be included in the next generated global state root hash and subsequent state accumulated from it.", "type": "object", - "required": [ - "Prune" - ], + "required": ["Prune"], "properties": { "Prune": { "$ref": "#/components/schemas/Key" @@ -5523,9 +5204,7 @@ { "description": "Represents the case where applying a transform would cause an error.", "type": "object", - "required": [ - "Failure" - ], + "required": ["Failure"], "properties": { "Failure": { "$ref": "#/components/schemas/TransformError" @@ -5541,9 +5220,7 @@ { "description": "A CLValue.", "type": "object", - "required": [ - "CLValue" - ], + "required": ["CLValue"], "properties": { "CLValue": { "$ref": "#/components/schemas/CLValue" @@ -5554,9 +5231,7 @@ { "description": "An account.", "type": "object", - "required": [ - "Account" - ], + "required": ["Account"], "properties": { "Account": { "$ref": "#/components/schemas/Account" @@ -5567,9 +5242,7 @@ { "description": "Contract wasm.", "type": "object", - "required": [ - "ContractWasm" - ], + "required": ["ContractWasm"], "properties": { "ContractWasm": { "$ref": "#/components/schemas/ContractWasm" @@ -5580,9 +5253,7 @@ { "description": "A contract.", "type": "object", - "required": [ - "Contract" - ], + "required": ["Contract"], "properties": { "Contract": { "$ref": "#/components/schemas/Contract" @@ -5593,9 +5264,7 @@ { "description": "A contract package.", "type": "object", - "required": [ - "ContractPackage" - ], + "required": ["ContractPackage"], "properties": { "ContractPackage": { "$ref": "#/components/schemas/ContractPackage" @@ -5606,9 +5275,7 @@ { "description": "A version 1 (legacy) transfer.", "type": "object", - "required": [ - "LegacyTransfer" - ], + "required": ["LegacyTransfer"], "properties": { "LegacyTransfer": { "$ref": "#/components/schemas/TransferV1" @@ -5619,9 +5286,7 @@ { "description": "Info about a deploy.", "type": "object", - "required": [ - "DeployInfo" - ], + "required": ["DeployInfo"], "properties": { "DeployInfo": { "$ref": "#/components/schemas/DeployInfo" @@ -5632,9 +5297,7 @@ { "description": "Info about an era.", "type": "object", - "required": [ - "EraInfo" - ], + "required": ["EraInfo"], "properties": { "EraInfo": { "$ref": "#/components/schemas/EraInfo" @@ -5645,9 +5308,7 @@ { "description": "Variant that stores [`Bid`].", "type": "object", - "required": [ - "Bid" - ], + "required": ["Bid"], "properties": { "Bid": { "$ref": "#/components/schemas/Bid" @@ -5658,9 +5319,7 @@ { "description": "Variant that stores withdraw information.", "type": "object", - "required": [ - "Withdraw" - ], + "required": ["Withdraw"], "properties": { "Withdraw": { "type": "array", @@ -5674,9 +5333,7 @@ { "description": "Unbonding information.", "type": "object", - "required": [ - "Unbonding" - ], + "required": ["Unbonding"], "properties": { "Unbonding": { "type": "array", @@ -5690,9 +5347,7 @@ { "description": "An `AddressableEntity`.", "type": "object", - "required": [ - "AddressableEntity" - ], + "required": ["AddressableEntity"], "properties": { "AddressableEntity": { "$ref": "#/components/schemas/AddressableEntity" @@ -5703,9 +5358,7 @@ { "description": "Variant that stores [`BidKind`].", "type": "object", - "required": [ - "BidKind" - ], + "required": ["BidKind"], "properties": { "BidKind": { "$ref": "#/components/schemas/BidKind" @@ -5716,9 +5369,7 @@ { "description": "A `Package`.", "type": "object", - "required": [ - "Package" - ], + "required": ["Package"], "properties": { "Package": { "$ref": "#/components/schemas/Package" @@ -5729,9 +5380,7 @@ { "description": "A record of byte code.", "type": "object", - "required": [ - "ByteCode" - ], + "required": ["ByteCode"], "properties": { "ByteCode": { "$ref": "#/components/schemas/ByteCode" @@ -5742,9 +5391,7 @@ { "description": "Variant that stores a message topic.", "type": "object", - "required": [ - "MessageTopic" - ], + "required": ["MessageTopic"], "properties": { "MessageTopic": { "$ref": "#/components/schemas/MessageTopicSummary" @@ -5755,9 +5402,7 @@ { "description": "Variant that stores a message digest.", "type": "object", - "required": [ - "Message" - ], + "required": ["Message"], "properties": { "Message": { "$ref": "#/components/schemas/MessageChecksum" @@ -5768,9 +5413,7 @@ { "description": "A NamedKey record.", "type": "object", - "required": [ - "NamedKey" - ], + "required": ["NamedKey"], "properties": { "NamedKey": { "$ref": "#/components/schemas/NamedKeyValue" @@ -5781,9 +5424,7 @@ { "description": "A reservation record.", "type": "object", - "required": [ - "Reservation" - ], + "required": ["Reservation"], "properties": { "Reservation": { "$ref": "#/components/schemas/ReservationKind" @@ -5794,9 +5435,7 @@ { "description": "An entrypoint record.", "type": "object", - "required": [ - "EntryPoint" - ], + "required": ["EntryPoint"], "properties": { "EntryPoint": { "$ref": "#/components/schemas/EntryPointValue" @@ -5859,10 +5498,7 @@ "AssociatedKey": { "description": "A weighted public key.", "type": "object", - "required": [ - "account_hash", - "weight" - ], + "required": ["account_hash", "weight"], "properties": { "account_hash": { "description": "The account hash of the public key.", @@ -5891,10 +5527,7 @@ "AccountActionThresholds": { "description": "Thresholds that have to be met when executing an action of a certain type.", "type": "object", - "required": [ - "deployment", - "key_management" - ], + "required": ["deployment", "key_management"], "properties": { "deployment": { "description": "Threshold for deploy execution.", @@ -5917,9 +5550,7 @@ "ContractWasm": { "description": "A container for contract's WASM bytes.", "type": "object", - "required": [ - "bytes" - ], + "required": ["bytes"], "properties": { "bytes": { "$ref": "#/components/schemas/Bytes" @@ -5970,10 +5601,7 @@ }, "NamedEntryPoint": { "type": "object", - "required": [ - "entry_point", - "name" - ], + "required": ["entry_point", "name"], "properties": { "name": { "type": "string" @@ -5990,13 +5618,7 @@ "EntryPoint": { "description": "Type signature of a method. Order of arguments matter since can be referenced by index as well as name.", "type": "object", - "required": [ - "access", - "args", - "entry_point_type", - "name", - "ret" - ], + "required": ["access", "args", "entry_point_type", "name", "ret"], "properties": { "name": { "type": "string" @@ -6021,10 +5643,7 @@ "Parameter": { "description": "Parameter to a method", "type": "object", - "required": [ - "cl_type", - "name" - ], + "required": ["cl_type", "name"], "properties": { "name": { "type": "string" @@ -6040,16 +5659,12 @@ { "description": "Anyone can call this method (no access controls).", "type": "string", - "enum": [ - "Public" - ] + "enum": ["Public"] }, { "description": "Only users from the listed groups may call this method. Note: if the list is empty then this method is not callable from outside the contract.", "type": "object", - "required": [ - "Groups" - ], + "required": ["Groups"], "properties": { "Groups": { "type": "array", @@ -6063,9 +5678,7 @@ { "description": "Can't be accessed directly but are kept in the derived wasm bytes.", "type": "string", - "enum": [ - "Template" - ] + "enum": ["Template"] } ] }, @@ -6079,23 +5692,17 @@ { "description": "Runs using the calling entity's context. In v1.x this was used for both \"session\" code run using the originating Account's context, and also for \"StoredSession\" code that ran in the caller's context. While this made systemic sense due to the way the runtime context nesting works, this dual usage was very confusing to most human beings.\n\nIn v2.x the renamed Caller variant is exclusively used for wasm run using the initiating account entity's context. Previously installed 1.x stored session code should continue to work as the binary value matches but we no longer allow such logic to be upgraded, nor do we allow new stored session to be installed.", "type": "string", - "enum": [ - "Caller" - ] + "enum": ["Caller"] }, { "description": "Runs using the called entity's context.", "type": "string", - "enum": [ - "Called" - ] + "enum": ["Called"] }, { "description": "Extract a subset of bytecode and installs it as a new smart contract. Runs using the called entity's context.", "type": "string", - "enum": [ - "Factory" - ] + "enum": ["Factory"] } ] }, @@ -6208,10 +5815,7 @@ }, "NamedUserGroup": { "type": "object", - "required": [ - "group_name", - "group_users" - ], + "required": ["group_name", "group_users"], "properties": { "group_name": { "allOf": [ @@ -6235,16 +5839,12 @@ { "description": "The package is locked and cannot be versioned.", "type": "string", - "enum": [ - "Locked" - ] + "enum": ["Locked"] }, { "description": "The package is unlocked and can be versioned.", "type": "string", - "enum": [ - "Unlocked" - ] + "enum": ["Unlocked"] } ] }, @@ -6294,9 +5894,7 @@ { "description": "Package associated with a native contract implementation.", "type": "object", - "required": [ - "System" - ], + "required": ["System"], "properties": { "System": { "$ref": "#/components/schemas/SystemEntityType" @@ -6307,9 +5905,7 @@ { "description": "Package associated with an Account hash.", "type": "object", - "required": [ - "Account" - ], + "required": ["Account"], "properties": { "Account": { "$ref": "#/components/schemas/AccountHash" @@ -6320,9 +5916,7 @@ { "description": "Packages associated with Wasm stored on chain.", "type": "object", - "required": [ - "SmartContract" - ], + "required": ["SmartContract"], "properties": { "SmartContract": { "$ref": "#/components/schemas/TransactionRuntime" @@ -6338,30 +5932,22 @@ { "description": "Mint contract.", "type": "string", - "enum": [ - "Mint" - ] + "enum": ["Mint"] }, { "description": "Handle Payment contract.", "type": "string", - "enum": [ - "HandlePayment" - ] + "enum": ["HandlePayment"] }, { "description": "Standard Payment contract.", "type": "string", - "enum": [ - "StandardPayment" - ] + "enum": ["StandardPayment"] }, { "description": "Auction contract.", "type": "string", - "enum": [ - "Auction" - ] + "enum": ["Auction"] } ] }, @@ -6380,11 +5966,7 @@ "EntityActionThresholds": { "description": "Thresholds that have to be met when executing an action of a certain type.", "type": "object", - "required": [ - "deployment", - "key_management", - "upgrade_management" - ], + "required": ["deployment", "key_management", "upgrade_management"], "properties": { "deployment": { "description": "Threshold for deploy execution.", @@ -6426,10 +6008,7 @@ }, "MessageTopic": { "type": "object", - "required": [ - "topic_name", - "topic_name_hash" - ], + "required": ["topic_name", "topic_name_hash"], "properties": { "topic_name": { "type": "string" @@ -6450,12 +6029,7 @@ "Package": { "description": "Entity definition, metadata, and security container.", "type": "object", - "required": [ - "disabled_versions", - "groups", - "lock_status", - "versions" - ], + "required": ["disabled_versions", "groups", "lock_status", "versions"], "properties": { "versions": { "description": "All versions (enabled & disabled).", @@ -6499,10 +6073,7 @@ }, "EntityVersionAndHash": { "type": "object", - "required": [ - "addressable_entity_hash", - "entity_version_key" - ], + "required": ["addressable_entity_hash", "entity_version_key"], "properties": { "entity_version_key": { "allOf": [ @@ -6523,10 +6094,7 @@ "EntityVersionKey": { "description": "Major element of `ProtocolVersion` combined with `EntityVersion`.", "type": "object", - "required": [ - "entity_version", - "protocol_version_major" - ], + "required": ["entity_version", "protocol_version_major"], "properties": { "protocol_version_major": { "description": "Major element of `ProtocolVersion` a `ContractVersion` is compatible with.", @@ -6548,26 +6116,19 @@ { "description": "The package is locked and cannot be versioned.", "type": "string", - "enum": [ - "Locked" - ] + "enum": ["Locked"] }, { "description": "The package is unlocked and can be versioned.", "type": "string", - "enum": [ - "Unlocked" - ] + "enum": ["Unlocked"] } ] }, "ByteCode": { "description": "A container for contract's Wasm bytes.", "type": "object", - "required": [ - "bytes", - "kind" - ], + "required": ["bytes", "kind"], "properties": { "kind": { "$ref": "#/components/schemas/ByteCodeKind" @@ -6583,26 +6144,19 @@ { "description": "Empty byte code.", "type": "string", - "enum": [ - "Empty" - ] + "enum": ["Empty"] }, { "description": "Byte code to be executed with the version 1 Casper execution engine.", "type": "string", - "enum": [ - "V1CasperWasm" - ] + "enum": ["V1CasperWasm"] } ] }, "MessageTopicSummary": { "description": "Summary of a message topic that will be stored in global state.", "type": "object", - "required": [ - "blocktime", - "message_count" - ], + "required": ["blocktime", "message_count"], "properties": { "message_count": { "description": "Number of messages in this topic.", @@ -6633,10 +6187,7 @@ "NamedKeyValue": { "description": "A NamedKey value.", "type": "object", - "required": [ - "name", - "named_key" - ], + "required": ["name", "named_key"], "properties": { "named_key": { "description": "The actual `Key` encoded as a CLValue.", @@ -6659,11 +6210,7 @@ "ReservationKind": { "description": "Container for bytes recording location, type and data for a gas reservation", "type": "object", - "required": [ - "receipt", - "reservation_data", - "reservation_kind" - ], + "required": ["receipt", "reservation_data", "reservation_kind"], "properties": { "receipt": { "$ref": "#/components/schemas/Digest" @@ -6684,9 +6231,7 @@ { "description": "Entrypoints to be executed against the V1 Casper VM.", "type": "object", - "required": [ - "V1CasperVm" - ], + "required": ["V1CasperVm"], "properties": { "V1CasperVm": { "$ref": "#/components/schemas/EntryPoint2" @@ -6697,9 +6242,7 @@ { "description": "Entrypoints to be executed against the V2 Casper VM.", "type": "object", - "required": [ - "V2CasperVm" - ], + "required": ["V2CasperVm"], "properties": { "V2CasperVm": { "$ref": "#/components/schemas/EntryPointV2" @@ -6750,33 +6293,24 @@ { "description": "The caller must cover cost", "type": "string", - "enum": [ - "Caller" - ] + "enum": ["Caller"] }, { "description": "Will cover cost to execute self but not cost of any subsequent invoked contracts", "type": "string", - "enum": [ - "SelfOnly" - ] + "enum": ["SelfOnly"] }, { "description": "will cover cost to execute self and the cost of any subsequent invoked contracts", "type": "string", - "enum": [ - "SelfOnward" - ] + "enum": ["SelfOnward"] } ] }, "EntryPointV2": { "description": "The entry point for the V2 Casper VM.", "type": "object", - "required": [ - "flags", - "function_index" - ], + "required": ["flags", "function_index"], "properties": { "function_index": { "description": "The selector.", @@ -6798,9 +6332,7 @@ { "description": "Error while (de)serializing data.", "type": "object", - "required": [ - "Serialization" - ], + "required": ["Serialization"], "properties": { "Serialization": { "$ref": "#/components/schemas/BytesreprError" @@ -6811,9 +6343,7 @@ { "description": "Type mismatch error.", "type": "object", - "required": [ - "TypeMismatch" - ], + "required": ["TypeMismatch"], "properties": { "TypeMismatch": { "$ref": "#/components/schemas/TypeMismatch" @@ -6824,9 +6354,7 @@ { "description": "Type no longer supported.", "type": "string", - "enum": [ - "Deprecated" - ] + "enum": ["Deprecated"] } ] }, @@ -6836,54 +6364,39 @@ { "description": "Early end of stream while deserializing.", "type": "string", - "enum": [ - "EarlyEndOfStream" - ] + "enum": ["EarlyEndOfStream"] }, { "description": "Formatting error while deserializing.", "type": "string", - "enum": [ - "Formatting" - ] + "enum": ["Formatting"] }, { "description": "Not all input bytes were consumed in [`deserialize`].", "type": "string", - "enum": [ - "LeftOverBytes" - ] + "enum": ["LeftOverBytes"] }, { "description": "Out of memory error.", "type": "string", - "enum": [ - "OutOfMemory" - ] + "enum": ["OutOfMemory"] }, { "description": "No serialized representation is available for a value.", "type": "string", - "enum": [ - "NotRepresentable" - ] + "enum": ["NotRepresentable"] }, { "description": "Exceeded a recursion depth limit.", "type": "string", - "enum": [ - "ExceededRecursionDepth" - ] + "enum": ["ExceededRecursionDepth"] } ] }, "TypeMismatch": { "description": "An error struct representing a type mismatch in [`StoredValue`](crate::StoredValue) operations.", "type": "object", - "required": [ - "expected", - "found" - ], + "required": ["expected", "found"], "properties": { "expected": { "description": "The name of the expected type.", @@ -6922,9 +6435,7 @@ { "description": "Identify and retrieve the block with its hash.", "type": "object", - "required": [ - "Hash" - ], + "required": ["Hash"], "properties": { "Hash": { "$ref": "#/components/schemas/BlockHash" @@ -6935,9 +6446,7 @@ { "description": "Identify and retrieve the block with its height.", "type": "object", - "required": [ - "Height" - ], + "required": ["Height"], "properties": { "Height": { "type": "integer", @@ -6952,12 +6461,21 @@ "EntityIdentifier": { "description": "Identifier of an addressable entity.", "oneOf": [ + { + "description": "The hash of a contract.", + "type": "object", + "required": ["ContractHash"], + "properties": { + "ContractHash": { + "$ref": "#/components/schemas/ContractHash" + } + }, + "additionalProperties": false + }, { "description": "The public key of an account.", "type": "object", - "required": [ - "PublicKey" - ], + "required": ["PublicKey"], "properties": { "PublicKey": { "$ref": "#/components/schemas/PublicKey" @@ -6968,9 +6486,7 @@ { "description": "The account hash of an account.", "type": "object", - "required": [ - "AccountHash" - ], + "required": ["AccountHash"], "properties": { "AccountHash": { "$ref": "#/components/schemas/AccountHash" @@ -6981,9 +6497,7 @@ { "description": "The address of an addressable entity.", "type": "object", - "required": [ - "EntityAddr" - ], + "required": ["EntityAddr"], "properties": { "EntityAddr": { "$ref": "#/components/schemas/EntityAddr" @@ -7010,23 +6524,17 @@ } ] }, - "EntityOrAccount": { - "description": "An addressable entity or a legacy account.", + "EntityWithBackwardCompat": { + "description": "An addressable entity or a legacy account or contract.", "oneOf": [ { "description": "An addressable entity.", "type": "object", - "required": [ - "AddressableEntity" - ], + "required": ["AddressableEntity"], "properties": { "AddressableEntity": { "type": "object", - "required": [ - "entity", - "entry_points", - "named_keys" - ], + "required": ["entity", "entry_points", "named_keys"], "properties": { "entity": { "description": "The addressable entity.", @@ -7050,6 +6558,17 @@ "items": { "$ref": "#/components/schemas/EntryPointValue" } + }, + "bytecode": { + "description": "The bytecode of the addressable entity. Returned when `include_bytecode` is `true`.", + "anyOf": [ + { + "$ref": "#/components/schemas/ByteCodeWithProof" + }, + { + "type": "null" + } + ] } } } @@ -7057,17 +6576,128 @@ "additionalProperties": false }, { - "description": "A legacy account.", + "description": "An account.", "type": "object", - "required": [ - "LegacyAccount" - ], + "required": ["Account"], "properties": { - "LegacyAccount": { + "Account": { "$ref": "#/components/schemas/Account" } }, "additionalProperties": false + }, + { + "description": "A contract.", + "type": "object", + "required": ["Contract"], + "properties": { + "Contract": { + "type": "object", + "required": ["contract"], + "properties": { + "contract": { + "description": "The contract.", + "allOf": [ + { + "$ref": "#/components/schemas/Contract" + } + ] + }, + "wasm": { + "description": "The Wasm code of the contract. Returned when `include_bytecode` is `true`.", + "anyOf": [ + { + "$ref": "#/components/schemas/ContractWasmWithProof" + }, + { + "type": "null" + } + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "ByteCodeWithProof": { + "description": "Byte code of an entity with a proof.", + "type": "object", + "required": ["code", "merkle_proof"], + "properties": { + "code": { + "$ref": "#/components/schemas/ByteCode" + }, + "merkle_proof": { + "type": "string" + } + } + }, + "ContractWasmWithProof": { + "description": "Wasm code of a contract with a proof.", + "type": "object", + "required": ["merkle_proof", "wasm"], + "properties": { + "wasm": { + "$ref": "#/components/schemas/ContractWasm" + }, + "merkle_proof": { + "type": "string" + } + } + }, + "PackageIdentifier": { + "description": "Identifier of a package.", + "oneOf": [ + { + "description": "The address of a package.", + "type": "object", + "required": ["PackageAddr"], + "properties": { + "PackageAddr": { + "$ref": "#/components/schemas/PackageHash" + } + }, + "additionalProperties": false + }, + { + "description": "The hash of a contract package.", + "type": "object", + "required": ["ContractPackageHash"], + "properties": { + "ContractPackageHash": { + "$ref": "#/components/schemas/ContractPackageHash" + } + }, + "additionalProperties": false + } + ] + }, + "PackageWithBackwardCompat": { + "description": "A package or a legacy contract package.", + "oneOf": [ + { + "description": "A package.", + "type": "object", + "required": ["Package"], + "properties": { + "Package": { + "$ref": "#/components/schemas/Package" + } + }, + "additionalProperties": false + }, + { + "description": "A contract package.", + "type": "object", + "required": ["ContractPackage"], + "properties": { + "ContractPackage": { + "$ref": "#/components/schemas/ContractPackage" + } + }, + "additionalProperties": false } ] }, @@ -7077,17 +6707,11 @@ { "description": "Lookup a dictionary item via an Account's named keys.", "type": "object", - "required": [ - "AccountNamedKey" - ], + "required": ["AccountNamedKey"], "properties": { "AccountNamedKey": { "type": "object", - "required": [ - "dictionary_item_key", - "dictionary_name", - "key" - ], + "required": ["dictionary_item_key", "dictionary_name", "key"], "properties": { "key": { "description": "The account key as a formatted string whose named keys contains dictionary_name.", @@ -7109,17 +6733,11 @@ { "description": "Lookup a dictionary item via a Contract's named keys.", "type": "object", - "required": [ - "ContractNamedKey" - ], + "required": ["ContractNamedKey"], "properties": { "ContractNamedKey": { "type": "object", - "required": [ - "dictionary_item_key", - "dictionary_name", - "key" - ], + "required": ["dictionary_item_key", "dictionary_name", "key"], "properties": { "key": { "description": "The contract key as a formatted string whose named keys contains dictionary_name.", @@ -7141,17 +6759,11 @@ { "description": "Lookup a dictionary item via an entities named keys.", "type": "object", - "required": [ - "EntityNamedKey" - ], + "required": ["EntityNamedKey"], "properties": { "EntityNamedKey": { "type": "object", - "required": [ - "dictionary_item_key", - "dictionary_name", - "key" - ], + "required": ["dictionary_item_key", "dictionary_name", "key"], "properties": { "key": { "description": "The entity address formatted as a string.", @@ -7173,16 +6785,11 @@ { "description": "Lookup a dictionary item via its seed URef.", "type": "object", - "required": [ - "URef" - ], + "required": ["URef"], "properties": { "URef": { "type": "object", - "required": [ - "dictionary_item_key", - "seed_uref" - ], + "required": ["dictionary_item_key", "seed_uref"], "properties": { "seed_uref": { "description": "The dictionary's seed URef.", @@ -7200,9 +6807,7 @@ { "description": "Lookup a dictionary item via its unique key.", "type": "object", - "required": [ - "Dictionary" - ], + "required": ["Dictionary"], "properties": { "Dictionary": { "type": "string" @@ -7218,9 +6823,7 @@ { "description": "Query using a block hash.", "type": "object", - "required": [ - "BlockHash" - ], + "required": ["BlockHash"], "properties": { "BlockHash": { "$ref": "#/components/schemas/BlockHash" @@ -7231,9 +6834,7 @@ { "description": "Query using a block height.", "type": "object", - "required": [ - "BlockHeight" - ], + "required": ["BlockHeight"], "properties": { "BlockHeight": { "type": "integer", @@ -7246,9 +6847,7 @@ { "description": "Query using the state root hash.", "type": "object", - "required": [ - "StateRootHash" - ], + "required": ["StateRootHash"], "properties": { "StateRootHash": { "$ref": "#/components/schemas/Digest" @@ -7264,9 +6863,7 @@ { "description": "The legacy, initial version of the header portion of a block.", "type": "object", - "required": [ - "Version1" - ], + "required": ["Version1"], "properties": { "Version1": { "$ref": "#/components/schemas/BlockHeaderV1" @@ -7277,9 +6874,7 @@ { "description": "The version 2 of the header portion of a block.", "type": "object", - "required": [ - "Version2" - ], + "required": ["Version2"], "properties": { "Version2": { "$ref": "#/components/schemas/BlockHeaderV2" @@ -7386,10 +6981,7 @@ "EraEndV1": { "description": "Information related to the end of an era, and validator weights for the following era.", "type": "object", - "required": [ - "era_report", - "next_era_validator_weights" - ], + "required": ["era_report", "next_era_validator_weights"], "properties": { "era_report": { "description": "Equivocation, reward and validator inactivity information.", @@ -7412,11 +7004,7 @@ "EraReport_for_PublicKey": { "description": "Equivocation, reward and validator inactivity information.", "type": "object", - "required": [ - "equivocators", - "inactive_validators", - "rewards" - ], + "required": ["equivocators", "inactive_validators", "rewards"], "properties": { "equivocators": { "description": "The set of equivocators.", @@ -7451,10 +7039,7 @@ "EraReward": { "description": "A validator's public key paired with a measure of the value of its contribution to consensus, as a fraction of the configured maximum block reward.", "type": "object", - "required": [ - "amount", - "validator" - ], + "required": ["amount", "validator"], "properties": { "validator": { "description": "The validator's public key.", @@ -7481,10 +7066,7 @@ "ValidatorWeight": { "description": "A validator's public key paired with its weight, i.e. the total number of motes staked by it and its delegators.", "type": "object", - "required": [ - "validator", - "weight" - ], + "required": ["validator", "weight"], "properties": { "validator": { "description": "The validator's public key.", @@ -7681,9 +7263,7 @@ { "description": "The main purse of the account identified by this public key.", "type": "object", - "required": [ - "main_purse_under_public_key" - ], + "required": ["main_purse_under_public_key"], "properties": { "main_purse_under_public_key": { "$ref": "#/components/schemas/PublicKey" @@ -7694,9 +7274,7 @@ { "description": "The main purse of the account identified by this account hash.", "type": "object", - "required": [ - "main_purse_under_account_hash" - ], + "required": ["main_purse_under_account_hash"], "properties": { "main_purse_under_account_hash": { "$ref": "#/components/schemas/AccountHash" @@ -7707,9 +7285,7 @@ { "description": "The main purse of the account identified by this entity address.", "type": "object", - "required": [ - "main_purse_under_entity_addr" - ], + "required": ["main_purse_under_entity_addr"], "properties": { "main_purse_under_entity_addr": { "$ref": "#/components/schemas/EntityAddr" @@ -7720,9 +7296,7 @@ { "description": "The purse identified by this URef.", "type": "object", - "required": [ - "purse_uref" - ], + "required": ["purse_uref"], "properties": { "purse_uref": { "$ref": "#/components/schemas/URef" @@ -7734,11 +7308,7 @@ }, "BalanceHoldWithProof": { "type": "object", - "required": [ - "amount", - "proof", - "time" - ], + "required": ["amount", "proof", "time"], "properties": { "time": { "description": "The block time at which the hold was created.", @@ -7772,10 +7342,7 @@ "PeerEntry": { "description": "Node peer entry.", "type": "object", - "required": [ - "address", - "node_id" - ], + "required": ["address", "node_id"], "properties": { "node_id": { "description": "Node id.", @@ -7826,10 +7393,7 @@ "NextUpgrade": { "description": "Information about the next protocol upgrade.", "type": "object", - "required": [ - "activation_point", - "protocol_version" - ], + "required": ["activation_point", "protocol_version"], "properties": { "activation_point": { "$ref": "#/components/schemas/ActivationPoint" @@ -7863,10 +7427,7 @@ "AvailableBlockRange": { "description": "An unbroken, inclusive range of blocks.", "type": "object", - "required": [ - "high", - "low" - ], + "required": ["high", "low"], "properties": { "low": { "description": "The inclusive lower bound of the range.", @@ -7915,10 +7476,7 @@ "BlockSyncStatus": { "description": "The status of syncing an individual block.", "type": "object", - "required": [ - "acquisition_state", - "block_hash" - ], + "required": ["acquisition_state", "block_hash"], "properties": { "block_hash": { "description": "The block hash.", @@ -7930,10 +7488,7 @@ }, "block_height": { "description": "The height of the block, if known.", - "type": [ - "integer", - "null" - ], + "type": ["integer", "null"], "format": "uint64", "minimum": 0.0 }, @@ -7949,9 +7504,7 @@ "oneOf": [ { "type": "object", - "required": [ - "Era" - ], + "required": ["Era"], "properties": { "Era": { "$ref": "#/components/schemas/EraId" @@ -7961,9 +7514,7 @@ }, { "type": "object", - "required": [ - "Block" - ], + "required": ["Block"], "properties": { "Block": { "$ref": "#/components/schemas/BlockIdentifier" @@ -7976,10 +7527,7 @@ "JsonValidatorChanges": { "description": "The changes in a validator's status.", "type": "object", - "required": [ - "public_key", - "status_changes" - ], + "required": ["public_key", "status_changes"], "properties": { "public_key": { "description": "The public key of the validator.", @@ -8002,10 +7550,7 @@ "JsonValidatorStatusChange": { "description": "A single change to a validator's status in the given era.", "type": "object", - "required": [ - "era_id", - "validator_change" - ], + "required": ["era_id", "validator_change"], "properties": { "era_id": { "description": "The era in which the change occurred.", @@ -8032,46 +7577,34 @@ { "description": "The validator got newly added to the validator set.", "type": "string", - "enum": [ - "Added" - ] + "enum": ["Added"] }, { "description": "The validator was removed from the validator set.", "type": "string", - "enum": [ - "Removed" - ] + "enum": ["Removed"] }, { "description": "The validator was banned from this era.", "type": "string", - "enum": [ - "Banned" - ] + "enum": ["Banned"] }, { "description": "The validator was excluded from proposing new blocks in this era.", "type": "string", - "enum": [ - "CannotPropose" - ] + "enum": ["CannotPropose"] }, { "description": "We saw the validator misbehave in this era.", "type": "string", - "enum": [ - "SeenAsFaulty" - ] + "enum": ["SeenAsFaulty"] } ] }, "ChainspecRawBytes": { "description": "The raw bytes of the chainspec.toml, genesis accounts.toml, and global_state.toml files.", "type": "object", - "required": [ - "chainspec_bytes" - ], + "required": ["chainspec_bytes"], "properties": { "chainspec_bytes": { "description": "Raw bytes of the current chainspec.toml file.", @@ -8108,10 +7641,7 @@ "JsonBlockWithSignatures": { "description": "A JSON-friendly representation of a block and the signatures for that block.", "type": "object", - "required": [ - "block", - "proofs" - ], + "required": ["block", "proofs"], "properties": { "block": { "description": "The block.", @@ -8138,9 +7668,7 @@ { "description": "The legacy, initial version of the block.", "type": "object", - "required": [ - "Version1" - ], + "required": ["Version1"], "properties": { "Version1": { "$ref": "#/components/schemas/BlockV1" @@ -8151,9 +7679,7 @@ { "description": "The version 2 of the block.", "type": "object", - "required": [ - "Version2" - ], + "required": ["Version2"], "properties": { "Version2": { "$ref": "#/components/schemas/BlockV2" @@ -8166,11 +7692,7 @@ "BlockV1": { "description": "A block after execution, with the resulting global state root hash. This is the core component of the Casper linear blockchain. Version 1.", "type": "object", - "required": [ - "body", - "hash", - "header" - ], + "required": ["body", "hash", "header"], "properties": { "hash": { "description": "The block hash identifying this block.", @@ -8201,11 +7723,7 @@ "BlockBodyV1": { "description": "The body portion of a block. Version 1.", "type": "object", - "required": [ - "deploy_hashes", - "proposer", - "transfer_hashes" - ], + "required": ["deploy_hashes", "proposer", "transfer_hashes"], "properties": { "proposer": { "description": "The public key of the validator which proposed the block.", @@ -8234,11 +7752,7 @@ "BlockV2": { "description": "A block after execution, with the resulting global state root hash. This is the core component of the Casper linear blockchain. Version 2.", "type": "object", - "required": [ - "body", - "hash", - "header" - ], + "required": ["body", "hash", "header"], "properties": { "hash": { "description": "The block hash identifying this block.", @@ -8269,10 +7783,7 @@ "BlockBodyV2": { "description": "The body portion of a block. Version 2.", "type": "object", - "required": [ - "rewarded_signatures", - "transactions" - ], + "required": ["rewarded_signatures", "transactions"], "properties": { "transactions": { "description": "Map of transactions mapping categories to a list of transaction hashes.", @@ -8319,10 +7830,7 @@ "BlockProof": { "description": "A validator's public key paired with a corresponding signature of a given block hash.", "type": "object", - "required": [ - "public_key", - "signature" - ], + "required": ["public_key", "signature"], "properties": { "public_key": { "description": "The validator's public key.", @@ -8437,10 +7945,7 @@ "JsonEraValidators": { "description": "The validators for the given era.", "type": "object", - "required": [ - "era_id", - "validator_weights" - ], + "required": ["era_id", "validator_weights"], "properties": { "era_id": { "$ref": "#/components/schemas/EraId" @@ -8457,10 +7962,7 @@ "JsonValidatorWeights": { "description": "A validator's weight.", "type": "object", - "required": [ - "public_key", - "weight" - ], + "required": ["public_key", "weight"], "properties": { "public_key": { "$ref": "#/components/schemas/PublicKey" @@ -8480,10 +7982,7 @@ "PublicKeyAndBid": { "description": "A bid associated with the given public key.", "type": "object", - "required": [ - "bid", - "public_key" - ], + "required": ["bid", "public_key"], "properties": { "public_key": { "description": "The public key of the bidder.", @@ -8505,4 +8004,4 @@ } } } -} \ No newline at end of file +} diff --git a/rpc_sidecar/src/http_server.rs b/rpc_sidecar/src/http_server.rs index 43f93bcf..2362f204 100644 --- a/rpc_sidecar/src/http_server.rs +++ b/rpc_sidecar/src/http_server.rs @@ -7,7 +7,7 @@ use casper_json_rpc::{CorsOrigin, RequestHandlersBuilder}; use crate::{ rpcs::{ info::{GetPeers, GetReward, GetStatus, GetTransaction}, - state::{GetAddressableEntity, QueryBalanceDetails}, + state::{GetAddressableEntity, GetPackage, QueryBalanceDetails}, }, NodeClient, }; @@ -50,6 +50,7 @@ pub async fn run( GetBalance::register_as_handler(node.clone(), &mut handlers); GetAccountInfo::register_as_handler(node.clone(), &mut handlers); GetAddressableEntity::register_as_handler(node.clone(), &mut handlers); + GetPackage::register_as_handler(node.clone(), &mut handlers); GetDeploy::register_as_handler(node.clone(), &mut handlers); GetTransaction::register_as_handler(node.clone(), &mut handlers); GetPeers::register_as_handler(node.clone(), &mut handlers); diff --git a/rpc_sidecar/src/node_client.rs b/rpc_sidecar/src/node_client.rs index 79817520..395d4ef5 100644 --- a/rpc_sidecar/src/node_client.rs +++ b/rpc_sidecar/src/node_client.rs @@ -15,17 +15,19 @@ use std::{ use tokio_util::codec::Framed; use casper_binary_port::{ - BalanceResponse, BinaryMessage, BinaryMessageCodec, BinaryRequest, BinaryResponse, - BinaryResponseAndRequest, ConsensusValidatorChanges, DictionaryItemIdentifier, - DictionaryQueryResult, EraIdentifier, ErrorCode, GetRequest, GetTrieFullResult, - GlobalStateQueryResult, GlobalStateRequest, InformationRequest, KeyPrefix, NodeStatus, - PayloadEntity, PurseIdentifier, RecordId, RewardResponse, SpeculativeExecutionResult, - TransactionWithExecutionInfo, + AccountInformation, AddressableEntityInformation, BalanceResponse, BinaryMessage, + BinaryMessageCodec, BinaryRequest, BinaryResponse, BinaryResponseAndRequest, + ConsensusValidatorChanges, ContractInformation, DictionaryItemIdentifier, + DictionaryQueryResult, EntityIdentifier, EraIdentifier, ErrorCode, GetRequest, + GetTrieFullResult, GlobalStateQueryResult, GlobalStateRequest, InformationRequest, KeyPrefix, + NodeStatus, PackageIdentifier, PayloadEntity, PurseIdentifier, RecordId, ResponseType, + RewardResponse, SpeculativeExecutionResult, TransactionWithExecutionInfo, ValueWithProof, }; use casper_types::{ bytesrepr::{self, FromBytes, ToBytes}, + contracts::ContractPackage, AvailableBlockRange, BlockHash, BlockHeader, BlockIdentifier, ChainspecRawBytes, Digest, - GlobalStateIdentifier, Key, KeyTag, Peers, ProtocolVersion, PublicKey, SignedBlock, + GlobalStateIdentifier, Key, KeyTag, Package, Peers, ProtocolVersion, PublicKey, SignedBlock, StoredValue, Transaction, TransactionHash, Transfer, }; use std::{ @@ -266,6 +268,53 @@ pub trait NodeClient: Send + Sync { .await?; parse_response::(&resp.into()) } + + async fn read_package( + &self, + state_identifier: Option, + identifier: PackageIdentifier, + ) -> Result, Error> { + let get = InformationRequest::Package { + state_identifier, + identifier, + }; + let resp = self.read_info(get).await?; + match resp.response().returned_data_type_tag() { + Some(type_tag) if type_tag == ResponseType::ContractPackageWithProof as u8 => Ok( + parse_response::>(&resp.into())? + .map(PackageResponse::ContractPackage), + ), + _ => Ok(parse_response::>(&resp.into())? + .map(PackageResponse::Package)), + } + } + + async fn read_entity( + &self, + state_identifier: Option, + identifier: EntityIdentifier, + include_bytecode: bool, + ) -> Result, Error> { + let get = InformationRequest::Entity { + state_identifier, + identifier, + include_bytecode, + }; + let resp = self.read_info(get).await?; + match resp.response().returned_data_type_tag() { + Some(type_tag) if type_tag == ResponseType::ContractInformation as u8 => { + Ok(parse_response::(&resp.into())? + .map(EntityResponse::Contract)) + } + Some(type_tag) if type_tag == ResponseType::AccountInformation as u8 => Ok( + parse_response::(&resp.into())?.map(EntityResponse::Account), + ), + _ => Ok( + parse_response::(&resp.into())? + .map(EntityResponse::Entity), + ), + } + } } #[derive(Debug, thiserror::Error, PartialEq, Eq)] @@ -968,6 +1017,19 @@ impl NodeClient for FramedNodeClient { } } +#[derive(Debug)] +pub enum EntityResponse { + Entity(AddressableEntityInformation), + Account(AccountInformation), + Contract(ContractInformation), +} + +#[derive(Debug)] +pub enum PackageResponse { + Package(ValueWithProof), + ContractPackage(ValueWithProof), +} + fn validate_response( resp: BinaryResponseAndRequest, expected_id: u16, @@ -1002,7 +1064,7 @@ where return Err(Error::from_error_code(resp.error_code())); } match resp.returned_data_type_tag() { - Some(found) if found == u8::from(A::PAYLOAD_TYPE) => { + Some(found) if found == u8::from(A::RESPONSE_TYPE) => { bytesrepr::deserialize_from_slice(resp.payload()) .map(Some) .map_err(|err| Error::Deserialization(err.to_string())) @@ -1023,7 +1085,7 @@ where return Err(Error::from_error_code(resp.error_code())); } match resp.returned_data_type_tag() { - Some(found) if found == u8::from(A::PAYLOAD_TYPE) => bincode::deserialize(resp.payload()) + Some(found) if found == u8::from(A::RESPONSE_TYPE) => bincode::deserialize(resp.payload()) .map(Some) .map_err(|err| Error::Deserialization(err.to_string())), Some(other) => Err(Error::UnexpectedVariantReceived(other)), diff --git a/rpc_sidecar/src/rpcs/common.rs b/rpc_sidecar/src/rpcs/common.rs index 74c64751..62d30654 100644 --- a/rpc_sidecar/src/rpcs/common.rs +++ b/rpc_sidecar/src/rpcs/common.rs @@ -1,16 +1,16 @@ use std::collections::BTreeMap; -use casper_binary_port::{GlobalStateQueryResult, KeyPrefix}; +use casper_binary_port::KeyPrefix; use once_cell::sync::Lazy; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use crate::rpcs::error::Error; use casper_types::{ - account::AccountHash, addressable_entity::NamedKeys, bytesrepr::ToBytes, + addressable_entity::NamedKeys, bytesrepr::ToBytes, contracts::ContractPackage, global_state::TrieMerkleProof, Account, AddressableEntity, AvailableBlockRange, BlockHeader, - BlockIdentifier, EntityAddr, EntryPointValue, GlobalStateIdentifier, Key, SignedBlock, - StoredValue, + BlockIdentifier, ByteCode, Contract, ContractWasm, EntityAddr, EntryPointValue, + GlobalStateIdentifier, Key, Package, SignedBlock, StoredValue, }; use crate::NodeClient; @@ -43,9 +43,9 @@ pub enum ErrorData { }, } -/// An addressable entity or a legacy account. +/// An addressable entity or a legacy account or contract. #[derive(Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema)] -pub enum EntityOrAccount { +pub enum EntityWithBackwardCompat { /// An addressable entity. AddressableEntity { /// The addressable entity. @@ -54,9 +54,55 @@ pub enum EntityOrAccount { named_keys: NamedKeys, /// The entry points of the addressable entity. entry_points: Vec, + /// The bytecode of the addressable entity. Returned when `include_bytecode` is `true`. + bytecode: Option, }, - /// A legacy account. - LegacyAccount(Account), + /// An account. + Account(Account), + /// A contract. + Contract { + /// The contract. + contract: Contract, + /// The Wasm code of the contract. Returned when `include_bytecode` is `true`. + wasm: Option, + }, +} + +/// A package or a legacy contract package. +#[derive(Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema)] +pub enum PackageWithBackwardCompat { + /// A package. + Package(Package), + /// A contract package. + ContractPackage(ContractPackage), +} + +/// Byte code of an entity with a proof. +#[derive(Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema)] +pub struct ByteCodeWithProof { + code: ByteCode, + merkle_proof: String, +} + +impl ByteCodeWithProof { + /// Creates a new `ByteCodeWithProof`. + pub fn new(code: ByteCode, merkle_proof: String) -> Self { + Self { code, merkle_proof } + } +} + +/// Wasm code of a contract with a proof. +#[derive(Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema)] +pub struct ContractWasmWithProof { + wasm: ContractWasm, + merkle_proof: String, +} + +impl ContractWasmWithProof { + /// Creates a new `ContractWasmWithProof`. + pub fn new(wasm: ContractWasm, merkle_proof: String) -> Self { + Self { wasm, merkle_proof } + } } pub async fn get_signed_block( @@ -118,87 +164,6 @@ pub async fn get_latest_switch_block_header( } } -pub async fn resolve_account_hash( - node_client: &dyn NodeClient, - account_hash: AccountHash, - state_identifier: Option, -) -> Result>, Error> { - let account_key = Key::Account(account_hash); - let Some((stored_value, account_merkle_proof)) = node_client - .query_global_state(state_identifier, account_key, vec![]) - .await - .map_err(|err| Error::NodeRequest("account stored value", err))? - .map(GlobalStateQueryResult::into_inner) - else { - return Ok(None); - }; - - let (value, merkle_proof) = match stored_value { - StoredValue::Account(account) => ( - EntityOrAccount::LegacyAccount(account), - account_merkle_proof, - ), - StoredValue::CLValue(entity_key_as_clvalue) => { - let key: Key = entity_key_as_clvalue - .into_t() - .map_err(|_| Error::InvalidAddressableEntity)?; - let Some((value, merkle_proof)) = node_client - .query_global_state(state_identifier, key, vec![]) - .await - .map_err(|err| Error::NodeRequest("account owning a purse", err))? - .map(GlobalStateQueryResult::into_inner) - else { - return Ok(None); - }; - let (Key::AddressableEntity(entity_addr), StoredValue::AddressableEntity(entity)) = - (key, value) - else { - return Err(Error::InvalidAddressableEntity); - }; - let named_keys = - get_entity_named_keys(node_client, entity_addr, state_identifier).await?; - let entry_points = - get_entity_entry_points(node_client, entity_addr, state_identifier).await?; - ( - EntityOrAccount::AddressableEntity { - entity, - named_keys, - entry_points, - }, - merkle_proof, - ) - } - _ => return Err(Error::InvalidAccountInfo), - }; - Ok(Some(SuccessfulQueryResult { - value, - merkle_proof, - })) -} - -pub async fn resolve_entity_addr( - node_client: &dyn NodeClient, - entity_addr: EntityAddr, - state_identifier: Option, -) -> Result>, Error> { - let entity_key = Key::AddressableEntity(entity_addr); - let Some((value, merkle_proof)) = node_client - .query_global_state(state_identifier, entity_key, vec![]) - .await - .map_err(|err| Error::NodeRequest("entity stored value", err))? - .map(GlobalStateQueryResult::into_inner) - else { - return Ok(None); - }; - - Ok(Some(SuccessfulQueryResult { - value: value - .into_addressable_entity() - .ok_or(Error::InvalidAddressableEntity)?, - merkle_proof, - })) -} - pub async fn get_entity_named_keys( node_client: &dyn NodeClient, entity_addr: EntityAddr, @@ -271,15 +236,3 @@ pub fn encode_proof(proof: &Vec>) -> Result { - pub value: A, - pub merkle_proof: Vec>, -} - -impl SuccessfulQueryResult { - pub fn into_inner(self) -> (A, Vec>) { - (self.value, self.merkle_proof) - } -} diff --git a/rpc_sidecar/src/rpcs/docs.rs b/rpc_sidecar/src/rpcs/docs.rs index 772f892e..17ab2ae4 100644 --- a/rpc_sidecar/src/rpcs/docs.rs +++ b/rpc_sidecar/src/rpcs/docs.rs @@ -24,7 +24,7 @@ use super::{ }, state::{ GetAccountInfo, GetAddressableEntity, GetAuctionInfo, GetBalance, GetDictionaryItem, - GetItem, QueryBalance, QueryBalanceDetails, QueryGlobalState, + GetItem, GetPackage, QueryBalance, QueryBalanceDetails, QueryGlobalState, }, ApiVersion, NodeClient, RpcError, RpcWithOptionalParams, RpcWithParams, RpcWithoutParams, CURRENT_API_VERSION, @@ -77,6 +77,7 @@ pub(crate) static OPEN_RPC_SCHEMA: Lazy = Lazy::new(|| { schema.push_with_params::("returns an Account from the network"); schema .push_with_params::("returns an AddressableEntity from the network"); + schema.push_with_params::("returns a Package from the network"); schema.push_with_params::("returns an item from a Dictionary"); schema.push_with_params::( "a query to global state using either a Block hash or state root hash", diff --git a/rpc_sidecar/src/rpcs/state.rs b/rpc_sidecar/src/rpcs/state.rs index aeee966e..5f439ef4 100644 --- a/rpc_sidecar/src/rpcs/state.rs +++ b/rpc_sidecar/src/rpcs/state.rs @@ -7,20 +7,28 @@ use once_cell::sync::Lazy; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; +use crate::node_client::{EntityResponse, PackageResponse}; + use super::{ - common::{self, EntityOrAccount, MERKLE_PROOF}, + common::{ + self, ByteCodeWithProof, ContractWasmWithProof, EntityWithBackwardCompat, + PackageWithBackwardCompat, MERKLE_PROOF, + }, docs::{DocExample, DOCS_EXAMPLE_API_VERSION}, ApiVersion, Error, NodeClient, RpcError, RpcWithOptionalParams, RpcWithParams, CURRENT_API_VERSION, }; -use casper_binary_port::DictionaryItemIdentifier; -use casper_binary_port::PurseIdentifier as PortPurseIdentifier; +use casper_binary_port::{ + DictionaryItemIdentifier, EntityIdentifier as PortEntityIdentifier, + PackageIdentifier as PortPackageIdentifier, PurseIdentifier as PortPurseIdentifier, +}; #[cfg(test)] use casper_types::testing::TestRng; use casper_types::{ account::{Account, AccountHash}, addressable_entity::EntityKindTag, bytesrepr::Bytes, + contracts::{ContractHash, ContractPackageHash}, system::{ auction::{ BidKind, EraValidators, SeigniorageRecipientsSnapshot, ValidatorWeights, @@ -30,7 +38,8 @@ use casper_types::{ }, AddressableEntity, AddressableEntityHash, AuctionState, BlockHash, BlockHeader, BlockHeaderV2, BlockIdentifier, BlockTime, BlockV2, CLValue, Digest, EntityAddr, EntryPoint, EntryPointValue, - GlobalStateIdentifier, Key, KeyTag, PublicKey, SecretKey, StoredValue, URef, U512, + GlobalStateIdentifier, Key, KeyTag, Package, PackageHash, PublicKey, SecretKey, StoredValue, + URef, U512, }; #[cfg(test)] use rand::Rng; @@ -82,12 +91,13 @@ static GET_ADDRESSABLE_ENTITY_PARAMS: Lazy = Lazy::new(|| GetAddressableEntityParams { entity_identifier: EntityIdentifier::EntityAddr(EntityAddr::new_account([0; 32])), block_identifier: Some(BlockIdentifier::Hash(*BlockHash::example())), + include_bytecode: None, }); static GET_ADDRESSABLE_ENTITY_RESULT: Lazy = Lazy::new(|| GetAddressableEntityResult { api_version: DOCS_EXAMPLE_API_VERSION, merkle_proof: MERKLE_PROOF.clone(), - entity: EntityOrAccount::AddressableEntity { + entity: EntityWithBackwardCompat::AddressableEntity { entity: AddressableEntity::example().clone(), named_keys: [("key".to_string(), Key::Hash([0u8; 32]))] .iter() @@ -97,8 +107,26 @@ static GET_ADDRESSABLE_ENTITY_RESULT: Lazy = entry_points: vec![EntryPointValue::new_v1_entry_point_value( EntryPoint::default_with_name("entry_point"), )], + bytecode: None, }, }); +static GET_PACKAGE_PARAMS: Lazy = Lazy::new(|| GetPackageParams { + package_identifier: PackageIdentifier::ContractPackageHash(ContractPackageHash::new([0; 32])), + block_identifier: Some(BlockIdentifier::Hash(*BlockHash::example())), +}); +static GET_PACKAGE_RESULT: Lazy = Lazy::new(|| GetPackageResult { + api_version: DOCS_EXAMPLE_API_VERSION, + package: PackageWithBackwardCompat::Package( + Package::new( + Default::default(), + Default::default(), + Default::default(), + Default::default(), + ) + .clone(), + ), + merkle_proof: MERKLE_PROOF.clone(), +}); static GET_DICTIONARY_ITEM_PARAMS: Lazy = Lazy::new(|| GetDictionaryItemParams { state_root_hash: *BlockHeaderV2::example().state_root_hash(), @@ -525,6 +553,8 @@ impl RpcWithParams for GetAccountInfo { #[derive(Serialize, Deserialize, Debug, Clone, JsonSchema)] #[serde(deny_unknown_fields)] pub enum EntityIdentifier { + /// The hash of a contract. + ContractHash(ContractHash), /// The public key of an account. PublicKey(PublicKey), /// The account hash of an account. @@ -543,6 +573,21 @@ impl EntityIdentifier { _ => unreachable!(), } } + + pub fn into_port_entity_identifier(self) -> PortEntityIdentifier { + match self { + EntityIdentifier::ContractHash(contract_hash) => { + PortEntityIdentifier::ContractHash(contract_hash) + } + EntityIdentifier::PublicKey(public_key) => PortEntityIdentifier::PublicKey(public_key), + EntityIdentifier::AccountHash(account_hash) => { + PortEntityIdentifier::AccountHash(account_hash) + } + EntityIdentifier::EntityAddr(entity_addr) => { + PortEntityIdentifier::EntityAddr(entity_addr) + } + } + } } /// Params for "state_get_entity" RPC request @@ -553,6 +598,8 @@ pub struct GetAddressableEntityParams { pub entity_identifier: EntityIdentifier, /// The block identifier. pub block_identifier: Option, + /// Whether to include the entity's bytecode in the response. + pub include_bytecode: Option, } impl DocExample for GetAddressableEntityParams { @@ -569,7 +616,7 @@ pub struct GetAddressableEntityResult { #[schemars(with = "String")] pub api_version: ApiVersion, /// The addressable entity or a legacy account. - pub entity: EntityOrAccount, + pub entity: EntityWithBackwardCompat, /// The Merkle proof. pub merkle_proof: String, } @@ -594,38 +641,58 @@ impl RpcWithParams for GetAddressableEntity { params: Self::RequestParams, ) -> Result { let state_identifier = params.block_identifier.map(GlobalStateIdentifier::from); - let (entity, merkle_proof) = match params.entity_identifier { - EntityIdentifier::EntityAddr(addr) => { - let result = common::resolve_entity_addr(&*node_client, addr, state_identifier) - .await? - .ok_or(Error::AddressableEntityNotFound)?; + let identifier = params.entity_identifier.into_port_entity_identifier(); + let include_bytecode = params.include_bytecode.unwrap_or(false); + + let (entity, merkle_proof) = match node_client + .read_entity(state_identifier, identifier, include_bytecode) + .await + .map_err(|err| Error::NodeRequest("entity", err))? + .ok_or(Error::AddressableEntityNotFound)? + { + EntityResponse::Entity(entity_with_bytecode) => { + let (addr, entity_with_proof, bytecode) = entity_with_bytecode.into_inner(); + let (entity, proof) = entity_with_proof.into_inner(); let named_keys = common::get_entity_named_keys(&*node_client, addr, state_identifier).await?; let entry_points = common::get_entity_entry_points(&*node_client, addr, state_identifier).await?; + let bytecode = bytecode + .map(|code_with_proof| { + let (code, proof) = code_with_proof.into_inner(); + Ok::<_, Error>(ByteCodeWithProof::new(code, common::encode_proof(&proof)?)) + }) + .transpose()?; ( - EntityOrAccount::AddressableEntity { - entity: result.value, + EntityWithBackwardCompat::AddressableEntity { + entity, named_keys, entry_points, + bytecode, }, - result.merkle_proof, + proof, ) } - EntityIdentifier::PublicKey(public_key) => { - let account_hash = public_key.to_account_hash(); - common::resolve_account_hash(&*node_client, account_hash, state_identifier) - .await? - .ok_or(Error::AddressableEntityNotFound)? - .into_inner() + EntityResponse::Account(account) => { + let (account, merkle_proof) = account.into_inner(); + (EntityWithBackwardCompat::Account(account), merkle_proof) } - EntityIdentifier::AccountHash(account_hash) => { - common::resolve_account_hash(&*node_client, account_hash, state_identifier) - .await? - .ok_or(Error::AddressableEntityNotFound)? - .into_inner() + EntityResponse::Contract(contract_with_wasm) => { + let (_, contract_with_proof, wasm) = contract_with_wasm.into_inner(); + let (contract, proof) = contract_with_proof.into_inner(); + let wasm = wasm + .map(|wasm_with_proof| { + let (wasm, proof) = wasm_with_proof.into_inner(); + Ok::<_, Error>(ContractWasmWithProof::new( + wasm, + common::encode_proof(&proof)?, + )) + }) + .transpose()?; + (EntityWithBackwardCompat::Contract { contract, wasm }, proof) } }; + Ok(Self::ResponseResult { api_version: CURRENT_API_VERSION, entity, @@ -634,6 +701,116 @@ impl RpcWithParams for GetAddressableEntity { } } +/// Identifier of a package. +#[derive(Serialize, Deserialize, Debug, Clone, JsonSchema)] +#[serde(deny_unknown_fields)] +pub enum PackageIdentifier { + /// The address of a package. + PackageAddr(PackageHash), + /// The hash of a contract package. + ContractPackageHash(ContractPackageHash), +} + +impl PackageIdentifier { + #[cfg(test)] + pub fn random(rng: &mut TestRng) -> Self { + match rng.gen_range(0..2) { + 0 => Self::PackageAddr(PackageHash::new(rng.gen())), + 1 => Self::ContractPackageHash(ContractPackageHash::new(rng.gen())), + _ => unreachable!(), + } + } + + pub fn into_port_package_identifier(self) -> PortPackageIdentifier { + match self { + Self::PackageAddr(package_addr) => { + PortPackageIdentifier::PackageAddr(package_addr.value()) + } + Self::ContractPackageHash(contract_package_hash) => { + PortPackageIdentifier::ContractPackageHash(contract_package_hash) + } + } + } +} + +/// Params for "state_get_entity" RPC request +#[derive(Serialize, Deserialize, Debug, JsonSchema)] +#[serde(deny_unknown_fields)] +pub struct GetPackageParams { + /// The identifier of the package. + pub package_identifier: PackageIdentifier, + /// The block identifier. + pub block_identifier: Option, +} + +impl DocExample for GetPackageParams { + fn doc_example() -> &'static Self { + &GET_PACKAGE_PARAMS + } +} + +/// Result for "state_get_entity" RPC response. +#[derive(PartialEq, Eq, Serialize, Deserialize, Debug, JsonSchema)] +#[serde(deny_unknown_fields)] +pub struct GetPackageResult { + /// The RPC API version. + #[schemars(with = "String")] + pub api_version: ApiVersion, + /// The addressable entity or a legacy account. + pub package: PackageWithBackwardCompat, + /// The Merkle proof. + pub merkle_proof: String, +} + +impl DocExample for GetPackageResult { + fn doc_example() -> &'static Self { + &GET_PACKAGE_RESULT + } +} + +/// "state_get_package" RPC. +pub struct GetPackage {} + +#[async_trait] +impl RpcWithParams for GetPackage { + const METHOD: &'static str = "state_get_package"; + type RequestParams = GetPackageParams; + type ResponseResult = GetPackageResult; + + async fn do_handle_request( + node_client: Arc, + params: Self::RequestParams, + ) -> Result { + let state_identifier = params.block_identifier.map(GlobalStateIdentifier::from); + let identifier = params.package_identifier.into_port_package_identifier(); + + let (package, merkle_proof) = match node_client + .read_package(state_identifier, identifier) + .await + .map_err(|err| Error::NodeRequest("package", err))? + .ok_or(Error::AddressableEntityNotFound)? + { + PackageResponse::Package(package_with_proof) => { + let (package, proof) = package_with_proof.into_inner(); + (PackageWithBackwardCompat::Package(package), proof) + } + PackageResponse::ContractPackage(contract_package_with_proof) => { + let (contract_package, proof) = contract_package_with_proof.into_inner(); + ( + PackageWithBackwardCompat::ContractPackage(contract_package), + proof, + ) + } + }; + + Ok(Self::ResponseResult { + api_version: CURRENT_API_VERSION, + package, + merkle_proof: common::encode_proof(&merkle_proof)?, + }) + } +} + #[derive(Serialize, Deserialize, Debug, JsonSchema, Clone)] /// Options for dictionary item lookups. pub enum DictionaryIdentifier { @@ -1146,17 +1323,20 @@ mod tests { use crate::{rpcs::ErrorCode, ClientError, SUPPORTED_PROTOCOL_VERSION}; use casper_binary_port::{ - BalanceResponse, BinaryRequest, BinaryResponse, BinaryResponseAndRequest, - DictionaryQueryResult, ErrorCode as BinaryErrorCode, GetRequest, GlobalStateQueryResult, - GlobalStateRequest, InformationRequestTag, KeyPrefix, + AccountInformation, AddressableEntityInformation, BalanceResponse, BinaryRequest, + BinaryResponse, BinaryResponseAndRequest, ContractInformation, DictionaryQueryResult, + ErrorCode as BinaryErrorCode, GetRequest, GlobalStateQueryResult, GlobalStateRequest, + InformationRequestTag, KeyPrefix, ValueWithProof, }; use casper_types::{ addressable_entity::{MessageTopics, NamedKeyValue, NamedKeys}, + contracts::ContractPackage, global_state::{TrieMerkleProof, TrieMerkleProofStep}, system::auction::{Bid, BidKind, ValidatorBid}, testing::TestRng, - AccessRights, AddressableEntity, AvailableBlockRange, Block, ByteCodeHash, EntityKind, - PackageHash, ProtocolVersion, TestBlockBuilder, TransactionRuntime, + AccessRights, AddressableEntity, AvailableBlockRange, Block, ByteCode, ByteCodeHash, + ByteCodeKind, Contract, ContractWasm, ContractWasmHash, EntityKind, PackageHash, + ProtocolVersion, TestBlockBuilder, TransactionRuntime, }; use pretty_assertions::assert_eq; use rand::Rng; @@ -1620,10 +1800,11 @@ mod tests { use casper_types::addressable_entity::{ActionThresholds, AssociatedKeys}; struct ClientMock { + addr: EntityAddr, entity: AddressableEntity, named_keys: NamedKeys, entry_points: Vec, - entity_hash: AddressableEntityHash, + bytecode: Option, } #[async_trait] @@ -1633,44 +1814,18 @@ mod tests { req: BinaryRequest, ) -> Result { match req { - BinaryRequest::Get(GetRequest::State(req)) - if matches!( - &*req, - GlobalStateRequest::Item { - base_key: Key::Account(_), - .. - } - ) => - { - Ok(BinaryResponseAndRequest::new( - BinaryResponse::from_value( - GlobalStateQueryResult::new( - StoredValue::CLValue( - CLValue::from_t(Key::contract_entity_key(self.entity_hash)) - .unwrap(), - ), - vec![], - ), - SUPPORTED_PROTOCOL_VERSION, - ), - &[], - 0, - )) - } - BinaryRequest::Get(GetRequest::State(req)) - if matches!( - &*req, - GlobalStateRequest::Item { - base_key: Key::AddressableEntity(_), - .. - } - ) => + BinaryRequest::Get(GetRequest::Information { info_type_tag, .. }) + if InformationRequestTag::try_from(info_type_tag) + == Ok(InformationRequestTag::Entity) => { Ok(BinaryResponseAndRequest::new( BinaryResponse::from_value( - GlobalStateQueryResult::new( - StoredValue::AddressableEntity(self.entity.clone()), - vec![], + AddressableEntityInformation::new( + self.addr, + ValueWithProof::new(self.entity.clone(), vec![]), + self.bytecode.as_ref().map(|bytecode| { + ValueWithProof::new(bytecode.clone(), vec![]) + }), ), SUPPORTED_PROTOCOL_VERSION, ), @@ -1760,7 +1915,7 @@ mod tests { MessageTopics::default(), EntityKind::SmartContract(TransactionRuntime::VmCasperV2), ); - let entity_hash: AddressableEntityHash = rng.gen(); + let addr: EntityAddr = rng.gen(); let named_key_count = rng.gen_range(0..10); let named_keys: NamedKeys = @@ -1777,18 +1932,24 @@ mod tests { .take(entry_point_count) .collect::>(); + let bytecode = rng + .gen::() + .then(|| ByteCode::new(ByteCodeKind::V1CasperWasm, rng.random_vec(10..50))); + let entity_identifier = EntityIdentifier::random(rng); let resp = GetAddressableEntity::do_handle_request( Arc::new(ClientMock { + addr, entity: entity.clone(), named_keys: named_keys.clone(), entry_points: entry_points.clone(), - entity_hash, + bytecode: bytecode.clone(), }), GetAddressableEntityParams { block_identifier: None, entity_identifier, + include_bytecode: Some(bytecode.is_some()), }, ) .await @@ -1798,10 +1959,12 @@ mod tests { resp, GetAddressableEntityResult { api_version: CURRENT_API_VERSION, - entity: EntityOrAccount::AddressableEntity { + entity: EntityWithBackwardCompat::AddressableEntity { entity, named_keys, - entry_points + entry_points, + bytecode: bytecode + .map(|bytecode| ByteCodeWithProof::new(bytecode, String::from("00000000"))), }, merkle_proof: String::from("00000000"), } @@ -1813,7 +1976,6 @@ mod tests { use casper_types::account::{ActionThresholds, AssociatedKeys}; let rng = &mut TestRng::new(); - let block = Block::V2(TestBlockBuilder::new().build(rng)); let account = Account::new( rng.gen(), NamedKeys::default(), @@ -1825,12 +1987,12 @@ mod tests { let resp = GetAddressableEntity::do_handle_request( Arc::new(ValidLegacyAccountMock { - block: block.clone(), account: account.clone(), }), GetAddressableEntityParams { block_identifier: None, entity_identifier, + include_bytecode: None, }, ) .await @@ -1840,16 +2002,18 @@ mod tests { resp, GetAddressableEntityResult { api_version: CURRENT_API_VERSION, - entity: EntityOrAccount::LegacyAccount(account), + entity: EntityWithBackwardCompat::Account(account), merkle_proof: String::from("00000000"), } ); } #[tokio::test] - async fn should_reject_read_entity_when_non_existent() { + async fn should_read_entity_legacy_contract() { struct ClientMock { - block: Block, + hash: ContractHash, + contract: Contract, + wasm: Option, } #[async_trait] @@ -1861,25 +2025,87 @@ mod tests { match req { BinaryRequest::Get(GetRequest::Information { info_type_tag, .. }) if InformationRequestTag::try_from(info_type_tag) - == Ok(InformationRequestTag::BlockHeader) => + == Ok(InformationRequestTag::Entity) => { Ok(BinaryResponseAndRequest::new( BinaryResponse::from_value( - self.block.clone_header(), + ContractInformation::new( + self.hash, + ValueWithProof::new(self.contract.clone(), vec![]), + self.wasm.as_ref().map(|bytecode| { + ValueWithProof::new(bytecode.clone(), vec![]) + }), + ), SUPPORTED_PROTOCOL_VERSION, ), &[], 0, )) } - BinaryRequest::Get(GetRequest::State(req)) - if matches!( - &*req, - GlobalStateRequest::Item { - base_key: Key::AddressableEntity(_), - .. - } - ) => + req => unimplemented!("unexpected request: {:?}", req), + } + } + } + + let rng = &mut TestRng::new(); + let contract = Contract::new( + ContractPackageHash::new(rng.gen()), + ContractWasmHash::new(rng.gen()), + Default::default(), + Default::default(), + ProtocolVersion::V2_0_0, + ); + let hash = ContractHash::new(rng.gen()); + + let wasm = rng + .gen::() + .then(|| ContractWasm::new(rng.random_vec(10..50))); + + let entity_identifier = EntityIdentifier::random(rng); + + let resp = GetAddressableEntity::do_handle_request( + Arc::new(ClientMock { + hash, + contract: contract.clone(), + wasm: wasm.clone(), + }), + GetAddressableEntityParams { + block_identifier: None, + entity_identifier, + include_bytecode: Some(wasm.is_some()), + }, + ) + .await + .expect("should handle request"); + + assert_eq!( + resp, + GetAddressableEntityResult { + api_version: CURRENT_API_VERSION, + entity: EntityWithBackwardCompat::Contract { + contract, + wasm: wasm + .map(|wasm| ContractWasmWithProof::new(wasm, String::from("00000000"))), + }, + merkle_proof: String::from("00000000"), + } + ); + } + + #[tokio::test] + async fn should_reject_read_entity_when_non_existent() { + struct ClientMock; + + #[async_trait] + impl NodeClient for ClientMock { + async fn send_request( + &self, + req: BinaryRequest, + ) -> Result { + match req { + BinaryRequest::Get(GetRequest::Information { info_type_tag, .. }) + if InformationRequestTag::try_from(info_type_tag) + == Ok(InformationRequestTag::Entity) => { Ok(BinaryResponseAndRequest::new( BinaryResponse::new_empty(SUPPORTED_PROTOCOL_VERSION), @@ -1893,16 +2119,14 @@ mod tests { } let rng = &mut TestRng::new(); - let block = Block::V2(TestBlockBuilder::new().build(rng)); let entity_identifier = EntityIdentifier::EntityAddr(rng.gen()); let err = GetAddressableEntity::do_handle_request( - Arc::new(ClientMock { - block: block.clone(), - }), + Arc::new(ClientMock), GetAddressableEntityParams { block_identifier: None, entity_identifier, + include_bytecode: None, }, ) .await @@ -1911,12 +2135,138 @@ mod tests { assert_eq!(err.code(), ErrorCode::NoSuchAddressableEntity as i64); } + #[tokio::test] + async fn should_read_package() { + struct ClientMock { + package: Package, + } + + #[async_trait] + impl NodeClient for ClientMock { + async fn send_request( + &self, + req: BinaryRequest, + ) -> Result { + match req { + BinaryRequest::Get(GetRequest::Information { info_type_tag, .. }) + if InformationRequestTag::try_from(info_type_tag) + == Ok(InformationRequestTag::Package) => + { + Ok(BinaryResponseAndRequest::new( + BinaryResponse::from_value( + ValueWithProof::new(self.package.clone(), vec![]), + SUPPORTED_PROTOCOL_VERSION, + ), + &[], + 0, + )) + } + req => unimplemented!("unexpected request: {:?}", req), + } + } + } + + let rng = &mut TestRng::new(); + let package = Package::new( + Default::default(), + Default::default(), + Default::default(), + Default::default(), + ); + + let package_identifier = PackageIdentifier::random(rng); + + let resp = GetPackage::do_handle_request( + Arc::new(ClientMock { + package: package.clone(), + }), + GetPackageParams { + block_identifier: None, + package_identifier, + }, + ) + .await + .expect("should handle request"); + + assert_eq!( + resp, + GetPackageResult { + api_version: CURRENT_API_VERSION, + package: PackageWithBackwardCompat::Package(package), + merkle_proof: String::from("00000000"), + } + ); + } + + #[tokio::test] + async fn should_read_contract_package() { + struct ClientMock { + package: ContractPackage, + } + + #[async_trait] + impl NodeClient for ClientMock { + async fn send_request( + &self, + req: BinaryRequest, + ) -> Result { + match req { + BinaryRequest::Get(GetRequest::Information { info_type_tag, .. }) + if InformationRequestTag::try_from(info_type_tag) + == Ok(InformationRequestTag::Package) => + { + Ok(BinaryResponseAndRequest::new( + BinaryResponse::from_value( + ValueWithProof::new(self.package.clone(), vec![]), + SUPPORTED_PROTOCOL_VERSION, + ), + &[], + 0, + )) + } + req => unimplemented!("unexpected request: {:?}", req), + } + } + } + + let rng = &mut TestRng::new(); + let package = ContractPackage::new( + rng.gen(), + Default::default(), + Default::default(), + Default::default(), + Default::default(), + ); + + let package_identifier = PackageIdentifier::random(rng); + + let resp = GetPackage::do_handle_request( + Arc::new(ClientMock { + package: package.clone(), + }), + GetPackageParams { + block_identifier: None, + package_identifier, + }, + ) + .await + .expect("should handle request"); + + assert_eq!( + resp, + GetPackageResult { + api_version: CURRENT_API_VERSION, + package: PackageWithBackwardCompat::ContractPackage(package), + merkle_proof: String::from("00000000"), + } + ); + } + #[tokio::test] async fn should_read_account_info() { use casper_types::account::{ActionThresholds, AssociatedKeys}; let rng = &mut TestRng::new(); - let block = Block::V2(TestBlockBuilder::new().build(rng)); let account = Account::new( rng.gen(), NamedKeys::default(), @@ -1928,7 +2278,6 @@ mod tests { let resp = GetAccountInfo::do_handle_request( Arc::new(ValidLegacyAccountMock { - block: block.clone(), account: account.clone(), }), GetAccountInfoParams { @@ -2332,7 +2681,6 @@ mod tests { } struct ValidLegacyAccountMock { - block: Block, account: Account, } @@ -2345,11 +2693,11 @@ mod tests { match req { BinaryRequest::Get(GetRequest::Information { info_type_tag, .. }) if InformationRequestTag::try_from(info_type_tag) - == Ok(InformationRequestTag::BlockHeader) => + == Ok(InformationRequestTag::Entity) => { Ok(BinaryResponseAndRequest::new( BinaryResponse::from_value( - self.block.clone_header(), + AccountInformation::new(self.account.clone(), vec![]), SUPPORTED_PROTOCOL_VERSION, ), &[], From 8c6211046888a3f8e48a0a7c64f74e3ff7abbe1c Mon Sep 17 00:00:00 2001 From: Jakub Zajkowski Date: Wed, 11 Sep 2024 15:20:26 +0200 Subject: [PATCH 2/2] Repointing node dependencies --- Cargo.lock | 619 +++++---- Cargo.toml | 4 +- resources/test/rpc_schema.json | 1420 +++++++++++++++----- resources/test/speculative_rpc_schema.json | 15 +- types/src/legacy_sse_data/fixtures.rs | 1 + 5 files changed, 1451 insertions(+), 608 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9392bc35..f6fff116 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,18 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aes" @@ -142,9 +142,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8" [[package]] name = "arc-swap" @@ -219,19 +219,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -257,17 +257,17 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -394,9 +394,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.2" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1bc3887947e51b03a2aa6dff41aaf64f2bd8f7369ebcb1ef49b2b54b6a0d1de" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", "regex-automata 0.4.7", @@ -417,22 +417,22 @@ checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" [[package]] name = "bytemuck" -version = "1.16.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" +checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" +checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -443,9 +443,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.1" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bzip2" @@ -471,7 +471,7 @@ dependencies = [ [[package]] name = "casper-binary-port" version = "1.0.0" -source = "git+https://github.com/jacek-casper/casper-node.git?branch=get-entity-get-package-binary-port#cc38fde731c3502bb790d05b5a15fcaf9daa1ffe" +source = "git+https://github.com/casper-network/casper-node.git?branch=feat-2.0#e6456b709ec1da1c6b703db2a04beeba960651c5" dependencies = [ "bincode", "bytes", @@ -502,13 +502,13 @@ dependencies = [ "mockito", "once_cell", "portpicker", - "reqwest 0.12.5", + "reqwest 0.12.7", "serde", "serde_json", "thiserror", "tokio", "tokio-stream", - "tokio-util 0.7.11", + "tokio-util 0.7.12", "tracing", "url", "warp", @@ -534,7 +534,7 @@ dependencies = [ "hex_fmt", "http 0.2.12", "hyper 0.14.30", - "indexmap 2.2.6", + "indexmap 2.5.0", "itertools", "jsonschema", "metrics", @@ -545,7 +545,7 @@ dependencies = [ "pretty_assertions", "rand", "regex", - "reqwest 0.12.5", + "reqwest 0.12.7", "schemars", "sea-query", "serde", @@ -556,7 +556,7 @@ dependencies = [ "thiserror", "tokio", "tokio-stream", - "tokio-util 0.7.11", + "tokio-util 0.7.12", "tower", "tracing", "tracing-subscriber", @@ -673,7 +673,7 @@ dependencies = [ [[package]] name = "casper-types" version = "5.0.0" -source = "git+https://github.com/jacek-casper/casper-node.git?branch=get-entity-get-package-binary-port#cc38fde731c3502bb790d05b5a15fcaf9daa1ffe" +source = "git+https://github.com/casper-network/casper-node.git?branch=feat-2.0#e6456b709ec1da1c6b703db2a04beeba960651c5" dependencies = [ "base16", "base64 0.13.1", @@ -716,12 +716,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.6" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f" +checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -742,9 +743,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.11" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35723e6a11662c2afb578bcf0b88bf6ea8e21282a953428f240574fcc3a2b5b3" +checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" dependencies = [ "clap_builder", "clap_derive", @@ -752,9 +753,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.11" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eb96cbfa7cfa35017b7cd548c75b14c3118c98b423041d70562665e07fb0fa" +checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" dependencies = [ "anstream", "anstyle", @@ -764,14 +765,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.11" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d029b67f89d30bbb547c89fd5161293c0aec155fc691d7924b64550662db93e" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck 0.5.0", "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -832,15 +833,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -945,8 +946,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -973,7 +974,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613e4ee15899913285b7612004bbd490abd605be7b11d35afada5902fb6b91d5" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] @@ -1004,7 +1005,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] @@ -1015,8 +1016,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -1027,9 +1028,9 @@ checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "rustc_version", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -1103,9 +1104,9 @@ checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "dunce" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dyn-clone" @@ -1277,9 +1278,9 @@ checksum = "a2a2b11eda1d40935b26cf18f6833c526845ae8c41e58d09af6adeb6f0269183" [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "ff" @@ -1299,21 +1300,21 @@ checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", "miniz_oxide", @@ -1442,8 +1443,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -1502,9 +1503,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "gix" @@ -1617,9 +1618,9 @@ dependencies = [ [[package]] name = "gix-config-value" -version = "0.14.7" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b328997d74dd15dc71b2773b162cb4af9a25c424105e4876e6d0686ab41c383e" +checksum = "03f76169faa0dec598eac60f83d7fcdd739ec16596eca8fb144c88973dbe6f8c" dependencies = [ "bitflags 2.6.0", "bstr", @@ -1689,9 +1690,9 @@ dependencies = [ [[package]] name = "gix-fs" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6adf99c27cdf17b1c4d77680c917e0d94d8783d4e1c73d3be0d1d63107163d7a" +checksum = "f2bfe6249cfea6d0c0e0990d5226a4cb36f030444ba9e35e0639275db8f98575" dependencies = [ "fastrand", "gix-features", @@ -1700,9 +1701,9 @@ dependencies = [ [[package]] name = "gix-glob" -version = "0.16.4" +version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7df15afa265cc8abe92813cd354d522f1ac06b29ec6dfa163ad320575cb447" +checksum = "74908b4bbc0a0a40852737e5d7889f676f081e340d5451a16e5b4c50d592f111" dependencies = [ "bitflags 2.6.0", "bstr", @@ -1777,8 +1778,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "999ce923619f88194171a67fb3e6d613653b8d4d6078b529b15a765da0edcc17" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -1840,9 +1841,9 @@ dependencies = [ [[package]] name = "gix-path" -version = "0.10.9" +version = "0.10.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d23d5bbda31344d8abc8de7c075b3cf26e5873feba7c4a15d916bce67382bd9" +checksum = "ebfc4febd088abdcbc9f1246896e57e37b7a34f6909840045a1767c6dafac7af" dependencies = [ "bstr", "gix-trace", @@ -1931,9 +1932,9 @@ dependencies = [ [[package]] name = "gix-sec" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1547d26fa5693a7f34f05b4a3b59a90890972922172653bcb891ab3f09f436df" +checksum = "0fe4d52f30a737bbece5276fab5d3a8b276dc2650df963e293d0673be34e7a5f" dependencies = [ "bitflags 2.6.0", "gix-path", @@ -1943,9 +1944,9 @@ dependencies = [ [[package]] name = "gix-tempfile" -version = "14.0.1" +version = "14.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006acf5a613e0b5cf095d8e4b3f48c12a60d9062aa2b2dd105afaf8344a5600c" +checksum = "046b4927969fa816a150a0cda2e62c80016fe11fb3c3184e4dddf4e542f108aa" dependencies = [ "gix-fs", "libc", @@ -1958,9 +1959,9 @@ dependencies = [ [[package]] name = "gix-trace" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f924267408915fddcd558e3f37295cc7d6a3e50f8bd8b606cee0808c3915157e" +checksum = "6cae0e8661c3ff92688ce1c8b8058b3efb312aba9492bbe93661a21705ab431b" [[package]] name = "gix-traverse" @@ -1981,9 +1982,9 @@ dependencies = [ [[package]] name = "gix-url" -version = "0.27.4" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2eb9b35bba92ea8f0b5ab406fad3cf6b87f7929aa677ff10aa042c6da621156" +checksum = "fd280c5e84fb22e128ed2a053a0daeacb6379469be6a85e3d518a0636e160c89" dependencies = [ "bstr", "gix-features", @@ -2036,18 +2037,18 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.2.6", + "indexmap 2.5.0", "slab", "tokio", - "tokio-util 0.7.11", + "tokio-util 0.7.12", "tracing", ] [[package]] name = "h2" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", "bytes", @@ -2055,10 +2056,10 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.2.6", + "indexmap 2.5.0", "slab", "tokio", - "tokio-util 0.7.11", + "tokio-util 0.7.12", "tracing", ] @@ -2288,10 +2289,11 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.5", + "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "httparse", + "httpdate", "itoa", "pin-project-lite", "smallvec", @@ -2301,15 +2303,15 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.1.0", "hyper 1.4.1", "hyper-util", - "rustls 0.23.12", + "rustls 0.23.13", "rustls-pki-types", "tokio", "tokio-rustls", @@ -2347,9 +2349,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" dependencies = [ "bytes", "futures-channel", @@ -2388,9 +2390,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -2404,8 +2406,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0122b7114117e64a63ac49f752a5ca4624d534c7b1c7de796ac196381cd2d947" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -2419,9 +2421,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" [[package]] name = "is_terminal_polyfill" @@ -2464,9 +2466,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -2542,9 +2544,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libm" @@ -2560,6 +2562,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.6.0", "libc", + "redox_syscall", ] [[package]] @@ -2672,18 +2675,18 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi", "libc", @@ -2714,20 +2717,25 @@ checksum = "af7cbce79ec385a1d4f54baa90a76401eb15d9cab93685f62e7e9f942aa00ae2" dependencies = [ "cfg-if", "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] name = "mockito" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f6e023aa5bdf392aa06c78e4a4e6d498baab5138d0c993503350ebbc37bf1e" +checksum = "09b34bd91b9e5c5b06338d392463e1318d683cf82ec3d3af4014609be6e2108d" dependencies = [ "assert-json-diff", + "bytes", "colored", - "futures-core", - "hyper 0.14.30", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", + "hyper-util", "log", "rand", "regex", @@ -2861,7 +2869,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] @@ -2928,9 +2936,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.2" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -2969,8 +2977,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -3034,7 +3042,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.3", + "redox_syscall", "smallvec", "windows-targets 0.52.6", ] @@ -3129,8 +3137,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -3189,9 +3197,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "predicates" @@ -3237,7 +3248,7 @@ checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", "version_check", ] @@ -3249,7 +3260,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "version_check", ] @@ -3371,9 +3382,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2 1.0.86", ] @@ -3426,15 +3437,6 @@ dependencies = [ "rand_core", ] -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.5.3" @@ -3446,9 +3448,9 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", @@ -3457,9 +3459,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -3528,7 +3530,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "sync_wrapper 0.1.2", - "system-configuration", + "system-configuration 0.5.1", "tokio", "tokio-native-tls", "tower-service", @@ -3536,21 +3538,21 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg 0.50.0", + "winreg", ] [[package]] name = "reqwest" -version = "0.12.5" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" dependencies = [ "base64 0.22.1", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2 0.4.5", + "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "http-body-util", @@ -3566,22 +3568,22 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls-pemfile 2.1.2", + "rustls-pemfile 2.1.3", "serde", "serde_json", "serde_urlencoded", "sync_wrapper 1.0.1", - "system-configuration", + "system-configuration 0.6.1", "tokio", "tokio-native-tls", - "tokio-util 0.7.11", + "tokio-util 0.7.12", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", "web-sys", - "winreg 0.52.0", + "windows-registry", ] [[package]] @@ -3647,9 +3649,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6125dbc8867951125eec87294137f4e9c2c96566e61bf72c45095a7c77761478" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "rust-embed-utils", - "syn 2.0.72", + "syn 2.0.77", "walkdir", ] @@ -3671,18 +3673,18 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36" dependencies = [ "bitflags 2.6.0", "errno", @@ -3704,13 +3706,13 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.12" +version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" dependencies = [ "once_cell", "rustls-pki-types", - "rustls-webpki 0.102.6", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -3726,9 +3728,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ "base64 0.22.1", "rustls-pki-types", @@ -3736,9 +3738,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" [[package]] name = "rustls-webpki" @@ -3752,9 +3754,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.6" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -3796,11 +3798,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3823,9 +3825,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "serde_derive_internals", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -3868,8 +3870,8 @@ checksum = "25a82fcb49253abcb45cdcb2adf92956060ec0928635eb21b4f7a6d8f25ab0bc" dependencies = [ "heck 0.4.1", "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", "thiserror", ] @@ -3917,9 +3919,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.204" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -3945,13 +3947,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -3961,18 +3963,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.5.0", "itoa", + "memchr", "ryu", "serde", ] @@ -4026,6 +4029,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook" version = "0.3.17" @@ -4107,9 +4116,9 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f895e3734318cc55f1fe66258926c9b910c124d47520339efecbb6c59cec7c1f" +checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" dependencies = [ "nom", "unicode_categories", @@ -4149,7 +4158,7 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.2.6", + "indexmap 2.5.0", "log", "memchr", "native-tls", @@ -4178,7 +4187,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ea40e2345eb2faa9e1e5e326db8c34711317d2b5e08d0d5741619048a803127" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "sqlx-core", "sqlx-macros-core", "syn 1.0.109", @@ -4196,7 +4205,7 @@ dependencies = [ "hex", "once_cell", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "serde", "serde_json", "sha2", @@ -4362,7 +4371,7 @@ checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ "heck 0.4.1", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "rustversion", "syn 1.0.109", ] @@ -4375,9 +4384,9 @@ checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ "heck 0.4.1", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "rustversion", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -4404,18 +4413,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.72" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "unicode-ident", ] @@ -4430,6 +4439,9 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "system-configuration" @@ -4439,7 +4451,18 @@ checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", "core-foundation", - "system-configuration-sys", + "system-configuration-sys 0.5.0", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.6.0", + "core-foundation", + "system-configuration-sys 0.6.0", ] [[package]] @@ -4452,6 +4475,16 @@ dependencies = [ "libc", ] +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tabled" version = "0.10.0" @@ -4473,7 +4506,7 @@ dependencies = [ "heck 0.4.1", "proc-macro-error", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] @@ -4490,14 +4523,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4522,8 +4556,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -4606,9 +4640,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.1" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d040ac2b29ab03b09d4129c2f5bbd012a3ac2f79d38ff506a4bf8dd34b0eac8a" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", @@ -4629,8 +4663,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -4649,21 +4683,21 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.12", + "rustls 0.23.13", "rustls-pki-types", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", "tokio", - "tokio-util 0.7.11", + "tokio-util 0.7.12", ] [[package]] @@ -4694,9 +4728,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -4725,7 +4759,7 @@ dependencies = [ "pin-project", "pin-project-lite", "tokio", - "tokio-util 0.7.11", + "tokio-util 0.7.12", "tower-layer", "tower-service", "tracing", @@ -4733,15 +4767,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -4762,8 +4796,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -4890,9 +4924,9 @@ checksum = "7eec5d1121208364f6793f7d2e222bf75a915c19557537745b195b253dd64217" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" @@ -4905,9 +4939,9 @@ dependencies = [ [[package]] name = "unicode-properties" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" +checksum = "52ea75f83c0137a9b98608359a5f1af8144876eb67bcb1ce837368e906a9f524" [[package]] name = "unicode-segmentation" @@ -4980,7 +5014,7 @@ version = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5afb1a60e207dca502682537fefcfd9921e71d0b83e9576060f09abc6efab23" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.5.0", "serde", "serde_json", "utoipa-gen", @@ -4994,8 +5028,8 @@ checksum = "7bf0e16c02bc4bf5322ab65f10ab1149bdbcaa782cba66dc7057370a3f8190be" dependencies = [ "proc-macro-error", "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -5046,9 +5080,9 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vte" @@ -5068,7 +5102,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e369bee1b05d510a7b4ed645f5faa90619e05437111783ea5848f28d97d3c2e" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", ] [[package]] @@ -5124,7 +5158,7 @@ dependencies = [ "serde_urlencoded", "tokio", "tokio-tungstenite", - "tokio-util 0.7.11", + "tokio-util 0.7.12", "tower-service", "tracing", ] @@ -5143,34 +5177,35 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -5180,32 +5215,32 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ - "quote 1.0.36", + "quote 1.0.37", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-streams" @@ -5222,9 +5257,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -5244,11 +5279,11 @@ checksum = "62945bc99a6a121cb2759c7bfa7b779ddf0e69b68bb35a9b23ab72276cfdcd3c" [[package]] name = "whoami" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" +checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" dependencies = [ - "redox_syscall 0.4.1", + "redox_syscall", "wasite", ] @@ -5270,11 +5305,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5283,6 +5318,36 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -5301,6 +5366,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -5424,9 +5498,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "557404e450152cd6795bb558bca69e43c585055f4606e3bcae5894fc6dac9ba0" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -5441,16 +5515,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "xattr" version = "1.3.1" @@ -5483,6 +5547,7 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] @@ -5493,8 +5558,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -5544,9 +5609,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.12+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index 0906ae11..0c64330a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,8 +14,8 @@ members = [ anyhow = "1" async-stream = "0.3.4" async-trait = "0.1.77" -casper-types = { git = "https://github.com/jacek-casper/casper-node.git", branch = "get-entity-get-package-binary-port" } -casper-binary-port = { git = "https://github.com/jacek-casper/casper-node.git", branch = "get-entity-get-package-binary-port" } +casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "feat-2.0" } +casper-binary-port = { git = "https://github.com/casper-network/casper-node.git", branch = "feat-2.0" } casper-event-sidecar = { path = "./event_sidecar", version = "1.0.0" } casper-event-types = { path = "./types", version = "1.0.0" } casper-rpc-sidecar = { path = "./rpc_sidecar", version = "1.0.0" } diff --git a/resources/test/rpc_schema.json b/resources/test/rpc_schema.json index 5d781393..09e16e1a 100644 --- a/resources/test/rpc_schema.json +++ b/resources/test/rpc_schema.json @@ -38,7 +38,10 @@ "schema": { "description": "Result for \"account_put_deploy\" RPC response.", "type": "object", - "required": ["api_version", "deploy_hash"], + "required": [ + "api_version", + "deploy_hash" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -138,7 +141,10 @@ "schema": { "description": "Result for \"account_put_transaction\" RPC response.", "type": "object", - "required": ["api_version", "transaction_hash"], + "required": [ + "api_version", + "transaction_hash" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -160,12 +166,13 @@ "name": "transaction", "value": { "Version1": { - "hash": "f5582cb81a5abda63ebaa4edb3b05210ecbd63ffb8dd17bfbeb3b867f4014468", + "serialization_version": 1, + "hash": "df4f6e95afd24c3bdac68862cfd888fea65912f0f3e3de9c42b24cee79b7a581", "header": { "chain_name": "casper-example", "timestamp": "2020-11-17T00:39:24.072Z", "ttl": "1h", - "body_hash": "aa24833ffbf31d62c8c8c4265349e7c09cd71952fcbce6f7b12daf5e340bf2cc", + "body_hash": "7bf1a4f736a9cbb2b692b74522d981213c3a5463d0095ded40d1454cf1b779e1", "pricing_mode": { "Fixed": { "gas_price_tolerance": 5 @@ -222,7 +229,7 @@ "approvals": [ { "signer": "01d9bf2148748a85c89da5aad8ee0b0fc2d105fd39d41a4c796536354f0ae2900c", - "signature": "0137d3f468d8f8a6e63f4110d79be29b8c8428e9cd858a92049660e7851ae16a299640d1fc1c930ab6cb424f1a6eec0b194df74bede14f4af1b5133106f1280d0b" + "signature": "015b407723d54bdfd376d43776d9b92ea465d7ec2e0d41e28b5f646fc17400193bc4e075cab4e8943de09935e3aa96d0bbe456382c2274689b6847a35a94d07309" } ] } @@ -234,7 +241,7 @@ "value": { "api_version": "2.0.0", "transaction_hash": { - "Version1": "f5582cb81a5abda63ebaa4edb3b05210ecbd63ffb8dd17bfbeb3b867f4014468" + "Version1": "df4f6e95afd24c3bdac68862cfd888fea65912f0f3e3de9c42b24cee79b7a581" } } } @@ -268,7 +275,10 @@ "schema": { "description": "Result for \"info_get_deploy\" RPC response.", "type": "object", - "required": ["api_version", "deploy"], + "required": [ + "api_version", + "deploy" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -395,7 +405,7 @@ } } ], - "size_estimate": 186, + "size_estimate": 206, "effects": [ { "key": "account-hash-2c4a11c062a8a337bfc97e27fd66291caeb2c65865dcb5d3ef3759c4c97efecb", @@ -443,7 +453,10 @@ "schema": { "description": "Result for \"info_get_transaction\" RPC response.", "type": "object", - "required": ["api_version", "transaction"], + "required": [ + "api_version", + "transaction" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -475,7 +488,7 @@ { "name": "transaction_hash", "value": { - "Version1": "f5582cb81a5abda63ebaa4edb3b05210ecbd63ffb8dd17bfbeb3b867f4014468" + "Version1": "df4f6e95afd24c3bdac68862cfd888fea65912f0f3e3de9c42b24cee79b7a581" } }, { @@ -489,12 +502,13 @@ "api_version": "2.0.0", "transaction": { "Version1": { - "hash": "f5582cb81a5abda63ebaa4edb3b05210ecbd63ffb8dd17bfbeb3b867f4014468", + "serialization_version": 1, + "hash": "df4f6e95afd24c3bdac68862cfd888fea65912f0f3e3de9c42b24cee79b7a581", "header": { "chain_name": "casper-example", "timestamp": "2020-11-17T00:39:24.072Z", "ttl": "1h", - "body_hash": "aa24833ffbf31d62c8c8c4265349e7c09cd71952fcbce6f7b12daf5e340bf2cc", + "body_hash": "7bf1a4f736a9cbb2b692b74522d981213c3a5463d0095ded40d1454cf1b779e1", "pricing_mode": { "Fixed": { "gas_price_tolerance": 5 @@ -551,7 +565,7 @@ "approvals": [ { "signer": "01d9bf2148748a85c89da5aad8ee0b0fc2d105fd39d41a4c796536354f0ae2900c", - "signature": "0137d3f468d8f8a6e63f4110d79be29b8c8428e9cd858a92049660e7851ae16a299640d1fc1c930ab6cb424f1a6eec0b194df74bede14f4af1b5133106f1280d0b" + "signature": "015b407723d54bdfd376d43776d9b92ea465d7ec2e0d41e28b5f646fc17400193bc4e075cab4e8943de09935e3aa96d0bbe456382c2274689b6847a35a94d07309" } ] } @@ -591,7 +605,7 @@ } } ], - "size_estimate": 186, + "size_estimate": 206, "effects": [ { "key": "account-hash-2c4a11c062a8a337bfc97e27fd66291caeb2c65865dcb5d3ef3759c4c97efecb", @@ -645,7 +659,11 @@ "schema": { "description": "Result for \"state_get_account_info\" RPC response.", "type": "object", - "required": ["account", "api_version", "merkle_proof"], + "required": [ + "account", + "api_version", + "merkle_proof" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -739,7 +757,10 @@ "name": "include_bytecode", "schema": { "description": "Whether to include the entity's bytecode in the response.", - "type": ["boolean", "null"] + "type": [ + "boolean", + "null" + ] }, "required": false } @@ -749,7 +770,11 @@ "schema": { "description": "Result for \"state_get_entity\" RPC response.", "type": "object", - "required": ["api_version", "entity", "merkle_proof"], + "required": [ + "api_version", + "entity", + "merkle_proof" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -880,7 +905,11 @@ "schema": { "description": "Result for \"state_get_entity\" RPC response.", "type": "object", - "required": ["api_version", "merkle_proof", "package"], + "required": [ + "api_version", + "merkle_proof", + "package" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -1067,7 +1096,11 @@ "schema": { "description": "Result for \"query_global_state\" RPC response.", "type": "object", - "required": ["api_version", "merkle_proof", "stored_value"], + "required": [ + "api_version", + "merkle_proof", + "stored_value" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -1220,7 +1253,10 @@ "schema": { "description": "Result for \"query_balance\" RPC response.", "type": "object", - "required": ["api_version", "balance"], + "required": [ + "api_version", + "balance" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -1372,7 +1408,10 @@ "schema": { "description": "Result for \"info_get_peers\" RPC response.", "type": "object", - "required": ["api_version", "peers"], + "required": [ + "api_version", + "peers" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -1711,7 +1750,10 @@ "schema": { "description": "Result for the \"info_get_validator_changes\" RPC.", "type": "object", - "required": ["api_version", "changes"], + "required": [ + "api_version", + "changes" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -1761,7 +1803,10 @@ "schema": { "description": "Result for the \"info_get_chainspec\" RPC.", "type": "object", - "required": ["api_version", "chainspec_bytes"], + "required": [ + "api_version", + "chainspec_bytes" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -1810,7 +1855,9 @@ "schema": { "description": "Result for \"chain_get_block\" RPC response.", "type": "object", - "required": ["api_version"], + "required": [ + "api_version" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -1945,7 +1992,9 @@ "schema": { "description": "Result for \"chain_get_block_transfers\" RPC response.", "type": "object", - "required": ["api_version"], + "required": [ + "api_version" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -1964,7 +2013,10 @@ }, "transfers": { "description": "The block's transfers, if found.", - "type": ["array", "null"], + "type": [ + "array", + "null" + ], "items": { "$ref": "#/components/schemas/Transfer" } @@ -2030,7 +2082,9 @@ "schema": { "description": "Result for \"chain_get_state_root_hash\" RPC response.", "type": "object", - "required": ["api_version"], + "required": [ + "api_version" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -2110,7 +2164,11 @@ "schema": { "description": "Result for \"state_get_item\" RPC response.", "type": "object", - "required": ["api_version", "merkle_proof", "stored_value"], + "required": [ + "api_version", + "merkle_proof", + "stored_value" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -2142,7 +2200,9 @@ }, { "name": "path", - "value": ["inner"] + "value": [ + "inner" + ] } ], "result": { @@ -2188,7 +2248,11 @@ "schema": { "description": "Result for \"state_get_balance\" RPC response.", "type": "object", - "required": ["api_version", "balance_value", "merkle_proof"], + "required": [ + "api_version", + "balance_value", + "merkle_proof" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -2248,7 +2312,9 @@ "schema": { "description": "Result for \"chain_get_era_info\" RPC response.", "type": "object", - "required": ["api_version"], + "required": [ + "api_version" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -2332,7 +2398,10 @@ "schema": { "description": "Result for \"state_get_auction_info\" RPC response.", "type": "object", - "required": ["api_version", "auction_state"], + "required": [ + "api_version", + "auction_state" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -2424,7 +2493,10 @@ "schema": { "description": "Result for \"chain_get_era_summary\" RPC response.", "type": "object", - "required": ["api_version", "era_summary"], + "required": [ + "api_version", + "era_summary" + ], "properties": { "api_version": { "description": "The RPC API version.", @@ -2489,7 +2561,13 @@ "Deploy": { "description": "A signed smart contract.", "type": "object", - "required": ["approvals", "hash", "header", "payment", "session"], + "required": [ + "approvals", + "hash", + "header", + "payment", + "session" + ], "properties": { "hash": { "$ref": "#/components/schemas/DeployHash" @@ -2602,11 +2680,16 @@ { "description": "Executable specified as raw bytes that represent Wasm code and an instance of [`RuntimeArgs`].", "type": "object", - "required": ["ModuleBytes"], + "required": [ + "ModuleBytes" + ], "properties": { "ModuleBytes": { "type": "object", - "required": ["args", "module_bytes"], + "required": [ + "args", + "module_bytes" + ], "properties": { "module_bytes": { "description": "Hex-encoded raw Wasm bytes.", @@ -2633,11 +2716,17 @@ { "description": "Stored contract referenced by its [`AddressableEntityHash`], entry point and an instance of [`RuntimeArgs`].", "type": "object", - "required": ["StoredContractByHash"], + "required": [ + "StoredContractByHash" + ], "properties": { "StoredContractByHash": { "type": "object", - "required": ["args", "entry_point", "hash"], + "required": [ + "args", + "entry_point", + "hash" + ], "properties": { "hash": { "description": "Hex-encoded contract hash.", @@ -2668,11 +2757,17 @@ { "description": "Stored contract referenced by a named key existing in the signer's account context, entry point and an instance of [`RuntimeArgs`].", "type": "object", - "required": ["StoredContractByName"], + "required": [ + "StoredContractByName" + ], "properties": { "StoredContractByName": { "type": "object", - "required": ["args", "entry_point", "name"], + "required": [ + "args", + "entry_point", + "name" + ], "properties": { "name": { "description": "Named key.", @@ -2699,11 +2794,17 @@ { "description": "Stored versioned contract referenced by its [`PackageHash`], entry point and an instance of [`RuntimeArgs`].", "type": "object", - "required": ["StoredVersionedContractByHash"], + "required": [ + "StoredVersionedContractByHash" + ], "properties": { "StoredVersionedContractByHash": { "type": "object", - "required": ["args", "entry_point", "hash"], + "required": [ + "args", + "entry_point", + "hash" + ], "properties": { "hash": { "description": "Hex-encoded contract package hash.", @@ -2715,7 +2816,10 @@ }, "version": { "description": "An optional version of the contract to call. It will default to the highest enabled version if no value is specified.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "uint32", "minimum": 0.0 }, @@ -2740,11 +2844,17 @@ { "description": "Stored versioned contract referenced by a named key existing in the signer's account context, entry point and an instance of [`RuntimeArgs`].", "type": "object", - "required": ["StoredVersionedContractByName"], + "required": [ + "StoredVersionedContractByName" + ], "properties": { "StoredVersionedContractByName": { "type": "object", - "required": ["args", "entry_point", "name"], + "required": [ + "args", + "entry_point", + "name" + ], "properties": { "name": { "description": "Named key.", @@ -2752,7 +2862,10 @@ }, "version": { "description": "An optional version of the contract to call. It will default to the highest enabled version if no value is specified.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "uint32", "minimum": 0.0 }, @@ -2777,11 +2890,15 @@ { "description": "A native transfer which does not contain or reference a Wasm code.", "type": "object", - "required": ["Transfer"], + "required": [ + "Transfer" + ], "properties": { "Transfer": { "type": "object", - "required": ["args"], + "required": [ + "args" + ], "properties": { "args": { "description": "Runtime arguments.", @@ -2827,7 +2944,10 @@ "CLValue": { "description": "A Casper value, i.e. a value which can be stored and manipulated by smart contracts.\n\nIt holds the underlying data as a type-erased, serialized `Vec` and also holds the CLType of the underlying data as a separate member.\n\nThe `parsed` field, representing the original value, is a convenience only available when a CLValue is encoded to JSON, and can always be set to null if preferred.", "type": "object", - "required": ["bytes", "cl_type"], + "required": [ + "bytes", + "cl_type" + ], "properties": { "cl_type": { "$ref": "#/components/schemas/CLType" @@ -2845,77 +2965,107 @@ { "description": "`bool` primitive.", "type": "string", - "enum": ["Bool"] + "enum": [ + "Bool" + ] }, { "description": "`i32` primitive.", "type": "string", - "enum": ["I32"] + "enum": [ + "I32" + ] }, { "description": "`i64` primitive.", "type": "string", - "enum": ["I64"] + "enum": [ + "I64" + ] }, { "description": "`u8` primitive.", "type": "string", - "enum": ["U8"] + "enum": [ + "U8" + ] }, { "description": "`u32` primitive.", "type": "string", - "enum": ["U32"] + "enum": [ + "U32" + ] }, { "description": "`u64` primitive.", "type": "string", - "enum": ["U64"] + "enum": [ + "U64" + ] }, { "description": "[`U128`] large unsigned integer type.", "type": "string", - "enum": ["U128"] + "enum": [ + "U128" + ] }, { "description": "[`U256`] large unsigned integer type.", "type": "string", - "enum": ["U256"] + "enum": [ + "U256" + ] }, { "description": "[`U512`] large unsigned integer type.", "type": "string", - "enum": ["U512"] + "enum": [ + "U512" + ] }, { "description": "`()` primitive.", "type": "string", - "enum": ["Unit"] + "enum": [ + "Unit" + ] }, { "description": "`String` primitive.", "type": "string", - "enum": ["String"] + "enum": [ + "String" + ] }, { "description": "[`Key`] system type.", "type": "string", - "enum": ["Key"] + "enum": [ + "Key" + ] }, { "description": "[`URef`] system type.", "type": "string", - "enum": ["URef"] + "enum": [ + "URef" + ] }, { "description": "[`PublicKey`](crate::PublicKey) system type.", "type": "string", - "enum": ["PublicKey"] + "enum": [ + "PublicKey" + ] }, { "description": "`Option` of a `CLType`.", "type": "object", - "required": ["Option"], + "required": [ + "Option" + ], "properties": { "Option": { "$ref": "#/components/schemas/CLType" @@ -2926,7 +3076,9 @@ { "description": "Variable-length list of a single `CLType` (comparable to a `Vec`).", "type": "object", - "required": ["List"], + "required": [ + "List" + ], "properties": { "List": { "$ref": "#/components/schemas/CLType" @@ -2937,7 +3089,9 @@ { "description": "Fixed-length list of a single `CLType` (comparable to a Rust array).", "type": "object", - "required": ["ByteArray"], + "required": [ + "ByteArray" + ], "properties": { "ByteArray": { "type": "integer", @@ -2950,11 +3104,16 @@ { "description": "`Result` with `Ok` and `Err` variants of `CLType`s.", "type": "object", - "required": ["Result"], + "required": [ + "Result" + ], "properties": { "Result": { "type": "object", - "required": ["err", "ok"], + "required": [ + "err", + "ok" + ], "properties": { "ok": { "$ref": "#/components/schemas/CLType" @@ -2971,11 +3130,16 @@ { "description": "Map with keys of a single `CLType` and values of a single `CLType`.", "type": "object", - "required": ["Map"], + "required": [ + "Map" + ], "properties": { "Map": { "type": "object", - "required": ["key", "value"], + "required": [ + "key", + "value" + ], "properties": { "key": { "$ref": "#/components/schemas/CLType" @@ -2992,7 +3156,9 @@ { "description": "1-ary tuple of a `CLType`.", "type": "object", - "required": ["Tuple1"], + "required": [ + "Tuple1" + ], "properties": { "Tuple1": { "type": "array", @@ -3008,7 +3174,9 @@ { "description": "2-ary tuple of `CLType`s.", "type": "object", - "required": ["Tuple2"], + "required": [ + "Tuple2" + ], "properties": { "Tuple2": { "type": "array", @@ -3024,7 +3192,9 @@ { "description": "3-ary tuple of `CLType`s.", "type": "object", - "required": ["Tuple3"], + "required": [ + "Tuple3" + ], "properties": { "Tuple3": { "type": "array", @@ -3040,7 +3210,9 @@ { "description": "Unspecified type.", "type": "string", - "enum": ["Any"] + "enum": [ + "Any" + ] } ] }, @@ -3055,7 +3227,10 @@ "Approval": { "description": "A struct containing a signature of a transaction hash and the public key of the signer.", "type": "object", - "required": ["signature", "signer"], + "required": [ + "signature", + "signer" + ], "properties": { "signer": { "$ref": "#/components/schemas/PublicKey" @@ -3076,7 +3251,9 @@ { "description": "A deploy.", "type": "object", - "required": ["Deploy"], + "required": [ + "Deploy" + ], "properties": { "Deploy": { "$ref": "#/components/schemas/Deploy" @@ -3087,7 +3264,9 @@ { "description": "A version 1 transaction.", "type": "object", - "required": ["Version1"], + "required": [ + "Version1" + ], "properties": { "Version1": { "$ref": "#/components/schemas/TransactionV1" @@ -3100,8 +3279,19 @@ "TransactionV1": { "description": "A unit of work sent by a client to the network, which when executed can cause global state to be altered.", "type": "object", - "required": ["approvals", "body", "hash", "header"], + "required": [ + "approvals", + "body", + "hash", + "header", + "serialization_version" + ], "properties": { + "serialization_version": { + "type": "integer", + "format": "uint8", + "minimum": 0.0 + }, "hash": { "$ref": "#/components/schemas/TransactionV1Hash" }, @@ -3168,7 +3358,9 @@ { "description": "The original payment model, where the creator of the transaction specifies how much they will pay, at what gas price.", "type": "object", - "required": ["Classic"], + "required": [ + "Classic" + ], "properties": { "Classic": { "type": "object", @@ -3203,11 +3395,15 @@ { "description": "The cost of the transaction is determined by the cost table, per the transaction category.", "type": "object", - "required": ["Fixed"], + "required": [ + "Fixed" + ], "properties": { "Fixed": { "type": "object", - "required": ["gas_price_tolerance"], + "required": [ + "gas_price_tolerance" + ], "properties": { "gas_price_tolerance": { "description": "User-specified gas_price tolerance (minimum 1). This is interpreted to mean \"do not include this transaction in a block if the current gas price is greater than this number\"", @@ -3224,11 +3420,15 @@ { "description": "The payment for this transaction was previously reserved, as proven by the receipt hash (this is for future use, not currently implemented).", "type": "object", - "required": ["Reserved"], + "required": [ + "Reserved" + ], "properties": { "Reserved": { "type": "object", - "required": ["receipt"], + "required": [ + "receipt" + ], "properties": { "receipt": { "description": "Pre-paid receipt.", @@ -3252,7 +3452,9 @@ { "description": "The public key of the initiator.", "type": "object", - "required": ["PublicKey"], + "required": [ + "PublicKey" + ], "properties": { "PublicKey": { "$ref": "#/components/schemas/PublicKey" @@ -3263,7 +3465,9 @@ { "description": "The account hash derived from the public key of the initiator.", "type": "object", - "required": ["AccountHash"], + "required": [ + "AccountHash" + ], "properties": { "AccountHash": { "$ref": "#/components/schemas/AccountHash" @@ -3314,16 +3518,23 @@ { "description": "The execution target is a native operation (e.g. a transfer).", "type": "string", - "enum": ["Native"] + "enum": [ + "Native" + ] }, { "description": "The execution target is a stored entity or package.", "type": "object", - "required": ["Stored"], + "required": [ + "Stored" + ], "properties": { "Stored": { "type": "object", - "required": ["id", "runtime"], + "required": [ + "id", + "runtime" + ], "properties": { "id": { "description": "The identifier of the stored execution target.", @@ -3350,11 +3561,16 @@ { "description": "The execution target is the included module bytes, i.e. compiled Wasm.", "type": "object", - "required": ["Session"], + "required": [ + "Session" + ], "properties": { "Session": { "type": "object", - "required": ["module_bytes", "runtime"], + "required": [ + "module_bytes", + "runtime" + ], "properties": { "module_bytes": { "description": "The compiled Wasm.", @@ -3386,7 +3602,9 @@ { "description": "Hex-encoded entity address identifying the invocable entity.", "type": "object", - "required": ["ByHash"], + "required": [ + "ByHash" + ], "properties": { "ByHash": { "type": "string" @@ -3397,7 +3615,9 @@ { "description": "The alias identifying the invocable entity.", "type": "object", - "required": ["ByName"], + "required": [ + "ByName" + ], "properties": { "ByName": { "type": "string" @@ -3408,11 +3628,15 @@ { "description": "The address and optional version identifying the package.", "type": "object", - "required": ["ByPackageHash"], + "required": [ + "ByPackageHash" + ], "properties": { "ByPackageHash": { "type": "object", - "required": ["addr"], + "required": [ + "addr" + ], "properties": { "addr": { "description": "Hex-encoded address of the package.", @@ -3420,7 +3644,10 @@ }, "version": { "description": "The package version.\n\nIf `None`, the latest enabled version is implied.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "uint32", "minimum": 0.0 } @@ -3433,11 +3660,15 @@ { "description": "The alias and optional version identifying the package.", "type": "object", - "required": ["ByPackageName"], + "required": [ + "ByPackageName" + ], "properties": { "ByPackageName": { "type": "object", - "required": ["name"], + "required": [ + "name" + ], "properties": { "name": { "description": "The package name.", @@ -3445,7 +3676,10 @@ }, "version": { "description": "The package version.\n\nIf `None`, the latest enabled version is implied.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "uint32", "minimum": 0.0 } @@ -3463,12 +3697,16 @@ { "description": "The Casper Version 1 Virtual Machine.", "type": "string", - "enum": ["VmCasperV1"] + "enum": [ + "VmCasperV1" + ] }, { "description": "The Casper Version 2 Virtual Machine.", "type": "string", - "enum": ["VmCasperV2"] + "enum": [ + "VmCasperV2" + ] } ] }, @@ -3478,12 +3716,16 @@ { "description": "The standard `call` entry point used in session code.", "type": "string", - "enum": ["Call"] + "enum": [ + "Call" + ] }, { "description": "A non-native, arbitrary entry point.", "type": "object", - "required": ["Custom"], + "required": [ + "Custom" + ], "properties": { "Custom": { "type": "string" @@ -3494,52 +3736,72 @@ { "description": "The `transfer` native entry point, used to transfer `Motes` from a source purse to a target purse.", "type": "string", - "enum": ["Transfer"] + "enum": [ + "Transfer" + ] }, { "description": "The `add_bid` native entry point, used to create or top off a bid purse.", "type": "string", - "enum": ["AddBid"] + "enum": [ + "AddBid" + ] }, { "description": "The `withdraw_bid` native entry point, used to decrease a stake.", "type": "string", - "enum": ["WithdrawBid"] + "enum": [ + "WithdrawBid" + ] }, { "description": "The `delegate` native entry point, used to add a new delegator or increase an existing delegator's stake.", "type": "string", - "enum": ["Delegate"] + "enum": [ + "Delegate" + ] }, { "description": "The `undelegate` native entry point, used to reduce a delegator's stake or remove the delegator if the remaining stake is 0.", "type": "string", - "enum": ["Undelegate"] + "enum": [ + "Undelegate" + ] }, { "description": "The `redelegate` native entry point, used to reduce a delegator's stake or remove the delegator if the remaining stake is 0, and after the unbonding delay, automatically delegate to a new validator.", "type": "string", - "enum": ["Redelegate"] + "enum": [ + "Redelegate" + ] }, { "description": "The `activate_bid` native entry point, used to used to reactivate an inactive bid.", "type": "string", - "enum": ["ActivateBid"] + "enum": [ + "ActivateBid" + ] }, { "description": "The `change_bid_public_key` native entry point, used to change a bid's public key.", "type": "string", - "enum": ["ChangeBidPublicKey"] + "enum": [ + "ChangeBidPublicKey" + ] }, { "description": "The `add_reservations` native entry point, used to add delegator to validator's reserve list", "type": "string", - "enum": ["AddReservations"] + "enum": [ + "AddReservations" + ] }, { "description": "The `cancel_reservations` native entry point, used to remove delegator from validator's reserve list", "type": "string", - "enum": ["CancelReservations"] + "enum": [ + "CancelReservations" + ] } ] }, @@ -3549,12 +3811,16 @@ { "description": "No special scheduling applied.", "type": "string", - "enum": ["Standard"] + "enum": [ + "Standard" + ] }, { "description": "Execution should be scheduled for the specified era.", "type": "object", - "required": ["FutureEra"], + "required": [ + "FutureEra" + ], "properties": { "FutureEra": { "$ref": "#/components/schemas/EraId" @@ -3565,7 +3831,9 @@ { "description": "Execution should be scheduled for the specified timestamp or later.", "type": "object", - "required": ["FutureTimestamp"], + "required": [ + "FutureTimestamp" + ], "properties": { "FutureTimestamp": { "$ref": "#/components/schemas/Timestamp" @@ -3587,7 +3855,9 @@ { "description": "A deploy hash.", "type": "object", - "required": ["Deploy"], + "required": [ + "Deploy" + ], "properties": { "Deploy": { "$ref": "#/components/schemas/DeployHash" @@ -3598,7 +3868,9 @@ { "description": "A version 1 transaction hash.", "type": "object", - "required": ["Version1"], + "required": [ + "Version1" + ], "properties": { "Version1": { "$ref": "#/components/schemas/TransactionV1Hash" @@ -3611,7 +3883,10 @@ "ExecutionInfo": { "description": "The block hash and height in which a given deploy was executed, along with the execution result if known.", "type": "object", - "required": ["block_hash", "block_height"], + "required": [ + "block_hash", + "block_height" + ], "properties": { "block_hash": { "description": "The hash of the block in which the deploy was executed.", @@ -3655,7 +3930,9 @@ { "description": "Version 1 of execution result type.", "type": "object", - "required": ["Version1"], + "required": [ + "Version1" + ], "properties": { "Version1": { "$ref": "#/components/schemas/ExecutionResultV1" @@ -3666,7 +3943,9 @@ { "description": "Version 2 of execution result type.", "type": "object", - "required": ["Version2"], + "required": [ + "Version2" + ], "properties": { "Version2": { "$ref": "#/components/schemas/ExecutionResultV2" @@ -3682,11 +3961,18 @@ { "description": "The result of a failed execution.", "type": "object", - "required": ["Failure"], + "required": [ + "Failure" + ], "properties": { "Failure": { "type": "object", - "required": ["cost", "effect", "error_message", "transfers"], + "required": [ + "cost", + "effect", + "error_message", + "transfers" + ], "properties": { "effect": { "description": "The effect of executing the deploy.", @@ -3724,11 +4010,17 @@ { "description": "The result of a successful execution.", "type": "object", - "required": ["Success"], + "required": [ + "Success" + ], "properties": { "Success": { "type": "object", - "required": ["cost", "effect", "transfers"], + "required": [ + "cost", + "effect", + "transfers" + ], "properties": { "effect": { "description": "The effect of executing the deploy.", @@ -3764,7 +4056,10 @@ "ExecutionEffect": { "description": "The sequence of execution transforms from a single deploy.", "type": "object", - "required": ["operations", "transforms"], + "required": [ + "operations", + "transforms" + ], "properties": { "operations": { "description": "The resulting operations.", @@ -3786,7 +4081,10 @@ "Operation": { "description": "An operation performed while executing a deploy.", "type": "object", - "required": ["key", "kind"], + "required": [ + "key", + "kind" + ], "properties": { "key": { "description": "The formatted string of the `Key`.", @@ -3809,34 +4107,47 @@ { "description": "A read operation.", "type": "string", - "enum": ["Read"] + "enum": [ + "Read" + ] }, { "description": "A write operation.", "type": "string", - "enum": ["Write"] + "enum": [ + "Write" + ] }, { "description": "An addition.", "type": "string", - "enum": ["Add"] + "enum": [ + "Add" + ] }, { "description": "An operation which has no effect.", "type": "string", - "enum": ["NoOp"] + "enum": [ + "NoOp" + ] }, { "description": "A prune operation.", "type": "string", - "enum": ["Prune"] + "enum": [ + "Prune" + ] } ] }, "TransformV1": { "description": "A transformation performed while executing a deploy.", "type": "object", - "required": ["key", "transform"], + "required": [ + "key", + "transform" + ], "properties": { "key": { "description": "The formatted string of the `Key`.", @@ -3859,12 +4170,16 @@ { "description": "A transform having no effect.", "type": "string", - "enum": ["Identity"] + "enum": [ + "Identity" + ] }, { "description": "Writes the given CLValue to global state.", "type": "object", - "required": ["WriteCLValue"], + "required": [ + "WriteCLValue" + ], "properties": { "WriteCLValue": { "$ref": "#/components/schemas/CLValue" @@ -3875,7 +4190,9 @@ { "description": "Writes the given Account to global state.", "type": "object", - "required": ["WriteAccount"], + "required": [ + "WriteAccount" + ], "properties": { "WriteAccount": { "$ref": "#/components/schemas/AccountHash" @@ -3886,22 +4203,30 @@ { "description": "Writes a smart contract as Wasm to global state.", "type": "string", - "enum": ["WriteContractWasm"] + "enum": [ + "WriteContractWasm" + ] }, { "description": "Writes a smart contract to global state.", "type": "string", - "enum": ["WriteContract"] + "enum": [ + "WriteContract" + ] }, { "description": "Writes a smart contract package to global state.", "type": "string", - "enum": ["WriteContractPackage"] + "enum": [ + "WriteContractPackage" + ] }, { "description": "Writes the given DeployInfo to global state.", "type": "object", - "required": ["WriteDeployInfo"], + "required": [ + "WriteDeployInfo" + ], "properties": { "WriteDeployInfo": { "$ref": "#/components/schemas/DeployInfo" @@ -3912,7 +4237,9 @@ { "description": "Writes the given EraInfo to global state.", "type": "object", - "required": ["WriteEraInfo"], + "required": [ + "WriteEraInfo" + ], "properties": { "WriteEraInfo": { "$ref": "#/components/schemas/EraInfo" @@ -3923,7 +4250,9 @@ { "description": "Writes the given version 1 Transfer to global state.", "type": "object", - "required": ["WriteTransfer"], + "required": [ + "WriteTransfer" + ], "properties": { "WriteTransfer": { "$ref": "#/components/schemas/TransferV1" @@ -3934,7 +4263,9 @@ { "description": "Writes the given Bid to global state.", "type": "object", - "required": ["WriteBid"], + "required": [ + "WriteBid" + ], "properties": { "WriteBid": { "$ref": "#/components/schemas/Bid" @@ -3945,7 +4276,9 @@ { "description": "Writes the given Withdraw to global state.", "type": "object", - "required": ["WriteWithdraw"], + "required": [ + "WriteWithdraw" + ], "properties": { "WriteWithdraw": { "type": "array", @@ -3959,7 +4292,9 @@ { "description": "Adds the given `i32`.", "type": "object", - "required": ["AddInt32"], + "required": [ + "AddInt32" + ], "properties": { "AddInt32": { "type": "integer", @@ -3971,7 +4306,9 @@ { "description": "Adds the given `u64`.", "type": "object", - "required": ["AddUInt64"], + "required": [ + "AddUInt64" + ], "properties": { "AddUInt64": { "type": "integer", @@ -3984,7 +4321,9 @@ { "description": "Adds the given `U128`.", "type": "object", - "required": ["AddUInt128"], + "required": [ + "AddUInt128" + ], "properties": { "AddUInt128": { "$ref": "#/components/schemas/U128" @@ -3995,7 +4334,9 @@ { "description": "Adds the given `U256`.", "type": "object", - "required": ["AddUInt256"], + "required": [ + "AddUInt256" + ], "properties": { "AddUInt256": { "$ref": "#/components/schemas/U256" @@ -4006,7 +4347,9 @@ { "description": "Adds the given `U512`.", "type": "object", - "required": ["AddUInt512"], + "required": [ + "AddUInt512" + ], "properties": { "AddUInt512": { "$ref": "#/components/schemas/U512" @@ -4017,7 +4360,9 @@ { "description": "Adds the given collection of named keys.", "type": "object", - "required": ["AddKeys"], + "required": [ + "AddKeys" + ], "properties": { "AddKeys": { "type": "array", @@ -4031,7 +4376,9 @@ { "description": "A failed transformation, containing an error message.", "type": "object", - "required": ["Failure"], + "required": [ + "Failure" + ], "properties": { "Failure": { "type": "string" @@ -4042,7 +4389,9 @@ { "description": "Writes the given Unbonding to global state.", "type": "object", - "required": ["WriteUnbonding"], + "required": [ + "WriteUnbonding" + ], "properties": { "WriteUnbonding": { "type": "array", @@ -4056,12 +4405,16 @@ { "description": "Writes the addressable entity to global state.", "type": "string", - "enum": ["WriteAddressableEntity"] + "enum": [ + "WriteAddressableEntity" + ] }, { "description": "Removes pathing to keyed value within global state. This is a form of soft delete; the underlying value remains in global state and is reachable from older global state root hashes where it was included in the hash up.", "type": "object", - "required": ["Prune"], + "required": [ + "Prune" + ], "properties": { "Prune": { "$ref": "#/components/schemas/Key" @@ -4072,7 +4425,9 @@ { "description": "Writes the given BidKind to global state.", "type": "object", - "required": ["WriteBidKind"], + "required": [ + "WriteBidKind" + ], "properties": { "WriteBidKind": { "$ref": "#/components/schemas/BidKind" @@ -4085,7 +4440,13 @@ "DeployInfo": { "description": "Information relating to the given Deploy.", "type": "object", - "required": ["deploy_hash", "from", "gas", "source", "transfers"], + "required": [ + "deploy_hash", + "from", + "gas", + "source", + "transfers" + ], "properties": { "deploy_hash": { "description": "Hex-encoded Deploy hash.", @@ -4144,7 +4505,9 @@ "EraInfo": { "description": "Auction metadata. Intended to be recorded at each era.", "type": "object", - "required": ["seigniorage_allocations"], + "required": [ + "seigniorage_allocations" + ], "properties": { "seigniorage_allocations": { "type": "array", @@ -4161,11 +4524,16 @@ { "description": "Info about a seigniorage allocation for a validator", "type": "object", - "required": ["Validator"], + "required": [ + "Validator" + ], "properties": { "Validator": { "type": "object", - "required": ["amount", "validator_public_key"], + "required": [ + "amount", + "validator_public_key" + ], "properties": { "validator_public_key": { "description": "Validator's public key", @@ -4192,7 +4560,9 @@ { "description": "Info about a seigniorage allocation for a delegator", "type": "object", - "required": ["Delegator"], + "required": [ + "Delegator" + ], "properties": { "Delegator": { "type": "object", @@ -4307,7 +4677,10 @@ }, "id": { "description": "User-defined id", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "uint64", "minimum": 0.0 } @@ -4384,7 +4757,9 @@ }, "VestingSchedule": { "type": "object", - "required": ["initial_release_timestamp_millis"], + "required": [ + "initial_release_timestamp_millis" + ], "properties": { "initial_release_timestamp_millis": { "type": "integer", @@ -4392,7 +4767,10 @@ "minimum": 0.0 }, "locked_amounts": { - "type": ["array", "null"], + "type": [ + "array", + "null" + ], "items": { "$ref": "#/components/schemas/U512" }, @@ -4411,7 +4789,10 @@ "PublicKeyAndDelegator": { "description": "A delegator associated with the given validator.", "type": "object", - "required": ["delegator", "delegator_public_key"], + "required": [ + "delegator", + "delegator_public_key" + ], "properties": { "delegator_public_key": { "description": "The public key of the delegator.", @@ -4531,7 +4912,10 @@ "NamedKey": { "description": "A key with a name.", "type": "object", - "required": ["key", "name"], + "required": [ + "key", + "name" + ], "properties": { "name": { "description": "The name of the entry.", @@ -4623,7 +5007,9 @@ { "description": "A unified record indexed on validator data, with an embedded collection of all delegator bids assigned to that validator. The Unified variant is for legacy retrograde support, new instances will not be created going forward.", "type": "object", - "required": ["Unified"], + "required": [ + "Unified" + ], "properties": { "Unified": { "$ref": "#/components/schemas/Bid" @@ -4634,7 +5020,9 @@ { "description": "A bid record containing only validator data.", "type": "object", - "required": ["Validator"], + "required": [ + "Validator" + ], "properties": { "Validator": { "$ref": "#/components/schemas/ValidatorBid" @@ -4645,7 +5033,9 @@ { "description": "A bid record containing only delegator data.", "type": "object", - "required": ["Delegator"], + "required": [ + "Delegator" + ], "properties": { "Delegator": { "$ref": "#/components/schemas/Delegator" @@ -4656,7 +5046,9 @@ { "description": "A bridge record pointing to a new `ValidatorBid` after the public key was changed.", "type": "object", - "required": ["Bridge"], + "required": [ + "Bridge" + ], "properties": { "Bridge": { "$ref": "#/components/schemas/Bridge" @@ -4667,7 +5059,9 @@ { "description": "Credited amount.", "type": "object", - "required": ["Credit"], + "required": [ + "Credit" + ], "properties": { "Credit": { "$ref": "#/components/schemas/ValidatorCredit" @@ -4678,7 +5072,9 @@ { "description": "Reservation", "type": "object", - "required": ["Reservation"], + "required": [ + "Reservation" + ], "properties": { "Reservation": { "$ref": "#/components/schemas/Reservation" @@ -4807,7 +5203,11 @@ "ValidatorCredit": { "description": "Validator credit record.", "type": "object", - "required": ["amount", "era_id", "validator_public_key"], + "required": [ + "amount", + "era_id", + "validator_public_key" + ], "properties": { "validator_public_key": { "description": "Validator public key", @@ -4894,7 +5294,10 @@ }, "error_message": { "description": "If there is no error message, this execution was processed successfully. If there is an error message, this execution failed to fully process for the stated reason.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "limit": { "description": "What was the maximum allowed gas limit for this transaction?.", @@ -4962,7 +5365,9 @@ "PaymentInfo": { "description": "Breakdown of payments made to cover the cost.", "type": "object", - "required": ["source"], + "required": [ + "source" + ], "properties": { "source": { "description": "Source purse used for payment of the transaction.", @@ -4980,7 +5385,9 @@ { "description": "A version 1 transfer.", "type": "object", - "required": ["Version1"], + "required": [ + "Version1" + ], "properties": { "Version1": { "$ref": "#/components/schemas/TransferV1" @@ -4991,7 +5398,9 @@ { "description": "A version 2 transfer.", "type": "object", - "required": ["Version2"], + "required": [ + "Version2" + ], "properties": { "Version2": { "$ref": "#/components/schemas/TransferV2" @@ -5074,7 +5483,10 @@ }, "id": { "description": "User-defined ID.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "uint64", "minimum": 0.0 } @@ -5091,7 +5503,10 @@ "TransformV2": { "description": "A transformation performed while executing a deploy.", "type": "object", - "required": ["key", "kind"], + "required": [ + "key", + "kind" + ], "properties": { "key": { "$ref": "#/components/schemas/Key" @@ -5108,12 +5523,16 @@ { "description": "An identity transformation that does not modify a value in the global state.\n\nCreated as a result of reading from the global state.", "type": "string", - "enum": ["Identity"] + "enum": [ + "Identity" + ] }, { "description": "Writes a new value in the global state.", "type": "object", - "required": ["Write"], + "required": [ + "Write" + ], "properties": { "Write": { "$ref": "#/components/schemas/StoredValue" @@ -5124,7 +5543,9 @@ { "description": "A wrapping addition of an `i32` to an existing numeric value (not necessarily an `i32`) in the global state.", "type": "object", - "required": ["AddInt32"], + "required": [ + "AddInt32" + ], "properties": { "AddInt32": { "type": "integer", @@ -5136,7 +5557,9 @@ { "description": "A wrapping addition of a `u64` to an existing numeric value (not necessarily an `u64`) in the global state.", "type": "object", - "required": ["AddUInt64"], + "required": [ + "AddUInt64" + ], "properties": { "AddUInt64": { "type": "integer", @@ -5149,7 +5572,9 @@ { "description": "A wrapping addition of a `U128` to an existing numeric value (not necessarily an `U128`) in the global state.", "type": "object", - "required": ["AddUInt128"], + "required": [ + "AddUInt128" + ], "properties": { "AddUInt128": { "$ref": "#/components/schemas/U128" @@ -5160,7 +5585,9 @@ { "description": "A wrapping addition of a `U256` to an existing numeric value (not necessarily an `U256`) in the global state.", "type": "object", - "required": ["AddUInt256"], + "required": [ + "AddUInt256" + ], "properties": { "AddUInt256": { "$ref": "#/components/schemas/U256" @@ -5171,7 +5598,9 @@ { "description": "A wrapping addition of a `U512` to an existing numeric value (not necessarily an `U512`) in the global state.", "type": "object", - "required": ["AddUInt512"], + "required": [ + "AddUInt512" + ], "properties": { "AddUInt512": { "$ref": "#/components/schemas/U512" @@ -5182,7 +5611,9 @@ { "description": "Adds new named keys to an existing entry in the global state.\n\nThis transform assumes that the existing stored value is either an Account or a Contract.", "type": "object", - "required": ["AddKeys"], + "required": [ + "AddKeys" + ], "properties": { "AddKeys": { "$ref": "#/components/schemas/NamedKeys" @@ -5193,7 +5624,9 @@ { "description": "Removes the pathing to the global state entry of the specified key. The pruned element remains reachable from previously generated global state root hashes, but will not be included in the next generated global state root hash and subsequent state accumulated from it.", "type": "object", - "required": ["Prune"], + "required": [ + "Prune" + ], "properties": { "Prune": { "$ref": "#/components/schemas/Key" @@ -5204,7 +5637,9 @@ { "description": "Represents the case where applying a transform would cause an error.", "type": "object", - "required": ["Failure"], + "required": [ + "Failure" + ], "properties": { "Failure": { "$ref": "#/components/schemas/TransformError" @@ -5220,7 +5655,9 @@ { "description": "A CLValue.", "type": "object", - "required": ["CLValue"], + "required": [ + "CLValue" + ], "properties": { "CLValue": { "$ref": "#/components/schemas/CLValue" @@ -5231,7 +5668,9 @@ { "description": "An account.", "type": "object", - "required": ["Account"], + "required": [ + "Account" + ], "properties": { "Account": { "$ref": "#/components/schemas/Account" @@ -5242,7 +5681,9 @@ { "description": "Contract wasm.", "type": "object", - "required": ["ContractWasm"], + "required": [ + "ContractWasm" + ], "properties": { "ContractWasm": { "$ref": "#/components/schemas/ContractWasm" @@ -5253,7 +5694,9 @@ { "description": "A contract.", "type": "object", - "required": ["Contract"], + "required": [ + "Contract" + ], "properties": { "Contract": { "$ref": "#/components/schemas/Contract" @@ -5264,7 +5707,9 @@ { "description": "A contract package.", "type": "object", - "required": ["ContractPackage"], + "required": [ + "ContractPackage" + ], "properties": { "ContractPackage": { "$ref": "#/components/schemas/ContractPackage" @@ -5275,7 +5720,9 @@ { "description": "A version 1 (legacy) transfer.", "type": "object", - "required": ["LegacyTransfer"], + "required": [ + "LegacyTransfer" + ], "properties": { "LegacyTransfer": { "$ref": "#/components/schemas/TransferV1" @@ -5286,7 +5733,9 @@ { "description": "Info about a deploy.", "type": "object", - "required": ["DeployInfo"], + "required": [ + "DeployInfo" + ], "properties": { "DeployInfo": { "$ref": "#/components/schemas/DeployInfo" @@ -5297,7 +5746,9 @@ { "description": "Info about an era.", "type": "object", - "required": ["EraInfo"], + "required": [ + "EraInfo" + ], "properties": { "EraInfo": { "$ref": "#/components/schemas/EraInfo" @@ -5308,7 +5759,9 @@ { "description": "Variant that stores [`Bid`].", "type": "object", - "required": ["Bid"], + "required": [ + "Bid" + ], "properties": { "Bid": { "$ref": "#/components/schemas/Bid" @@ -5319,7 +5772,9 @@ { "description": "Variant that stores withdraw information.", "type": "object", - "required": ["Withdraw"], + "required": [ + "Withdraw" + ], "properties": { "Withdraw": { "type": "array", @@ -5333,7 +5788,9 @@ { "description": "Unbonding information.", "type": "object", - "required": ["Unbonding"], + "required": [ + "Unbonding" + ], "properties": { "Unbonding": { "type": "array", @@ -5347,7 +5804,9 @@ { "description": "An `AddressableEntity`.", "type": "object", - "required": ["AddressableEntity"], + "required": [ + "AddressableEntity" + ], "properties": { "AddressableEntity": { "$ref": "#/components/schemas/AddressableEntity" @@ -5358,7 +5817,9 @@ { "description": "Variant that stores [`BidKind`].", "type": "object", - "required": ["BidKind"], + "required": [ + "BidKind" + ], "properties": { "BidKind": { "$ref": "#/components/schemas/BidKind" @@ -5369,7 +5830,9 @@ { "description": "A `Package`.", "type": "object", - "required": ["Package"], + "required": [ + "Package" + ], "properties": { "Package": { "$ref": "#/components/schemas/Package" @@ -5380,7 +5843,9 @@ { "description": "A record of byte code.", "type": "object", - "required": ["ByteCode"], + "required": [ + "ByteCode" + ], "properties": { "ByteCode": { "$ref": "#/components/schemas/ByteCode" @@ -5391,7 +5856,9 @@ { "description": "Variant that stores a message topic.", "type": "object", - "required": ["MessageTopic"], + "required": [ + "MessageTopic" + ], "properties": { "MessageTopic": { "$ref": "#/components/schemas/MessageTopicSummary" @@ -5402,7 +5869,9 @@ { "description": "Variant that stores a message digest.", "type": "object", - "required": ["Message"], + "required": [ + "Message" + ], "properties": { "Message": { "$ref": "#/components/schemas/MessageChecksum" @@ -5413,7 +5882,9 @@ { "description": "A NamedKey record.", "type": "object", - "required": ["NamedKey"], + "required": [ + "NamedKey" + ], "properties": { "NamedKey": { "$ref": "#/components/schemas/NamedKeyValue" @@ -5424,7 +5895,9 @@ { "description": "A reservation record.", "type": "object", - "required": ["Reservation"], + "required": [ + "Reservation" + ], "properties": { "Reservation": { "$ref": "#/components/schemas/ReservationKind" @@ -5435,7 +5908,9 @@ { "description": "An entrypoint record.", "type": "object", - "required": ["EntryPoint"], + "required": [ + "EntryPoint" + ], "properties": { "EntryPoint": { "$ref": "#/components/schemas/EntryPointValue" @@ -5498,7 +5973,10 @@ "AssociatedKey": { "description": "A weighted public key.", "type": "object", - "required": ["account_hash", "weight"], + "required": [ + "account_hash", + "weight" + ], "properties": { "account_hash": { "description": "The account hash of the public key.", @@ -5527,7 +6005,10 @@ "AccountActionThresholds": { "description": "Thresholds that have to be met when executing an action of a certain type.", "type": "object", - "required": ["deployment", "key_management"], + "required": [ + "deployment", + "key_management" + ], "properties": { "deployment": { "description": "Threshold for deploy execution.", @@ -5550,7 +6031,9 @@ "ContractWasm": { "description": "A container for contract's WASM bytes.", "type": "object", - "required": ["bytes"], + "required": [ + "bytes" + ], "properties": { "bytes": { "$ref": "#/components/schemas/Bytes" @@ -5601,7 +6084,10 @@ }, "NamedEntryPoint": { "type": "object", - "required": ["entry_point", "name"], + "required": [ + "entry_point", + "name" + ], "properties": { "name": { "type": "string" @@ -5618,7 +6104,13 @@ "EntryPoint": { "description": "Type signature of a method. Order of arguments matter since can be referenced by index as well as name.", "type": "object", - "required": ["access", "args", "entry_point_type", "name", "ret"], + "required": [ + "access", + "args", + "entry_point_type", + "name", + "ret" + ], "properties": { "name": { "type": "string" @@ -5643,7 +6135,10 @@ "Parameter": { "description": "Parameter to a method", "type": "object", - "required": ["cl_type", "name"], + "required": [ + "cl_type", + "name" + ], "properties": { "name": { "type": "string" @@ -5659,12 +6154,16 @@ { "description": "Anyone can call this method (no access controls).", "type": "string", - "enum": ["Public"] + "enum": [ + "Public" + ] }, { "description": "Only users from the listed groups may call this method. Note: if the list is empty then this method is not callable from outside the contract.", "type": "object", - "required": ["Groups"], + "required": [ + "Groups" + ], "properties": { "Groups": { "type": "array", @@ -5678,7 +6177,9 @@ { "description": "Can't be accessed directly but are kept in the derived wasm bytes.", "type": "string", - "enum": ["Template"] + "enum": [ + "Template" + ] } ] }, @@ -5692,17 +6193,23 @@ { "description": "Runs using the calling entity's context. In v1.x this was used for both \"session\" code run using the originating Account's context, and also for \"StoredSession\" code that ran in the caller's context. While this made systemic sense due to the way the runtime context nesting works, this dual usage was very confusing to most human beings.\n\nIn v2.x the renamed Caller variant is exclusively used for wasm run using the initiating account entity's context. Previously installed 1.x stored session code should continue to work as the binary value matches but we no longer allow such logic to be upgraded, nor do we allow new stored session to be installed.", "type": "string", - "enum": ["Caller"] + "enum": [ + "Caller" + ] }, { "description": "Runs using the called entity's context.", "type": "string", - "enum": ["Called"] + "enum": [ + "Called" + ] }, { "description": "Extract a subset of bytecode and installs it as a new smart contract. Runs using the called entity's context.", "type": "string", - "enum": ["Factory"] + "enum": [ + "Factory" + ] } ] }, @@ -5815,7 +6322,10 @@ }, "NamedUserGroup": { "type": "object", - "required": ["group_name", "group_users"], + "required": [ + "group_name", + "group_users" + ], "properties": { "group_name": { "allOf": [ @@ -5839,12 +6349,16 @@ { "description": "The package is locked and cannot be versioned.", "type": "string", - "enum": ["Locked"] + "enum": [ + "Locked" + ] }, { "description": "The package is unlocked and can be versioned.", "type": "string", - "enum": ["Unlocked"] + "enum": [ + "Unlocked" + ] } ] }, @@ -5894,7 +6408,9 @@ { "description": "Package associated with a native contract implementation.", "type": "object", - "required": ["System"], + "required": [ + "System" + ], "properties": { "System": { "$ref": "#/components/schemas/SystemEntityType" @@ -5905,7 +6421,9 @@ { "description": "Package associated with an Account hash.", "type": "object", - "required": ["Account"], + "required": [ + "Account" + ], "properties": { "Account": { "$ref": "#/components/schemas/AccountHash" @@ -5916,7 +6434,9 @@ { "description": "Packages associated with Wasm stored on chain.", "type": "object", - "required": ["SmartContract"], + "required": [ + "SmartContract" + ], "properties": { "SmartContract": { "$ref": "#/components/schemas/TransactionRuntime" @@ -5932,22 +6452,30 @@ { "description": "Mint contract.", "type": "string", - "enum": ["Mint"] + "enum": [ + "Mint" + ] }, { "description": "Handle Payment contract.", "type": "string", - "enum": ["HandlePayment"] + "enum": [ + "HandlePayment" + ] }, { "description": "Standard Payment contract.", "type": "string", - "enum": ["StandardPayment"] + "enum": [ + "StandardPayment" + ] }, { "description": "Auction contract.", "type": "string", - "enum": ["Auction"] + "enum": [ + "Auction" + ] } ] }, @@ -5966,7 +6494,11 @@ "EntityActionThresholds": { "description": "Thresholds that have to be met when executing an action of a certain type.", "type": "object", - "required": ["deployment", "key_management", "upgrade_management"], + "required": [ + "deployment", + "key_management", + "upgrade_management" + ], "properties": { "deployment": { "description": "Threshold for deploy execution.", @@ -6008,7 +6540,10 @@ }, "MessageTopic": { "type": "object", - "required": ["topic_name", "topic_name_hash"], + "required": [ + "topic_name", + "topic_name_hash" + ], "properties": { "topic_name": { "type": "string" @@ -6029,7 +6564,12 @@ "Package": { "description": "Entity definition, metadata, and security container.", "type": "object", - "required": ["disabled_versions", "groups", "lock_status", "versions"], + "required": [ + "disabled_versions", + "groups", + "lock_status", + "versions" + ], "properties": { "versions": { "description": "All versions (enabled & disabled).", @@ -6073,7 +6613,10 @@ }, "EntityVersionAndHash": { "type": "object", - "required": ["addressable_entity_hash", "entity_version_key"], + "required": [ + "addressable_entity_hash", + "entity_version_key" + ], "properties": { "entity_version_key": { "allOf": [ @@ -6094,7 +6637,10 @@ "EntityVersionKey": { "description": "Major element of `ProtocolVersion` combined with `EntityVersion`.", "type": "object", - "required": ["entity_version", "protocol_version_major"], + "required": [ + "entity_version", + "protocol_version_major" + ], "properties": { "protocol_version_major": { "description": "Major element of `ProtocolVersion` a `ContractVersion` is compatible with.", @@ -6116,19 +6662,26 @@ { "description": "The package is locked and cannot be versioned.", "type": "string", - "enum": ["Locked"] + "enum": [ + "Locked" + ] }, { "description": "The package is unlocked and can be versioned.", "type": "string", - "enum": ["Unlocked"] + "enum": [ + "Unlocked" + ] } ] }, "ByteCode": { "description": "A container for contract's Wasm bytes.", "type": "object", - "required": ["bytes", "kind"], + "required": [ + "bytes", + "kind" + ], "properties": { "kind": { "$ref": "#/components/schemas/ByteCodeKind" @@ -6144,19 +6697,26 @@ { "description": "Empty byte code.", "type": "string", - "enum": ["Empty"] + "enum": [ + "Empty" + ] }, { "description": "Byte code to be executed with the version 1 Casper execution engine.", "type": "string", - "enum": ["V1CasperWasm"] + "enum": [ + "V1CasperWasm" + ] } ] }, "MessageTopicSummary": { "description": "Summary of a message topic that will be stored in global state.", "type": "object", - "required": ["blocktime", "message_count"], + "required": [ + "blocktime", + "message_count" + ], "properties": { "message_count": { "description": "Number of messages in this topic.", @@ -6187,7 +6747,10 @@ "NamedKeyValue": { "description": "A NamedKey value.", "type": "object", - "required": ["name", "named_key"], + "required": [ + "name", + "named_key" + ], "properties": { "named_key": { "description": "The actual `Key` encoded as a CLValue.", @@ -6210,7 +6773,11 @@ "ReservationKind": { "description": "Container for bytes recording location, type and data for a gas reservation", "type": "object", - "required": ["receipt", "reservation_data", "reservation_kind"], + "required": [ + "receipt", + "reservation_data", + "reservation_kind" + ], "properties": { "receipt": { "$ref": "#/components/schemas/Digest" @@ -6231,7 +6798,9 @@ { "description": "Entrypoints to be executed against the V1 Casper VM.", "type": "object", - "required": ["V1CasperVm"], + "required": [ + "V1CasperVm" + ], "properties": { "V1CasperVm": { "$ref": "#/components/schemas/EntryPoint2" @@ -6242,7 +6811,9 @@ { "description": "Entrypoints to be executed against the V2 Casper VM.", "type": "object", - "required": ["V2CasperVm"], + "required": [ + "V2CasperVm" + ], "properties": { "V2CasperVm": { "$ref": "#/components/schemas/EntryPointV2" @@ -6293,24 +6864,33 @@ { "description": "The caller must cover cost", "type": "string", - "enum": ["Caller"] + "enum": [ + "Caller" + ] }, { "description": "Will cover cost to execute self but not cost of any subsequent invoked contracts", "type": "string", - "enum": ["SelfOnly"] + "enum": [ + "SelfOnly" + ] }, { "description": "will cover cost to execute self and the cost of any subsequent invoked contracts", "type": "string", - "enum": ["SelfOnward"] + "enum": [ + "SelfOnward" + ] } ] }, "EntryPointV2": { "description": "The entry point for the V2 Casper VM.", "type": "object", - "required": ["flags", "function_index"], + "required": [ + "flags", + "function_index" + ], "properties": { "function_index": { "description": "The selector.", @@ -6332,7 +6912,9 @@ { "description": "Error while (de)serializing data.", "type": "object", - "required": ["Serialization"], + "required": [ + "Serialization" + ], "properties": { "Serialization": { "$ref": "#/components/schemas/BytesreprError" @@ -6343,7 +6925,9 @@ { "description": "Type mismatch error.", "type": "object", - "required": ["TypeMismatch"], + "required": [ + "TypeMismatch" + ], "properties": { "TypeMismatch": { "$ref": "#/components/schemas/TypeMismatch" @@ -6354,7 +6938,9 @@ { "description": "Type no longer supported.", "type": "string", - "enum": ["Deprecated"] + "enum": [ + "Deprecated" + ] } ] }, @@ -6364,39 +6950,54 @@ { "description": "Early end of stream while deserializing.", "type": "string", - "enum": ["EarlyEndOfStream"] + "enum": [ + "EarlyEndOfStream" + ] }, { "description": "Formatting error while deserializing.", "type": "string", - "enum": ["Formatting"] + "enum": [ + "Formatting" + ] }, { "description": "Not all input bytes were consumed in [`deserialize`].", "type": "string", - "enum": ["LeftOverBytes"] + "enum": [ + "LeftOverBytes" + ] }, { "description": "Out of memory error.", "type": "string", - "enum": ["OutOfMemory"] + "enum": [ + "OutOfMemory" + ] }, { "description": "No serialized representation is available for a value.", "type": "string", - "enum": ["NotRepresentable"] + "enum": [ + "NotRepresentable" + ] }, { "description": "Exceeded a recursion depth limit.", "type": "string", - "enum": ["ExceededRecursionDepth"] + "enum": [ + "ExceededRecursionDepth" + ] } ] }, "TypeMismatch": { "description": "An error struct representing a type mismatch in [`StoredValue`](crate::StoredValue) operations.", "type": "object", - "required": ["expected", "found"], + "required": [ + "expected", + "found" + ], "properties": { "expected": { "description": "The name of the expected type.", @@ -6435,7 +7036,9 @@ { "description": "Identify and retrieve the block with its hash.", "type": "object", - "required": ["Hash"], + "required": [ + "Hash" + ], "properties": { "Hash": { "$ref": "#/components/schemas/BlockHash" @@ -6446,7 +7049,9 @@ { "description": "Identify and retrieve the block with its height.", "type": "object", - "required": ["Height"], + "required": [ + "Height" + ], "properties": { "Height": { "type": "integer", @@ -6464,7 +7069,9 @@ { "description": "The hash of a contract.", "type": "object", - "required": ["ContractHash"], + "required": [ + "ContractHash" + ], "properties": { "ContractHash": { "$ref": "#/components/schemas/ContractHash" @@ -6475,7 +7082,9 @@ { "description": "The public key of an account.", "type": "object", - "required": ["PublicKey"], + "required": [ + "PublicKey" + ], "properties": { "PublicKey": { "$ref": "#/components/schemas/PublicKey" @@ -6486,7 +7095,9 @@ { "description": "The account hash of an account.", "type": "object", - "required": ["AccountHash"], + "required": [ + "AccountHash" + ], "properties": { "AccountHash": { "$ref": "#/components/schemas/AccountHash" @@ -6497,7 +7108,9 @@ { "description": "The address of an addressable entity.", "type": "object", - "required": ["EntityAddr"], + "required": [ + "EntityAddr" + ], "properties": { "EntityAddr": { "$ref": "#/components/schemas/EntityAddr" @@ -6530,11 +7143,17 @@ { "description": "An addressable entity.", "type": "object", - "required": ["AddressableEntity"], + "required": [ + "AddressableEntity" + ], "properties": { "AddressableEntity": { "type": "object", - "required": ["entity", "entry_points", "named_keys"], + "required": [ + "entity", + "entry_points", + "named_keys" + ], "properties": { "entity": { "description": "The addressable entity.", @@ -6578,7 +7197,9 @@ { "description": "An account.", "type": "object", - "required": ["Account"], + "required": [ + "Account" + ], "properties": { "Account": { "$ref": "#/components/schemas/Account" @@ -6589,11 +7210,15 @@ { "description": "A contract.", "type": "object", - "required": ["Contract"], + "required": [ + "Contract" + ], "properties": { "Contract": { "type": "object", - "required": ["contract"], + "required": [ + "contract" + ], "properties": { "contract": { "description": "The contract.", @@ -6624,7 +7249,10 @@ "ByteCodeWithProof": { "description": "Byte code of an entity with a proof.", "type": "object", - "required": ["code", "merkle_proof"], + "required": [ + "code", + "merkle_proof" + ], "properties": { "code": { "$ref": "#/components/schemas/ByteCode" @@ -6637,7 +7265,10 @@ "ContractWasmWithProof": { "description": "Wasm code of a contract with a proof.", "type": "object", - "required": ["merkle_proof", "wasm"], + "required": [ + "merkle_proof", + "wasm" + ], "properties": { "wasm": { "$ref": "#/components/schemas/ContractWasm" @@ -6653,7 +7284,9 @@ { "description": "The address of a package.", "type": "object", - "required": ["PackageAddr"], + "required": [ + "PackageAddr" + ], "properties": { "PackageAddr": { "$ref": "#/components/schemas/PackageHash" @@ -6664,7 +7297,9 @@ { "description": "The hash of a contract package.", "type": "object", - "required": ["ContractPackageHash"], + "required": [ + "ContractPackageHash" + ], "properties": { "ContractPackageHash": { "$ref": "#/components/schemas/ContractPackageHash" @@ -6680,7 +7315,9 @@ { "description": "A package.", "type": "object", - "required": ["Package"], + "required": [ + "Package" + ], "properties": { "Package": { "$ref": "#/components/schemas/Package" @@ -6691,7 +7328,9 @@ { "description": "A contract package.", "type": "object", - "required": ["ContractPackage"], + "required": [ + "ContractPackage" + ], "properties": { "ContractPackage": { "$ref": "#/components/schemas/ContractPackage" @@ -6707,11 +7346,17 @@ { "description": "Lookup a dictionary item via an Account's named keys.", "type": "object", - "required": ["AccountNamedKey"], + "required": [ + "AccountNamedKey" + ], "properties": { "AccountNamedKey": { "type": "object", - "required": ["dictionary_item_key", "dictionary_name", "key"], + "required": [ + "dictionary_item_key", + "dictionary_name", + "key" + ], "properties": { "key": { "description": "The account key as a formatted string whose named keys contains dictionary_name.", @@ -6733,11 +7378,17 @@ { "description": "Lookup a dictionary item via a Contract's named keys.", "type": "object", - "required": ["ContractNamedKey"], + "required": [ + "ContractNamedKey" + ], "properties": { "ContractNamedKey": { "type": "object", - "required": ["dictionary_item_key", "dictionary_name", "key"], + "required": [ + "dictionary_item_key", + "dictionary_name", + "key" + ], "properties": { "key": { "description": "The contract key as a formatted string whose named keys contains dictionary_name.", @@ -6759,11 +7410,17 @@ { "description": "Lookup a dictionary item via an entities named keys.", "type": "object", - "required": ["EntityNamedKey"], + "required": [ + "EntityNamedKey" + ], "properties": { "EntityNamedKey": { "type": "object", - "required": ["dictionary_item_key", "dictionary_name", "key"], + "required": [ + "dictionary_item_key", + "dictionary_name", + "key" + ], "properties": { "key": { "description": "The entity address formatted as a string.", @@ -6785,11 +7442,16 @@ { "description": "Lookup a dictionary item via its seed URef.", "type": "object", - "required": ["URef"], + "required": [ + "URef" + ], "properties": { "URef": { "type": "object", - "required": ["dictionary_item_key", "seed_uref"], + "required": [ + "dictionary_item_key", + "seed_uref" + ], "properties": { "seed_uref": { "description": "The dictionary's seed URef.", @@ -6807,7 +7469,9 @@ { "description": "Lookup a dictionary item via its unique key.", "type": "object", - "required": ["Dictionary"], + "required": [ + "Dictionary" + ], "properties": { "Dictionary": { "type": "string" @@ -6823,7 +7487,9 @@ { "description": "Query using a block hash.", "type": "object", - "required": ["BlockHash"], + "required": [ + "BlockHash" + ], "properties": { "BlockHash": { "$ref": "#/components/schemas/BlockHash" @@ -6834,7 +7500,9 @@ { "description": "Query using a block height.", "type": "object", - "required": ["BlockHeight"], + "required": [ + "BlockHeight" + ], "properties": { "BlockHeight": { "type": "integer", @@ -6847,7 +7515,9 @@ { "description": "Query using the state root hash.", "type": "object", - "required": ["StateRootHash"], + "required": [ + "StateRootHash" + ], "properties": { "StateRootHash": { "$ref": "#/components/schemas/Digest" @@ -6863,7 +7533,9 @@ { "description": "The legacy, initial version of the header portion of a block.", "type": "object", - "required": ["Version1"], + "required": [ + "Version1" + ], "properties": { "Version1": { "$ref": "#/components/schemas/BlockHeaderV1" @@ -6874,7 +7546,9 @@ { "description": "The version 2 of the header portion of a block.", "type": "object", - "required": ["Version2"], + "required": [ + "Version2" + ], "properties": { "Version2": { "$ref": "#/components/schemas/BlockHeaderV2" @@ -6981,7 +7655,10 @@ "EraEndV1": { "description": "Information related to the end of an era, and validator weights for the following era.", "type": "object", - "required": ["era_report", "next_era_validator_weights"], + "required": [ + "era_report", + "next_era_validator_weights" + ], "properties": { "era_report": { "description": "Equivocation, reward and validator inactivity information.", @@ -7004,7 +7681,11 @@ "EraReport_for_PublicKey": { "description": "Equivocation, reward and validator inactivity information.", "type": "object", - "required": ["equivocators", "inactive_validators", "rewards"], + "required": [ + "equivocators", + "inactive_validators", + "rewards" + ], "properties": { "equivocators": { "description": "The set of equivocators.", @@ -7039,7 +7720,10 @@ "EraReward": { "description": "A validator's public key paired with a measure of the value of its contribution to consensus, as a fraction of the configured maximum block reward.", "type": "object", - "required": ["amount", "validator"], + "required": [ + "amount", + "validator" + ], "properties": { "validator": { "description": "The validator's public key.", @@ -7066,7 +7750,10 @@ "ValidatorWeight": { "description": "A validator's public key paired with its weight, i.e. the total number of motes staked by it and its delegators.", "type": "object", - "required": ["validator", "weight"], + "required": [ + "validator", + "weight" + ], "properties": { "validator": { "description": "The validator's public key.", @@ -7263,7 +7950,9 @@ { "description": "The main purse of the account identified by this public key.", "type": "object", - "required": ["main_purse_under_public_key"], + "required": [ + "main_purse_under_public_key" + ], "properties": { "main_purse_under_public_key": { "$ref": "#/components/schemas/PublicKey" @@ -7274,7 +7963,9 @@ { "description": "The main purse of the account identified by this account hash.", "type": "object", - "required": ["main_purse_under_account_hash"], + "required": [ + "main_purse_under_account_hash" + ], "properties": { "main_purse_under_account_hash": { "$ref": "#/components/schemas/AccountHash" @@ -7285,7 +7976,9 @@ { "description": "The main purse of the account identified by this entity address.", "type": "object", - "required": ["main_purse_under_entity_addr"], + "required": [ + "main_purse_under_entity_addr" + ], "properties": { "main_purse_under_entity_addr": { "$ref": "#/components/schemas/EntityAddr" @@ -7296,7 +7989,9 @@ { "description": "The purse identified by this URef.", "type": "object", - "required": ["purse_uref"], + "required": [ + "purse_uref" + ], "properties": { "purse_uref": { "$ref": "#/components/schemas/URef" @@ -7308,7 +8003,11 @@ }, "BalanceHoldWithProof": { "type": "object", - "required": ["amount", "proof", "time"], + "required": [ + "amount", + "proof", + "time" + ], "properties": { "time": { "description": "The block time at which the hold was created.", @@ -7342,7 +8041,10 @@ "PeerEntry": { "description": "Node peer entry.", "type": "object", - "required": ["address", "node_id"], + "required": [ + "address", + "node_id" + ], "properties": { "node_id": { "description": "Node id.", @@ -7393,7 +8095,10 @@ "NextUpgrade": { "description": "Information about the next protocol upgrade.", "type": "object", - "required": ["activation_point", "protocol_version"], + "required": [ + "activation_point", + "protocol_version" + ], "properties": { "activation_point": { "$ref": "#/components/schemas/ActivationPoint" @@ -7427,7 +8132,10 @@ "AvailableBlockRange": { "description": "An unbroken, inclusive range of blocks.", "type": "object", - "required": ["high", "low"], + "required": [ + "high", + "low" + ], "properties": { "low": { "description": "The inclusive lower bound of the range.", @@ -7476,7 +8184,10 @@ "BlockSyncStatus": { "description": "The status of syncing an individual block.", "type": "object", - "required": ["acquisition_state", "block_hash"], + "required": [ + "acquisition_state", + "block_hash" + ], "properties": { "block_hash": { "description": "The block hash.", @@ -7488,7 +8199,10 @@ }, "block_height": { "description": "The height of the block, if known.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "uint64", "minimum": 0.0 }, @@ -7504,7 +8218,9 @@ "oneOf": [ { "type": "object", - "required": ["Era"], + "required": [ + "Era" + ], "properties": { "Era": { "$ref": "#/components/schemas/EraId" @@ -7514,7 +8230,9 @@ }, { "type": "object", - "required": ["Block"], + "required": [ + "Block" + ], "properties": { "Block": { "$ref": "#/components/schemas/BlockIdentifier" @@ -7527,7 +8245,10 @@ "JsonValidatorChanges": { "description": "The changes in a validator's status.", "type": "object", - "required": ["public_key", "status_changes"], + "required": [ + "public_key", + "status_changes" + ], "properties": { "public_key": { "description": "The public key of the validator.", @@ -7550,7 +8271,10 @@ "JsonValidatorStatusChange": { "description": "A single change to a validator's status in the given era.", "type": "object", - "required": ["era_id", "validator_change"], + "required": [ + "era_id", + "validator_change" + ], "properties": { "era_id": { "description": "The era in which the change occurred.", @@ -7577,34 +8301,46 @@ { "description": "The validator got newly added to the validator set.", "type": "string", - "enum": ["Added"] + "enum": [ + "Added" + ] }, { "description": "The validator was removed from the validator set.", "type": "string", - "enum": ["Removed"] + "enum": [ + "Removed" + ] }, { "description": "The validator was banned from this era.", "type": "string", - "enum": ["Banned"] + "enum": [ + "Banned" + ] }, { "description": "The validator was excluded from proposing new blocks in this era.", "type": "string", - "enum": ["CannotPropose"] + "enum": [ + "CannotPropose" + ] }, { "description": "We saw the validator misbehave in this era.", "type": "string", - "enum": ["SeenAsFaulty"] + "enum": [ + "SeenAsFaulty" + ] } ] }, "ChainspecRawBytes": { "description": "The raw bytes of the chainspec.toml, genesis accounts.toml, and global_state.toml files.", "type": "object", - "required": ["chainspec_bytes"], + "required": [ + "chainspec_bytes" + ], "properties": { "chainspec_bytes": { "description": "Raw bytes of the current chainspec.toml file.", @@ -7641,7 +8377,10 @@ "JsonBlockWithSignatures": { "description": "A JSON-friendly representation of a block and the signatures for that block.", "type": "object", - "required": ["block", "proofs"], + "required": [ + "block", + "proofs" + ], "properties": { "block": { "description": "The block.", @@ -7668,7 +8407,9 @@ { "description": "The legacy, initial version of the block.", "type": "object", - "required": ["Version1"], + "required": [ + "Version1" + ], "properties": { "Version1": { "$ref": "#/components/schemas/BlockV1" @@ -7679,7 +8420,9 @@ { "description": "The version 2 of the block.", "type": "object", - "required": ["Version2"], + "required": [ + "Version2" + ], "properties": { "Version2": { "$ref": "#/components/schemas/BlockV2" @@ -7692,7 +8435,11 @@ "BlockV1": { "description": "A block after execution, with the resulting global state root hash. This is the core component of the Casper linear blockchain. Version 1.", "type": "object", - "required": ["body", "hash", "header"], + "required": [ + "body", + "hash", + "header" + ], "properties": { "hash": { "description": "The block hash identifying this block.", @@ -7723,7 +8470,11 @@ "BlockBodyV1": { "description": "The body portion of a block. Version 1.", "type": "object", - "required": ["deploy_hashes", "proposer", "transfer_hashes"], + "required": [ + "deploy_hashes", + "proposer", + "transfer_hashes" + ], "properties": { "proposer": { "description": "The public key of the validator which proposed the block.", @@ -7752,7 +8503,11 @@ "BlockV2": { "description": "A block after execution, with the resulting global state root hash. This is the core component of the Casper linear blockchain. Version 2.", "type": "object", - "required": ["body", "hash", "header"], + "required": [ + "body", + "hash", + "header" + ], "properties": { "hash": { "description": "The block hash identifying this block.", @@ -7783,7 +8538,10 @@ "BlockBodyV2": { "description": "The body portion of a block. Version 2.", "type": "object", - "required": ["rewarded_signatures", "transactions"], + "required": [ + "rewarded_signatures", + "transactions" + ], "properties": { "transactions": { "description": "Map of transactions mapping categories to a list of transaction hashes.", @@ -7830,7 +8588,10 @@ "BlockProof": { "description": "A validator's public key paired with a corresponding signature of a given block hash.", "type": "object", - "required": ["public_key", "signature"], + "required": [ + "public_key", + "signature" + ], "properties": { "public_key": { "description": "The validator's public key.", @@ -7945,7 +8706,10 @@ "JsonEraValidators": { "description": "The validators for the given era.", "type": "object", - "required": ["era_id", "validator_weights"], + "required": [ + "era_id", + "validator_weights" + ], "properties": { "era_id": { "$ref": "#/components/schemas/EraId" @@ -7962,7 +8726,10 @@ "JsonValidatorWeights": { "description": "A validator's weight.", "type": "object", - "required": ["public_key", "weight"], + "required": [ + "public_key", + "weight" + ], "properties": { "public_key": { "$ref": "#/components/schemas/PublicKey" @@ -7982,7 +8749,10 @@ "PublicKeyAndBid": { "description": "A bid associated with the given public key.", "type": "object", - "required": ["bid", "public_key"], + "required": [ + "bid", + "public_key" + ], "properties": { "public_key": { "description": "The public key of the bidder.", @@ -8004,4 +8774,4 @@ } } } -} +} \ No newline at end of file diff --git a/resources/test/speculative_rpc_schema.json b/resources/test/speculative_rpc_schema.json index 867cd792..35118280 100644 --- a/resources/test/speculative_rpc_schema.json +++ b/resources/test/speculative_rpc_schema.json @@ -174,12 +174,13 @@ "name": "transaction", "value": { "Version1": { - "hash": "f5582cb81a5abda63ebaa4edb3b05210ecbd63ffb8dd17bfbeb3b867f4014468", + "serialization_version": 1, + "hash": "df4f6e95afd24c3bdac68862cfd888fea65912f0f3e3de9c42b24cee79b7a581", "header": { "chain_name": "casper-example", "timestamp": "2020-11-17T00:39:24.072Z", "ttl": "1h", - "body_hash": "aa24833ffbf31d62c8c8c4265349e7c09cd71952fcbce6f7b12daf5e340bf2cc", + "body_hash": "7bf1a4f736a9cbb2b692b74522d981213c3a5463d0095ded40d1454cf1b779e1", "pricing_mode": { "Fixed": { "gas_price_tolerance": 5 @@ -236,7 +237,7 @@ "approvals": [ { "signer": "01d9bf2148748a85c89da5aad8ee0b0fc2d105fd39d41a4c796536354f0ae2900c", - "signature": "0137d3f468d8f8a6e63f4110d79be29b8c8428e9cd858a92049660e7851ae16a299640d1fc1c930ab6cb424f1a6eec0b194df74bede14f4af1b5133106f1280d0b" + "signature": "015b407723d54bdfd376d43776d9b92ea465d7ec2e0d41e28b5f646fc17400193bc4e075cab4e8943de09935e3aa96d0bbe456382c2274689b6847a35a94d07309" } ] } @@ -3735,9 +3736,15 @@ "approvals", "body", "hash", - "header" + "header", + "serialization_version" ], "properties": { + "serialization_version": { + "type": "integer", + "format": "uint8", + "minimum": 0.0 + }, "hash": { "$ref": "#/components/schemas/TransactionV1Hash" }, diff --git a/types/src/legacy_sse_data/fixtures.rs b/types/src/legacy_sse_data/fixtures.rs index b51c4d8f..c444c7b6 100644 --- a/types/src/legacy_sse_data/fixtures.rs +++ b/types/src/legacy_sse_data/fixtures.rs @@ -366,6 +366,7 @@ const RAW_TRANSACTION_ACCEPTED: &str = r#" { "TransactionAccepted": { "Version1": { + "serialization_version": 1, "hash": "2084a40f58874fb2997e029e61ec55e3d5a6cd5f6de77a1d42dcaf21aeddc760", "header": { "chain_name":"⸻⋉◬⸗ⶨ⼄≙⡫⨁ⶃℍ⊨⇏ⴲⲋ⪝⣬ⴂ⨨⪯⿉⺙⚚⻰⒯ⶖ⟽⬪❴⴯╽♥⅏⏵❲⃽ⶁ⾠⸗◩⋑Ⅹ♼⺓⊻⼠Ⓩ∇Ⅺ⸔◘⠝◓⚾◯⦁★⢹␄⍆⨿⵮⭭⮛⸹⃻⹶⎶⟆⛎⤑₇⩐╨⋸⠸₈⥡ⷔ⹪⤛⭺⵫Ⲗ⃁⪏⫵⚎⁘⦳☉␛Ⲹ⥝⇡Ⰰ⫂⁎⍆⼸",