cosmos-sdk: github.com/cosmos/cosmos-sdk/x/genutil/types Index | Files

package types

import "github.com/cosmos/cosmos-sdk/x/genutil/types"

Index

Package Files

expected_keepers.go genesis.pb.go genesis_state.go types.go

Constants

const ModuleName = "genutil"

ModuleName is genutil

Variables

var (
    ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)

func GenesisStateFromGenDoc Uses

func GenesisStateFromGenDoc(cdc codec.JSONMarshaler, genDoc tmtypes.GenesisDoc,
) (genesisState map[string]json.RawMessage, err error)

GenesisStateFromGenDoc creates the core parameters for genesis initialization for the application.

NOTE: The pubkey input is this machines pubkey.

func GenesisStateFromGenFile Uses

func GenesisStateFromGenFile(cdc codec.JSONMarshaler, genFile string) (genesisState map[string]json.RawMessage, genDoc *tmtypes.GenesisDoc, err error)

GenesisStateFromGenFile creates the core parameters for genesis initialization for the application.

NOTE: The pubkey input is this machines pubkey.

func SetGenesisStateInAppState Uses

func SetGenesisStateInAppState(
    cdc codec.JSONMarshaler, appState map[string]json.RawMessage, genesisState GenesisState,
) map[string]json.RawMessage

SetGenesisStateInAppState sets the genutil genesis state within the expected app state

func ValidateGenesis Uses

func ValidateGenesis(genesisState GenesisState, txJSONDecoder sdk.TxDecoder) error

ValidateGenesis validates GenTx transactions

type AccountKeeper Uses

type AccountKeeper interface {
    NewAccount(sdk.Context, auth.AccountI) auth.AccountI
    SetAccount(sdk.Context, auth.AccountI)
    IterateAccounts(ctx sdk.Context, process func(auth.AccountI) (stop bool))
}

AccountKeeper defines the expected account keeper (noalias)

type AppMap Uses

type AppMap map[string]json.RawMessage

AppMap map modules names with their json raw representation.

type GenesisAccountsIterator Uses

type GenesisAccountsIterator interface {
    IterateGenesisAccounts(
        cdc *codec.Codec,
        appGenesis map[string]json.RawMessage,
        cb func(auth.AccountI) (stop bool),
    )
}

GenesisAccountsIterator defines the expected iterating genesis accounts object (noalias)

type GenesisBalancesIterator Uses

type GenesisBalancesIterator interface {
    IterateGenesisBalances(
        cdc codec.JSONMarshaler,
        appGenesis map[string]json.RawMessage,
        cb func(bankexported.GenesisBalance) (stop bool),
    )
}

GenesisAccountsIterator defines the expected iterating genesis accounts object (noalias)

type GenesisState Uses

type GenesisState struct {
    GenTxs []encoding_json.RawMessage `protobuf:"bytes,1,rep,name=gen_txs,json=genTxs,proto3,casttype=encoding/json.RawMessage" json:"gentxs" yaml:"gentxs"`
}

GenesisState defines the raw genesis transaction in JSON

func DefaultGenesisState Uses

func DefaultGenesisState() GenesisState

DefaultGenesisState returns the genutil module's default genesis state.

func GetGenesisStateFromAppState Uses

func GetGenesisStateFromAppState(cdc codec.JSONMarshaler, appState map[string]json.RawMessage) GenesisState

GetGenesisStateFromAppState gets the genutil genesis state from the expected app state

func NewGenesisState Uses

func NewGenesisState(genTxs []json.RawMessage) GenesisState

NewGenesisState creates a new GenesisState object

func NewGenesisStateFromTx Uses

func NewGenesisStateFromTx(txJSONEncoder sdk.TxEncoder, genTxs []sdk.Tx) GenesisState

NewGenesisStateFromTx creates a new GenesisState object from auth transactions

func (*GenesisState) Descriptor Uses

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetGenTxs Uses

func (m *GenesisState) GetGenTxs() []encoding_json.RawMessage

func (*GenesisState) Marshal Uses

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo Uses

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer Uses

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage Uses

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset Uses

func (m *GenesisState) Reset()

func (*GenesisState) Size Uses

func (m *GenesisState) Size() (n int)

func (*GenesisState) String Uses

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal Uses

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (*GenesisState) XXX_DiscardUnknown Uses

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal Uses

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge Uses

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size Uses

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal Uses

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type InitConfig Uses

type InitConfig struct {
    ChainID   string
    GenTxsDir string
    NodeID    string
    ValPubKey crypto.PubKey
}

InitConfig common config options for init

func NewInitConfig Uses

func NewInitConfig(chainID, genTxsDir, nodeID string, valPubKey crypto.PubKey) InitConfig

NewInitConfig creates a new InitConfig object

type MigrationCallback Uses

type MigrationCallback func(AppMap) AppMap

MigrationCallback converts a genesis map from the previous version to the targeted one.

TODO: MigrationCallback should also return an error upon failure.

type MigrationMap Uses

type MigrationMap map[string]MigrationCallback

MigrationMap defines a mapping from a version to a MigrationCallback.

type StakingKeeper Uses

type StakingKeeper interface {
    ApplyAndReturnValidatorSetUpdates(sdk.Context) (updates []abci.ValidatorUpdate)
}

StakingKeeper defines the expected staking keeper (noalias)

Package types imports 17 packages (graph) and is imported by 11 packages. Updated 2020-08-05. Refresh now. Tools for package owners.