pubkeymanager

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: MIT Imports: 13 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockPoolAddressValidator

type MockPoolAddressValidator struct{}

func NewMockPoolAddressValidator

func NewMockPoolAddressValidator() *MockPoolAddressValidator

func (*MockPoolAddressValidator) AddNodePubKey

func (mpa *MockPoolAddressValidator) AddNodePubKey(pk common.PubKey)

func (*MockPoolAddressValidator) AddPubKey

func (mpa *MockPoolAddressValidator) AddPubKey(pk common.PubKey, _ bool)

func (*MockPoolAddressValidator) FetchPubKeys

func (mpa *MockPoolAddressValidator) FetchPubKeys()

func (*MockPoolAddressValidator) GetNodePubKey

func (mpa *MockPoolAddressValidator) GetNodePubKey() common.PubKey

func (*MockPoolAddressValidator) GetPubKeys

func (mpa *MockPoolAddressValidator) GetPubKeys() common.PubKeys

func (*MockPoolAddressValidator) GetSignPubKeys

func (mpa *MockPoolAddressValidator) GetSignPubKeys() common.PubKeys

func (*MockPoolAddressValidator) HasPubKey

func (mpa *MockPoolAddressValidator) HasPubKey(pk common.PubKey) bool

func (*MockPoolAddressValidator) IsValidPoolAddress

func (mpa *MockPoolAddressValidator) IsValidPoolAddress(addr string, chain common.Chain) (bool, common.ChainPoolInfo)

func (*MockPoolAddressValidator) RemovePubKey

func (mpa *MockPoolAddressValidator) RemovePubKey(pk common.PubKey)

func (*MockPoolAddressValidator) Start

func (mpa *MockPoolAddressValidator) Start() error

func (*MockPoolAddressValidator) Stop

func (mpa *MockPoolAddressValidator) Stop() error

type PK

type PK struct {
	PubKey      common.PubKey
	Signer      bool
	NodeAccount bool
}

type PubKeyManager

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

PubKeyManager it manages a list of pubkeys

func NewPubKeyManager

func NewPubKeyManager(bridge *thorclient.ThorchainBridge, m *metrics.Metrics) (*PubKeyManager, error)

NewPubKeyManager create a new instance of PubKeyManager

func (*PubKeyManager) AddNodePubKey

func (pkm *PubKeyManager) AddNodePubKey(pk common.PubKey)

func (*PubKeyManager) AddPubKey

func (pkm *PubKeyManager) AddPubKey(pk common.PubKey, signer bool)

func (*PubKeyManager) FetchPubKeys

func (pkm *PubKeyManager) FetchPubKeys()

func (*PubKeyManager) GetNodePubKey

func (pkm *PubKeyManager) GetNodePubKey() common.PubKey

func (*PubKeyManager) GetPubKeys

func (pkm *PubKeyManager) GetPubKeys() common.PubKeys

func (*PubKeyManager) GetSignPubKeys

func (pkm *PubKeyManager) GetSignPubKeys() common.PubKeys

func (*PubKeyManager) HasPubKey

func (pkm *PubKeyManager) HasPubKey(pk common.PubKey) bool

func (*PubKeyManager) IsValidPoolAddress

func (pkm *PubKeyManager) IsValidPoolAddress(addr string, chain common.Chain) (bool, common.ChainPoolInfo)

IsValidPoolAddress check whether the given address is a pool addr

func (*PubKeyManager) RemovePubKey

func (pkm *PubKeyManager) RemovePubKey(pk common.PubKey)

func (*PubKeyManager) Start

func (pkm *PubKeyManager) Start() error

Start to poll pubkeys from thorchain

func (*PubKeyManager) Stop

func (pkm *PubKeyManager) Stop() error

Stop pubkey manager

type PubKeyValidator

type PubKeyValidator interface {
	IsValidPoolAddress(addr string, chain common.Chain) (bool, common.ChainPoolInfo)
	FetchPubKeys()
	HasPubKey(pk common.PubKey) bool
	AddPubKey(pk common.PubKey, _ bool)
	AddNodePubKey(pk common.PubKey)
	RemovePubKey(pk common.PubKey)
	GetSignPubKeys() common.PubKeys
	GetNodePubKey() common.PubKey
	GetPubKeys() common.PubKeys
	Start() error
	Stop() error
}

Jump to

Keyboard shortcuts

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