TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] |
ChannelMonitor.best_block_updated(byte[] header,
int height,
BroadcasterInterface broadcaster,
FeeEstimator fee_estimator,
Logger logger) |
Updates the monitor with the current best chain tip, returning new outputs to watch.
|
TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] |
ChannelMonitor.block_connected(byte[] header,
TwoTuple_usizeTransactionZ[] txdata,
int height,
BroadcasterInterface broadcaster,
FeeEstimator fee_estimator,
Logger logger) |
Processes transactions in a newly connected block, which may result in any of the following:
- update the monitor's state against resolved HTLCs
- punish the counterparty in the case of seeing a revoked commitment transaction
- force close the channel and claim/timeout incoming/outgoing HTLCs if near expiration
- detect settled outputs for later spending
- schedule and bump any in-flight claims
Returns any new outputs to watch from `txdata`; after called, these are also included in
[`get_outputs_to_watch`].
|
void |
ChannelMonitor.block_disconnected(byte[] header,
int height,
BroadcasterInterface broadcaster,
FeeEstimator fee_estimator,
Logger logger) |
Determines if the disconnected block contained any transactions of interest and updates
appropriately.
|
static Result_RouteLightningErrorZ |
UtilMethods.build_route_from_hops(byte[] our_node_pubkey,
byte[][] hops,
RouteParameters route_params,
NetworkGraph network_graph,
Logger logger,
byte[] random_seed_bytes) |
Construct a route from us (payer) to the target node (payee) via the given hops (which should
exclude the payer, but include the payee).
|
static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ |
UtilMethods.C2Tuple_BlockHashChannelManagerZ_read(byte[] ser,
EntropySource arg_entropy_source,
NodeSigner arg_node_signer,
SignerProvider arg_signer_provider,
FeeEstimator arg_fee_estimator,
Watch arg_chain_monitor,
BroadcasterInterface arg_tx_broadcaster,
Router arg_router,
Logger arg_logger,
UserConfig arg_default_config,
ChannelMonitor[] arg_channel_monitors) |
Read a C2Tuple_BlockHashChannelManagerZ from a byte array, created by C2Tuple_BlockHashChannelManagerZ_write
|
static Result_InvoiceSignOrCreationErrorZ |
UtilMethods.create_invoice_from_channelmanager(ChannelManager channelmanager,
NodeSigner node_signer,
Logger logger,
Currency network,
Option_u64Z amt_msat,
String description,
int invoice_expiry_delta_secs,
Option_u16Z min_final_cltv_expiry_delta) |
Utility to construct an invoice.
|
static Result_InvoiceSignOrCreationErrorZ |
UtilMethods.create_invoice_from_channelmanager_and_duration_since_epoch(ChannelManager channelmanager,
NodeSigner node_signer,
Logger logger,
Currency network,
Option_u64Z amt_msat,
String description,
long duration_since_epoch,
int invoice_expiry_delta_secs,
Option_u16Z min_final_cltv_expiry_delta) |
See [`create_invoice_from_channelmanager`]
This version can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
available and the current time is supplied by the caller.
|
static Result_InvoiceSignOrCreationErrorZ |
UtilMethods.create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(ChannelManager channelmanager,
NodeSigner node_signer,
Logger logger,
Currency network,
Option_u64Z amt_msat,
String description,
long duration_since_epoch,
int invoice_expiry_delta_secs,
byte[] payment_hash,
Option_u16Z min_final_cltv_expiry_delta) |
See [`create_invoice_from_channelmanager_and_duration_since_epoch`]
This version allows for providing a custom [`PaymentHash`] for the invoice.
|
static Result_InvoiceSignOrCreationErrorZ |
UtilMethods.create_invoice_from_channelmanager_with_description_hash(ChannelManager channelmanager,
NodeSigner node_signer,
Logger logger,
Currency network,
Option_u64Z amt_msat,
Sha256 description_hash,
int invoice_expiry_delta_secs,
Option_u16Z min_final_cltv_expiry_delta) |
Utility to construct an invoice.
|
static Result_InvoiceSignOrCreationErrorZ |
UtilMethods.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(ChannelManager channelmanager,
NodeSigner node_signer,
Logger logger,
Currency network,
Option_u64Z amt_msat,
Sha256 description_hash,
long duration_since_epoch,
int invoice_expiry_delta_secs,
Option_u16Z min_final_cltv_expiry_delta) |
See [`create_invoice_from_channelmanager_with_description_hash`]
This version can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
available and the current time is supplied by the caller.
|
static Result_InvoiceSignOrCreationErrorZ |
UtilMethods.create_phantom_invoice(Option_u64Z amt_msat,
byte[] payment_hash,
String description,
int invoice_expiry_delta_secs,
PhantomRouteHints[] phantom_route_hints,
EntropySource entropy_source,
NodeSigner node_signer,
Logger logger,
Currency network,
Option_u16Z min_final_cltv_expiry_delta,
long duration_since_epoch) |
Utility to create an invoice that can be paid to one of multiple nodes, or a \"phantom invoice.\"
See [`PhantomKeysManager`] for more information on phantom node payments.
|
static Result_InvoiceSignOrCreationErrorZ |
UtilMethods.create_phantom_invoice_with_description_hash(Option_u64Z amt_msat,
byte[] payment_hash,
int invoice_expiry_delta_secs,
Sha256 description_hash,
PhantomRouteHints[] phantom_route_hints,
EntropySource entropy_source,
NodeSigner node_signer,
Logger logger,
Currency network,
Option_u16Z min_final_cltv_expiry_delta,
long duration_since_epoch) |
Utility to create an invoice that can be paid to one of multiple nodes, or a \"phantom invoice.\"
See [`PhantomKeysManager`] for more information on phantom node payments.
|
static Result_RouteLightningErrorZ |
UtilMethods.find_route(byte[] our_node_pubkey,
RouteParameters route_params,
NetworkGraph network_graph,
ChannelDetails[] first_hops,
Logger logger,
Score scorer,
byte[] random_seed_bytes) |
Finds a route from us (payer) to the given target node (payee).
|
byte[][] |
ChannelMonitor.get_latest_holder_commitment_txn(Logger logger) |
Used by ChannelManager deserialization to broadcast the latest holder state if its copy of
the Channel was out-of-date.
|
static ChainMonitor |
ChainMonitor.of(Option_FilterZ chain_source,
BroadcasterInterface broadcaster,
Logger logger,
FeeEstimator feeest,
Persist persister) |
Creates a new `ChainMonitor` used to watch on-chain activity pertaining to channels.
|
static ChannelManager |
ChannelManager.of(FeeEstimator fee_est,
Watch chain_monitor,
BroadcasterInterface tx_broadcaster,
Router router,
Logger logger,
EntropySource entropy_source,
NodeSigner node_signer,
SignerProvider signer_provider,
UserConfig config,
ChainParameters params) |
Constructs a new `ChannelManager` to hold several channels and route between them.
|
static ChannelManagerReadArgs |
ChannelManagerReadArgs.of(EntropySource entropy_source,
NodeSigner node_signer,
SignerProvider signer_provider,
FeeEstimator fee_estimator,
Watch chain_monitor,
BroadcasterInterface tx_broadcaster,
Router router,
Logger logger,
UserConfig default_config,
ChannelMonitor[] channel_monitors) |
Simple utility function to create a ChannelManagerReadArgs which creates the monitor
HashMap for you.
|
static DefaultRouter |
DefaultRouter.of(NetworkGraph network_graph,
Logger logger,
byte[] random_seed_bytes,
LockableScore scorer) |
Creates a new router.
|
static NetworkGraph |
NetworkGraph.of(Network network,
Logger logger) |
Creates a new, empty, network graph.
|
static OnionMessenger |
OnionMessenger.of(EntropySource entropy_source,
NodeSigner node_signer,
Logger logger,
CustomOnionMessageHandler custom_handler) |
Constructs a new `OnionMessenger` to send, forward, and delegate received onion messages to
their respective handlers.
|
static P2PGossipSync |
P2PGossipSync.of(NetworkGraph network_graph,
Option_UtxoLookupZ utxo_lookup,
Logger logger) |
Creates a new tracker of the actual state of the network of channels and nodes,
assuming an existing [`NetworkGraph`].
|
static PeerManager |
PeerManager.of(ChannelMessageHandler message_handler_chan_handler_arg,
RoutingMessageHandler message_handler_route_handler_arg,
OnionMessageHandler message_handler_onion_message_handler_arg,
int current_time,
byte[] ephemeral_random_data,
Logger logger,
CustomMessageHandler custom_message_handler,
NodeSigner node_signer) |
Constructs a new `PeerManager` with the given message handlers.
|
static ProbabilisticScorer |
ProbabilisticScorer.of(ProbabilisticScoringParameters params,
NetworkGraph network_graph,
Logger logger) |
Creates a new scorer using the given scoring parameters for sending payments from a node
through a network graph.
|
static RapidGossipSync |
RapidGossipSync.of(NetworkGraph network_graph,
Logger logger) |
Instantiate a new [`RapidGossipSync`] instance.
|
static TwoTuple_BlockHashChannelManagerZ |
TwoTuple_BlockHashChannelManagerZ.of(byte[] a,
FeeEstimator b_fee_est,
Watch b_chain_monitor,
BroadcasterInterface b_tx_broadcaster,
Router b_router,
Logger b_logger,
EntropySource b_entropy_source,
NodeSigner b_node_signer,
SignerProvider b_signer_provider,
UserConfig b_config,
ChainParameters b_params) |
Creates a new C2Tuple_BlockHashChannelManagerZ from the contained elements.
|
static Result_NetworkGraphDecodeErrorZ |
Result_NetworkGraphDecodeErrorZ.ok(Network o_network,
Logger o_logger) |
Creates a new CResult_NetworkGraphDecodeErrorZ in the success state.
|
static Result_ProbabilisticScorerDecodeErrorZ |
Result_ProbabilisticScorerDecodeErrorZ.ok(ProbabilisticScoringParameters o_params,
NetworkGraph o_network_graph,
Logger o_logger) |
Creates a new CResult_ProbabilisticScorerDecodeErrorZ in the success state.
|
static Result_NetworkGraphDecodeErrorZ |
NetworkGraph.read(byte[] ser,
Logger arg) |
Read a NetworkGraph from a byte array, created by NetworkGraph_write
|
static Result_ProbabilisticScorerDecodeErrorZ |
ProbabilisticScorer.read(byte[] ser,
ProbabilisticScoringParameters arg_a,
NetworkGraph arg_b,
Logger arg_c) |
Read a ProbabilisticScorer from a byte array, created by ProbabilisticScorer_write
|
void |
ChannelMonitor.rebroadcast_pending_claims(BroadcasterInterface broadcaster,
FeeEstimator fee_estimator,
Logger logger) |
Triggers rebroadcasts/fee-bumps of pending claims from a force-closed channel.
|
void |
ChannelManagerReadArgs.set_logger(Logger val) |
The Logger for use in the ChannelManager and which may be used to log information during
deserialization.
|
static BackgroundProcessor |
BackgroundProcessor.start(Persister persister,
EventHandler event_handler,
ChainMonitor chain_monitor,
ChannelManager channel_manager,
GossipSync gossip_sync,
PeerManager peer_manager,
Logger logger,
Option_WriteableScoreZ scorer) |
Start a background thread that takes care of responsibilities enumerated in the [top-level
documentation].
|
void |
ChannelMonitor.transaction_unconfirmed(byte[] txid,
BroadcasterInterface broadcaster,
FeeEstimator fee_estimator,
Logger logger) |
Processes a transaction that was reorganized out of the chain.
|
TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] |
ChannelMonitor.transactions_confirmed(byte[] header,
TwoTuple_usizeTransactionZ[] txdata,
int height,
BroadcasterInterface broadcaster,
FeeEstimator fee_estimator,
Logger logger) |
Processes transactions confirmed in a block with the given header and height, returning new
outputs to watch.
|
Result_NoneNoneZ |
ChannelMonitor.update_monitor(ChannelMonitorUpdate updates,
BroadcasterInterface broadcaster,
FeeEstimator fee_estimator,
Logger logger) |
Updates a ChannelMonitor on the basis of some new information provided by the Channel
itself.
|