Documentation
¶
Index ¶
- func ByteArrayToArray(arr [][]byte) []string
- func ByteArrayToStringArray(arr [][]byte) string
- func DecodeTx(rawTx []byte) (*types.Transaction, error)
- func DecryptKey(cfg *config.CliConfig) (*keystore.Key, error)
- func DeepCopy(a, b interface{})
- func Equals(a string, b string) bool
- func GetActivationSlotOfLatestProcessedValidator(validators map[phase0.ValidatorIndex]*v1.Validator) uint64
- func GetEth1Address(withdrawalCred string) (string, error)
- func GetEth1AddressByte(withdrawalCredByte []byte) (string, error)
- func GetTxSender(tx *types.Transaction) (common.Address, error)
- func GetUniqueElements(arr []string) []string
- func IsBlsType(withdrawalCred string) bool
- func IsEth1Type(withdrawalCred string) bool
- func NumInSlice(a uint64, list []uint64) bool
- func SlotsToTime(slots uint64, secondsInSlot uint64) string
- func StringToBlsKey(str string) phase0.BLSPubKey
- func SumAndSaturate(a *big.Int, b *big.Int, saturate *big.Int) *big.Int
- func ToBytes20(x []byte) [20]byte
- func WeiToEther(wei *big.Int) *big.Float
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteArrayToArray ¶
func ByteArrayToStringArray ¶
func DeepCopy ¶
func DeepCopy(a, b interface{})
Not the most efficient way of deep coping, if performance matters, dont use this.
func GetActivationSlotOfLatestProcessedValidator ¶
func GetActivationSlotOfLatestProcessedValidator( validators map[phase0.ValidatorIndex]*v1.Validator) uint64
func GetEth1Address ¶
See: https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/validator.md#withdrawal-credentials Input example: 01000000000000000000000059b0d71688da01057c08e4c1baa8faa629819c2a Output example: 0x59b0d71688da01057c08e4c1baa8faa629819c2a
func GetEth1AddressByte ¶
func GetTxSender ¶
func GetTxSender(tx *types.Transaction) (common.Address, error)
func GetUniqueElements ¶
func IsBlsType ¶
See: https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/validator.md#withdrawal-credentials Input example: 00fccee96b30754af30208261e38df169a95aa3c722662a9df8fc057cc7d3a69 (true)
func IsEth1Type ¶
See: https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/validator.md#withdrawal-credentials Input example: 010000000000000000000000dc62f9e8c34be08501cdef4ebde0a280f576d762 (true)
func NumInSlice ¶
func SlotsToTime ¶
Converts from slots to readable time (eg 1 day 9 hours 20 minutes)
func StringToBlsKey ¶
func SumAndSaturate ¶
Sum two numbers, and if the sum is bigger than saturate, return saturate
Types ¶
This section is empty.