tss

package
v0.0.0-...-74e6f8a Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(host string, port string, timeout time.Duration, logger log.Logger) (*grpc.ClientConn, error)

func SetMpk

func SetMpk(mpk []byte, id string)

Types

type AtomicSlice

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

func (*AtomicSlice) Append

func (a *AtomicSlice) Append(item int)

type EventMsg

type EventMsg struct {
	MsgIndex int           `json:"msg_index"`
	Events   []KeygenEvent `json:"events"`
}

type KeyShareRecoveryInfo

type KeyShareRecoveryInfo struct {
	X_i_ciphertext []byte `json:"x_i_ciphertext"`
}

type KeygenAttributes

type KeygenAttributes struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type KeygenEvent

type KeygenEvent struct {
	Type       string             `json:"type"`
	Attributes []KeygenAttributes `json:"attributes"`
}

type LockableStream

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

func NewLockableStream

func NewLockableStream(stream Stream) *LockableStream

func (*LockableStream) CloseSend

func (l *LockableStream) CloseSend() error

func (*LockableStream) Recv

func (l *LockableStream) Recv() (*tofnd.MessageOut, error)

func (*LockableStream) Send

func (l *LockableStream) Send(in *tofnd.MessageIn) error

type MPK

type MPK struct {
	Mpk []byte
	Id  string
}

type Mgr

type Mgr struct {
	Timeout time.Duration

	Logger log.Logger
	// contains filtered or unexported fields
}

func NewMgr

func NewMgr(c *tmclient.HTTP, client rpc.Client, cliCtx sdkClient.Context, timeout time.Duration, principalAddr string, broadcaster *broadcast.CosmosClient, logger log.Logger, cdc *codec.LegacyAmino) *Mgr

func (*Mgr) CheckTimeout

func (mgr *Mgr) CheckTimeout(e types.Event) error

func (*Mgr) ProcessKeygenMsg

func (mgr *Mgr) ProcessKeygenMsg(e []types.Event, h int64) error

func (*Mgr) ProcessKeygenMsgDispute

func (mgr *Mgr) ProcessKeygenMsgDispute(e []KeygenEvent) error

func (*Mgr) ProcessKeygenStart

func (mgr *Mgr) ProcessKeygenStart(e types.Event) error

func (*Mgr) ProcessNewBlockHeader

func (mgr *Mgr) ProcessNewBlockHeader(blockHeight int64)

ProcessNewBlockHeader handles timeout on new block header

func (*Mgr) ProcessTimeout

func (mgr *Mgr) ProcessTimeout() error

func (*Mgr) Recover

func (mgr *Mgr) Recover(recoverJSON []byte) error

type P2pSad

type P2pSad struct {
	VssComplaint []ShareInfoDispute `json:"vss_complaint"`
}

type Session

type Session struct {
	ID        string
	TimeoutAt int64
	// contains filtered or unexported fields
}

func (*Session) Timeout

func (s *Session) Timeout()

func (*Session) WaitForTimeout

func (s *Session) WaitForTimeout()

type Share

type Share struct {
	Scalar []byte `json:"scalar"`
	Index  int    `json:"index"`
}

type ShareInfoDispute

type ShareInfoDispute struct {
	Share     Share       `json:"share"`
	Kij       []byte      `json:"kij"`
	Proof     [3][32]byte `json:"proof"`
	Commit    [][]byte    `json:"commit"`
	Faulter   []byte      `json:"faulter"`
	Accuser   []byte      `json:"accuser"`
	AccuserId uint64      `json:"accuserId"`
	FaulterId uint64      `json:"faulterId"`
}

type Stream

type Stream interface {
	Send(in *tofnd.MessageIn) error
	Recv() (*tofnd.MessageOut, error)
	CloseSend() error
}

type TimeoutQueue

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

func NewTimeoutQueue

func NewTimeoutQueue() *TimeoutQueue

func (*TimeoutQueue) Dequeue

func (q *TimeoutQueue) Dequeue() *Session

func (*TimeoutQueue) Enqueue

func (q *TimeoutQueue) Enqueue(ID string, timeoutAt int64) *Session

func (*TimeoutQueue) Top

func (q *TimeoutQueue) Top() *Session

Directories

Path Synopsis
rpc

Jump to

Keyboard shortcuts

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