Documentation ¶
Overview ¶
Package balance provides an onion layer message that comes in response to a getbalance query, informing the client of the balance of a session, identified by the getbalance nonce.ID.
Index ¶
- Constants
- func Gen() codec.Codec
- func New(id nonce.ID, amt lnwire.MilliSatoshi) ont.Onion
- type Balance
- func (x *Balance) Account(res *sess.Data, sm *sess.Manager, s *sessions.Data, last bool) (skip bool, sd *sessions.Data)
- func (x *Balance) Decode(s *splice.Splice) (e error)
- func (x *Balance) Encode(s *splice.Splice) (e error)
- func (x *Balance) Handle(s *splice.Splice, p ont.Onion, ng ont.Ngin) (e error)
- func (x *Balance) Len() int
- func (x *Balance) Magic() string
- func (x *Balance) Unwrap() interface{}
- func (x *Balance) Wrap(inner ont.Onion)
Constants ¶
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Balance ¶
type Balance struct { // ID of the request this response relates to. ID nonce.ID // Amount current in the balance according to the relay. lnwire.MilliSatoshi }
Balance is the balance with an ID the client has a pending balance update waiting on.
func (*Balance) Account ¶
func (x *Balance) Account(res *sess.Data, sm *sess.Manager, s *sessions.Data, last bool) (skip bool, sd *sessions.Data)
Account simply records the message ID, which will be recognised in the pending responses cache.
func (*Balance) Handle ¶
Handle provides relay and accounting processing logic for receiving a Balance message.
Click to show internal directories.
Click to hide internal directories.