types

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "asset"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName

	// RouterKey is the module name router key
	RouterKey = ModuleName

	// QuerierRoute to be used for querierer msgs
	QuerierRoute = ModuleName
)
View Source
const (
	TypeAssetCreateMsg = "asset_create"
	TypeAssetUpdateMsg = "asset_update"
	TypeAssetDeleteMsg = "asset_delete"
)

Variables

View Source
var (
	ErrNameDoesNotExist = sdkerrors.Register(ModuleName, 1, "Asset does not exist")
)
View Source
var ModuleCdc = codec.New()

ModuleCdc is the codec for the module

Functions

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on the Amino codec

Types

type Asset

type Asset struct {
	UUID    string         `json:"uuid"`
	Hash    []byte         `json:"hash"`
	Creator sdk.AccAddress `json:"creator"`
	Status  bool           `json:"status"`
	Rate    int64          `json:""`
}

func NewAsset

func NewAsset() Asset

func NewAssetFromMsgCreate

func NewAssetFromMsgCreate(msg MsgCreate) Asset

func NewAssetFromMsgUpdate

func NewAssetFromMsgUpdate(msg MsgUpdate) Asset

func (Asset) GetString

func (a Asset) GetString() (string, error)

type MsgCreate

type MsgCreate struct {
	Creator sdk.AccAddress `json:"creator"`
	Hash    []byte         `json:"hash"`
	UUID    string         `json:"uuid"`
	Status  bool           `json:"status"`
	Rate    int64          `json:"rate"`
}

func NewMsgCreate

func NewMsgCreate(creator sdk.AccAddress, hash []byte, uuid string, status bool, rate int64) MsgCreate

func (MsgCreate) GetSignBytes

func (msg MsgCreate) GetSignBytes() []byte

func (MsgCreate) GetSigners

func (msg MsgCreate) GetSigners() []sdk.AccAddress

func (MsgCreate) Route

func (msg MsgCreate) Route() string

func (MsgCreate) String

func (msg MsgCreate) String() string

func (MsgCreate) Type

func (msg MsgCreate) Type() string

Type Implements Msg

func (MsgCreate) ValidateBasic

func (msg MsgCreate) ValidateBasic() error

ValidateBasic Implements Msg

type MsgDelete

type MsgDelete struct {
	Owner sdk.AccAddress `json:"owner"`
	UUID  string         `json:"uuid"`
}

func NewMsgDelete

func NewMsgDelete(owner sdk.AccAddress, uuid string) MsgDelete

func (MsgDelete) GetSignBytes

func (msg MsgDelete) GetSignBytes() []byte

func (MsgDelete) GetSigners

func (msg MsgDelete) GetSigners() []sdk.AccAddress

func (MsgDelete) Route

func (msg MsgDelete) Route() string

func (MsgDelete) Type

func (msg MsgDelete) Type() string

func (MsgDelete) ValidateBasic

func (msg MsgDelete) ValidateBasic() error

type MsgUpdate

type MsgUpdate struct {
	Creator sdk.AccAddress `json:"creator"`
	Hash    []byte         `json:"hash"`
	UUID    string         `json:"uuid"`
	Status  bool           `json:"status"`
	Rate    int64          `json:"rate"`
}

func NewMsgUpdate

func NewMsgUpdate(creator sdk.AccAddress, hash []byte, uuid string, status bool, rate int64) MsgUpdate

func (MsgUpdate) GetSignBytes

func (msg MsgUpdate) GetSignBytes() []byte

func (MsgUpdate) GetSigners

func (msg MsgUpdate) GetSigners() []sdk.AccAddress

func (MsgUpdate) Route

func (msg MsgUpdate) Route() string

func (MsgUpdate) Type

func (msg MsgUpdate) Type() string

func (MsgUpdate) ValidateBasic

func (msg MsgUpdate) ValidateBasic() error

type QueryResNames

type QueryResNames []string

QueryResNames Queries Result Payload for a names query

func (QueryResNames) String

func (n QueryResNames) String() string

implement fmt.Stringer

type QueryResResolve

type QueryResResolve struct {
	Value string `json:"value"`
}

QueryResResolve Queries Result Payload for a resolve query

func (QueryResResolve) String

func (r QueryResResolve) String() string

implement fmt.Stringer

Jump to

Keyboard shortcuts

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