Documentation ¶
Index ¶
Constants ¶
View Source
const ( EventTypeCreateRecord = "create_record" AttributeKeyCreator = "creator" AttributeKeyRecordID = "record_id" AttributeValueCategory = ModuleName )
record module event types
View Source
const ( // module name ModuleName = "record" // StoreKey is the default store key for record StoreKey = ModuleName // RouterKey is the message route for record RouterKey = ModuleName // QuerierRoute is the querier route for the record store. QuerierRoute = StoreKey // Query endpoints supported by the record querier QueryRecord = "record" )
nolint
View Source
const (
TypeMsgCreateRecord = "create_record" // type for TypeMsgCreateRecord
)
Variables ¶
View Source
var ( RecordKey = []byte{0x00} // record key IntraTxCounterKey = []byte{0x01} // key for intra-block tx index )
View Source
var (
ErrUnknownRecord = sdkerrors.Register(ModuleName, 1, "unknown record")
)
record module sentinel errors
View Source
var ModuleCdc *codec.Codec
ModuleCdc defines the module codec
Functions ¶
func RegisterCodec ¶
RegisterCodec registers concrete types on the codec.
Types ¶
type Content ¶
type Content struct { Digest string `json:"digest" yaml:"digest"` DigestAlgo string `json:"digest_algo" yaml:"digest_algo"` URI string `json:"uri" yaml:"uri"` Meta string `json:"meta" yaml:"meta"` }
Content represents a sub-record
type GenesisState ¶
type GenesisState struct {
Records []Record `json:"records"`
}
GenesisState - all record state that must be provided at genesis
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState gets raw genesis raw message for testing
func NewGenesisState ¶
func NewGenesisState(records []Record) GenesisState
NewGenesisState constructs a GenesisState
type MsgCreateRecord ¶
type MsgCreateRecord struct { Contents []Content Creator sdk.AccAddress // the creator of the record }
MsgCreateRecord - struct for create a record
func NewMsgCreateRecord ¶
func NewMsgCreateRecord(contents []Content, Creator sdk.AccAddress) MsgCreateRecord
NewMsgCreateRecord constructs a MsgCreateRecord
func (MsgCreateRecord) GetSignBytes ¶
func (msg MsgCreateRecord) GetSignBytes() []byte
GetSignBytes implements Msg.
func (MsgCreateRecord) GetSigners ¶
func (msg MsgCreateRecord) GetSigners() []sdk.AccAddress
GetSigners implements Msg.
func (MsgCreateRecord) ValidateBasic ¶
func (msg MsgCreateRecord) ValidateBasic() error
ValidateBasic implements Msg.
type QueryRecordParams ¶
type QueryRecordParams struct {
RecordID []byte `json:"record_id"`
}
QueryRecordParams defines QueryRecord params
type Record ¶
type Record struct { TxHash bytes.HexBytes `json:"tx_hash" yaml:"tx_hash"` Contents []Content `json:"contents" yaml:"contents"` Creator sdk.AccAddress `json:"creator" yaml:"creator"` }
Record represents a Record
type RecordOutput ¶
type RecordOutput struct { TxHash string `json:"tx_hash" yaml:"tx_hash"` Contents []Content `json:"contents" yaml:"contents"` Creator sdk.AccAddress `json:"creator" yaml:"creator"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.