Documentation ¶
Index ¶
- Constants
- Variables
- func ErrNameDoesNotExist(codespace sdk.CodespaceType) sdk.Error
- func FileDoesNotExist(codespace sdk.CodespaceType) sdk.Error
- func RegisterCodec(cdc *codec.Codec)
- type File
- type MsgBuyName
- type MsgDeleteName
- type MsgRegisterTransfer
- type MsgSetName
- type QueryResNames
- type QueryResResolve
- type QueryResTransfers
- type Transfer
- type Whois
Constants ¶
const ( DefaultCodespace sdk.CodespaceType = ModuleName CodeNameDoesNotExist sdk.CodeType = 101 CodeFileDoesNotExist sdk.CodeType = 102 )
DefaultCodespace is the Module Name
const ( // ModuleName is the name of the module ModuleName = "nameservice" // StoreKey to be used when creating the KVStore StoreKey = ModuleName Pkey = "pkey" )
const RouterKey = ModuleName // this was defined in your key.go file
RouterKey is the module name router key
Variables ¶
var MinNamePrice = sdk.Coins{sdk.NewInt64Coin("nametoken", 1)}
MinNamePrice is Initial Starting Price for a name that was never previously owned
var ModuleCdc = codec.New()
ModuleCdc is the codec for the module
Functions ¶
func ErrNameDoesNotExist ¶
func ErrNameDoesNotExist(codespace sdk.CodespaceType) sdk.Error
ErrNameDoesNotExist is the error for name not existing
func FileDoesNotExist ¶
func FileDoesNotExist(codespace sdk.CodespaceType) sdk.Error
ErrFileDoesNotExist is the error for name not existing
func RegisterCodec ¶
RegisterCodec registers concrete types on the Amino codec
Types ¶
type File ¶
type File struct { Filename string `json:"filename"` Owner sdk.AccAddress `json:"owner"` }
File structure for register files
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) ValidateBasic ¶
func (msg MsgBuyName) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgDeleteName ¶
type MsgDeleteName struct { Name string `json:"name"` Owner sdk.AccAddress `json:"owner"` }
MsgDeleteName defines a DeleteName message
func NewMsgDeleteName ¶
func NewMsgDeleteName(name string, owner sdk.AccAddress) MsgDeleteName
NewMsgDeleteName is a constructor function for MsgDeleteName
func (MsgDeleteName) GetSignBytes ¶
func (msg MsgDeleteName) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgDeleteName) GetSigners ¶
func (msg MsgDeleteName) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgDeleteName) Route ¶
func (msg MsgDeleteName) Route() string
Route should return the name of the module
func (MsgDeleteName) ValidateBasic ¶
func (msg MsgDeleteName) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgRegisterTransfer ¶
type MsgRegisterTransfer struct { Sender sdk.AccAddress `json:"sender"` Receiver sdk.AccAddress `json:"receiver"` Prestige uint `json:"price"` Filename string `json:"filename"` }
MsgSetName defines a SetName message
func NewMsgRegisterTransfer ¶
func NewMsgRegisterTransfer(sender sdk.AccAddress, receiver sdk.AccAddress, prestige uint, filename string) MsgRegisterTransfer
NewMsgSetName is a constructor function for MsgSetName
func (MsgRegisterTransfer) GetSignBytes ¶
func (msg MsgRegisterTransfer) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgRegisterTransfer) GetSigners ¶
func (msg MsgRegisterTransfer) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgRegisterTransfer) Route ¶
func (msg MsgRegisterTransfer) Route() string
Route should return the name of the module
func (MsgRegisterTransfer) Type ¶
func (msg MsgRegisterTransfer) Type() string
Type should return the action
func (MsgRegisterTransfer) ValidateBasic ¶
func (msg MsgRegisterTransfer) 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) ValidateBasic ¶
func (msg MsgSetName) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type QueryResNames ¶
type QueryResNames []string
QueryResNames Queries Result Payload for a names query
type QueryResResolve ¶
type QueryResResolve struct {
Value string `json:"value"`
}
QueryResResolve Queries Result Payload for a resolve query
type QueryResTransfers ¶
type QueryResTransfers []string
QueryResNames Queries Result Payload for a names query
type Transfer ¶
type Transfer struct { Sender sdk.AccAddress `json:"sender"` Receiver sdk.AccAddress `json:"receiver"` Prestige uint `json:"price"` Filename string `json:"filename"` }
Transfer is a struct that contains all the metadata of a transfer