Documentation ¶
Index ¶
- Constants
- Variables
- func GetAccountInvoiceKey(addr sdk.AccAddress, contractID string) []byte
- func GetAccountInvoicesKey(addr sdk.AccAddress) []byte
- func GetKey(id string) []byte
- func MakeHandle(k InvoiceKeeper) sdk.Handler
- func NewPubKey(pk string) (res ed25519.PubKeyEd25519)
- func RegisterWire(cdc *wire.Codec)
- func TestAddr(addr string, bech string) sdk.AccAddress
- type Invoice
- type InvoiceKeeper
- func (ik InvoiceKeeper) CreateInvoice(ctx sdk.Context, msg MsgCreate) (sdk.Tags, sdk.Error)
- func (ik InvoiceKeeper) GetInvoice(ctx sdk.Context, id string) *Invoice
- func (ik InvoiceKeeper) HasInvoice(ctx sdk.Context, id string) bool
- func (ik InvoiceKeeper) SetInvoice(ctx sdk.Context, invoice Invoice)
- type Item
- type MsgCreate
Constants ¶
View Source
const ( CodespaceDefault sdk.CodespaceType = 69 CodeDuplicateInvoice sdk.CodeType = 1 )
View Source
const (
DefaultCodespace sdk.CodespaceType = 11
)
Variables ¶
View Source
var ( PrefixKey = []byte{0x01} AccountInvoiceKey = []byte{0x02} ErrorDuplicateInvoice = sdk.NewError(CodespaceDefault, CodeDuplicateInvoice, "Duplicate invoice.") )
View Source
var MsgCdc *wire.Codec
generic sealed codec to be used throughout sdk
Functions ¶
func GetAccountInvoiceKey ¶ added in v0.9.0
func GetAccountInvoiceKey(addr sdk.AccAddress, contractID string) []byte
func GetAccountInvoicesKey ¶ added in v0.9.0
func GetAccountInvoicesKey(addr sdk.AccAddress) []byte
func MakeHandle ¶
func MakeHandle(k InvoiceKeeper) sdk.Handler
func NewPubKey ¶ added in v0.20.0
func NewPubKey(pk string) (res ed25519.PubKeyEd25519)
Types ¶
type Invoice ¶
type Invoice struct { ID string `json:"id"` Issuer sdk.AccAddress `json:"issuer"` Receiver sdk.AccAddress `json:"receiver"` Items []Item `json:"items"` CreateTime int64 `json:"create_time"` }
type InvoiceKeeper ¶
type InvoiceKeeper struct {
// contains filtered or unexported fields
}
func NewInvoiceKeeper ¶
func (InvoiceKeeper) CreateInvoice ¶
func (InvoiceKeeper) GetInvoice ¶
func (ik InvoiceKeeper) GetInvoice(ctx sdk.Context, id string) *Invoice
func (InvoiceKeeper) HasInvoice ¶
func (ik InvoiceKeeper) HasInvoice(ctx sdk.Context, id string) bool
func (InvoiceKeeper) SetInvoice ¶
func (ik InvoiceKeeper) SetInvoice(ctx sdk.Context, invoice Invoice)
type MsgCreate ¶
type MsgCreate struct { ID string `json:"id"` Issuer sdk.AccAddress `json:"issuer"` Receiver sdk.AccAddress `json:"receiver"` Items []Item `json:"items"` }
func NewMsgCreate ¶
func NewMsgCreate(id string, issuer, receiver sdk.AccAddress, items []Item) MsgCreate
func (MsgCreate) GetSignBytes ¶
func (MsgCreate) GetSigners ¶
func (msg MsgCreate) GetSigners() []sdk.AccAddress
func (MsgCreate) ValidateBasic ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.