diff --git a/rpc/types/src/bin.rs b/rpc/types/src/bin.rs index b567ea1..6bf2ec0 100644 --- a/rpc/types/src/bin.rs +++ b/rpc/types/src/bin.rs @@ -13,8 +13,8 @@ use crate::{ macros::define_request_and_response, misc::{ AuxPow, BlockCompleteEntry, BlockHeader, BlockOutputIndices, ChainInfo, ConnectionInfo, - GetBan, HardforkEntry, HistogramEntry, OutputDistributionData, Peer, PoolTxInfo, SetBan, - Span, Status, TxBacklogEntry, + GetBan, GetOutputsOut, HardforkEntry, HistogramEntry, OutKey, OutputDistributionData, Peer, + PoolTxInfo, SetBan, Span, Status, TxBacklogEntry, }, }; @@ -86,13 +86,28 @@ define_request_and_response! { core_rpc_server_commands_defs.h => 487..=510, GetOutputIndexes, Request { - txid: Vec<[u8; 32]>, + txid: [u8; 32], }, AccessResponseBase { o_indexes: Vec, } } +define_request_and_response! { + get_outsbin, + cc73fe71162d564ffda8e549b79a350bca53c454 => + core_rpc_server_commands_defs.h => 512..=565, + GetOuts, + Request { + outputs: Vec, + #[cfg_attr(feature = "serde", serde(default = "default_bool"))] + get_txid: bool = default_bool(), + }, + AccessResponseBase { + outs: Vec, + } +} + //---------------------------------------------------------------------------------------------------- Tests #[cfg(test)] mod test { diff --git a/rpc/types/src/misc.rs b/rpc/types/src/misc.rs index 622dc23..a9cdfd5 100644 --- a/rpc/types/src/misc.rs +++ b/rpc/types/src/misc.rs @@ -397,6 +397,39 @@ define_struct_and_impl_epee! { } } +define_struct_and_impl_epee! { + #[doc = monero_definition_link!( + cc73fe71162d564ffda8e549b79a350bca53c454, + "rpc/core_rpc_server_commands_defs.h", + 512..=521 + )] + /// Used in [`crate::bin::GetOutsRequest`]. + #[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] + GetOutputsOut { + amount: u64, + index: u64, + } +} + +define_struct_and_impl_epee! { + #[doc = monero_definition_link!( + cc73fe71162d564ffda8e549b79a350bca53c454, + "rpc/core_rpc_server_commands_defs.h", + 512..=521 + )] + /// Used in [`crate::bin::GetOutsRequest`]. + #[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] + OutKey { + key: u8, // TODO: crypto::public_key, + mask: u8, // TODO: rct::key, + unlocked: bool, + height: u64, + txid: [u8; 32], + } +} + //---------------------------------------------------------------------------------------------------- TODO // TODO - weird types.