Package org.ldk.structs
Class WalletSource
- java.lang.Object
-
- org.ldk.structs.WalletSource
-
public class WalletSource extends Object
An alternative to [`CoinSelectionSource`] that can be implemented and used along [`Wallet`] to provide a default implementation to [`CoinSelectionSource`].
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceWalletSource.WalletSourceInterface
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Destroys the object, freeing associated resources.protected voidfinalize()Result_CVec_u8ZNoneZget_change_script()Returns a script to use for change above dust resulting from a successful coin selection attempt.Result_CVec_UtxoZNoneZlist_confirmed_utxos()Returns all UTXOs, with at least 1 confirmation each, that are available to spend.static WalletSourcenew_impl(WalletSource.WalletSourceInterface arg)Result_TransactionNoneZsign_tx(byte[] tx)Signs and provides the full [`TxIn::script_sig`] and [`TxIn::witness`] for all inputs within the transaction known to the wallet (i.e., any provided via [`WalletSource::list_confirmed_utxos`]).
-
-
-
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 WalletSource new_impl(WalletSource.WalletSourceInterface arg)
-
list_confirmed_utxos
public Result_CVec_UtxoZNoneZ list_confirmed_utxos()
Returns all UTXOs, with at least 1 confirmation each, that are available to spend.
-
get_change_script
public Result_CVec_u8ZNoneZ get_change_script()
Returns a script to use for change above dust resulting from a successful coin selection attempt.
-
sign_tx
public Result_TransactionNoneZ sign_tx(byte[] tx)
Signs and provides the full [`TxIn::script_sig`] and [`TxIn::witness`] for all inputs within the transaction known to the wallet (i.e., any provided via [`WalletSource::list_confirmed_utxos`]).
-
-