Skip to content

Commit

Permalink
feat(client): expose get_transactions for Client trait
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdeafbeef committed Mar 27, 2024
1 parent fb26aa7 commit 3b8b5d0
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "everscale-rpc-client"
edition = "2021"
version = "0.6.0"
version = "0.6.1"

[dependencies]
anyhow = "1"
Expand Down
10 changes: 10 additions & 0 deletions client/src/jrpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,16 @@ where
)),
}
}

async fn get_transactions(
&self,
limit: u8,
account: &MsgAddressInt,
last_transaction_lt: Option<u64>,
) -> Result<Vec<Transaction>> {
self.get_transactions(limit, account, last_transaction_lt)
.await
}
}

impl<T: Connection + Ord + Clone + 'static> JrpcClientImpl<T> {
Expand Down
7 changes: 7 additions & 0 deletions client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,13 @@ where
.map(Some)?;
Ok(result)
}

async fn get_transactions(
&self,
limit: u8,
account: &MsgAddressInt,
last_transaction_lt: Option<u64>,
) -> Result<Vec<Transaction>>;
}

#[async_trait::async_trait]
Expand Down
10 changes: 10 additions & 0 deletions client/src/proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,16 @@ where
_ => Err(ClientError::InvalidResponse.into()),
}
}

async fn get_transactions(
&self,
limit: u8,
account: &MsgAddressInt,
last_transaction_lt: Option<u64>,
) -> Result<Vec<Transaction>> {
self.get_transactions(limit, account, last_transaction_lt)
.await
}
}

impl<T: Connection + Ord + Clone + 'static> ProtoClientImpl<T> {
Expand Down

0 comments on commit 3b8b5d0

Please sign in to comment.