Documentation ¶
Index ¶
- func AmountSplit(amount uint64) []uint64
- func NewLightningClient() (lightning.Client, error)
- type Mint
- func (m *Mint) CheckFees(pr string) (uint64, error)
- func (m *Mint) CheckSpendables(proofs []cashu.Proof) cashu.CheckSpendableResponse
- func (m Mint) GetKeySet() []string
- func (m Mint) GetKeySetIds() []string
- func (m *Mint) GetPublicKeys() map[uint64]string
- func (m Mint) LoadKeySet(id string) (*crypto.KeySet, error)
- func (m *Mint) Melt(proofs []cashu.Proof, invoice string) (payment lightning.Payment, err error)
- func (m Mint) Mint(messages cashu.BlindedMessages, pr string, keySet *crypto.KeySet) ([]cashu.BlindedSignature, error)
- func (m Mint) MintWithoutKeySet(messages cashu.BlindedMessages, pr string) ([]cashu.BlindedSignature, error)
- func (m *Mint) RequestMint(amount uint64) (lightning.Invoicer, error)
- func (m *Mint) Split(proofs []cashu.Proof, amount uint64, outputs []cashu.BlindedMessage, ...) ([]cashu.BlindedSignature, []cashu.BlindedSignature, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AmountSplit ¶
AmountSplit will return an array with all decimal binary values (i.e. powers of two) that the given amount consists of.
func NewLightningClient ¶
NewLightningClient will create a new lightning client implementation based on the ln config
Types ¶
type Mint ¶
Mint implements all functions for a cashu ledger.
func (*Mint) CheckSpendables ¶
func (m *Mint) CheckSpendables(proofs []cashu.Proof) cashu.CheckSpendableResponse
checkSpendables checks multiple proofs
func (Mint) GetKeySetIds ¶
func (*Mint) GetPublicKeys ¶
GetPublicKeys will return current public keys for all amounts
func (*Mint) Melt ¶
if not all( [self._verify_proof(p) for p in proofs]): raise Exception ("could not verify proofs.")
melt will meld proofs
func (Mint) Mint ¶
func (m Mint) Mint(messages cashu.BlindedMessages, pr string, keySet *crypto.KeySet) ([]cashu.BlindedSignature, error)
func (Mint) MintWithoutKeySet ¶
func (m Mint) MintWithoutKeySet(messages cashu.BlindedMessages, pr string) ([]cashu.BlindedSignature, error)
func (*Mint) RequestMint ¶
requestMint will create and return the lightning invoice for a mint
func (*Mint) Split ¶
func (m *Mint) Split(proofs []cashu.Proof, amount uint64, outputs []cashu.BlindedMessage, keySet *crypto.KeySet) ([]cashu.BlindedSignature, []cashu.BlindedSignature, error)
split will split proofs. creates BlindedSignatures from BlindedMessages.
type Options ¶
type Options func(l *Mint)
func WithClient ¶
func WithInitialKeySet ¶
func WithStorage ¶
func WithStorage(database db.MintStorage) Options
Click to show internal directories.
Click to hide internal directories.