Versions in this module Expand all Collapse all v0 v0.4.2-beta May 29, 2018 v0.4.1-beta Apr 3, 2018 v0.2.1-alpha Apr 13, 2017 v0.1.1-alpha Jan 18, 2017 v0.0.2 Oct 3, 2016 Changes in this version + const MaxMemoSize + const MaxReceiptSize + var ErrChannelNoExist = fmt.Errorf("this channel does not exist") + var ErrDuplicateInvoice = fmt.Errorf("invoice with payment hash already exists") + var ErrInvoiceNotFound = fmt.Errorf("unable to locate invoice") + var ErrNoActiveChannels = fmt.Errorf("no active channels exist") + var ErrNoChanDBExists = fmt.Errorf("channel db has not yet been created") + var ErrNoInvoicesCreated = fmt.Errorf("there are no existing invoices") + var ErrNoPastDeltas = fmt.Errorf("channel has no recorded deltas") + func DisableLog() + func SetLogWriter(w io.Writer, level string) error + func UseLogger(logger btclog.Logger) + type ChannelDelta struct + Htlcs []*HTLC + LocalBalance btcutil.Amount + RemoteBalance btcutil.Amount + UpdateNum uint32 + type ChannelSnapshot struct + Capacity btcutil.Amount + ChannelPoint *wire.OutPoint + Htlcs []HTLC + LocalBalance btcutil.Amount + NumUpdates uint64 + RemoteBalance btcutil.Amount + RemoteID [wire.HashSize]byte + TotalSatoshisReceived uint64 + TotalSatoshisSent uint64 + type ContractTerm struct + PaymentPreimage [32]byte + Settled bool + Value btcutil.Amount + type DB struct + func Open(dbPath string, netParams *chaincfg.Params) (*DB, error) + func (d *DB) AddInvoice(i *Invoice) error + func (d *DB) Close() error + func (d *DB) FetchAllInvoices(pendingOnly bool) ([]*Invoice, error) + func (d *DB) FetchOpenChannels(nodeID *wire.ShaHash) ([]*OpenChannel, error) + func (d *DB) GetIdAdr() (*btcutil.AddressPubKeyHash, error) + func (d *DB) LookupInvoice(paymentHash [32]byte) (*Invoice, error) + func (d *DB) PutIdKey(pkh []byte) error + func (d *DB) SettleInvoice(paymentHash [32]byte) error + func (d *DB) Wipe() error + type HTLC struct + Amt btcutil.Amount + Incoming bool + RHash [32]byte + RefundTimeout uint32 + RevocationDelay uint32 + func (h *HTLC) Copy() HTLC + type Invoice struct + CreationDate time.Time + Memo []byte + Receipt []byte + Terms ContractTerm + type OpenChannel struct + Capacity btcutil.Amount + ChanID *wire.OutPoint + CreationTime time.Time + Db *DB + FundingOutpoint *wire.OutPoint + FundingRedeemScript []byte + Htlcs []*HTLC + LocalCsvDelay uint32 + LocalElkrem *elkrem.ElkremSender + MinFeePerKb btcutil.Amount + NumUpdates uint64 + OurBalance btcutil.Amount + OurCommitKey *btcec.PublicKey + OurCommitSig []byte + OurCommitTx *wire.MsgTx + OurDeliveryScript []byte + OurMultiSigKey *btcec.PublicKey + RemoteCsvDelay uint32 + RemoteElkrem *elkrem.ElkremReceiver + TheirBalance btcutil.Amount + TheirCommitKey *btcec.PublicKey + TheirCurrentRevocation *btcec.PublicKey + TheirCurrentRevocationHash [32]byte + TheirDeliveryScript []byte + TheirLNID [wire.HashSize]byte + TheirMultiSigKey *btcec.PublicKey + TotalNetFees uint64 + TotalSatoshisReceived uint64 + TotalSatoshisSent uint64 + func (c *OpenChannel) AppendToRevocationLog(delta *ChannelDelta) error + func (c *OpenChannel) CloseChannel() error + func (c *OpenChannel) FindPreviousState(updateNum uint64) (*ChannelDelta, error) + func (c *OpenChannel) FullSync() error + func (c *OpenChannel) Snapshot() *ChannelSnapshot + func (c *OpenChannel) UpdateCommitment(newCommitment *wire.MsgTx, newSig []byte, delta *ChannelDelta) error