Documentation ¶
Index ¶
- Variables
- func CommitsToBytes(cs []kyber.Point) []byte
- func Contains(s []*rsa.PrivateKey, i int) bool
- func GetDisjointNewOperators(oldOperators, newOperators []*wire.Operator) []*wire.Operator
- func GetDisjointOldOperators(oldOperators, newOperators []*wire.Operator) []*wire.Operator
- func GetNetworkByFork(fork [4]byte) eth2_key_manager_core.Network
- func GetNonce(input []byte) []byte
- func GetThreshold(ids []uint64) (int, error)
- func HexToAddress(s string) (common.Address, error)
- func JoinSets(oldOperators, newOperators []*wire.Operator) []*wire.Operator
- func SplitBytes(buf []byte, lim int) [][]byte
- func WriteErrorResponse(logger *zap.Logger, writer http.ResponseWriter, err error, statusCode int)
- func WriteJSON(filePth string, data any) error
Constants ¶
This section is empty.
Variables ¶
var ErrAlreadyExists = errors.New("got init msg for existing instance")
var ErrMaxInstances = errors.New("max number of instances ongoing, please wait")
var ErrMissingInstance = errors.New("got message to instance that I don't have, send Init first")
var ErrVersion = errors.New("wrong version")
Functions ¶
func CommitsToBytes ¶ added in v1.0.0
func GetDisjointNewOperators ¶ added in v1.0.0
GetDisjointNewOperators returns a new set of operators disjoint from old set For example: old set [1,2,3,4,5]; new set [3,4,5,6,7]; returns [6,7]
func GetDisjointOldOperators ¶ added in v1.0.0
GetDisjointOldOperators returns an old set of operators disjoint from new set For example: old set [1,2,3,4,5]; new set [3,4,5,6,7]; returns [3,4,5]
func GetNetworkByFork ¶ added in v1.0.0
func GetNetworkByFork(fork [4]byte) eth2_key_manager_core.Network
GetNetworkByFork translates the network fork bytes into name
TODO: once eth2_key_manager implements this we can get rid of it and support all networks ekm supports automatically
func GetThreshold ¶ added in v1.0.0
GetThreshold computes threshold from amount of operators following 3f+1 tolerance
func HexToAddress ¶
HexToAddress converts a string HEX representation of Ethereum address to Address structure
func JoinSets ¶ added in v1.0.0
JoinSets creates a set of two groups of operators. For example: [1,2,3,4] and [1,2,5,6,7] will return [1,2,3,4,5,6,7]
func SplitBytes ¶ added in v1.0.0
SplitBytes split bytes slice to n parts
func WriteErrorResponse ¶ added in v1.1.0
Types ¶
This section is empty.