types

package
v0.0.0-...-625e232 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// module name
	ModuleName = "nameservice"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName
)
View Source
const RouterKey = ModuleName // this was defined in your key.go file

Variables

View Source
var MinNamePrice = sdk.Coins{sdk.NewInt64Coin("nametoken", 1)}

Initial Starting Price for a name that was never previously owned

View Source
var ModuleCdc = codec.New()

Functions

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on the Amino codec

Types

type MsgAddCoin

type MsgAddCoin struct {
	Owner sdk.AccAddress `json:"addr"`
	Amt   sdk.Coins      `json:"amt"`
}

增发------------------------------------------------------- MsgAddCoin defines the AddCoin message

func NewMsgAddCoin

func NewMsgAddCoin(owner sdk.AccAddress, amount sdk.Coins) MsgAddCoin

MsgAddCoin is a constructor function for MsgAddCoin

func (MsgAddCoin) GetSignBytes

func (msg MsgAddCoin) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgAddCoin) GetSigners

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

GetSigners defines whose signature is required

func (MsgAddCoin) Route

func (msg MsgAddCoin) Route() string

Route should return the name of the module

func (MsgAddCoin) Type

func (msg MsgAddCoin) Type() string

Type should return the action

func (MsgAddCoin) ValidateBasic

func (msg MsgAddCoin) ValidateBasic() sdk.Error

ValidateBasic runs stateless checks on the message

type MsgAddNewCoin

type MsgAddNewCoin struct {
	Owner sdk.AccAddress `json:"addr"`
	Amt   sdk.Coins      `json:"amt"`
}

MsgAddCoin defines the AddNewCoin message

func NewMsgAddNewCoin

func NewMsgAddNewCoin(owner sdk.AccAddress, amount sdk.Coins) MsgAddNewCoin

MsgAddCoin is a constructor function for MsgAddCoin

func (MsgAddNewCoin) GetSignBytes

func (msg MsgAddNewCoin) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgAddNewCoin) GetSigners

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

GetSigners defines whose signature is required

func (MsgAddNewCoin) Route

func (msg MsgAddNewCoin) Route() string

Route should return the name of the module

func (MsgAddNewCoin) Type

func (msg MsgAddNewCoin) Type() string

Type should return the action

func (MsgAddNewCoin) ValidateBasic

func (msg MsgAddNewCoin) ValidateBasic() sdk.Error

ValidateBasic runs stateless checks on the message

type MsgBurnCoin

type MsgBurnCoin struct {
	Owner sdk.AccAddress `json:"addr"`
	Amt   sdk.Coins      `json:"amt"`
}

MsgBurnCoin MsgBurnCoin defines the BurnCoin message

func NewMsgBurnCoin

func NewMsgBurnCoin(owner sdk.AccAddress, amount sdk.Coins) MsgBurnCoin

MsgBurnCoin is a constructor function for MsgBurnCoin

func (MsgBurnCoin) GetSignBytes

func (msg MsgBurnCoin) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgBurnCoin) GetSigners

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

GetSigners defines whose signature is required

func (MsgBurnCoin) Route

func (msg MsgBurnCoin) Route() string

Route should return the name of the module

func (MsgBurnCoin) Type

func (msg MsgBurnCoin) Type() string

Type should return the action

func (MsgBurnCoin) ValidateBasic

func (msg MsgBurnCoin) ValidateBasic() sdk.Error

ValidateBasic runs stateless checks on the message

type MsgBuyName

type MsgBuyName struct {
	Name  string         `json:"name"`
	Bid   sdk.Coins      `json:"bid"`
	Buyer sdk.AccAddress `json:"buyer"`
}

MsgBuyName defines the BuyName message

func NewMsgBuyName

func NewMsgBuyName(name string, bid sdk.Coins, buyer sdk.AccAddress) MsgBuyName

NewMsgBuyName is the constructor function for MsgBuyName

func (MsgBuyName) GetSignBytes

func (msg MsgBuyName) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgBuyName) GetSigners

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

GetSigners defines whose signature is required

func (MsgBuyName) Route

func (msg MsgBuyName) Route() string

Route should return the name of the module

func (MsgBuyName) Type

func (msg MsgBuyName) Type() string

Type should return the action

func (MsgBuyName) ValidateBasic

func (msg MsgBuyName) ValidateBasic() sdk.Error

ValidateBasic runs stateless checks on the message

type MsgSetName

type MsgSetName struct {
	Name  string         `json:"name"`
	Value string         `json:"value"`
	Owner sdk.AccAddress `json:"owner"`
}

MsgSetName defines a SetName message

func NewMsgSetName

func NewMsgSetName(name string, value string, owner sdk.AccAddress) MsgSetName

NewMsgSetName is a constructor function for MsgSetName

func (MsgSetName) GetSignBytes

func (msg MsgSetName) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgSetName) GetSigners

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

GetSigners defines whose signature is required

func (MsgSetName) Route

func (msg MsgSetName) Route() string

Route should return the name of the module

func (MsgSetName) Type

func (msg MsgSetName) Type() string

Type should return the action

func (MsgSetName) ValidateBasic

func (msg MsgSetName) ValidateBasic() sdk.Error

ValidateBasic runs stateless checks on the message

type QueryResNames

type QueryResNames []string

Query 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"`
}

Query Result Payload for a resolve query

func (QueryResResolve) String

func (r QueryResResolve) String() string

implement fmt.Stringer

type Whois

type Whois struct {
	Value string         `json:"value"`
	Owner sdk.AccAddress `json:"owner"`
	Price sdk.Coins      `json:"price"`
}

Whois is a struct that contains all the metadata of a name

func NewWhois

func NewWhois() Whois

Returns a new Whois with the minprice as the price

func (Whois) String

func (w Whois) String() string

implement fmt.Stringer

Jump to

Keyboard shortcuts

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