Documentation ¶
Index ¶
- Constants
- Variables
- func GetRecordKey(recordID []byte) []byte
- func RegisterCodec(cdc *codec.Codec)
- type AccountKeeper
- type BankKeeper
- type Content
- func (*Content) Descriptor() ([]byte, []int)
- func (this *Content) Equal(that interface{}) bool
- func (m *Content) GetDigest() string
- func (m *Content) GetDigestAlgo() string
- func (m *Content) GetMeta() string
- func (m *Content) GetURI() string
- func (m *Content) Marshal() (dAtA []byte, err error)
- func (m *Content) MarshalTo(dAtA []byte) (int, error)
- func (m *Content) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Content) ProtoMessage()
- func (m *Content) Reset()
- func (m *Content) Size() (n int)
- func (m *Content) String() string
- func (m *Content) Unmarshal(dAtA []byte) error
- func (m *Content) XXX_DiscardUnknown()
- func (m *Content) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Content) XXX_Merge(src proto.Message)
- func (m *Content) XXX_Size() int
- func (m *Content) XXX_Unmarshal(b []byte) error
- type GenesisState
- type MsgCreateRecord
- func (*MsgCreateRecord) Descriptor() ([]byte, []int)
- func (this *MsgCreateRecord) Equal(that interface{}) bool
- func (m *MsgCreateRecord) GetContents() []Content
- func (m *MsgCreateRecord) GetCreator() github_com_cosmos_cosmos_sdk_types.AccAddress
- func (msg MsgCreateRecord) GetSignBytes() []byte
- func (msg MsgCreateRecord) GetSigners() []sdk.AccAddress
- func (m *MsgCreateRecord) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateRecord) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateRecord) ProtoMessage()
- func (m *MsgCreateRecord) Reset()
- func (msg MsgCreateRecord) Route() string
- func (m *MsgCreateRecord) Size() (n int)
- func (m *MsgCreateRecord) String() string
- func (msg MsgCreateRecord) Type() string
- func (m *MsgCreateRecord) Unmarshal(dAtA []byte) error
- func (msg MsgCreateRecord) ValidateBasic() error
- func (m *MsgCreateRecord) XXX_DiscardUnknown()
- func (m *MsgCreateRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateRecord) XXX_Merge(src proto.Message)
- func (m *MsgCreateRecord) XXX_Size() int
- func (m *MsgCreateRecord) XXX_Unmarshal(b []byte) error
- type QueryRecordParams
- type Record
- func (*Record) Descriptor() ([]byte, []int)
- func (this *Record) Equal(that interface{}) bool
- func (m *Record) GetContents() []Content
- func (m *Record) GetCreator() github_com_cosmos_cosmos_sdk_types.AccAddress
- func (m *Record) GetTxHash() github_com_tendermint_tendermint_libs_bytes.HexBytes
- func (m *Record) Marshal() (dAtA []byte, err error)
- func (m *Record) MarshalTo(dAtA []byte) (int, error)
- func (m *Record) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Record) ProtoMessage()
- func (m *Record) Reset()
- func (m *Record) Size() (n int)
- func (m *Record) String() string
- func (m *Record) Unmarshal(dAtA []byte) error
- func (m *Record) XXX_DiscardUnknown()
- func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Record) XXX_Merge(src proto.Message)
- func (m *Record) XXX_Size() int
- func (m *Record) XXX_Unmarshal(b []byte) error
- type RecordOutput
Constants ¶
const ( EventTypeCreateRecord = "create_record" AttributeKeyCreator = "creator" AttributeKeyRecordID = "record_id" AttributeValueCategory = ModuleName )
record module event types
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
const (
TypeMsgCreateRecord = "create_record" // type for TypeMsgCreateRecord
)
Variables ¶
var ( RecordKey = []byte{0x01} // record key IntraTxCounterKey = []byte{0x02} // key for intra-block tx index )
var ( ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") )
var (
ErrUnknownRecord = sdkerrors.Register(ModuleName, 2, "unknown record")
)
record module sentinel errors
var ( // ModuleCdc references the global x/staking module codec. Note, the codec should // ONLY be used in certain instances of tests and for JSON encoding as Amino is // still used for that purpose. // // The actual codec used for serialization should be provided to x/staking and // defined at the application level. ModuleCdc = codec.NewHybridCodec(amino, types.NewInterfaceRegistry()) )
Functions ¶
func RegisterCodec ¶
RegisterCodec registers the necessary x/staking interfaces and concrete types on the provided Amino codec. These types are used for Amino JSON serialization.
Types ¶
type AccountKeeper ¶
AccountKeeper defines the expected account keeper for query account
type BankKeeper ¶
type BankKeeper interface { GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin SetBalances(ctx sdk.Context, addr sdk.AccAddress, balances sdk.Coins) error LockedCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins }
BankKeeper defines the expected interface needed to retrieve account balances.
type Content ¶
type Content struct { Digest string `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"` DigestAlgo string `protobuf:"bytes,2,opt,name=digest_algo,json=digestAlgo,proto3" json:"digest_algo,omitempty" yaml:"digest_algo"` URI string `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty" yaml:"uri"` Meta string `protobuf:"bytes,4,opt,name=meta,proto3" json:"meta,omitempty"` }
Content defines a detail information for a record.
func (*Content) Descriptor ¶
func (*Content) GetDigestAlgo ¶
func (*Content) MarshalToSizedBuffer ¶
func (*Content) ProtoMessage ¶
func (*Content) ProtoMessage()
func (*Content) XXX_DiscardUnknown ¶
func (m *Content) XXX_DiscardUnknown()
func (*Content) XXX_Marshal ¶
func (*Content) XXX_Unmarshal ¶
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 `protobuf:"bytes,1,rep,name=contents,proto3" json:"contents"` Creator github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=creator,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"creator,omitempty"` }
MsgCreateValidator defines an SDK message for creating a new validator.
func NewMsgCreateRecord ¶
func NewMsgCreateRecord(contents []Content, Creator sdk.AccAddress) MsgCreateRecord
NewMsgCreateRecord constructs a MsgCreateRecord
func (*MsgCreateRecord) Descriptor ¶
func (*MsgCreateRecord) Descriptor() ([]byte, []int)
func (*MsgCreateRecord) Equal ¶
func (this *MsgCreateRecord) Equal(that interface{}) bool
func (*MsgCreateRecord) GetContents ¶
func (m *MsgCreateRecord) GetContents() []Content
func (*MsgCreateRecord) GetCreator ¶
func (m *MsgCreateRecord) GetCreator() github_com_cosmos_cosmos_sdk_types.AccAddress
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) Marshal ¶
func (m *MsgCreateRecord) Marshal() (dAtA []byte, err error)
func (*MsgCreateRecord) MarshalToSizedBuffer ¶
func (m *MsgCreateRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateRecord) ProtoMessage ¶
func (*MsgCreateRecord) ProtoMessage()
func (*MsgCreateRecord) Reset ¶
func (m *MsgCreateRecord) Reset()
func (*MsgCreateRecord) Size ¶
func (m *MsgCreateRecord) Size() (n int)
func (*MsgCreateRecord) String ¶
func (m *MsgCreateRecord) String() string
func (*MsgCreateRecord) Unmarshal ¶
func (m *MsgCreateRecord) Unmarshal(dAtA []byte) error
func (MsgCreateRecord) ValidateBasic ¶
func (msg MsgCreateRecord) ValidateBasic() error
ValidateBasic implements Msg.
func (*MsgCreateRecord) XXX_DiscardUnknown ¶
func (m *MsgCreateRecord) XXX_DiscardUnknown()
func (*MsgCreateRecord) XXX_Marshal ¶
func (m *MsgCreateRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateRecord) XXX_Merge ¶
func (m *MsgCreateRecord) XXX_Merge(src proto.Message)
func (*MsgCreateRecord) XXX_Size ¶
func (m *MsgCreateRecord) XXX_Size() int
func (*MsgCreateRecord) XXX_Unmarshal ¶
func (m *MsgCreateRecord) XXX_Unmarshal(b []byte) error
type QueryRecordParams ¶
type QueryRecordParams struct {
RecordID []byte `json:"record_id"`
}
QueryRecordParams defines QueryRecord params
type Record ¶
type Record struct { TxHash github_com_tendermint_tendermint_libs_bytes.HexBytes `` /* 156-byte string literal not displayed */ Contents []Content `protobuf:"bytes,2,rep,name=contents,proto3" json:"contents"` Creator github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,3,opt,name=creator,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"creator,omitempty"` }
func (*Record) Descriptor ¶
func (*Record) GetContents ¶
func (*Record) GetCreator ¶
func (m *Record) GetCreator() github_com_cosmos_cosmos_sdk_types.AccAddress
func (*Record) GetTxHash ¶
func (m *Record) GetTxHash() github_com_tendermint_tendermint_libs_bytes.HexBytes
func (*Record) MarshalToSizedBuffer ¶
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) XXX_DiscardUnknown ¶
func (m *Record) XXX_DiscardUnknown()
func (*Record) XXX_Marshal ¶
func (*Record) XXX_Unmarshal ¶
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"` }