tss

package
v1.101.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyGen

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

KeyGen is

func NewTssKeyGen

func NewTssKeyGen(keys *mayaclient.Keys, server *tss.TssServer, bridge *mayaclient.MayachainBridge) (*KeyGen, error)

NewTssKeyGen create a new instance of TssKeyGen which will look after TSS key stuff

func (*KeyGen) GenerateNewKey

func (kg *KeyGen) GenerateNewKey(keygenBlockHeight int64, pKeys common.PubKeys) (common.PubKeySet, types.Blame, error)

type KeyGenRequest

type KeyGenRequest struct {
	Keys []string `json:"keys"`
}

KeyGenRequest is the request send to tss_keygen

type KeySign

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

KeySign is a proxy between signer and TSS

func NewKeySign

func NewKeySign(server *tss.TssServer, bridge *mayaclient.MayachainBridge) (*KeySign, error)

NewKeySign create a new instance of KeySign

func (*KeySign) ExportAsKeyStore

func (s *KeySign) ExportAsKeyStore(password string) (*keys.EncryptedKeyJSON, error)

ExportAsKeyStore THORNode don't need this function for TSS, just keep it to fulfill KeyManager interface

func (*KeySign) ExportAsMnemonic

func (s *KeySign) ExportAsMnemonic() (string, error)

ExportAsMnemonic THORNode don't need this function for TSS, just keep it to fulfill KeyManager interface

func (*KeySign) ExportAsPrivateKey

func (s *KeySign) ExportAsPrivateKey() (string, error)

ExportAsPrivateKey THORNode don't need this function for TSS, just keep it to fulfill KeyManager interface

func (*KeySign) GetAddr

func (s *KeySign) GetAddr() ctypes.AccAddress

func (*KeySign) GetPrivKey

func (s *KeySign) GetPrivKey() crypto.PrivKey

GetPrivKey THORNode don't actually have any private key , but just return something

func (*KeySign) RemoteSign

func (s *KeySign) RemoteSign(msg []byte, poolPubKey string) ([]byte, []byte, error)

RemoteSign send the request to local task queue

func (*KeySign) Sign

func (s *KeySign) Sign(msg tx.StdSignMsg) ([]byte, error)

func (*KeySign) SignWithPool

func (s *KeySign) SignWithPool(msg tx.StdSignMsg, poolPubKey common.PubKey) ([]byte, error)

func (*KeySign) Start

func (s *KeySign) Start()

Start the keysign workers

func (*KeySign) Stop

func (s *KeySign) Stop()

Stop Keysign

type KeysignError

type KeysignError struct {
	Blame types.Blame
}

KeysignError is a custom error create to include which party to blame

func NewKeysignError

func NewKeysignError(blame types.Blame) KeysignError

NewKeysignError create a new instance of KeysignError

func (KeysignError) Error

func (k KeysignError) Error() string

Error implement error interface

type MockThorchainKeyManager

type MockThorchainKeyManager struct{}

MockThorchainKeymanager is to mock the TSS , so as we could test it

func (*MockThorchainKeyManager) ExportAsKeyStore

func (k *MockThorchainKeyManager) ExportAsKeyStore(password string) (*keys.EncryptedKeyJSON, error)

func (*MockThorchainKeyManager) ExportAsMnemonic

func (k *MockThorchainKeyManager) ExportAsMnemonic() (string, error)

func (*MockThorchainKeyManager) ExportAsPrivateKey

func (k *MockThorchainKeyManager) ExportAsPrivateKey() (string, error)

func (*MockThorchainKeyManager) GetAddr

func (*MockThorchainKeyManager) GetPrivKey

func (k *MockThorchainKeyManager) GetPrivKey() crypto.PrivKey

func (*MockThorchainKeyManager) RemoteSign

func (k *MockThorchainKeyManager) RemoteSign(msg []byte, poolPubKey string) ([]byte, []byte, error)

func (*MockThorchainKeyManager) Sign

func (*MockThorchainKeyManager) SignWithPool

func (k *MockThorchainKeyManager) SignWithPool(msg tx.StdSignMsg, poolPubKey common.PubKey) ([]byte, error)

type ThorchainKeyManager

type ThorchainKeyManager interface {
	keys.KeyManager
	SignWithPool(msg tx.StdSignMsg, poolPubKey common.PubKey) ([]byte, error)
	RemoteSign(msg []byte, poolPubKey string) ([]byte, []byte, error)
}

ThorchainKeyManager it is a composite of binance chain keymanager

Jump to

Keyboard shortcuts

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