keyshare

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbiCoder

func AbiCoder(argTypes []string, argValues []interface{}) ([]byte, error)

func AbiCoderHex

func AbiCoderHex(argTypes []string, argValues []interface{}) (string, error)

func AbiDecoder

func AbiDecoder(argTypes []string, input []byte, argValues []interface{}) error

func AbiDecoderWithReturnedValues

func AbiDecoderWithReturnedValues(argTypes []string, input []byte) ([]interface{}, error)

func CreateThreshold

func CreateThreshold(skBytes []byte, operators []*Operator) (map[uint64]*Share, error)

CreateThreshold receives a bls.SecretKey hex and count. Will split the secret key into count shares

Types

type KeystoreShareInfo

type KeystoreShareInfo struct {
	ID        uint64
	PublicKey string

	EncryptedKey    string
	AbiEncryptedKey string
	Operator        *Operator
	// contains filtered or unexported fields
}

func EncryptShares

func EncryptShares(skBytes []byte, operators []*Operator) ([]*KeystoreShareInfo, error)

type Operator

type Operator struct {
	Id        uint64          `json:"id"`
	PublicKey string          `json:"publicKey"`
	Fee       decimal.Decimal `json:"fee"`

	Active         bool
	ValidatorCount uint64

	LastNotActiveTime int64
}

type Share

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

Jump to

Keyboard shortcuts

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