Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NodeJs: add missing utxo routes #2112

Merged
6 changes: 2 additions & 4 deletions bindings/core/src/method/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ pub enum ClientMethod {
},
/// Get a node candidate from the healthy node pool.
GetNode,
/// Gets the network related information such as network_id.
GetNetworkInfo,
/// Gets the network id of the node we're connecting to.
GetNetworkId,
/// Returns the bech32_hrp
Expand Down Expand Up @@ -162,7 +160,7 @@ pub enum ClientMethod {
},
/// Returns all the available Mana rewards of an account or delegation output in the returned range of epochs.
#[serde(rename_all = "camelCase")]
GetRewards {
GetOutputManaRewards {
/// Output ID of an account or delegation output.
output_id: OutputId,
/// A client can specify a slot index explicitly, which should be equal to the slot it uses as the commitment
Expand Down Expand Up @@ -205,7 +203,7 @@ pub enum ClientMethod {
/// Post block (raw)
#[serde(rename_all = "camelCase")]
PostBlockRaw {
/// Block
/// Block as raw bytes
block_bytes: Vec<u8>,
},
/// Get block
Expand Down
3 changes: 1 addition & 2 deletions bindings/core/src/method_handler/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ pub(crate) async fn call_client_method_internal(client: &Client, method: ClientM
Response::Ok
}
ClientMethod::GetNode => Response::Node(client.get_node().await?),
ClientMethod::GetNetworkInfo => Response::NetworkInfo(client.get_network_info().await?),
ClientMethod::GetNetworkId => Response::NetworkId(client.get_network_id().await?.to_string()),
ClientMethod::GetBech32Hrp => Response::Bech32Hrp(client.get_bech32_hrp().await?),
ClientMethod::GetProtocolParameters => Response::ProtocolParameters(client.get_protocol_parameters().await?),
Expand All @@ -186,7 +185,7 @@ pub(crate) async fn call_client_method_internal(client: &Client, method: ClientM
ClientMethod::GetAccountCongestion { account_id, work_score } => {
Response::Congestion(client.get_account_congestion(&account_id, work_score).await?)
}
ClientMethod::GetRewards { output_id, slot_index } => {
ClientMethod::GetOutputManaRewards { output_id, slot_index } => {
Response::ManaRewards(client.get_output_mana_rewards(&output_id, slot_index).await?)
}
ClientMethod::GetValidators { page_size, cursor } => {
Expand Down
4 changes: 0 additions & 4 deletions bindings/core/src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use iota_sdk::{
api::{PreparedTransactionData, SignedTransactionDataDto},
node_api::core::routes::NodeInfoResponse,
node_manager::node::Node,
NetworkInfo,
},
types::{
api::{
Expand Down Expand Up @@ -71,9 +70,6 @@ pub enum Response {
/// - [`GetNode`](crate::method::ClientMethod::GetNode)
Node(Node),
/// Response for:
/// - [`GetNetworkInfo`](crate::method::ClientMethod::GetNetworkInfo)
NetworkInfo(NetworkInfo),
/// Response for:
/// - [`GetNetworkId`](crate::method::ClientMethod::GetNetworkId)
NetworkId(String),
/// Response for:
Expand Down
Loading
Loading