Documentation ¶
Index ¶
- func AppGenState(_ *codec.LegacyAmino, _ genutiltypes.AppGenesis, _ []json.RawMessage) (appState json.RawMessage, err error)
- func AppGenStateEmpty(_ *codec.LegacyAmino, _ genutiltypes.AppGenesis, _ []json.RawMessage) (appState json.RawMessage, err error)
- func InitChainer(key storetypes.StoreKey) func(sdk.Context, *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- func KVStoreHandler(storeKey storetypes.StoreKey) bam.MsgServiceHandler
- func MsgTestHandler(srv interface{}, ctx context.Context, dec func(interface{}) error, ...) (interface{}, error)
- func NewApp(rootDir string, logger log.Logger) (servertypes.ABCI, error)
- func NewCommitMultiStore() storetypes.CommitMultiStore
- type GenesisJSON
- type KV
- type KVStoreTx
- func (msg *KVStoreTx) Address() cryptotypes.Address
- func (msg *KVStoreTx) Bytes() []byte
- func (msg *KVStoreTx) Equals(key cryptotypes.PubKey) bool
- func (msg *KVStoreTx) GetMsgs() []sdk.Msg
- func (msg *KVStoreTx) GetMsgsV2() ([]protov2.Message, error)
- func (msg *KVStoreTx) GetPubKeys() ([]cryptotypes.PubKey, error)
- func (msg *KVStoreTx) GetSignBytes() []byte
- func (msg *KVStoreTx) GetSignaturesV2() (res []txsigning.SignatureV2, err error)
- func (msg *KVStoreTx) GetSigners() ([][]byte, error)
- func (msg *KVStoreTx) ProtoMessage()
- func (msg *KVStoreTx) Reset()
- func (msg *KVStoreTx) String() string
- func (msg *KVStoreTx) Type() string
- func (msg *KVStoreTx) ValidateBasic() error
- func (msg *KVStoreTx) VerifySignature(msgByte, sig []byte) bool
- type MsgServer
- type MsgServerImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppGenState ¶
func AppGenState(_ *codec.LegacyAmino, _ genutiltypes.AppGenesis, _ []json.RawMessage) (appState json.RawMessage, err error)
AppGenState can be passed into InitCmd, returns a static string of a few key-values that can be parsed by InitChainer
func AppGenStateEmpty ¶
func AppGenStateEmpty(_ *codec.LegacyAmino, _ genutiltypes.AppGenesis, _ []json.RawMessage) (appState json.RawMessage, err error)
AppGenStateEmpty returns an empty transaction state for mocking.
func InitChainer ¶
func InitChainer(key storetypes.StoreKey) func(sdk.Context, *abci.RequestInitChain) (*abci.ResponseInitChain, error)
InitChainer returns a function that can initialize the chain with key/value pairs
func KVStoreHandler ¶
func KVStoreHandler(storeKey storetypes.StoreKey) bam.MsgServiceHandler
KVStoreHandler is a simple handler that takes KVStoreTx and writes them to the db.
func MsgTestHandler ¶ added in v0.50.0
func NewApp ¶
NewApp creates a simple mock kvstore app for testing. It should work similar to a real app. Make sure rootDir is empty before running the test, in order to guarantee consistent results.
func NewCommitMultiStore ¶
func NewCommitMultiStore() storetypes.CommitMultiStore
Types ¶
type GenesisJSON ¶
type GenesisJSON struct {
Values []KV `json:"values"`
}
What Genesis JSON is formatted as
type KVStoreTx ¶ added in v0.50.0
type KVStoreTx struct {
// contains filtered or unexported fields
}
An sdk.Tx which is its own sdk.Msg.
func (*KVStoreTx) Address ¶ added in v0.50.0
func (msg *KVStoreTx) Address() cryptotypes.Address
func (*KVStoreTx) Equals ¶ added in v0.50.0
func (msg *KVStoreTx) Equals(key cryptotypes.PubKey) bool
func (*KVStoreTx) GetPubKeys ¶ added in v0.50.0
func (msg *KVStoreTx) GetPubKeys() ([]cryptotypes.PubKey, error)
func (*KVStoreTx) GetSignBytes ¶ added in v0.50.0
func (*KVStoreTx) GetSignaturesV2 ¶ added in v0.50.0
func (msg *KVStoreTx) GetSignaturesV2() (res []txsigning.SignatureV2, err error)
func (*KVStoreTx) GetSigners ¶ added in v0.50.0
func (*KVStoreTx) ProtoMessage ¶ added in v0.50.0
func (msg *KVStoreTx) ProtoMessage()
func (*KVStoreTx) Reset ¶ added in v0.50.0
func (msg *KVStoreTx) Reset()
dummy implementation of proto.Message
func (*KVStoreTx) ValidateBasic ¶ added in v0.50.0
Should the app be calling this? Or only handlers?