Fixed LSP receive bug
This is the new release of ldk-node-rn
v0.3.0
buildWithFsStore
method is added in theBuilder
class allowing to use the filesystem storage backend.- Exposed
setLiquiditySourceLsps2
method toBuilder
to configure theNode
instance to source the inbound liquidity. nextEventAsync
method is added toNode
class that allows polling the event queue asynchronously.status
method has been added toNode
allowing to retrieve information about the Node's status.config
method added to get the config with which theNode
was initialized.- The payment APIs have been restructured to use per-type (bolt11, onchain, bolt12) payment handlers which can be accessed via
node.{type}Payment
. - Support for sourcing inbound liquidity via LSPS2 just-in-time (JIT) channels has been added.
- Support for creating and paying BOLT12 offers and refunds has been added.
- Added
networkGraph
handler method allowing to query the network graph. - Added
forceCloseChannel
toNode
class.
- All available balances outside of channel balances are now exposed via a unified
listBalances
interface method.
This is a bugfix release that reestablishes compatibility of Swift packages with Xcode 15.3 and later.
This is a bugfix release bumping the used LDK and BDK dependencies to the latest stable versions.
BugFix
- Fixed logger failed
error on startup node everytime.
-
Builder
classsetListeningAddress()
tosetListeningAddresses()
to set multuple listening addresses. -
Node
classlisteningAddress()
tolisteningAddresses()
to get all listening addresses. -
Config
classcreate
method changes:- Added
logDirPath
param to make the location of thelogs
directory customizable . - Changed
listeningAddress
param tolistendingAddresses
to allow multiple addresses. - Added
probingLiquidityLimitMultiplier
param.
- Added
-
Exposed
ChannelConfig
class and following are its methods:create
- Constructs a newChannelConfig
.acceptUnderpayingHtlcs
- Returns the setacceptUnderpayingHtlcs
.cltvExpiryDelta
- Returns the setcltvExpiryDelta
.forceCloseAvoidanceMaxFeeSatoshis
- Returns the setforceCloseAvoidanceMaxFeeSatoshis
.forwardingFeeBaseMsat
- Returns the setforwardingFeeBaseMsat
.forwardingFeeProportionalMillionths
- Returns the setforwardingFeeProportionalMillionths
.setAcceptUnderpayingHtlcs
- Sets thesetAcceptUnderpayingHtlcs
.setCltvExpiryDelta
- Sets thesetCltvExpiryDelta
.setForceCloseAvoidanceMaxFeeSatoshis
- Sets thesetForceCloseAvoidanceMaxFeeSatoshis
.setForwardingFeeBaseMsat
- Sets thesetForwardingFeeBaseMsat
.setForwardingFeeProportionalMillionths
- Sets thesetForwardingFeeProportionalMillionths
.setMaxDustHtlcExposureFromFeeRateMultiplier
- Sets thesetMaxDustHtlcExposureFromFeeRateMultiplier
.setMaxDustHtlcExposureFromFixedLimit
- Sets thesetMaxDustHtlcExposureFromFixedLimit
.
-
Exposed following new methods for
Node
isrunning
- Returns whether the [Node
] is running.sendPaymentProbes
- Sends payment probes over all paths of a route that would be used to pay the given invoice.sendPaymentProbesUsingAmount
- Sends payment probes over all paths of a route that would be used to pay the given zero-value invoice using the given amount.sendSpontaneousPaymentProbes
- Sends payment probes over all paths of a route that would be used to pay the given amount to the givennode_id
.
This is the first release of ldk_node
. It features support for sourcing chain data via an Esplora
server, filesystem persistence, gossip sourcing via the Lightning
peer-to-peer network, and configurble entropy sources for the integrated LDK & BDK-based wallets.
Config Methods:
create
- Create newConfig
instance forBuilder
.
Builder Methods:
-
fromConfig
- Creates a newBuilder
instance from an Config. -
setEntropySeedPath
- Configures theNode
instance to source its wallet entropy from a seed file on disk. -
setEntropySeedBytes
- Configures theNode
instance to source its wallet entropy from the given seed bytes. -
setEntropyBip39Mnemonic
- Configures theNode
instance to source its wallet entropy from a BIP 39 mnemonic. -
setEsploraServerUrl
- Sets theEsplora
server URL. Default: https://blockstream.info/api -
setGossipSourceP2p
- Configures theNode
instance to source its gossip data from the Lightning peer-to-peer network. -
setGossipSourceRgs
- Configures theNode
instance to source its gossip data from the given RapidGossipSync server. -
setStorageDirPath
- Sets the used storage directory path. -
setNetwork
- Sets theBitcoin
network used. -
setListeningAddress
- Sets the IP address and TCP port on which Node will listen for incoming network connections. Default: 0.0.0.0:9735 -
build
- Builds anNode
instance according to the options previously configured.
Node Methods:
-
start
- Starts the necessary background tasks, such as handling events coming from user input,LDK/BDK
, and the peer-to-peer network. -
stop
- Disconnects all peers, stops all running background tasks, and shuts down Node. -
syncWallets
- Sync theLDK & BDK
wallets with the current chain state. -
nodeId
- Returns our ownnode id
. -
listeningAddress
- Returns our own listening address. -
newOnchainAddress
- Retrieve a new on-chain/funding address. -
sendToOnchainAddress
- Send an on-chain payment to the given address. -
sendAllToOnchainAddress
- Send an on-chain payment to the given address, draining all the available funds. -
spendableOnchainBalanceSats
- Retrieve current spendable on-chain balance in sats. -
totalOnchainBalanceSats
- Retrieve total on-chain balance in sats. -
connect
- Connect to a node on the peer-to-peer network. If permanently is set to true, we’ll remember the peer and reconnect to it on restart -
disconnect
- Disconnects the peer with the givennode id
. -
connectOpenChannel
- Connect to a node and open a new channel. Disconnects and re-connects are handled automatically -
closeChannel
- Close a previously opened channel. -
receivePayment
- Returns a payable invoice that can be used to request and receive a payment of the amount given. -
receiveVariableAmountPayment
- Returns a payable invoice that can be used to request and receive a payment for which the amount is to be determined by the user,also known as azero-amount
invoice. -
sendPayment
- Send a payement given an invoice. -
sendPaymentUsingAmount
- Send a payment given an invoice and an amount in millisatoshi. -
sendSpontaneousPayment
- Send a spontaneous, aka.keysend
, payment. -
listPayments
- Retrieves all payments. -
listPeers
- Retrieve a list of connected peers. -
listChannels
- Retrieve a list of known channels. -
payment
- Retrieve the details of a specific payment with the given hash. -
removePayment
- Remove the payment with the given hash from the store. -
signMessage
- Creates a digital ECDSA signature of a message with the node's secret key. -
verifySignature
- Verifies that the given ECDSA signature was created for the given message with the secret key corresponding to the given public key. -
updateChannelConfig
- Update the config for a previously opened channel.
Independent utility methods:
generateEntropyMnemonic
- Utility method for generating a BIP39 mnemonic.