Documentation ¶
Index ¶
- Variables
- func AllInvariants(k Keeper) sdk.Invariant
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- func RegisterInvariants(ir sdk.InvariantRegistry, keeper Keeper)
- func ValidProfileInvariant(k Keeper) sdk.Invariant
- type Keeper
- func (k Keeper) DTagTransfers(ctx context.Context, request *types.QueryDTagTransfersRequest) (*types.QueryDTagTransfersResponse, error)
- func (k Keeper) DeleteAllDTagTransferRequests(ctx sdk.Context, user string)
- func (k Keeper) DeleteDTagTransferRequest(ctx sdk.Context, sender, recipient string) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetDTagRelatedAddress(ctx sdk.Context, dtag string) (addr string)
- func (k Keeper) GetDTagTransferRequests(ctx sdk.Context) (requests []types.DTagTransferRequest)
- func (k Keeper) GetDtagFromAddress(ctx sdk.Context, addr string) (dtag string)
- func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)
- func (k Keeper) GetProfile(ctx sdk.Context, address string) (profile types.Profile, found bool)
- func (k Keeper) GetProfiles(ctx sdk.Context) []types.Profile
- func (k Keeper) GetUserIncomingDTagTransferRequests(ctx sdk.Context, user string) []types.DTagTransferRequest
- func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState) []abci.ValidatorUpdate
- func (k Keeper) IsUserBlocked(ctx sdk.Context, blocker, blocked string) bool
- func (k Keeper) IterateProfiles(ctx sdk.Context, fn func(index int64, profile types.Profile) (stop bool))
- func (k Keeper) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) Profile(ctx context.Context, request *types.QueryProfileRequest) (*types.QueryProfileResponse, error)
- func (k Keeper) RemoveProfile(ctx sdk.Context, address string) error
- func (k Keeper) SaveDTagTransferRequest(ctx sdk.Context, request types.DTagTransferRequest) error
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) StoreProfile(ctx sdk.Context, profile types.Profile) error
- func (k Keeper) ValidateProfile(ctx sdk.Context, profile types.Profile) error
- type WrappedDTagOwner
- func (*WrappedDTagOwner) Descriptor() ([]byte, []int)
- func (this *WrappedDTagOwner) Equal(that interface{}) bool
- func (m *WrappedDTagOwner) GetAddress() string
- func (m *WrappedDTagOwner) Marshal() (dAtA []byte, err error)
- func (m *WrappedDTagOwner) MarshalTo(dAtA []byte) (int, error)
- func (m *WrappedDTagOwner) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*WrappedDTagOwner) ProtoMessage()
- func (m *WrappedDTagOwner) Reset()
- func (m *WrappedDTagOwner) Size() (n int)
- func (m *WrappedDTagOwner) String() string
- func (m *WrappedDTagOwner) Unmarshal(dAtA []byte) error
- func (m *WrappedDTagOwner) XXX_DiscardUnknown()
- func (m *WrappedDTagOwner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WrappedDTagOwner) XXX_Merge(src proto.Message)
- func (m *WrappedDTagOwner) XXX_Size() int
- func (m *WrappedDTagOwner) XXX_Unmarshal(b []byte) error
- type WrappedDTagTransferRequests
- func (*WrappedDTagTransferRequests) Descriptor() ([]byte, []int)
- func (this *WrappedDTagTransferRequests) Equal(that interface{}) bool
- func (m *WrappedDTagTransferRequests) GetRequests() []types.DTagTransferRequest
- func (m *WrappedDTagTransferRequests) Marshal() (dAtA []byte, err error)
- func (m *WrappedDTagTransferRequests) MarshalTo(dAtA []byte) (int, error)
- func (m *WrappedDTagTransferRequests) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*WrappedDTagTransferRequests) ProtoMessage()
- func (m *WrappedDTagTransferRequests) Reset()
- func (m *WrappedDTagTransferRequests) Size() (n int)
- func (m *WrappedDTagTransferRequests) String() string
- func (m *WrappedDTagTransferRequests) Unmarshal(dAtA []byte) error
- func (m *WrappedDTagTransferRequests) XXX_DiscardUnknown()
- func (m *WrappedDTagTransferRequests) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WrappedDTagTransferRequests) XXX_Merge(src proto.Message)
- func (m *WrappedDTagTransferRequests) XXX_Size() int
- func (m *WrappedDTagTransferRequests) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AllInvariants ¶
func NewMsgServerImpl ¶ added in v0.15.0
NewMsgServerImpl returns an implementation of the profiles MsgServer interface for the provided Keeper.
func NewQuerier ¶
func NewQuerier(keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
NewQuerier is the module level router for state queries
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, keeper Keeper)
RegisterInvariants registers all posts invariants
func ValidProfileInvariant ¶
ValidProfileInvariant checks that all registered profiles have a non-empty dtag and a non-empty creator
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryMarshaler, storeKey sdk.StoreKey, paramSpace paramstypes.Subspace, relKeeper relationshipskeeper.Keeper, ) Keeper
NewKeeper creates new instances of the profiles Keeper. This k stores the profile data using two different associations:
- Address -> Profile This is used to easily retrieve the profile of a user based on an address
- DTag -> Address This is used to get the address of a user based on a DTag
func (Keeper) DTagTransfers ¶ added in v0.15.0
func (k Keeper) DTagTransfers(ctx context.Context, request *types.QueryDTagTransfersRequest) (*types.QueryDTagTransfersResponse, error)
DTagTransfers implements the Query/DTagTransfers gRPC method
func (Keeper) DeleteAllDTagTransferRequests ¶ added in v0.12.0
DeleteAllDTagTransferRequests delete all the requests made to the given user
func (Keeper) DeleteDTagTransferRequest ¶ added in v0.13.0
DeleteDTagTransferRequest deletes the transfer requests made from the sender towards the recipient
func (Keeper) ExportGenesis ¶ added in v0.15.0
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the GenesisState associated with the given context
func (Keeper) GetDTagRelatedAddress ¶ added in v0.15.0
GetDTagRelatedAddress returns the address associated to the given dtag or an empty string if it does not exists
func (Keeper) GetDTagTransferRequests ¶ added in v0.12.0
func (k Keeper) GetDTagTransferRequests(ctx sdk.Context) (requests []types.DTagTransferRequest)
GetDTagTransferRequests returns all the requests inside the given context
func (Keeper) GetDtagFromAddress ¶
GetDtagFromAddress returns the dtag associated with the given address or an empty string if no dtag exists
func (Keeper) GetProfile ¶
GetProfile returns the profile corresponding to the given address inside the current context.
func (Keeper) GetProfiles ¶
GetProfiles returns all the created profiles inside the current context.
func (Keeper) GetUserIncomingDTagTransferRequests ¶ added in v0.15.0
func (k Keeper) GetUserIncomingDTagTransferRequests(ctx sdk.Context, user string) []types.DTagTransferRequest
GetUserIncomingDTagTransferRequests returns all the request made to the given user inside the current context.
func (Keeper) InitGenesis ¶ added in v0.15.0
func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState) []abci.ValidatorUpdate
InitGenesis initializes the chain state based on the given GenesisState
func (Keeper) IsUserBlocked ¶ added in v0.14.0
IsUserBlocked tells if the given blocker has blocked the given blocked user
func (Keeper) IterateProfiles ¶
func (k Keeper) IterateProfiles(ctx sdk.Context, fn func(index int64, profile types.Profile) (stop bool))
IterateProfiles iterates through the profiles set and performs the provided function
func (Keeper) Params ¶ added in v0.15.0
func (k Keeper) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params implements the Query/Params gRPC method
func (Keeper) Profile ¶ added in v0.15.0
func (k Keeper) Profile(ctx context.Context, request *types.QueryProfileRequest) (*types.QueryProfileResponse, error)
Profiles implements the Query/Profiles gRPC method
func (Keeper) RemoveProfile ¶ added in v0.15.0
RemoveProfile allows to delete a profile associated with the given address inside the current context. It assumes that the address-related profile exists.
func (Keeper) SaveDTagTransferRequest ¶ added in v0.12.0
SaveDTagTransferRequest save the given request associating it to the request recipient. It returns an error if the same request already exists.
func (Keeper) StoreProfile ¶ added in v0.15.0
StoreProfile stores the given profile inside the current context. It assumes that the given profile has already been validated. It returns an error if a profile with the same dtag from a different creator already exists
type WrappedDTagOwner ¶ added in v0.15.0
type WrappedDTagOwner struct { // Address of the user owning a Dtag Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` }
DTagOwner represents the owner of a specific DTag
func NewWrappedDTagOwner ¶ added in v0.15.0
func NewWrappedDTagOwner(address string) WrappedDTagOwner
NewWrappedDTagOwner returns a DTagOwner instance wrapping the given address
func (*WrappedDTagOwner) Descriptor ¶ added in v0.15.0
func (*WrappedDTagOwner) Descriptor() ([]byte, []int)
func (*WrappedDTagOwner) Equal ¶ added in v0.15.0
func (this *WrappedDTagOwner) Equal(that interface{}) bool
func (*WrappedDTagOwner) GetAddress ¶ added in v0.15.0
func (m *WrappedDTagOwner) GetAddress() string
func (*WrappedDTagOwner) Marshal ¶ added in v0.15.0
func (m *WrappedDTagOwner) Marshal() (dAtA []byte, err error)
func (*WrappedDTagOwner) MarshalTo ¶ added in v0.15.0
func (m *WrappedDTagOwner) MarshalTo(dAtA []byte) (int, error)
func (*WrappedDTagOwner) MarshalToSizedBuffer ¶ added in v0.15.0
func (m *WrappedDTagOwner) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*WrappedDTagOwner) ProtoMessage ¶ added in v0.15.0
func (*WrappedDTagOwner) ProtoMessage()
func (*WrappedDTagOwner) Reset ¶ added in v0.15.0
func (m *WrappedDTagOwner) Reset()
func (*WrappedDTagOwner) Size ¶ added in v0.15.0
func (m *WrappedDTagOwner) Size() (n int)
func (*WrappedDTagOwner) String ¶ added in v0.15.0
func (m *WrappedDTagOwner) String() string
func (*WrappedDTagOwner) Unmarshal ¶ added in v0.15.0
func (m *WrappedDTagOwner) Unmarshal(dAtA []byte) error
func (*WrappedDTagOwner) XXX_DiscardUnknown ¶ added in v0.15.0
func (m *WrappedDTagOwner) XXX_DiscardUnknown()
func (*WrappedDTagOwner) XXX_Marshal ¶ added in v0.15.0
func (m *WrappedDTagOwner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WrappedDTagOwner) XXX_Merge ¶ added in v0.15.0
func (m *WrappedDTagOwner) XXX_Merge(src proto.Message)
func (*WrappedDTagOwner) XXX_Size ¶ added in v0.15.0
func (m *WrappedDTagOwner) XXX_Size() int
func (*WrappedDTagOwner) XXX_Unmarshal ¶ added in v0.15.0
func (m *WrappedDTagOwner) XXX_Unmarshal(b []byte) error
type WrappedDTagTransferRequests ¶ added in v0.15.0
type WrappedDTagTransferRequests struct {
Requests []types.DTagTransferRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests"`
}
DtagRequests contains the DTag transfer requests made towards a user
func NewWrappedDTagTransferRequests ¶ added in v0.15.0
func NewWrappedDTagTransferRequests(requests []types.DTagTransferRequest) WrappedDTagTransferRequests
NewWrappedDTagTransferRequests returns a DTagRequests instance wrapping the given requests
func (*WrappedDTagTransferRequests) Descriptor ¶ added in v0.15.0
func (*WrappedDTagTransferRequests) Descriptor() ([]byte, []int)
func (*WrappedDTagTransferRequests) Equal ¶ added in v0.15.0
func (this *WrappedDTagTransferRequests) Equal(that interface{}) bool
func (*WrappedDTagTransferRequests) GetRequests ¶ added in v0.15.0
func (m *WrappedDTagTransferRequests) GetRequests() []types.DTagTransferRequest
func (*WrappedDTagTransferRequests) Marshal ¶ added in v0.15.0
func (m *WrappedDTagTransferRequests) Marshal() (dAtA []byte, err error)
func (*WrappedDTagTransferRequests) MarshalTo ¶ added in v0.15.0
func (m *WrappedDTagTransferRequests) MarshalTo(dAtA []byte) (int, error)
func (*WrappedDTagTransferRequests) MarshalToSizedBuffer ¶ added in v0.15.0
func (m *WrappedDTagTransferRequests) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*WrappedDTagTransferRequests) ProtoMessage ¶ added in v0.15.0
func (*WrappedDTagTransferRequests) ProtoMessage()
func (*WrappedDTagTransferRequests) Reset ¶ added in v0.15.0
func (m *WrappedDTagTransferRequests) Reset()
func (*WrappedDTagTransferRequests) Size ¶ added in v0.15.0
func (m *WrappedDTagTransferRequests) Size() (n int)
func (*WrappedDTagTransferRequests) String ¶ added in v0.15.0
func (m *WrappedDTagTransferRequests) String() string
func (*WrappedDTagTransferRequests) Unmarshal ¶ added in v0.15.0
func (m *WrappedDTagTransferRequests) Unmarshal(dAtA []byte) error
func (*WrappedDTagTransferRequests) XXX_DiscardUnknown ¶ added in v0.15.0
func (m *WrappedDTagTransferRequests) XXX_DiscardUnknown()
func (*WrappedDTagTransferRequests) XXX_Marshal ¶ added in v0.15.0
func (m *WrappedDTagTransferRequests) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WrappedDTagTransferRequests) XXX_Merge ¶ added in v0.15.0
func (m *WrappedDTagTransferRequests) XXX_Merge(src proto.Message)
func (*WrappedDTagTransferRequests) XXX_Size ¶ added in v0.15.0
func (m *WrappedDTagTransferRequests) XXX_Size() int
func (*WrappedDTagTransferRequests) XXX_Unmarshal ¶ added in v0.15.0
func (m *WrappedDTagTransferRequests) XXX_Unmarshal(b []byte) error