Documentation ¶
Index ¶
- Constants
- Variables
- func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState) []abci.ValidatorUpdate
- func ValidateGenesis(data GenesisState) error
- type AppModule
- func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
- func (am AppModule) EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) Name() string
- func (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (am AppModule) QuerierRoute() string
- func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (am AppModule) Route() string
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type BitcoinHeader
- type GenesisState
- type Hash160Digest
- type Hash256Digest
- type HexBytes
- type Keeper
- type NullHandler
- type ProofHandler
- type RawHeader
- type SPVProof
Constants ¶
const ( // ModuleName is what it says on the tin ModuleName = types.ModuleName // RouterKey is what it says on the tin RouterKey = types.RouterKey //StoreKey is what it says on the tin StoreKey = types.StoreKey )
Variables ¶
var ( // NewKeeper is what is says on the tin NewKeeper = keeper.NewKeeper // NewQuerier is what is says on the tin NewQuerier = keeper.NewQuerier // NewMsgIngestHeaderChain is what is says on the tin NewMsgIngestHeaderChain = types.NewMsgIngestHeaderChain // NewMsgIngestDifficultyChange is what is says on the tin NewMsgIngestDifficultyChange = types.NewMsgIngestDifficultyChange // NewMsgMarkNewHeaviest is what is says on the tin NewMsgMarkNewHeaviest = types.NewMsgMarkNewHeaviest // NewMsgNewRequest is what is says on the tin NewMsgNewRequest = types.NewMsgNewRequest // NewMsgProvideProof is what is says on the tin NewMsgProvideProof = types.NewMsgProvideProof // RegisterCodec is what is says on the tin RegisterCodec = types.RegisterCodec // ModuleCdc is what is says on the tin ModuleCdc = types.ModuleCdc )
Functions ¶
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState) []abci.ValidatorUpdate
InitGenesis inits the app state based on the genesis state
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis validates a genesis state
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule is the AppModule
func NewAppModule ¶
NewAppModule creates a new AppModule Object
func (AppModule) BeginBlock ¶
func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
BeginBlock is
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate
EndBlock is
func (AppModule) ExportGenesis ¶
func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
ExportGenesis is
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
InitGenesis is
func (AppModule) NewHandler ¶
NewHandler makes a new handler
func (AppModule) NewQuerierHandler ¶
NewQuerierHandler is
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
RegisterInvariants is
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic is app module Basics object
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
DefaultGenesis is
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
GetQueryCmd get the root query command of this module
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
GetTxCmd get the root tx command of this module
func (AppModuleBasic) RegisterCodec ¶
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
RegisterCodec is
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
RegisterRESTRoutes registers rest routes
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
ValidateGenesis validates check of the Genesis
type BitcoinHeader ¶
type BitcoinHeader = types.BitcoinHeader
BitcoinHeader is a parsed Bitcoin header
type GenesisState ¶
type GenesisState struct { Headers []BitcoinHeader `json:"headers"` PeriodStart BitcoinHeader `json:"periodStart"` }
GenesisState is the genesis state
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState sets block 606210 as genesis
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState
ExportGenesis exports the genesis state TODO: export GenesisState
May need special store keys for it
func NewGenesisState ¶
func NewGenesisState(headers []BitcoinHeader, periodStart BitcoinHeader) GenesisState
NewGenesisState instantiates a genesis state
type Hash160Digest ¶
type Hash160Digest = types.Hash160Digest
Hash160Digest is a 20-byte ripemd160+sha2 hash
type Hash256Digest ¶
type Hash256Digest = types.Hash256Digest
Hash256Digest 32-byte double-sha2 digest
type ProofHandler ¶
type ProofHandler = types.ProofHandler
ProofHandler is an interface to which the keepers dispatches valid proofs