pub enum RequestPayload {
Show 61 variants
Handshake {
module_id: String,
module_name: String,
version: String,
},
GetBlock {
hash: [u8; 32],
},
GetBlockHeader {
hash: [u8; 32],
},
GetTransaction {
hash: [u8; 32],
},
HasTransaction {
hash: [u8; 32],
},
GetChainTip,
GetBlockHeight,
GetUtxo {
outpoint: OutPoint,
},
SubscribeEvents {
event_types: Vec<EventType>,
},
GetMempoolTransactions,
GetMempoolTransaction {
tx_hash: [u8; 32],
},
GetMempoolSize,
GetNetworkStats,
GetNetworkPeers,
GetChainInfo,
GetBlockByHeight {
height: u64,
},
GetLightningNodeUrl,
GetLightningInfo,
GetPaymentState {
payment_id: String,
},
CheckTransactionInMempool {
tx_hash: [u8; 32],
},
GetFeeEstimate {
target_blocks: u32,
},
ReadFile {
path: String,
},
WriteFile {
path: String,
data: Vec<u8>,
},
DeleteFile {
path: String,
},
ListDirectory {
path: String,
},
CreateDirectory {
path: String,
},
GetFileMetadata {
path: String,
},
RegisterRpcEndpoint {
method: String,
description: String,
},
UnregisterRpcEndpoint {
method: String,
},
RegisterTimer {
interval_seconds: u64,
},
CancelTimer {
timer_id: u64,
},
ScheduleTask {
delay_seconds: u64,
},
ReportMetric {
metric: Metric,
},
GetModuleMetrics {
module_id: String,
},
GetAllMetrics,
DiscoverModules,
GetModuleInfo {
module_id: String,
},
IsModuleAvailable {
module_id: String,
},
PublishEvent {
event_type: EventType,
payload: EventPayload,
},
CallModule {
target_module_id: Option<String>,
method: String,
params: Vec<u8>,
},
RegisterModuleApi {
methods: Vec<String>,
api_version: u32,
},
UnregisterModuleApi,
GetModuleHealth {
module_id: String,
},
GetAllModuleHealth,
ReportModuleHealth {
health: ModuleHealth,
},
SendMeshPacketToPeer {
peer_addr: String,
packet_data: Vec<u8>,
},
SendStratumV2MessageToPeer {
peer_addr: String,
message_data: Vec<u8>,
},
GetBlockTemplate {
rules: Vec<String>,
coinbase_script: Option<Vec<u8>>,
coinbase_address: Option<String>,
},
SubmitBlock {
block: Block,
},
MergeBlockServeDenylist {
block_hashes: Vec<[u8; 32]>,
},
GetBlockServeDenylistSnapshot,
ClearBlockServeDenylist,
ReplaceBlockServeDenylist {
block_hashes: Vec<[u8; 32]>,
},
MergeTxServeDenylist {
tx_hashes: Vec<[u8; 32]>,
},
GetTxServeDenylistSnapshot,
ClearTxServeDenylist,
ReplaceTxServeDenylist {
tx_hashes: Vec<[u8; 32]>,
},
GetSyncStatus,
BanPeer {
peer_addr: String,
ban_duration_seconds: Option<u64>,
},
SetBlockServeMaintenanceMode {
enabled: bool,
},
RegisterCliSpec {
spec: CliSpec,
},
}Expand description
Request payload types
Variants§
Handshake
Handshake: Module identifies itself (first message)
GetBlock
GetBlockHeader
GetTransaction
HasTransaction
GetChainTip
GetBlockHeight
GetUtxo
SubscribeEvents
GetMempoolTransactions
GetMempoolTransaction
GetMempoolSize
GetNetworkStats
GetNetworkPeers
GetChainInfo
GetBlockByHeight
GetLightningNodeUrl
GetLightningInfo
GetPaymentState
CheckTransactionInMempool
GetFeeEstimate
ReadFile
WriteFile
DeleteFile
ListDirectory
CreateDirectory
GetFileMetadata
RegisterRpcEndpoint
UnregisterRpcEndpoint
RegisterTimer
CancelTimer
ScheduleTask
ReportMetric
GetModuleMetrics
GetAllMetrics
DiscoverModules
GetModuleInfo
IsModuleAvailable
PublishEvent
CallModule
RegisterModuleApi
UnregisterModuleApi
GetModuleHealth
GetAllModuleHealth
ReportModuleHealth
Fields
§
health: ModuleHealthSendMeshPacketToPeer
SendStratumV2MessageToPeer
GetBlockTemplate
SubmitBlock
MergeBlockServeDenylist
Block hashes that must not be answered with a full block on the wire (e.g. getdata).
GetBlockServeDenylistSnapshot
ClearBlockServeDenylist
ReplaceBlockServeDenylist
MergeTxServeDenylist
GetTxServeDenylistSnapshot
ClearTxServeDenylist
ReplaceTxServeDenylist
GetSyncStatus
BanPeer
SetBlockServeMaintenanceMode
RegisterCliSpec
Register CLI spec (module → node on connect)
Trait Implementations§
Source§impl Clone for RequestPayload
impl Clone for RequestPayload
Source§fn clone(&self) -> RequestPayload
fn clone(&self) -> RequestPayload
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RequestPayload
impl Debug for RequestPayload
Source§impl<'de> Deserialize<'de> for RequestPayload
impl<'de> Deserialize<'de> for RequestPayload
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RequestPayload, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RequestPayload, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for RequestPayload
impl Serialize for RequestPayload
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for RequestPayload
impl RefUnwindSafe for RequestPayload
impl Send for RequestPayload
impl Sync for RequestPayload
impl Unpin for RequestPayload
impl UnsafeUnpin for RequestPayload
impl UnwindSafe for RequestPayload
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more