Documentation ¶
Index ¶
- Constants
- Variables
- func EndpointsDupCheck(eps Endpoints) sdk.Error
- func ErrBadDenom(msg string) sdk.Error
- func ErrBondInsufficient(msg string) sdk.Error
- func ErrEmptyInputs(msg string) sdk.Error
- func ErrEndpointsDuplicate(msg string) sdk.Error
- func ErrEndpointsEmpty() sdk.Error
- func ErrEndpointsFormat() sdk.Error
- func ErrMonikerExist(msg string) sdk.Error
- func GetServiceNodeByBondKey(obj ServiceNode) []byte
- func GetServiceNodeByMonikerKey(moniker string) []byte
- func GetServiceNodeKey(addr sdk.AccAddress) []byte
- func GetUnBondingKey(timestamp time.Time) []byte
- func MustMarshalServiceNode(cdc *codec.Codec, obj ServiceNode) []byte
- func RegisterCodec(cdc *codec.Codec)
- type Endpoint
- type EndpointDuplicateErrDetector
- type Endpoints
- type GenesisState
- type MsgServiceNodeClaim
- func (msg MsgServiceNodeClaim) GetSignBytes() []byte
- func (msg MsgServiceNodeClaim) GetSigners() []sdk.AccAddress
- func (msg MsgServiceNodeClaim) Route() string
- func (msg *MsgServiceNodeClaim) TrimSpace()
- func (msg MsgServiceNodeClaim) Type() string
- func (msg MsgServiceNodeClaim) ValidateBasic() sdk.Error
- type Params
- type QueryServiceNodeParams
- type QueryServiceNodesParams
- type ServiceNode
- type ServiceNodes
- type ServiceType
- type SupplyKeeper
- type UnBonding
- type UnBondings
Constants ¶
View Source
const ( DefaultCodespace sdk.CodespaceType = ModuleName CodeEmptyInputs sdk.CodeType = 100 CodeEndpointsFormatErr sdk.CodeType = 102 CodeEndpointsEmptyErr sdk.CodeType = 103 CodeEndpointsDuplicateErr sdk.CodeType = 104 CodeBadDenom sdk.CodeType = 111 CodeBondInsufficient sdk.CodeType = 112 CodeMonikerExist sdk.CodeType = 113 )
View Source
const ( ModuleName = "ipal" StoreKey = ModuleName RouterKey = ModuleName QuerierRoute = ModuleName )
View Source
const ( QueryServiceNodeList = "list" QueryServiceNode = "node" QueryServiceNodes = "nodes" QueryParameters = "params" )
View Source
const (
DefaultUnbondingTime = time.Hour * 24 * 7
)
Variables ¶
View Source
var ( ServiceNodeKey = []byte{0x10} ServiceNodeByBondKey = []byte{0x11} ServiceNodeByMonikerKey = []byte{0x12} UnBondingKey = []byte{0x13} )
View Source
var ( KeyUnbondingTime = []byte("UnbondingTime") KeyMinBond = []byte("MinBond") )
View Source
var (
AttributeValueCategory = ModuleName
)
View Source
var (
DefaultMinBond = sdk.NewCoin(sdk.NativeTokenName, sdk.NewInt(1000000*1))
)
View Source
var ModuleCdc *codec.Codec
Functions ¶
func EndpointsDupCheck ¶
func ErrBadDenom ¶
func ErrBondInsufficient ¶
func ErrEmptyInputs ¶
func ErrEndpointsDuplicate ¶
func ErrEndpointsEmpty ¶
func ErrEndpointsFormat ¶
func ErrMonikerExist ¶
func GetServiceNodeByBondKey ¶
func GetServiceNodeByBondKey(obj ServiceNode) []byte
func GetServiceNodeKey ¶
func GetServiceNodeKey(addr sdk.AccAddress) []byte
func GetUnBondingKey ¶
func MustMarshalServiceNode ¶
func MustMarshalServiceNode(cdc *codec.Codec, obj ServiceNode) []byte
func RegisterCodec ¶
Types ¶
type Endpoint ¶
type Endpoint struct { Type uint64 `json:"type" yaml:"type"` Endpoint string `json:"endpoint" yaml:"endpoint"` }
func NewEndpoint ¶
type GenesisState ¶
type GenesisState struct {
Params Params `json:"params" yaml:"params"`
}
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
func NewGenesisState ¶
func NewGenesisState(params Params) GenesisState
type MsgServiceNodeClaim ¶
type MsgServiceNodeClaim struct { OperatorAddress sdk.AccAddress `json:"operator_address" yaml:"operator_address"` // address of the ServiceNode's operator Moniker string `json:"moniker" yaml:"moniker"` // name Website string `json:"website" yaml:"website"` // optional website link Details string `json:"details" yaml:"details"` // optional details Endpoints Endpoints `json:"endpoints" yaml:"endpoints"` // server endpoint for app client Bond sdk.Coin `json:"bond" yaml:"bond"` }
func NewMsgServiceNodeClaim ¶
func NewMsgServiceNodeClaim(operator sdk.AccAddress, moniker, website, details string, endpoints Endpoints, Bond sdk.Coin) MsgServiceNodeClaim
func (MsgServiceNodeClaim) GetSignBytes ¶
func (msg MsgServiceNodeClaim) GetSignBytes() []byte
func (MsgServiceNodeClaim) GetSigners ¶
func (msg MsgServiceNodeClaim) GetSigners() []sdk.AccAddress
func (MsgServiceNodeClaim) Route ¶
func (msg MsgServiceNodeClaim) Route() string
func (*MsgServiceNodeClaim) TrimSpace ¶
func (msg *MsgServiceNodeClaim) TrimSpace()
func (MsgServiceNodeClaim) Type ¶
func (msg MsgServiceNodeClaim) Type() string
func (MsgServiceNodeClaim) ValidateBasic ¶
func (msg MsgServiceNodeClaim) ValidateBasic() sdk.Error
type Params ¶
type Params struct { UnbondingTime time.Duration `json:"unbonding_time" yaml:"unbonding_time"` MinBond sdk.Coin `json:"min_bond" yaml:"min_bond"` }
func DefaultParams ¶
func DefaultParams() Params
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() params.ParamSetPairs
type QueryServiceNodeParams ¶
type QueryServiceNodeParams struct {
AccAddr sdk.AccAddress
}
func NewQueryServiceNodeParams ¶
func NewQueryServiceNodeParams(AccAddr sdk.AccAddress) QueryServiceNodeParams
type QueryServiceNodesParams ¶ added in v1.0.10
type QueryServiceNodesParams struct {
AccAddrs []sdk.AccAddress `json:"acc_addrs"`
}
func NewQueryServiceNodesParams ¶ added in v1.0.10
func NewQueryServiceNodesParams(AccAddrs []sdk.AccAddress) QueryServiceNodesParams
type ServiceNode ¶
type ServiceNode struct { OperatorAddress sdk.AccAddress `json:"operator_address" yaml:"operator_address"` // address of the ServiceNode's operator Moniker string `json:"moniker" yaml:"moniker"` // name Website string `json:"website" yaml:"website"` // optional website link Details string `json:"details" yaml:"details"` // optional details Endpoints Endpoints `json:"endpoints" yaml:"endpoints"` Bond sdk.Coin `json:"bond" yaml:"bond"` }
func MustUnmarshalServiceNode ¶
func MustUnmarshalServiceNode(cdc *codec.Codec, value []byte) ServiceNode
func NewServiceNode ¶
func NewServiceNode(operator sdk.AccAddress, moniker, website string, details string, endpoints Endpoints, amount sdk.Coin) ServiceNode
func UnmarshalServiceNode ¶
func UnmarshalServiceNode(cdc *codec.Codec, value []byte) (obj ServiceNode, err error)
func (ServiceNode) MarshalYAML ¶
func (obj ServiceNode) MarshalYAML() (interface{}, error)
func (ServiceNode) String ¶
func (obj ServiceNode) String() string
type ServiceNodes ¶
type ServiceNodes []ServiceNode
func (ServiceNodes) String ¶
func (v ServiceNodes) String() (out string)
type SupplyKeeper ¶
type SupplyKeeper interface { GetModuleAddress(name string) sdk.AccAddress GetModuleAccount(ctx sdk.Context, name string) supplyexported.ModuleAccountI SetModuleAccount(sdk.Context, supplyexported.ModuleAccountI) SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) sdk.Error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) sdk.Error }
type UnBonding ¶
type UnBonding struct { AccountAddress sdk.AccAddress `json:"account_address" yaml:"account_address"` Amount sdk.Coin `json:"amount" yaml:"amount"` EndTime time.Time `json:"end_time" yaml:"end_time"` }
func NewUnBonding ¶
type UnBondings ¶
type UnBondings []UnBonding
Click to show internal directories.
Click to hide internal directories.