profiles

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	SaveProfilesParams(params types.ProfilesParams) error
	SaveUserIfNotExisting(address string, height int64) error
	GetUserByAddress(address string) (*profilestypes.Profile, error)
	SaveProfile(profile *types.Profile) error
	DeleteProfile(address string, height int64) error
	GetProfilesAddresses() ([]string, error)
	SaveDTagTransferRequest(request types.DTagTransferRequest) error
	DeleteDTagTransferRequest(request types.DTagTransferRequest) error
	SaveChainLink(link types.ChainLink) error
	DeleteChainLink(user string, externalAddress string, chainName string, height int64) error
	DeleteAllChainLinks(height int64) error
	SaveDefaultChainLink(chainLink types.ChainLink) error
	DeleteAllDefaultChainLinks(height int64) error
	SaveApplicationLink(link types.ApplicationLink) error
	GetApplicationLinkInfos() ([]types.ApplicationLinkInfo, error)
	DeleteApplicationLink(user, application, username string, height int64) error
	DeleteAllApplicationLinks(height int64) error
}

type Module

type Module struct {
	// contains filtered or unexported fields
}

Module represents the x/profiles module handler

func NewModule

func NewModule(node node.Node, grpcConnection *grpc.ClientConn, cdc codec.Codec, db Database) *Module

NewModule allows to build a new Module instance

func (*Module) GetDisplayName

func (m *Module) GetDisplayName(userAddress string) string

GetDisplayName returns the name to be displayed for the user having the given address

func (*Module) GetUserProfile

func (m *Module) GetUserProfile(userAddress string) (*types.Profile, error)

GetUserProfile queries the profile for the user having the given address, if any

func (*Module) HandleGenesis

func (m *Module) HandleGenesis(doc *tmtypes.GenesisDoc, appState map[string]json.RawMessage) error

HandleGenesis implements modules.GenesisModule

func (*Module) HandleMsg

func (m *Module) HandleMsg(index int, msg sdk.Msg, tx *juno.Tx) error

HandleMsg implements modules.MessageModule

func (*Module) HandleMsgExec

func (m *Module) HandleMsgExec(index int, _ *authz.MsgExec, _ int, executedMsg sdk.Msg, tx *juno.Tx) error

HandleMsgExec implements modules.AuthzMessageModule

func (*Module) Name

func (m *Module) Name() string

Name implements modules.Module

func (m *Module) RefreshApplicationLinks(height int64) error

RefreshApplicationLinks fetches and stores all the application links present on the chain

func (m *Module) RefreshChainLinks(height int64) error

RefreshChainLinks fetches and stores all the chain links present on the chain

func (*Module) RefreshProfiles

func (m *Module) RefreshProfiles(height int64) error

RefreshProfiles fetches and stores all the profiles present on the chain

func (*Module) RegisterPeriodicOperations

func (m *Module) RegisterPeriodicOperations(scheduler *gocron.Scheduler) error

RegisterPeriodicOperations implements modules.PeriodicOperationsModule

func (*Module) UpdateProfiles

func (m *Module) UpdateProfiles(height int64, addresses []string) error

UpdateProfiles updates the profiles associated with the given addresses, if any

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL