Skip to content

Commit

Permalink
Feature/add get transfers sdk (#4653)
Browse files Browse the repository at this point in the history
* Add get slots transfers in sdk

* add debug prints

* Fix prints

* Remove debug prints
  • Loading branch information
AurelienFT authored Feb 26, 2024
1 parent b75577f commit d1b371c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion massa-sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ use massa_api_exports::{
block::{BlockInfo, BlockSummary},
datastore::{DatastoreEntryInput, DatastoreEntryOutput},
endorsement::EndorsementInfo,
execution::{ExecuteReadOnlyResponse, ReadOnlyBytecodeExecution, ReadOnlyCall},
execution::{ExecuteReadOnlyResponse, ReadOnlyBytecodeExecution, ReadOnlyCall, Transfer},
node::NodeStatus,
operation::{OperationInfo, OperationInput},
TimeInterval,
};
use massa_models::secure_share::SecureShare;
use massa_models::slot::Slot;
use massa_models::{
address::Address,
block::FilledBlock,
Expand Down Expand Up @@ -320,6 +321,14 @@ impl RpcClient {
.map_err(|e| to_error_obj(e.to_string()))
}

/// Returns the transfers for slots
pub async fn get_slots_transfers(&self, slots: Vec<Slot>) -> RpcResult<Vec<Vec<Transfer>>> {
self.http_client
.request("get_slots_transfers", rpc_params![slots])
.await
.map_err(|e| to_error_obj(e.to_string()))
}

pub(crate) async fn _get_cliques(&self) -> RpcResult<Vec<Clique>> {
self.http_client
.request("get_cliques", rpc_params![])
Expand Down

0 comments on commit d1b371c

Please sign in to comment.