Documentation
¶
Index ¶
- Constants
- Variables
- func CheckChainParams(network string) (chaincfg.Params, error)
- func CheckMeltRequest(ctx context.Context, mint *Mint, quoteId string) (cashu.PostMeltQuoteBolt11Response, error)
- func CheckMintRequest(mint *Mint, quote cashu.MintRequestDB, invoice *zpay32.Invoice) (cashu.MintRequestDB, error)
- func CheckProofState(ctx context.Context, mint *Mint, Ys []cashu.WrappedPublicKey) ([]cashu.CheckState, error)
- func SendJson(conn *websocket.Conn, content any) error
- func SetUpConfigDB(db database.MintDB) (utils.Config, error)
- type MeltQuoteChannel
- type Mint
- func (m *Mint) CheckMeltQuoteState(ctx context.Context, quoteId string) (cashu.MeltRequestDB, error)
- func (m *Mint) CheckPendingQuoteAndProofs() error
- func (m *Mint) CheckProofsAreSameUnit(proofs []cashu.Proof, keys []cashu.BasicKeysetResponse) (cashu.Unit, error)
- func (m *Mint) GetChangeOutput(messages []cashu.BlindedMessage, overPaidFees uint64, unit string) ([]cashu.RecoverSigDB, error)
- func (m *Mint) IsInternalTransaction(request string) (bool, error)
- func (m *Mint) Melt(ctx context.Context, meltRequest cashu.PostMeltBolt11Request) (cashu.PostMeltQuoteBolt11Response, error)
- func (m *Mint) SetupOidcService(ctx context.Context, url string) error
- func (m *Mint) VerifyAuthBlindToken(authProof cashu.AuthProof) error
- func (m *Mint) VerifyAuthClearToken(token string) error
- func (m *Mint) VerifyInputsAndOutputs(tx pgx.Tx, proofs cashu.Proofs, outputs []cashu.BlindedMessage) error
- func (m *Mint) VerifyOutputs(tx pgx.Tx, outputs []cashu.BlindedMessage, keys []cashu.BasicKeysetResponse) (cashu.Unit, error)
- func (m *Mint) VerifyProofsBDHKE(proofs cashu.Proofs) error
- func (m *Mint) VerifyUnitSupport(unitStr string) error
- type MintQuoteChannel
- type Observer
- func (o *Observer) AddMeltWatch(quote string, meltChan MeltQuoteChannel)
- func (o *Observer) AddMintWatch(quote string, mintChan MintQuoteChannel)
- func (o *Observer) AddProofWatch(y string, proofChan ProofWatchChannel)
- func (o *Observer) RemoveWatch(subId string)
- func (o *Observer) SendMeltEvent(melt cashu.MeltRequestDB)
- func (o *Observer) SendMintEvent(mint cashu.MintRequestDB)
- func (o *Observer) SendProofsEvent(proofs cashu.Proofs)
- type ProofWatchChannel
- 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 ( NETWORK_ENV = "NETWORK" MINT_LIGHTNING_BACKEND_ENV = "MINT_LIGHTNING_BACKEND" )
Functions ¶
func CheckMeltRequest ¶
func CheckMintRequest ¶
func CheckMintRequest(mint *Mint, quote cashu.MintRequestDB, invoice *zpay32.Invoice) (cashu.MintRequestDB, error)
func CheckProofState ¶
func CheckProofState(ctx context.Context, mint *Mint, Ys []cashu.WrappedPublicKey) ([]cashu.CheckState, error)
Types ¶
type MeltQuoteChannel ¶
type MeltQuoteChannel struct {
Channel chan cashu.MeltRequestDB
SubId string
}
type Mint ¶
type Mint struct {
LightningBackend lightning.LightningBackend
MintDB database.MintDB
Signer signer.Signer
OICDClient *oidc.Provider
Observer *Observer
MintPubkey string
Config utils.Config
}
func (*Mint) CheckMeltQuoteState ¶
func (*Mint) CheckPendingQuoteAndProofs ¶
func (*Mint) CheckProofsAreSameUnit ¶
func (*Mint) GetChangeOutput ¶
func (m *Mint) GetChangeOutput(messages []cashu.BlindedMessage, overPaidFees uint64, unit string) ([]cashu.RecoverSigDB, error)
func (*Mint) IsInternalTransaction ¶
func (*Mint) Melt ¶
func (m *Mint) Melt(ctx context.Context, meltRequest cashu.PostMeltBolt11Request) (cashu.PostMeltQuoteBolt11Response, error)
func (*Mint) SetupOidcService ¶ added in v0.4.0
func (*Mint) VerifyAuthBlindToken ¶
func (*Mint) VerifyAuthClearToken ¶
func (*Mint) VerifyInputsAndOutputs ¶
func (*Mint) VerifyOutputs ¶
func (m *Mint) VerifyOutputs(tx pgx.Tx, outputs []cashu.BlindedMessage, keys []cashu.BasicKeysetResponse) (cashu.Unit, error)
func (*Mint) VerifyProofsBDHKE ¶ added in v0.4.0
VerifyProofsBDHKE verifies the BDHKE cryptographic signatures of the proofs. This should always be called regardless of SIG_ALL.
func (*Mint) VerifyUnitSupport ¶
type MintQuoteChannel ¶
type MintQuoteChannel struct {
Channel chan cashu.MintRequestDB
SubId string
}
type Observer ¶
type Observer struct {
Proofs map[string][]ProofWatchChannel
MintQuote map[string][]MintQuoteChannel
MeltQuote map[string][]MeltQuoteChannel
sync.Mutex
}
func (*Observer) AddMeltWatch ¶
func (o *Observer) AddMeltWatch(quote string, meltChan MeltQuoteChannel)
func (*Observer) AddMintWatch ¶
func (o *Observer) AddMintWatch(quote string, mintChan MintQuoteChannel)
func (*Observer) AddProofWatch ¶
func (o *Observer) AddProofWatch(y string, proofChan ProofWatchChannel)
func (*Observer) RemoveWatch ¶
func (*Observer) SendMeltEvent ¶
func (o *Observer) SendMeltEvent(melt cashu.MeltRequestDB)
func (*Observer) SendMintEvent ¶
func (o *Observer) SendMintEvent(mint cashu.MintRequestDB)
func (*Observer) SendProofsEvent ¶
type ProofWatchChannel ¶
Click to show internal directories.
Click to hide internal directories.