diff --git a/lib/src/json_rpc/methods.rs b/lib/src/json_rpc/methods.rs index 7b01479b3c..dd21f69c84 100644 --- a/lib/src/json_rpc/methods.rs +++ b/lib/src/json_rpc/methods.rs @@ -702,37 +702,37 @@ pub enum FollowEvent<'a> { #[serde(rename = "prunedBlockHashes")] pruned_blocks_hashes: Vec, }, - #[serde(rename = "operation-body-done")] + #[serde(rename = "operationBodyDone")] OperationBodyDone { #[serde(rename = "operationId")] operation_id: Cow<'a, str>, value: Vec, }, - #[serde(rename = "operation-call-done")] + #[serde(rename = "operationCallDone")] OperationCallDone { #[serde(rename = "operationId")] operation_id: Cow<'a, str>, output: HexString, }, - #[serde(rename = "operation-inaccessible")] + #[serde(rename = "operationInaccessible")] OperationInaccessible { #[serde(rename = "operationId")] operation_id: Cow<'a, str>, }, - #[serde(rename = "operation-storage-items")] + #[serde(rename = "operationStorageItems")] OperationStorageItems { #[serde(rename = "operationId")] operation_id: Cow<'a, str>, items: Vec, }, - #[serde(rename = "operation-storage-done")] + #[serde(rename = "operationStorageDone")] OperationStorageDone { #[serde(rename = "operationId")] operation_id: Cow<'a, str>, }, - #[serde(rename = "operation-waiting-for-continue")] + #[serde(rename = "operationWaitingForContinue")] OperationWaitingForContinue, - #[serde(rename = "operation-error")] + #[serde(rename = "operationError")] OperationError { #[serde(rename = "operationId")] operation_id: Cow<'a, str>, @@ -783,7 +783,7 @@ pub struct ChainHeadStorageResponseItem { #[serde(skip_serializing_if = "Option::is_none")] pub hash: Option, #[serde( - rename = "closest-descendant-merkle-value", + rename = "closestDescendantMerkleValue", skip_serializing_if = "Option::is_none" )] pub closest_descendant_merkle_value: Option, @@ -795,11 +795,11 @@ pub enum ChainHeadStorageType { Value, #[serde(rename = "hash")] Hash, - #[serde(rename = "closest-descendant-merkle-value")] + #[serde(rename = "closestDescendantMerkleValue")] ClosestDescendantMerkleValue, - #[serde(rename = "descendants-values")] + #[serde(rename = "descendantsValues")] DescendantsValues, - #[serde(rename = "descendants-hashes")] + #[serde(rename = "descendantsHashes")] DescendantsHashes, } diff --git a/wasm-node/CHANGELOG.md b/wasm-node/CHANGELOG.md index 92ce2fbcc2..ea6bafdf74 100644 --- a/wasm-node/CHANGELOG.md +++ b/wasm-node/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Changed + +- The `operation-body-done`, `operation-call-done`, `operation-storage-done`, `operation-storage-items`, `operation-waiting-for-continue`, `operation-inaccessible`, and `operation-error` events, and the `closest-descendant-merkle-value`, `descendants-values`, and `descendants-hashes` item types of the new JSON-RPC API have been renamed and are now camelCased (`operationBodyDone`, `operationStorageItems`, `descendantsValues`, etc.), in accordance with the latest changes in the JSON-RPC API specification. ([#973](https://github.com/smol-dot/smoldot/pull/973)) + ## 1.0.14 - 2023-07-26 ### Changed diff --git a/wasm-node/javascript/test/chainHead.mjs b/wasm-node/javascript/test/chainHead.mjs index 6da332314a..fc698bdb79 100644 --- a/wasm-node/javascript/test/chainHead.mjs +++ b/wasm-node/javascript/test/chainHead.mjs @@ -99,7 +99,7 @@ test('chainHead_unstable_body works', async t => { .then(async (chain) => { while (true) { const parsed = JSON.parse(await chain.nextJsonRpcResponse()); - if (parsed.method == "chainHead_unstable_followEvent" && parsed.params.result.event == "operation-inaccessible") { + if (parsed.method == "chainHead_unstable_followEvent" && parsed.params.result.event == "operationInaccessible") { t.pass(); break; }