nut05

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package nut05 contains structs as defined in NUT-05

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostMeltBolt11Request

type PostMeltBolt11Request struct {
	Quote   string                `json:"quote"`
	Inputs  cashu.Proofs          `json:"inputs"`
	Outputs cashu.BlindedMessages `json:"outputs,omitempty"`
}

type PostMeltQuoteBolt11Request

type PostMeltQuoteBolt11Request struct {
	Request string `json:"request"`
	Unit    string `json:"unit"`
}

type PostMeltQuoteBolt11Response

type PostMeltQuoteBolt11Response struct {
	Quote      string                  `json:"quote"`
	Amount     uint64                  `json:"amount"`
	FeeReserve uint64                  `json:"fee_reserve"`
	State      State                   `json:"state"`
	Paid       bool                    `json:"paid"` // DEPRECATED: use state instead
	Expiry     uint64                  `json:"expiry"`
	Preimage   string                  `json:"payment_preimage,omitempty"`
	Change     cashu.BlindedSignatures `json:"change,omitempty"`
}

func (*PostMeltQuoteBolt11Response) MarshalJSON added in v0.2.0

func (quoteResponse *PostMeltQuoteBolt11Response) MarshalJSON() ([]byte, error)

func (*PostMeltQuoteBolt11Response) UnmarshalJSON added in v0.2.0

func (quoteResponse *PostMeltQuoteBolt11Response) UnmarshalJSON(data []byte) error

type State added in v0.2.0

type State int
const (
	Unpaid State = iota
	Pending
	Unknown
)

func StringToState added in v0.2.0

func StringToState(state string) State

func (State) String added in v0.2.0

func (state State) String() string

type TempQuote added in v0.2.0

type TempQuote struct {
	Quote      string                  `json:"quote"`
	Amount     uint64                  `json:"amount"`
	FeeReserve uint64                  `json:"fee_reserve"`
	State      string                  `json:"state"`
	Paid       bool                    `json:"paid"` // DEPRECATED: use state instead
	Expiry     uint64                  `json:"expiry"`
	Preimage   string                  `json:"payment_preimage,omitempty"`
	Change     cashu.BlindedSignatures `json:"change,omitempty"`
}

Jump to

Keyboard shortcuts

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