badgegenerator

package
v0.20.5 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PortEnvironmentVariable        = "PORT"
	UserDataEnvironmentVariable    = "USER_DATA"
	GrpcUrlEnvironmentVariable     = "GRPC_URL"
	LavaChainIDEnvironmentVariable = "CHAIN_ID"
)
View Source
const DefaultProjectId = "default"

Variables

This section is empty.

Functions

func CreateBadgeGeneratorCobraCommand

func CreateBadgeGeneratorCobraCommand() *cobra.Command

func RunBadgeServer

func RunBadgeServer(cmd *cobra.Command, v *viper.Viper)

Types

type BadgeStateTracker

type BadgeStateTracker struct {
	*statetracker.StateTracker
	// contains filtered or unexported fields
}

func NewBadgeStateTracker

func NewBadgeStateTracker(ctx context.Context, clientCtx cosmosclient.Context, chainFetcher chaintracker.ChainFetcher, chainId string) (ret *BadgeStateTracker, err error)

func (*BadgeStateTracker) RegisterForEpochUpdates

func (st *BadgeStateTracker) RegisterForEpochUpdates(ctx context.Context, epochUpdatable statetracker.EpochUpdatable)

type HealthServer

type HealthServer struct {
	health.UnimplementedHealthServer
}

func (*HealthServer) Check

func (*HealthServer) Watch

type ProjectConfiguration

type ProjectConfiguration struct {
	ProjectPublicKey  string              `json:"project_public_key"`
	ProjectPrivateKey string              `json:"private_key"`
	EpochsMaxCu       int64               `json:"epochs_max_cu"`
	UpdatedEpoch      uint64              `json:"update_epoch,omitempty"`
	PairingList       *[]types.StakeEntry `json:"pairing_list,omitempty"`
}

type Server

type Server struct {
	pairingtypes.UnimplementedBadgeGeneratorServer
	ProjectsConfiguration map[string]*ProjectConfiguration // project_id/project_data

	ChainId string
	// contains filtered or unexported fields
}

func NewServer

func NewServer(grpcUrl string, chainId string, userData string) (*Server, error)

func (*Server) GetEpoch

func (s *Server) GetEpoch() uint64

func (*Server) UpdateEpoch

func (s *Server) UpdateEpoch(epoch uint64)

type UserBadgeItem

type UserBadgeItem struct {
	AllowedCu int64
	Epoch     uint64
	Signature string
	PublicKey string
	UserId    string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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