Package fr.acinq.lightning.serialization.v1

Types

Aborted
Link copied to clipboard
common
data class Aborted(staticParams: StaticParams, currentTip: Pair<Int, BlockHeader>, currentOnChainFeerates: OnChainFeerates) : ChannelState
AbstractBtcSerializableKSerializer
Link copied to clipboard
common
abstract class AbstractBtcSerializableKSerializer<T : BtcSerializable<T>>(name: String, btcSerializer: BtcSerializer<T>) : KSerializer<T>
AbstractStringKSerializer
Link copied to clipboard
common
abstract class AbstractStringKSerializer<T>(name: String, toString: (T) -> String, fromString: (String) -> T) : KSerializer<T>
BlockHeaderKSerializer
Link copied to clipboard
common
object BlockHeaderKSerializer : AbstractBtcSerializableKSerializer<BlockHeader>
ByteVector32KSerializer
Link copied to clipboard
common
object ByteVector32KSerializer : AbstractStringKSerializer<ByteVector32>
ByteVector64KSerializer
Link copied to clipboard
common
object ByteVector64KSerializer : AbstractStringKSerializer<ByteVector64>
ByteVectorKSerializer
Link copied to clipboard
common
object ByteVectorKSerializer : AbstractStringKSerializer<ByteVector>
ChannelState
Link copied to clipboard
common
sealed class ChannelState
ChannelStateWithCommitments
Link copied to clipboard
common
sealed class ChannelStateWithCommitments : ChannelState
ChannelVersion
Link copied to clipboard
common
data class ChannelVersion(bits: ByteVector)
Closed
Link copied to clipboard
common
data class Closed(state: Closing) : ChannelStateWithCommitments
Closing
Link copied to clipboard
common
data class Closing(staticParams: StaticParams, currentTip: Pair<Int, BlockHeader>, currentOnChainFeerates: OnChainFeerates, commitments: Commitments, fundingTx: Transaction?, waitingSinceBlock: Long, mutualCloseProposed: List<Transactions.TransactionWithInputInfo.ClosingTx>, mutualClosePublished: List<Transactions.TransactionWithInputInfo.ClosingTx>, localCommitPublished: LocalCommitPublished?, remoteCommitPublished: RemoteCommitPublished?, nextRemoteCommitPublished: RemoteCommitPublished?, futureRemoteCommitPublished: RemoteCommitPublished?, revokedCommitPublished: List<RevokedCommitPublished>) : ChannelStateWithCommitments
ClosingTxProposed
Link copied to clipboard
common
data class ClosingTxProposed(unsignedTx: Transactions.TransactionWithInputInfo.ClosingTx, localClosingSigned: ClosingSigned)
Commitments
Link copied to clipboard
common
data class Commitments(channelVersion: ChannelVersion, localParams: LocalParams, remoteParams: RemoteParams, channelFlags: Byte, localCommit: LocalCommit, remoteCommit: RemoteCommit, localChanges: LocalChanges, remoteChanges: RemoteChanges, localNextHtlcId: Long, remoteNextHtlcId: Long, payments: Map<Long, UUID>, remoteNextCommitInfo: Either<WaitingForRevocation, PublicKey>, commitInput: Transactions.InputInfo, remotePerCommitmentSecrets: ShaChain, channelId: ByteVector32, remoteChannelData: EncryptedChannelData)
CommitmentSpec
Link copied to clipboard
common
data class CommitmentSpec(htlcs: Set<DirectedHtlc>, feerate: FeeratePerKw, toLocal: MilliSatoshi, toRemote: MilliSatoshi)
DirectedHtlc
Link copied to clipboard
common
sealed class DirectedHtlc
EitherSerializer
Link copied to clipboard
common
class EitherSerializer<A : Any, B : Any>(aSer: KSerializer<A>, bSer: KSerializer<B>) : KSerializer<Either<A, B>>
ErrorInformationLeak
Link copied to clipboard
common
data class ErrorInformationLeak(staticParams: StaticParams, currentTip: Pair<Int, BlockHeader>, currentOnChainFeerates: OnChainFeerates, commitments: Commitments) : ChannelStateWithCommitments
ExtendedPrivateKeyKSerializer
Link copied to clipboard
common
object ExtendedPrivateKeyKSerializer : KSerializer<DeterministicWallet.ExtendedPrivateKey>
ExtendedPublicKeyKSerializer
Link copied to clipboard
common
object ExtendedPublicKeyKSerializer : KSerializer<DeterministicWallet.ExtendedPublicKey>
HtlcTxAndSigs
Link copied to clipboard
common
data class HtlcTxAndSigs(txinfo: Transactions.TransactionWithInputInfo.HtlcTx, localSig: ByteVector64, remoteSig: ByteVector64)
IncomingHtlc
Link copied to clipboard
common
data class IncomingHtlc(add: UpdateAddHtlc) : DirectedHtlc
InitFunder
Link copied to clipboard
common
data class InitFunder(temporaryChannelId: ByteVector32, fundingAmount: Satoshi, pushAmount: MilliSatoshi, initialFeerate: FeeratePerKw, fundingTxFeerate: FeeratePerKw, localParams: LocalParams, remoteInit: Init, channelFlags: Byte, channelVersion: ChannelVersion)
KeyPathKSerializer
Link copied to clipboard
common
object KeyPathKSerializer : KSerializer<KeyPath>
LocalChanges
Link copied to clipboard
common
data class LocalChanges(proposed: List<UpdateMessage>, signed: List<UpdateMessage>, acked: List<UpdateMessage>)
LocalCommit
Link copied to clipboard
common
data class LocalCommit(index: Long, spec: CommitmentSpec, publishableTxs: PublishableTxs)
LocalCommitPublished
Link copied to clipboard
common
data class LocalCommitPublished(commitTx: Transaction, claimMainDelayedOutputTx: Transactions.TransactionWithInputInfo.ClaimLocalDelayedOutputTx?, htlcTxs: Map<OutPoint, Transactions.TransactionWithInputInfo.HtlcTx?>, claimHtlcDelayedTxs: List<Transactions.TransactionWithInputInfo.ClaimLocalDelayedOutputTx>, claimAnchorTxs: List<Transactions.TransactionWithInputInfo.ClaimAnchorOutputTx>, irrevocablySpent: Map<OutPoint, Transaction>)
LocalParams
Link copied to clipboard
common
data class LocalParams(nodeId: PublicKey, fundingKeyPath: KeyPath, dustLimit: Satoshi, maxHtlcValueInFlightMsat: Long, channelReserve: Satoshi, htlcMinimum: MilliSatoshi, toSelfDelay: CltvExpiryDelta, maxAcceptedHtlcs: Int, isFunder: Boolean, defaultFinalScriptPubKey: ByteVector, features: Features)

README: by design, we do not include channel private keys and secret here, so they won't be included in our backups (local files, encrypted peer backup, ...), so even if these backups were compromised channel private keys would not be leaked unless the main seed was also compromised. This means that they will be recomputed once when we convert serialized data to their "live" counterparts.

Negotiating
Link copied to clipboard
common
data class Negotiating(staticParams: StaticParams, currentTip: Pair<Int, BlockHeader>, currentOnChainFeerates: OnChainFeerates, commitments: Commitments, localShutdown: Shutdown, remoteShutdown: Shutdown, closingTxProposed: List<List<ClosingTxProposed>>, bestUnpublishedClosingTx: Transactions.TransactionWithInputInfo.ClosingTx?) : ChannelStateWithCommitments
Normal
Link copied to clipboard
common
data class Normal(staticParams: StaticParams, currentTip: Pair<Int, BlockHeader>, currentOnChainFeerates: OnChainFeerates, commitments: Commitments, shortChannelId: ShortChannelId, buried: Boolean, channelAnnouncement: ChannelAnnouncement?, channelUpdate: ChannelUpdate, remoteChannelUpdate: ChannelUpdate?, localShutdown: Shutdown?, remoteShutdown: Shutdown?) : ChannelStateWithCommitments
Offline
Link copied to clipboard
common
data class Offline(state: ChannelStateWithCommitments) : ChannelState
OnChainFeerates
Link copied to clipboard
common
data class OnChainFeerates(mutualCloseFeerate: FeeratePerKw, claimMainFeerate: FeeratePerKw, fastFeerate: FeeratePerKw)
OutgoingHtlc
Link copied to clipboard
common
data class OutgoingHtlc(add: UpdateAddHtlc) : DirectedHtlc
OutPointKSerializer
Link copied to clipboard
common
object OutPointKSerializer : AbstractBtcSerializableKSerializer<OutPoint>
PrivateKeyKSerializer
Link copied to clipboard
common
object PrivateKeyKSerializer : AbstractStringKSerializer<PrivateKey>
PublicKeyKSerializer
Link copied to clipboard
common
object PublicKeyKSerializer : AbstractStringKSerializer<PublicKey>
PublishableTxs
Link copied to clipboard
common
data class PublishableTxs(commitTx: Transactions.TransactionWithInputInfo.CommitTx, htlcTxsAndSigs: List<HtlcTxAndSigs>)
RemoteChanges
Link copied to clipboard
common
data class RemoteChanges(proposed: List<UpdateMessage>, acked: List<UpdateMessage>, signed: List<UpdateMessage>)
RemoteCommit
Link copied to clipboard
common
data class RemoteCommit(index: Long, spec: CommitmentSpec, txid: ByteVector32, remotePerCommitmentPoint: PublicKey)
RemoteCommitPublished
Link copied to clipboard
common
data class RemoteCommitPublished(commitTx: Transaction, claimMainOutputTx: Transactions.TransactionWithInputInfo.ClaimRemoteCommitMainOutputTx?, claimHtlcTxs: Map<OutPoint, Transactions.TransactionWithInputInfo.ClaimHtlcTx?>, claimAnchorTxs: List<Transactions.TransactionWithInputInfo.ClaimAnchorOutputTx>, irrevocablySpent: Map<OutPoint, Transaction>)
RemoteParams
Link copied to clipboard
common
data class RemoteParams(nodeId: PublicKey, dustLimit: Satoshi, maxHtlcValueInFlightMsat: Long, channelReserve: Satoshi, htlcMinimum: MilliSatoshi, toSelfDelay: CltvExpiryDelta, maxAcceptedHtlcs: Int, fundingPubKey: PublicKey, revocationBasepoint: PublicKey, paymentBasepoint: PublicKey, delayedPaymentBasepoint: PublicKey, htlcBasepoint: PublicKey, features: Features)
RevokedCommitPublished
Link copied to clipboard
common
data class RevokedCommitPublished(commitTx: Transaction, remotePerCommitmentSecret: PrivateKey, claimMainOutputTx: Transactions.TransactionWithInputInfo.ClaimRemoteCommitMainOutputTx?, mainPenaltyTx: Transactions.TransactionWithInputInfo.MainPenaltyTx?, htlcPenaltyTxs: List<Transactions.TransactionWithInputInfo.HtlcPenaltyTx>, claimHtlcDelayedPenaltyTxs: List<Transactions.TransactionWithInputInfo.ClaimHtlcDelayedOutputPenaltyTx>, irrevocablySpent: Map<OutPoint, Transaction>)
SatoshiKSerializer
Link copied to clipboard
common
object SatoshiKSerializer : KSerializer<Satoshi>
ScriptWitnessKSerializer
Link copied to clipboard
common
object ScriptWitnessKSerializer : AbstractBtcSerializableKSerializer<ScriptWitness>
Serialization
Link copied to clipboard
common
object Serialization
ShaChainSerializer
Link copied to clipboard
common
object ShaChainSerializer : KSerializer<ShaChain>
ShuttingDown
Link copied to clipboard
common
data class ShuttingDown(staticParams: StaticParams, currentTip: Pair<Int, BlockHeader>, currentOnChainFeerates: OnChainFeerates, commitments: Commitments, localShutdown: Shutdown, remoteShutdown: Shutdown) : ChannelStateWithCommitments
StaticParams
Link copied to clipboard
common
data class StaticParams(chainHash: ByteVector32, remoteNodeId: PublicKey)
Syncing
Link copied to clipboard
common
data class Syncing(state: ChannelStateWithCommitments, waitForTheirReestablishMessage: Boolean) : ChannelState
TransactionKSerializer
Link copied to clipboard
common
object TransactionKSerializer : AbstractBtcSerializableKSerializer<Transaction>
TxInKSerializer
Link copied to clipboard
common
object TxInKSerializer : AbstractBtcSerializableKSerializer<TxIn>
TxOutKSerializer
Link copied to clipboard
common
object TxOutKSerializer : AbstractBtcSerializableKSerializer<TxOut>
WaitForAcceptChannel
Link copied to clipboard
common
data class WaitForAcceptChannel(staticParams: StaticParams, currentTip: Pair<Int, BlockHeader>, currentOnChainFeerates: OnChainFeerates, initFunder: InitFunder, lastSent: OpenChannel) : ChannelState
WaitForFundingConfirmed
Link copied to clipboard
common
data class WaitForFundingConfirmed(staticParams: StaticParams, currentTip: Pair<Int, BlockHeader>, currentOnChainFeerates: OnChainFeerates, commitments: Commitments, fundingTx: Transaction?, waitingSinceBlock: Long, deferred: FundingLocked?, lastSent: Either<FundingCreated, FundingSigned>) : ChannelStateWithCommitments
WaitForFundingCreated
Link copied to clipboard
common
data class WaitForFundingCreated(staticParams: StaticParams, currentTip: Pair<Int, BlockHeader>, currentOnChainFeerates: OnChainFeerates, temporaryChannelId: ByteVector32, localParams: LocalParams, remoteParams: RemoteParams, fundingAmount: Satoshi, pushAmount: MilliSatoshi, initialFeerate: FeeratePerKw, remoteFirstPerCommitmentPoint: PublicKey, channelFlags: Byte, channelVersion: ChannelVersion, lastSent: AcceptChannel) : ChannelState
WaitForFundingInternal
Link copied to clipboard
common
data class WaitForFundingInternal(staticParams: StaticParams, currentTip: Pair<Int, BlockHeader>, currentOnChainFeerates: OnChainFeerates, temporaryChannelId: ByteVector32, localParams: LocalParams, remoteParams: RemoteParams, fundingAmount: Satoshi, pushAmount: MilliSatoshi, initialFeerate: FeeratePerKw, remoteFirstPerCommitmentPoint: PublicKey, channelVersion: ChannelVersion, lastSent: OpenChannel) : ChannelState
WaitForFundingLocked
Link copied to clipboard
common
data class WaitForFundingLocked(staticParams: StaticParams, currentTip: Pair<Int, BlockHeader>, currentOnChainFeerates: OnChainFeerates, commitments: Commitments, shortChannelId: ShortChannelId, lastSent: FundingLocked) : ChannelStateWithCommitments
WaitForFundingSigned
Link copied to clipboard
common
data class WaitForFundingSigned(staticParams: StaticParams, currentTip: Pair<Int, BlockHeader>, currentOnChainFeerates: OnChainFeerates, channelId: ByteVector32, localParams: LocalParams, remoteParams: RemoteParams, fundingTx: Transaction, fundingTxFee: Satoshi, localSpec: CommitmentSpec, localCommitTx: Transactions.TransactionWithInputInfo.CommitTx, remoteCommit: RemoteCommit, channelFlags: Byte, channelVersion: ChannelVersion, lastSent: FundingCreated) : ChannelState
WaitForInit
Link copied to clipboard
common
data class WaitForInit(staticParams: StaticParams, currentTip: Pair<Int, BlockHeader>, currentOnChainFeerates: OnChainFeerates) : ChannelState
WaitForOpenChannel
Link copied to clipboard
common
data class WaitForOpenChannel(staticParams: StaticParams, currentTip: Pair<Int, BlockHeader>, currentOnChainFeerates: OnChainFeerates, temporaryChannelId: ByteVector32, localParams: LocalParams, remoteInit: Init) : ChannelState
WaitForRemotePublishFutureCommitment
Link copied to clipboard
common
data class WaitForRemotePublishFutureCommitment(staticParams: StaticParams, currentTip: Pair<Int, BlockHeader>, currentOnChainFeerates: OnChainFeerates, commitments: Commitments, remoteChannelReestablish: ChannelReestablish) : ChannelStateWithCommitments
WaitingForRevocation
Link copied to clipboard
common
data class WaitingForRevocation(nextRemoteCommit: RemoteCommit, sent: CommitSig, sentAfterLocalCommitIndex: Long, reSignAsap: Boolean)