Skip to content

Commit

Permalink
rpc-v2: Change method name for provided events (#1593)
Browse files Browse the repository at this point in the history
This PR changes the method name of the subscription that provides
JSON-RPC notifications (ie subscription events).
This brings the raw JSON response in sync with the rpc-spec-v2 format.

Changes:
- `chainHead_unstable_follow` to `chainHead_unstable_followEvent`
[spec/chainHead](https://github.com/paritytech/json-rpc-interface-spec/blob/main/src/api/chainHead_unstable_follow.md#notifications-format)
- `transaction_unstable_submitAndWatch` to
`transaction_unstable_watchEvent`
[spec/tx](https://github.com/paritytech/json-rpc-interface-spec/blob/main/src/api/transaction_unstable_submitAndWatch.md#notifications-format)

@paritytech/subxt-team

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
  • Loading branch information
lexnv authored Sep 15, 2023
1 parent 841a33e commit 76c68ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion substrate/client/rpc-spec-v2/src/chain_head/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub trait ChainHeadApi<Hash> {
///
/// This method is unstable and subject to change in the future.
#[subscription(
name = "chainHead_unstable_follow",
name = "chainHead_unstable_follow" => "chainHead_unstable_followEvent",
unsubscribe = "chainHead_unstable_unfollow",
item = FollowEvent<Hash>,
)]
Expand Down
2 changes: 1 addition & 1 deletion substrate/client/rpc-spec-v2/src/transaction/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub trait TransactionApi<Hash: Clone> {
/// See [`TransactionEvent`](crate::transaction::event::TransactionEvent) for details on
/// transaction life cycle.
#[subscription(
name = "transaction_unstable_submitAndWatch" => "transaction_unstable_submitExtrinsic",
name = "transaction_unstable_submitAndWatch" => "transaction_unstable_watchEvent",
unsubscribe = "transaction_unstable_unwatch",
item = TransactionEvent<Hash>,
)]
Expand Down

0 comments on commit 76c68ee

Please sign in to comment.