This module contains a functions to work with LN-specific transactions.
Modules | Description |
Function or value | Description |
Full Usage:
UINT32_MAX
Returns: uint32
|
|
Full Usage:
checkSigAndAdd tx signature pk
Parameters:
ILightningTx
signature : TransactionSignature
pk : PubKey
Returns: Result<ILightningTx, TransactionError>
|
|
Full Usage:
checkTxFinalized psbt inputIndex additionalKnownSigs
Parameters:
PSBT
inputIndex : int
additionalKnownSigs : seq<PubKey * TransactionSignature>
Returns: Result<FinalizedTx, TransactionError>
|
|
Full Usage:
getCommitTxNumber commitTx isFunder localPaymentBasepoint remotePaymentBasepoint
Parameters:
Transaction
isFunder : bool
localPaymentBasepoint : PaymentBasepoint
remotePaymentBasepoint : PaymentBasepoint
Returns: Option<CommitmentNumber>
|
|
Full Usage:
makeClaimHTLCSuccessTx commitTx localDustLimit localHTLCPubKey remoteHTLCPubKey remoteRevocationPubKey localFinalScriptPubKey htlc feeRatePerKw network
Parameters:
Transaction
localDustLimit : Money
localHTLCPubKey : HtlcPubKey
remoteHTLCPubKey : HtlcPubKey
remoteRevocationPubKey : RevocationPubKey
localFinalScriptPubKey : Script
htlc : UpdateAddHTLCMsg
feeRatePerKw : FeeRatePerKw
network : Network
Returns: Result<ClaimHTLCSuccessTx, TransactionError>
|
|
Full Usage:
makeClaimHTLCTimeoutTx commitTx localDustLimit localHTLCPubKey remoteHTLCPubKey remoteRevocationPubKey localFinalScriptPubKey htlc feeRatePerKw network
Parameters:
Transaction
localDustLimit : Money
localHTLCPubKey : HtlcPubKey
remoteHTLCPubKey : HtlcPubKey
remoteRevocationPubKey : RevocationPubKey
localFinalScriptPubKey : Script
htlc : UpdateAddHTLCMsg
feeRatePerKw : FeeRatePerKw
network : Network
Returns: Result<ClaimHTLCTimeoutTx, TransactionError>
|
|
Full Usage:
makeClosingTx commitTxInput localDestination remoteDestination localIsFunder dustLimit closingFee spec network
Parameters:
ScriptCoin
localDestination : ShutdownScriptPubKey
remoteDestination : ShutdownScriptPubKey
localIsFunder : bool
dustLimit : Money
closingFee : Money
spec : CommitmentSpec
network : Network
Returns: Result<ClosingTx, TransactionError>
|
|
Full Usage:
makeCommitTx inputInfo commitmentNumber localPaymentBasepoint remotePaymentBasepoint localIsFunder localDustLimit localRevocationPubKey toLocalDelay localDelayedPaymentPubKey remotePaymentPubkey localHTLCPubKey remoteHTLCPubkey spec network
Parameters:
ScriptCoin
commitmentNumber : CommitmentNumber
localPaymentBasepoint : PaymentBasepoint
remotePaymentBasepoint : PaymentBasepoint
localIsFunder : bool
localDustLimit : Money
localRevocationPubKey : RevocationPubKey
toLocalDelay : BlockHeightOffset16
localDelayedPaymentPubKey : DelayedPaymentPubKey
remotePaymentPubkey : PaymentPubKey
localHTLCPubKey : HtlcPubKey
remoteHTLCPubkey : HtlcPubKey
spec : CommitmentSpec
network : Network
Returns: CommitTx
|
|
Full Usage:
makeHTLCPenaltyTx _commitTx _localDustLimit
Parameters:
Transaction
_localDustLimit : Money
Returns: HTLCPenaltyTx
|
|
Full Usage:
makeHTLCSuccessTx commitTx localDustLimit localRevocationPubKey toLocalDelay localDelayedPaymentPubKey localHTLCPubKey remoteHTLCPubKey feeratePerKw htlc network
Parameters:
Transaction
localDustLimit : Money
localRevocationPubKey : RevocationPubKey
toLocalDelay : BlockHeightOffset16
localDelayedPaymentPubKey : DelayedPaymentPubKey
localHTLCPubKey : HtlcPubKey
remoteHTLCPubKey : HtlcPubKey
feeratePerKw : FeeRatePerKw
htlc : UpdateAddHTLCMsg
network : Network
Returns: Result<HTLCSuccessTx, TransactionError>
|
|
Full Usage:
makeHTLCTimeoutTx commitTx localDustLimit localRevocationPubKey toLocalDelay localDelayedPaymentPubKey localHTLCPubKey remoteHTLCPubKey feeratePerKw htlc network
Parameters:
Transaction
localDustLimit : Money
localRevocationPubKey : RevocationPubKey
toLocalDelay : BlockHeightOffset16
localDelayedPaymentPubKey : DelayedPaymentPubKey
localHTLCPubKey : HtlcPubKey
remoteHTLCPubKey : HtlcPubKey
feeratePerKw : FeeRatePerKw
htlc : UpdateAddHTLCMsg
network : Network
Returns: Result<HTLCTimeoutTx, TransactionError>
|
|
Full Usage:
makeHTLCTxs commitTx localDustLimit localRevocationPubKey toLocalDelay toLocalDelayedPaymentPubKey localHTLCPubKey remoteHTLCPubKey spec network
Parameters:
Transaction
localDustLimit : Money
localRevocationPubKey : RevocationPubKey
toLocalDelay : BlockHeightOffset16
toLocalDelayedPaymentPubKey : DelayedPaymentPubKey
localHTLCPubKey : HtlcPubKey
remoteHTLCPubKey : HtlcPubKey
spec : CommitmentSpec
network : Network
Returns: Result<(HTLCTimeoutTx list * HTLCSuccessTx list), TransactionError list>
|
|
Full Usage:
makeMainPenaltyTx commitTx localDustLimit remoteRevocationKey localFinalDestination toRemoteDelay remoteDelayedPaymentPubKey feeRatePerKw network
Parameters:
Transaction
localDustLimit : Money
remoteRevocationKey : RevocationPubKey
localFinalDestination : IDestination
toRemoteDelay : BlockHeightOffset16
remoteDelayedPaymentPubKey : DelayedPaymentPubKey
feeRatePerKw : FeeRatePerKw
network : Network
Returns: Result<MainPenaltyTx, TransactionError>
|
|
Full Usage:
sign (tx, key)
Parameters:
ILightningTx
key : Key
Returns: TransactionSignature * ILightningTx
|
|
Full Usage:
signCore (tx, key, enforceLowR)
Parameters:
ILightningTx
key : Key
enforceLowR : bool
Returns: TransactionSignature * ILightningTx
|
Sign psbt inside ILightningTx and returns 1. Newly created signature 2. ILightningTx updated Technically speaking, we could just return one of them. Returning both is just for ergonomic reason. (pretending to be referential transparent)
|
Full Usage:
sortTxOut txOutsWithMeta
Parameters:
(TxOut * Option<UpdateAddHTLCMsg>) list
Returns: TxOut list
|
|