pub enum RequestPayload {
Show 87 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,
},
GetBlockAndWitnesses {
hash: [u8; 32],
},
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,
},
RegisterCoreRpcOverride {
method: String,
description: String,
},
UnregisterCoreRpcOverride {
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,
},
QueueReceivedBlock {
block_bytes: Vec<u8>,
},
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,
},
GetBlockTemplateWithOutputs {
rules: Vec<String>,
coinbase_script: Option<Vec<u8>>,
coinbase_outputs: Vec<(i64, Vec<u8>)>,
},
GetBlockTemplateDeclared {
rules: Vec<String>,
coinbase_script: Option<Vec<u8>>,
coinbase_outputs: Vec<(i64, Vec<u8>)>,
declared_txids: Vec<[u8; 32]>,
},
SubmitMempoolTransaction {
tx: Transaction,
witnesses: Option<Vec<Vec<Vec<u8>>>>,
},
GetTxMetadata {
txid: [u8; 32],
},
GetMempoolFeeRateSummary,
SetAdvertisedServiceBits {
bits: u64,
},
TimerCreate {
spec: TimerSpec,
mode: CreateMode,
},
TimerCancel {
target: TimerTarget,
},
TimerPause {
target: TimerTarget,
},
TimerResume {
target: TimerTarget,
},
TimerTrigger {
target: TimerTarget,
},
TimerGet {
target: TimerTarget,
},
TimerList,
HandshakeV2 {
module_id: String,
module_name: String,
version: String,
ipc_protocol: u32,
},
SubscribeModuleEventNames {
names: Vec<String>,
},
HttpRequest {
url: String,
accept: Option<String>,
timeout_ms: u32,
},
StreamSend {
conn_id: u64,
bytes: Vec<u8>,
},
StreamClose {
conn_id: u64,
},
RegisterFeeEstimators {
specs: Vec<FeeEstimatorSpecWire>,
},
SubmitFeeTable {
table: ExternalFeeTableWire,
},
GetFeeTable {
view: String,
mode: String,
targets: Vec<u32>,
},
HttpPost {
url: String,
content_type: String,
body: Vec<u8>,
timeout_ms: u32,
authorization: Option<String>,
},
}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
GetBlockAndWitnesses
GetLightningNodeUrl
GetLightningInfo
GetPaymentState
CheckTransactionInMempool
GetFeeEstimate
ReadFile
WriteFile
DeleteFile
ListDirectory
CreateDirectory
GetFileMetadata
RegisterRpcEndpoint
UnregisterRpcEndpoint
RegisterCoreRpcOverride
UnregisterCoreRpcOverride
RegisterTimer
CancelTimer
ScheduleTask
ReportMetric
GetModuleMetrics
GetAllMetrics
DiscoverModules
GetModuleInfo
IsModuleAvailable
PublishEvent
CallModule
RegisterModuleApi
UnregisterModuleApi
GetModuleHealth
GetAllModuleHealth
ReportModuleHealth
Fields
health: ModuleHealthSendMeshPacketToPeer
SendStratumV2MessageToPeer
GetBlockTemplate
SubmitBlock
QueueReceivedBlock
Serialized block (same encoding as BlockReceived: bincode of Block).
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)
GetBlockTemplateWithOutputs
GetBlockTemplateDeclared
Stage 3b: named mempool txids in order. Empty list is coinbase-only.
Fields
SubmitMempoolTransaction
Parsed Bitcoin tx + optional witness stacks. Already-in-mempool is ok.
GetTxMetadata
GetMempoolFeeRateSummary
SetAdvertisedServiceBits
bits must be NODE_FIBRE (1 << 26). The node keys the bit by the calling module.
TimerCreate
TimerCancel
Fields
target: TimerTargetTimerPause
Fields
target: TimerTargetTimerResume
Fields
target: TimerTargetTimerTrigger
Fields
target: TimerTargetTimerGet
Fields
target: TimerTargetTimerList
HandshakeV2
Same as RequestPayload::Handshake, plus the IPC layout version.
SubscribeModuleEventNames
Names a subscriber wants for EventType::ModuleEvent. An empty list clears the filter.
HttpRequest
GET only. The node enforces the operator allow-list.
StreamSend
Bytes from the module onto a hosted stream connection.
StreamClose
The module closes a hosted stream connection.
RegisterFeeEstimators
Replace this module’s estimator names. module_id comes from the session.
Fields
specs: Vec<FeeEstimatorSpecWire>SubmitFeeTable
Push one table. module_id comes from the session.
Fields
table: ExternalFeeTableWireGetFeeTable
Native columns only. view is combined, history, or mempool.
HttpPost
POST a body. The node enforces the same origin allow-list as HttpRequest.
Trait Implementations§
Source§impl Clone for RequestPayload
impl Clone for RequestPayload
Source§fn clone(&self) -> RequestPayload
fn clone(&self) -> RequestPayload
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
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,
Auto Trait Implementations§
impl Forget for RequestPayload
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> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.