storage

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltDB

type BoltDB struct {
	// contains filtered or unexported fields
}

func InitBolt

func InitBolt(path string) (*BoltDB, error)

func (*BoltDB) DeleteProof

func (db *BoltDB) DeleteProof(secret string) error

func (*BoltDB) GetInvoice

func (db *BoltDB) GetInvoice(paymentHash string) *lightning.Invoice

func (*BoltDB) GetInvoices

func (db *BoltDB) GetInvoices() []lightning.Invoice

func (*BoltDB) GetKeysets

func (db *BoltDB) GetKeysets() crypto.KeysetsMap

func (*BoltDB) GetProofs

func (db *BoltDB) GetProofs() cashu.Proofs

return all proofs from db

func (*BoltDB) GetProofsByKeysetId

func (db *BoltDB) GetProofsByKeysetId(id string) cashu.Proofs

func (*BoltDB) SaveInvoice

func (db *BoltDB) SaveInvoice(invoice lightning.Invoice) error

func (*BoltDB) SaveKeyset

func (db *BoltDB) SaveKeyset(keyset *crypto.Keyset) error

func (*BoltDB) SaveProof

func (db *BoltDB) SaveProof(proof cashu.Proof) error

type DB

type DB interface {
	SaveProof(cashu.Proof) error
	GetProofsByKeysetId(string) cashu.Proofs
	GetProofs() cashu.Proofs
	DeleteProof(string) error
	SaveKeyset(*crypto.Keyset) error
	GetKeysets() crypto.KeysetsMap
	SaveInvoice(lightning.Invoice) error
	GetInvoice(string) *lightning.Invoice
	GetInvoices() []lightning.Invoice
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL