Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions ethexe/rpc/client/src/apis/injected/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (C) Gear Technologies Inc.
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0

use crate::types::PromiseSubscriptionFilter;
use ethexe_common::{
HashOf,
injected::{
Expand Down Expand Up @@ -30,6 +31,19 @@ pub trait Injected {
transaction: SignedInjectedTransaction,
) -> jsonrpsee::core::SubscriptionResult;

/// Subscribes to a stream of all newly computed promises. Promises are
/// delivered as they are computed; there is no replay of historical
/// promises. An optional filter narrows the stream per subscriber.
#[subscription(
name = "subscribePromises",
unsubscribe = "unsubscribePromises",
item = crate::types::PromiseEnvelope
)]
async fn subscribe_promises(
&self,
filter: Option<PromiseSubscriptionFilter>,
) -> jsonrpsee::core::SubscriptionResult;

#[method(name = "getTransactionReceipt")]
async fn get_transaction_receipt(
&self,
Expand Down
3 changes: 3 additions & 0 deletions ethexe/rpc/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@ gprimitives = { workspace = true, features = ["serde", "ethexe"] }
serde = { workspace = true, features = ["std"] }
gear-workspace-hack.workspace = true

[dev-dependencies]
serde_json.workspace = true

[lints]
workspace = true
Loading
Loading