Documentation ¶
Index ¶
Constants ¶
const ( // ModuleName uses for schema name in key-value store ModuleName = "nameservice" // StoreKey sets schema name from ModuleName StoreKey = ModuleName )
const RouterKey = ModuleName
RouterKey is not in sense yet
Variables ¶
var ModuleCdc = codec.New()
ModuleCdc is used as a codec in types package
Functions ¶
func RegisterCodec ¶
RegisterCodec registers concrete types on the Amino codec
Types ¶
type MsgAddrCheck ¶
type MsgAddrCheck struct { ID string `json:"id"` Address sdk.AccAddress `json:"address"` }
MsgAddrCheck defines a ChangeKey message
func NewMsgAddrCheck ¶
func NewMsgAddrCheck(name string, address sdk.AccAddress) MsgAddrCheck
NewMsgAddrCheck is a constructor function for MsgAddrCheck
func (MsgAddrCheck) GetSignBytes ¶
func (msg MsgAddrCheck) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgAddrCheck) GetSigners ¶
func (msg MsgAddrCheck) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgAddrCheck) Route ¶
func (msg MsgAddrCheck) Route() string
Route should return the name of the module
func (MsgAddrCheck) ValidateBasic ¶
func (msg MsgAddrCheck) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgChangeKey ¶
type MsgChangeKey struct { ID string `json:"ID"` OldAddress sdk.AccAddress `json:"oldaddress"` NewAddress sdk.AccAddress `json:"newaddress"` }
MsgChangeKey defines a ChangeKey message
func NewMsgChangeKey ¶
func NewMsgChangeKey(name string, oldAddress, newAddress sdk.AccAddress) MsgChangeKey
NewMsgChangeKey is a constructor function for MsgChangeKey
func (MsgChangeKey) GetSignBytes ¶
func (msg MsgChangeKey) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgChangeKey) GetSigners ¶
func (msg MsgChangeKey) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgChangeKey) Route ¶
func (msg MsgChangeKey) Route() string
Route should return the name of the module
func (MsgChangeKey) ValidateBasic ¶
func (msg MsgChangeKey) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgSetAccount ¶
type MsgSetAccount struct { ID string `json:"id"` Address sdk.AccAddress `json:"address"` }
MsgSetAccount defines a SetAccount message
func NewMsgSetAccount ¶
func NewMsgSetAccount(name string, address sdk.AccAddress) MsgSetAccount
NewMsgSetAccount is a constructor function for MsgSetName
func (MsgSetAccount) GetSignBytes ¶
func (msg MsgSetAccount) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgSetAccount) GetSigners ¶
func (msg MsgSetAccount) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgSetAccount) Route ¶
func (msg MsgSetAccount) Route() string
Route should return the name of the module
func (MsgSetAccount) ValidateBasic ¶
func (msg MsgSetAccount) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type Name ¶
type Name struct {
H, L uint64
}
Name is uint128 datatype, and supports redable ID which contains up to 20 letters. But, Golang has no uint128 in native, so it should be created manually. ID fills H uint64 first 10 letters, and fills L next 10 letters.
type QueryResUnitAccount ¶
type QueryResUnitAccount struct { ID string `json:"id"` Address sdk.AccAddress `json:"address"` }
QueryResUnitAccount payload for a UnitAccount query
func (QueryResUnitAccount) String ¶
func (r QueryResUnitAccount) String() string
implement fmt.Stringer
type UnitAccount ¶
type UnitAccount struct { ID Name `json:"id"` Address sdk.AccAddress `json:"address"` }
UnitAccount used to define Unit account structure