v030

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

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

type SessionID

type SessionID uint64

SessionID represents a unique session id

Jump to

Keyboard shortcuts

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