types

package
v0.0.0-...-5cda5f8 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminService

type AdminService interface {
	ResetScanHeight(height uint64) error
	GetScannedHeight() (uint64, error)
	RemoveSlashingInfo(common.Address, uint64)
}

type CPKStore

type CPKStore interface {
	Insert(CpkData) error
	GetByElectionId(uint64) (CpkData, error)
}

type Context

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

Context ---------------------------------------------

func NewContext

func NewContext() Context

func (Context) Approvers

func (c Context) Approvers() []string

func (Context) AvailableNodes

func (c Context) AvailableNodes() []string

func (Context) ElectionId

func (c Context) ElectionId() uint64

func (Context) RequestId

func (c Context) RequestId() string

func (Context) StateBatchRoot

func (c Context) StateBatchRoot() [32]byte

func (Context) TssInfos

func (c Context) TssInfos() *TssCommitteeInfo

func (Context) UnApprovers

func (c Context) UnApprovers() []string

func (Context) WithApprovers

func (c Context) WithApprovers(nodes []string) Context

func (Context) WithAvailableNodes

func (c Context) WithAvailableNodes(nodes []string) Context

func (Context) WithElectionId

func (c Context) WithElectionId(election uint64) Context

func (Context) WithRequestId

func (c Context) WithRequestId(requestId string) Context

func (Context) WithStateBatchRoot

func (c Context) WithStateBatchRoot(stateBatchRoot [32]byte) Context

func (Context) WithTssInfo

func (c Context) WithTssInfo(tssInfos *TssCommitteeInfo) Context

func (Context) WithUnApprovers

func (c Context) WithUnApprovers(nodes []string) Context

type CpkData

type CpkData struct {
	Cpk          string    `json:"cpk"`
	ElectionId   uint64    `json:"election_id"`
	CreationTime time.Time `json:"creation_time"`
}

type SignService

type SignService interface {
	SignStateBatch(request tss.SignStateRequest) ([]byte, error)
	SignRollBack(request tss.SignStateRequest) ([]byte, error)
	SignTxBatch() error
}

type TgTssMember

type TgTssMember struct {
	PublicKey   []byte
	NodeAddress common.Address
	Status      uint8
}

type TssCommitteeInfo

type TssCommitteeInfo struct {
	ElectionId    uint64   `json:"election_id"`
	ClusterPubKey string   `json:"cluster_pub_key"`
	TssMembers    []string `json:"tss_members"`
	Threshold     int      `json:"threshold"`
}

type TssQueryService

type TssQueryService interface {
	QueryActiveInfo() (*TssCommitteeInfo, error)
	QueryInactiveInfo() (*TssCommitteeInfo, error)
	QueryTssGroupMembers() (*TssCommitteeInfo, error)
}

Jump to

Keyboard shortcuts

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