Package org.ldk.structs
Class BroadcasterInterface
- java.lang.Object
-
- org.ldk.structs.BroadcasterInterface
-
public class BroadcasterInterface extends Object
An interface to send a transaction to the Bitcoin network.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceBroadcasterInterface.BroadcasterInterfaceInterface
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbroadcast_transactions(byte[][] txs)Sends a list of transactions out to (hopefully) be mined.voiddestroy()Destroys the object, freeing associated resources.protected voidfinalize()static BroadcasterInterfacenew_impl(BroadcasterInterface.BroadcasterInterfaceInterface arg)
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
destroy
public void destroy()
Destroys the object, freeing associated resources. After this call, any access to this object may result in a SEGFAULT or worse. You should generally NEVER call this method. You should let the garbage collector do this for you when it finalizes objects. However, it may be useful for types which represent locks and should be closed immediately to avoid holding locks until the GC runs.
-
new_impl
public static BroadcasterInterface new_impl(BroadcasterInterface.BroadcasterInterfaceInterface arg)
-
broadcast_transactions
public void broadcast_transactions(byte[][] txs)
Sends a list of transactions out to (hopefully) be mined. This only needs to handle the actual broadcasting of transactions, LDK will automatically rebroadcast transactions that haven't made it into a block. In some cases LDK may attempt to broadcast a transaction which double-spends another and this isn't a bug and can be safely ignored. If more than one transaction is given, these transactions should be considered to be a package and broadcast together. Some of the transactions may or may not depend on each other, be sure to manage both cases correctly. Bitcoin transaction packages are defined in BIP 331 and here: https://github.com/bitcoin/bitcoin/blob/master/doc/policy/packages.md
-
-