TwoTuple<byte[],TwoTuple<Integer,TxOut>[]>[] |
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<byte[],TwoTuple<Integer,TxOut>[]>[] |
ChannelMonitor.block_connected(byte[] header,
TwoTuple<Long,byte[]>[] 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_C2Tuple_BlockHashChannelManagerZDecodeErrorZ |
UtilMethods.BlockHashChannelManagerZ_read(byte[] ser,
KeysInterface arg_keys_manager,
FeeEstimator arg_fee_estimator,
Watch arg_chain_monitor,
BroadcasterInterface arg_tx_broadcaster,
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_RouteLightningErrorZ |
UtilMethods.get_keysend_route(byte[] our_node_id,
NetworkGraph network,
byte[] payee,
ChannelDetails[] first_hops,
RouteHint[] last_hops,
long final_value_msat,
int final_cltv,
Logger logger) |
Gets a keysend 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 Result_RouteLightningErrorZ |
UtilMethods.get_route(byte[] our_node_id,
NetworkGraph network,
byte[] payee,
InvoiceFeatures payee_features,
ChannelDetails[] first_hops,
RouteHint[] last_hops,
long final_value_msat,
int final_cltv,
Logger logger) |
Gets a route from us (payer) to the given target node (payee).
|
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,
Logger logger,
KeysInterface keys_manager,
UserConfig config,
ChainParameters params) |
Constructs a new ChannelManager to hold several channels and route between them.
|
static ChannelManagerReadArgs |
ChannelManagerReadArgs.of(KeysInterface keys_manager,
FeeEstimator fee_estimator,
Watch chain_monitor,
BroadcasterInterface tx_broadcaster,
Logger logger,
UserConfig default_config,
ChannelMonitor[] channel_monitors) |
Simple utility function to create a ChannelManagerReadArgs which creates the monitor
HashMap for you.
|
static NetGraphMsgHandler |
NetGraphMsgHandler.of(byte[] network_graph_genesis_hash,
Option_AccessZ chain_access,
Logger logger) |
Creates a new tracker of the actual state of the network of channels and nodes,
assuming an existing Network Graph.
|
static PeerManager |
PeerManager.of(ChannelMessageHandler message_handler_chan_handler_arg,
RoutingMessageHandler message_handler_route_handler_arg,
byte[] our_node_secret,
byte[] ephemeral_random_data,
Logger logger,
CustomMessageHandler custom_message_handler) |
Constructs a new PeerManager with the given message handlers and node_id secret key
ephemeral_random_data is used to derive per-connection ephemeral keys and must be
cryptographically secure random bytes.
|
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(ChannelManagerPersister persister,
EventHandler event_handler,
ChainMonitor chain_monitor,
ChannelManager channel_manager,
NetGraphMsgHandler net_graph_msg_handler,
PeerManager peer_manager,
Logger logger) |
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<byte[],TwoTuple<Integer,TxOut>[]>[] |
ChannelMonitor.transactions_confirmed(byte[] header,
TwoTuple<Long,byte[]>[] 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_NoneMonitorUpdateErrorZ |
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.
|