scoin.ln
Types, utils and wire codecs related to the BOLT specification (the Lightning Network).
Type members
Classlikes
- Source:
- LightningMessageTypes.scala
- Source:
- LightningMessageTypes.scala
Lightning Bolt 11 invoice see https://github.com/lightning/bolts/blob/master/11-payment-encoding.md
Lightning Bolt 11 invoice see https://github.com/lightning/bolts/blob/master/11-payment-encoding.md
- Value parameters:
- amount_opt
amount to pay (empty string means no amount is specified)
- createdAt
invoice timestamp (UNIX format)
- nodeId
id of the node emitting the invoice
- prefix
currency prefix; lnbc for bitcoin, lntb for bitcoin testnet
- signature
invoice signature that will be checked against node id
- tags
payment tags; must include a single PaymentHash tag and a single PaymentSecret tag.
- Companion:
- object
- Source:
- Bolt11Invoice.scala
- Source:
- LightningMessageTypes.scala
- Source:
- FailureMessage.scala
- Source:
- LightningMessageTypes.scala
Permanent channel feature negotiated in the channel type. Those features take precedence over permanent channel features negotiated in init messages. For example, if the channel type is option_static_remotekey, then even if the option_anchor_outputs feature is supported by both peers, it won't apply to the channel.
Permanent channel feature negotiated in the channel type. Those features take precedence over permanent channel features negotiated in init messages. For example, if the channel type is option_static_remotekey, then even if the option_anchor_outputs feature is supported by both peers, it won't apply to the channel.
- Source:
- Features.scala
- Companion:
- object
- Source:
- LightningMessageTypes.scala
- Source:
- LightningMessageTypes.scala
- Source:
- LightningMessageTypes.scala
- Companion:
- object
- Source:
- LightningMessageTypes.scala
Not a sealed trait, so it can be extended by plugins.
Not a sealed trait, so it can be extended by plugins.
- Source:
- Features.scala
- Source:
- LightningMessageTypes.scala
- Source:
- LightningMessageTypes.scala
- Source:
- LightningMessageTypes.scala
Generic tlv type we fallback to if we don't understand the incoming tlv.
Generic tlv type we fallback to if we don't understand the incoming tlv.
- Value parameters:
- tag
tlv tag.
- value
tlv value (length is implicit, and encoded as a varint).
- Source:
- Tlv.scala
- Source:
- LightningMessageTypes.scala
Helpers to handle incoming payment packets.
Helpers to handle incoming payment packets.
- Companion:
- class
- Source:
- PaymentPacket.scala
- Source:
- LightningMessageTypes.scala
Feature that should be advertised in init messages.
Feature that should be advertised in init messages.
- Source:
- Features.scala
Feature that should be advertised in invoices.
Feature that should be advertised in invoices.
- Source:
- Features.scala
- Source:
- LightningMessageTypes.scala
Feature that should be advertised in node announcements.
Feature that should be advertised in node announcements.
- Source:
- Features.scala
Tlv types used inside a payment onion.
Tlv types used inside a payment onion.
- Companion:
- object
- Source:
- PaymentOnion.scala
- Source:
- OnionRouting.scala
- Companion:
- object
- Source:
- LightningMessageTypes.scala
Feature negotiated when opening a channel that will apply for all of the channel's lifetime. This doesn't include features that can be safely activated/deactivated without impacting the channel's operation such as option_dataloss_protect or option_shutdown_anysegwit.
Feature negotiated when opening a channel that will apply for all of the channel's lifetime. This doesn't include features that can be safely activated/deactivated without impacting the channel's operation such as option_dataloss_protect or option_shutdown_anysegwit.
- Source:
- Features.scala
- Source:
- LightningMessageTypes.scala
- Source:
- LightningMessageTypes.scala
- Source:
- LightningMessageTypes.scala
- Companion:
- object
- Source:
- LightningMessageTypes.scala
- Source:
- LightningMessageTypes.scala
- Source:
- LightningMessageTypes.scala
see https://github.com/rustyrussell/lightning-rfc/blob/master/early-drafts/shachain.txt
Structure used to intelligently store unguessable hashes.
Structure used to intelligently store unguessable hashes.
- Value parameters:
- knownHashes
know hashes
- lastIndex
index of the last known hash. Hashes are supposed to be added in reverse order i.e. from 0xFFFFFFFFFFFFFFFF down to 0
- Companion:
- object
- Source:
- ShaChain.scala
- Source:
- LightningMessageTypes.scala
A tlv stream is a collection of tlv records. A tlv stream is constrained to a specific tlv namespace that dictates how to parse the tlv records. That namespace is provided by a trait extending the top-level tlv trait.
A tlv stream is a collection of tlv records. A tlv stream is constrained to a specific tlv namespace that dictates how to parse the tlv records. That namespace is provided by a trait extending the top-level tlv trait.
We allow remote nodes to send us unknown failure codes (e.g. deprecated failure codes). By reading the PERM and NODE bits we can still extract useful information for payment retry even without knowing how to decode the failure payload (but we can't extract a channel update or onion hash).
We allow remote nodes to send us unknown failure codes (e.g. deprecated failure codes). By reading the PERM and NODE bits we can still extract useful information for payment retry even without knowing how to decode the failure payload (but we can't extract a channel update or onion hash).
- Source:
- FailureMessage.scala
- Source:
- LightningMessageTypes.scala
- Source:
- LightningMessageTypes.scala
- Source:
- LightningMessageTypes.scala
- Source:
- LightningMessageTypes.scala
- Source:
- LightningMessageTypes.scala
- Companion:
- object
- Source:
- LightningMessageTypes.scala
Value members
Concrete methods
- Value parameters:
- address
base58 of bech32 address
- chainHash
hash of the chain we're on, which will be checked against the input address
- Returns:
the public key script that matches the input address.
- Source:
- package.scala
Tests whether the binary data is composed solely of printable ASCII characters (see BOLT 1)
Tests whether the binary data is composed solely of printable ASCII characters (see BOLT 1)
- Value parameters:
- data
to check
- Source:
- package.scala
- Value parameters:
- baseFee
fixed fee
- paymentAmount
payment amount in millisatoshi
- proportionalFee
proportional fee (millionths)
- Returns:
the fee that a node should be paid to forward an HTLC of 'paymentAmount' millisatoshis
- Source:
- package.scala