Documentation ¶
Index ¶
- Constants
- Variables
- func CheckChainParams(network string) (chaincfg.Params, error)
- func DeriveKeysetFromSeeds(seeds []cashu.Seed, privateKey *secp256k1.PrivateKey) (map[string][]cashu.Keyset, map[string]cashu.KeysetMap, error)
- type ActiveProofs
- type ActiveQuote
- type AddToDBFunc
- type Config
- type LightningBackend
- type Mint
- func (m *Mint) AddQuotesAndProofs(quote string, proofs []cashu.Proof) error
- func (m *Mint) CheckProofsAreSameUnit(proofs []cashu.Proof) (cashu.Unit, error)
- func (m *Mint) GetAllKeysets() []cashu.Keyset
- func (m *Mint) GetKeysetById(id string) ([]cashu.Keyset, error)
- func (m *Mint) OrderActiveKeysByUnit() cashu.KeysResponse
- func (m *Mint) RemoveQuotesAndProofs(quote string, proofs []cashu.Proof)
- func (m *Mint) SignBlindedMessages(outputs []cashu.BlindedMessage, unit string) ([]cashu.BlindSignature, []cashu.RecoverSigDB, error)
- func (m *Mint) ValidateProof(proof cashu.Proof, unit cashu.Unit, checkOutputs *bool, ...) error
- func (m *Mint) VerifyLightingPaymentHappened(pool *pgxpool.Pool, paid bool, quote string, dbCall AddToDBFunc) (cashu.ACTION_STATE, string, error)
- func (m *Mint) VerifyListOfProofs(proofs []cashu.Proof, blindMessages []cashu.BlindedMessage, unit cashu.Unit) error
- type SeedType
Constants ¶
View Source
const ConfigDirName string = "nutmix"
View Source
const ConfigFileName string = "config.toml"
View Source
const LogFileName string = "nutmix.log"
Variables ¶
View Source
var ( AlreadyActiveProof = errors.New("Proof already being spent") AlreadyActiveQuote = errors.New("Quote already being spent") UsingInactiveKeyset = errors.New("Trying to use an inactive keyset") )
View Source
var ( ErrInvalidProof = errors.New("Invalid proof") ErrQuoteNotPaid = errors.New("Quote not paid") ErrMessageAmountToBig = errors.New("Message amount is to big") ErrInvalidBlindMessage = errors.New("Invalid blind message") )
errors types for validation
View Source
var ( NETWORK_ENV = "NETWORK" MINT_LIGHTNING_BACKEND_ENV = "MINT_LIGHTNING_BACKEND" )
Functions ¶
Types ¶
type ActiveProofs ¶
func (*ActiveProofs) RemoveProofs ¶
func (a *ActiveProofs) RemoveProofs(proofs []cashu.Proof) error
type ActiveQuote ¶
func (*ActiveQuote) AddQuote ¶
func (q *ActiveQuote) AddQuote(quote string) error
func (*ActiveQuote) RemoveQuote ¶
func (q *ActiveQuote) RemoveQuote(quote string) error
type AddToDBFunc ¶
type Config ¶
type Config struct { NAME string DESCRIPTION string DESCRIPTION_LONG string MOTD string EMAIL string NOSTR string NETWORK string MINT_LIGHTNING_BACKEND LightningBackend LND_GRPC_HOST string LND_TLS_CERT string LND_MACAROON string MINT_LNBITS_ENDPOINT string MINT_LNBITS_KEY string CLN_GRPC_HOST string CLN_CA_CERT string CLN_CLIENT_CERT string CLN_CLIENT_KEY string CLN_MACAROON string DATABASE_TYPE string DATABASE_URL string PEG_OUT_ONLY bool PEG_OUT_LIMIT_SATS *int PEG_IN_LIMIT_SATS *int }
func SetUpConfigFile ¶
func (*Config) SetTOMLFile ¶
func (*Config) UseEnviromentVars ¶
func (c *Config) UseEnviromentVars()
type LightningBackend ¶
type LightningBackend string
const CLNGRPC LightningBackend = "ClnGrpcWallet"
const FAKE_WALLET LightningBackend = "FakeWallet"
const LNBITS LightningBackend = "LNbitsWallet"
const LNDGRPC LightningBackend = "LndGrpcWallet"
func StringToLightningBackend ¶
func StringToLightningBackend(text string) LightningBackend
type Mint ¶
type Mint struct { ActiveKeysets map[string]cashu.KeysetMap Keysets map[string][]cashu.Keyset LightningBackend lightning.LightningBackend PendingProofs []cashu.Proof ActiveProofs *ActiveProofs ActiveQuotes *ActiveQuote Config Config MintPubkey string }
func (*Mint) AddQuotesAndProofs ¶
func (*Mint) CheckProofsAreSameUnit ¶
func (*Mint) GetAllKeysets ¶
func (*Mint) OrderActiveKeysByUnit ¶
func (m *Mint) OrderActiveKeysByUnit() cashu.KeysResponse
func (*Mint) RemoveQuotesAndProofs ¶
func (*Mint) SignBlindedMessages ¶
func (m *Mint) SignBlindedMessages(outputs []cashu.BlindedMessage, unit string) ([]cashu.BlindSignature, []cashu.RecoverSigDB, error)
func (*Mint) ValidateProof ¶
func (*Mint) VerifyLightingPaymentHappened ¶
func (m *Mint) VerifyLightingPaymentHappened(pool *pgxpool.Pool, paid bool, quote string, dbCall AddToDBFunc) (cashu.ACTION_STATE, string, error)
func (*Mint) VerifyListOfProofs ¶
Click to show internal directories.
Click to hide internal directories.