Documentation ¶
Index ¶
Constants ¶
View Source
const ( ModuleName = "magpie" DefaultSessionLength = 240 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenesisState ¶
type GenesisState struct { DefaultSessionLength int64 `json:"default_session_length"` Sessions []Session `json:"sessions"` }
GenesisState represents the genesis state for the magpie module
func Migrate ¶
func Migrate(oldGenState v020magpie.GenesisState) GenesisState
Migrate accepts exported genesis state from v0.2.0 and migrates it to v0.3.0 genesis state. This migration adds the default session length to the new genesis state.
func NewGenesisState ¶
func NewGenesisState(defaultSessionLength int64, session []Session) GenesisState
NewGenesisState returns a new genesis state from the given data
type Session ¶
type Session struct { SessionID SessionID `json:"id,string"` // Id of the session Owner sdk.AccAddress `json:"owner"` // Desmos owner of this session Created int64 `json:"creation_time,string"` // Block height at which the session has been created Expiry int64 `json:"expiration_time,string"` // Block height at which the session will expire Namespace string `json:"namespace"` // External chain identifier ExternalOwner string `json:"external_owner"` // External chain owner address PubKey string `json:"pub_key"` // External chain owner public key Signature string `json:"signature"` // Session signature }
Session is a struct of a user session
Click to show internal directories.
Click to hide internal directories.