Versions in this module Expand all Collapse all v0 v0.23.1 Jul 27, 2018 Changes in this version + func ErrInvalidCount(codespace sdk.CodespaceType, msg string) sdk.Error + func ErrInvalidDifficulty(codespace sdk.CodespaceType, msg string) sdk.Error + func ErrInvalidProof(codespace sdk.CodespaceType, msg string) sdk.Error + func ErrNonexistentCount(codespace sdk.CodespaceType) sdk.Error + func ErrNonexistentDifficulty(codespace sdk.CodespaceType) sdk.Error + func ErrNonexistentReward(codespace sdk.CodespaceType) sdk.Error + func ErrNotBelowTarget(codespace sdk.CodespaceType, msg string) sdk.Error + func InitGenesis(ctx sdk.Context, k Keeper, genesis Genesis) error + func RegisterWire(cdc *wire.Codec) + type CodeType = sdk.CodeType + const CodeInvalidCount + const CodeInvalidDifficulty + const CodeInvalidProof + const CodeNonexistentCount + const CodeNonexistentDifficulty + const CodeNonexistentReward + const CodeNotBelowTarget + const CodeUnknownRequest + const DefaultCodespace + type Config struct + Denomination string + Reward int64 + func NewConfig(denomination string, reward int64) Config + type Genesis struct + Count uint64 + Difficulty uint64 + func WriteGenesis(ctx sdk.Context, k Keeper) Genesis + type Keeper struct + func NewKeeper(key sdk.StoreKey, config Config, ck bank.Keeper, codespace sdk.CodespaceType) Keeper + func (k Keeper) ApplyValid(ctx sdk.Context, sender sdk.AccAddress, newDifficulty uint64, newCount uint64) sdk.Error + func (k Keeper) CheckValid(ctx sdk.Context, difficulty uint64, count uint64) (uint64, uint64, sdk.Error) + func (k Keeper) GetLastCount(ctx sdk.Context) (uint64, error) + func (k Keeper) GetLastDifficulty(ctx sdk.Context) (uint64, error) + func (k Keeper) SetLastCount(ctx sdk.Context, count uint64) + func (k Keeper) SetLastDifficulty(ctx sdk.Context, diff uint64) + func (pk Keeper) Handler(ctx sdk.Context, msg sdk.Msg) sdk.Result + type MsgMine struct + Count uint64 + Difficulty uint64 + Nonce uint64 + Proof []byte + Sender sdk.AccAddress + func GenerateMsgMine(sender sdk.AccAddress, count uint64, difficulty uint64) MsgMine + func NewMsgMine(sender sdk.AccAddress, difficulty uint64, count uint64, nonce uint64, ...) MsgMine + func (msg MsgMine) GetSignBytes() []byte + func (msg MsgMine) GetSigners() []sdk.AccAddress + func (msg MsgMine) String() string + func (msg MsgMine) Type() string + func (msg MsgMine) ValidateBasic() sdk.Error