Documentation
¶
Index ¶
- func GetTssAddrEVM(tssPubkey string) (ethcommon.Address, error)
- func IsEnvFlagEnabled(flag string) bool
- func SetupTSSServer(peer p2p.AddrList, privkey tmcrypto.PrivKey, preParams *keygen.LocalPreParams, ...) (*tss.TssServer, error)
- func TestKeysign(tssPubkey string, tssServer *tss.TssServer) error
- type ConcurrentKeysignsTracker
- type Key
- type TSS
- func (tss *TSS) EVMAddress() ethcommon.Address
- func (tss *TSS) InsertPubKey(pk string) error
- func (tss *TSS) LoadTssFilesFromDirectory(tssPath string) error
- func (tss *TSS) PubKeyCompressedBytes() []byte
- func (tss *TSS) Pubkey() []byte
- func (tss *TSS) Sign(ctx context.Context, digest []byte, height uint64, nonce uint64, ...) ([65]byte, error)
- func (tss *TSS) SignBatch(ctx context.Context, digests [][]byte, height uint64, nonce uint64, ...) ([][65]byte, error)
- func (tss *TSS) Validate() error
- func (tss *TSS) VerifyKeysharesForPubkeys(tssList []relayertypes.TSS, granteePubKey32 string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEnvFlagEnabled ¶
func SetupTSSServer ¶
Types ¶
type ConcurrentKeysignsTracker ¶
type ConcurrentKeysignsTracker struct {
Logger zerolog.Logger
// contains filtered or unexported fields
}
ConcurrentKeysignsTracker keeps track of concurrent keysigns performed by go-tss
func NewKeysignsTracker ¶
func NewKeysignsTracker(logger zerolog.Logger) *ConcurrentKeysignsTracker
NewKeysignsTracker - constructor
func (*ConcurrentKeysignsTracker) EndMsgSign ¶
func (k *ConcurrentKeysignsTracker) EndMsgSign()
EndMsgSign is decrementing the number of active signing ceremonies as well as updating the prometheus metric
func (*ConcurrentKeysignsTracker) GetNumActiveMessageSigns ¶
func (k *ConcurrentKeysignsTracker) GetNumActiveMessageSigns() int64
GetNumActiveMessageSigns gets the current number of active signing ceremonies
func (*ConcurrentKeysignsTracker) StartMsgSign ¶
func (k *ConcurrentKeysignsTracker) StartMsgSign()
StartMsgSign is incrementing the number of active signing ceremonies as well as updating the prometheus metric
type Key ¶
type TSS ¶
type TSS struct {
Server *tss.TssServer
Keys map[string]*Key // PubkeyInBech32 => TSSKey
CurrentPubkey string
Signers []string
CoreBridge interfaces.PellCoreBridger
KeysignsTracker *ConcurrentKeysignsTracker
// contains filtered or unexported fields
}
TSS is a struct that holds the server and the keys for TSS
func NewTSS ¶
func NewTSS( ctx context.Context, peer p2p.AddrList, privkey tmcrypto.PrivKey, preParams *keygen.LocalPreParams, bridge interfaces.PellCoreBridger, tssHistoricalList []relayertypes.TSS, tssPassword string, hotkeyPassword string, ) (*TSS, error)
NewTSS creates a new TSS instance
func (*TSS) EVMAddress ¶
func (*TSS) InsertPubKey ¶
InsertPubKey adds a new key to the TSS keys map
func (*TSS) LoadTssFilesFromDirectory ¶
func (*TSS) PubKeyCompressedBytes ¶
func (*TSS) Sign ¶
func (tss *TSS) Sign(ctx context.Context, digest []byte, height uint64, nonce uint64, chain *chains.Chain, optionalPubKey string) ([65]byte, error)
Sign signs a digest digest should be Hashes of some data NOTE: Specify optionalPubkey to use a different pubkey than the current pubkey set during keygen
func (*TSS) SignBatch ¶
func (tss *TSS) SignBatch(ctx context.Context, digests [][]byte, height uint64, nonce uint64, chain *chains.Chain) ([][65]byte, error)
SignBatch is hash of some data digest should be batch of hashes of some data
func (*TSS) VerifyKeysharesForPubkeys ¶
func (tss *TSS) VerifyKeysharesForPubkeys(tssList []relayertypes.TSS, granteePubKey32 string) error