Documentation ¶
Index ¶
- Constants
- Variables
- func CheckFileExists(inputPath string) bool
- func CheckValidIP(input_IP string) bool
- func CopyFileToNewPath(oldPath string, newPath string) error
- func ExistsInArray(inputList []string, inputValue string) bool
- func ExistsInMapValue(inputMap map[string]string, inputValue string) bool
- func ExtractIPFromMAddr(input_addr ma.Multiaddr) net.IP
- func Generate_privKey() string
- func GetForkDigestFromENode(n enode.Node) (string, error)
- func GetForkDigestFromEth2Data(b beacon.Eth2Data) string
- func GetForkDigestFromStatus(b beacon.Status) string
- func IsIPPublic(ip net.IP) bool
- func ParseInterfaceAddrArray(input_arr []interface{}) ([]ma.Multiaddr, error)
- func ParseInterfaceStringArray(input_arr []interface{}) []string
- func ParseInterfaceTimeArray(input_arr []interface{}) ([]time.Time, error)
- func ParseLogFormatter(lvl string) logrus.Formatter
- func ParseLogLevel(lvl string) logrus.Level
- func ParseLogOutput(lvl string) io.Writer
- func ParseNodeEth2Data(n enode.Node) (data *beacon.Eth2Data, exists bool, err error)
- func ParsePrivateKey(v string) (*crypto.Secp256k1PrivateKey, error)
- func ParsePubkey(v string) (*ecdsa.PublicKey, error)
- func PrivKeyToString(input_key *crypto.Secp256k1PrivateKey) string
- func ReturnGreatestTime(input_array []time.Time) time.Time
- func ReturnMaxInt(input_array []int) int
- func UnmarshalMaddr(inputAddr string) (ma.Multiaddr, error)
- type AttnetsENREntry
- type Eth2ENREntry
Constants ¶
const ATTNETS_KEY = "attnets"
const ETH2_ENR_KEY = "eth2"
const MADDR_SEPARATOR string = "/"
Variables ¶
var ( DefaultLoglvl = logrus.InfoLevel DefaultLogOutput = os.Stdout DefaultFormater = &logrus.TextFormatter{} )
App default configurations
var (
ModuleName = "UTILS-KEY"
)
Functions ¶
func CheckFileExists ¶
func CheckValidIP ¶
checkvalidIP * This method checks whether the IP can be parsed or not
func CopyFileToNewPath ¶
func ExistsInArray ¶
func Generate_privKey ¶
func Generate_privKey() string
func GetForkDigestFromStatus ¶
func IsIPPublic ¶
func ParseInterfaceAddrArray ¶
func ParseInterfaceStringArray ¶
func ParseInterfaceStringArray(input_arr []interface{}) []string
func ParseInterfaceTimeArray ¶
func ParseLogFormatter ¶
parse Formatter from string
func ParseNodeEth2Data ¶
ParseNodeEth2Data * This method will parse the Node and obtain information about it @param n: the enode from where to get the information @return the Eth2Data object from the beacon package
func ParsePrivateKey ¶
func ParsePrivateKey(v string) (*crypto.Secp256k1PrivateKey, error)
Parse a Secp256k1PrivateKey from string, checking if it has the proper curve
func PrivKeyToString ¶
func PrivKeyToString(input_key *crypto.Secp256k1PrivateKey) string
Export Private Key to a string
func ReturnGreatestTime ¶
ReturnGreatestTime * This method return the latest time inside the given array @param input_array: the array of times to compare @return the latest time inside the array
func ReturnMaxInt ¶
Types ¶
type AttnetsENREntry ¶
type AttnetsENREntry []byte
TODO: Comment Attended networks are the networks the node will be participating in
func NewAttnetsENREntry ¶
func NewAttnetsENREntry(input_bytes string) AttnetsENREntry
func (AttnetsENREntry) ENRKey ¶
func (aee AttnetsENREntry) ENRKey() string
type Eth2ENREntry ¶
type Eth2ENREntry []byte
With this entry we allow the node to have a registered fork digest
func NewEth2DataEntry ¶
func NewEth2DataEntry(input_bytes string) Eth2ENREntry
func (Eth2ENREntry) ENRKey ¶
func (eee Eth2ENREntry) ENRKey() string