Documentation ¶
Index ¶
- func CreateTestWalletAndAccounts(validatorIndices []phase0.ValidatorIndex, hex string) (map[phase0.ValidatorIndex]e2wtypes.Account, error)
- func CreateValidatorIndexToCommitteeIndicesTestData() map[phase0.ValidatorIndex][]phase0.CommitteeIndex
- func HexToBytes(input string) []byte
- func HexToBytes32(input string) [32]byte
- func HexToDomain(input string) phase0.Domain
- func HexToDomainType(input string) phase0.DomainType
- func HexToPubKey(input string) phase0.BLSPubKey
- func HexToRoot(input string) phase0.Root
- func HexToSignature(input string) phase0.BLSSignature
- func HexToVersion(input string) phase0.Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTestWalletAndAccounts ¶ added in v1.9.0
func CreateTestWalletAndAccounts(validatorIndices []phase0.ValidatorIndex, hex string) (map[phase0.ValidatorIndex]e2wtypes.Account, error)
CreateTestWalletAndAccounts creates a map of validator indices to accounts for unit tests.
func CreateValidatorIndexToCommitteeIndicesTestData ¶ added in v1.9.0
func CreateValidatorIndexToCommitteeIndicesTestData() map[phase0.ValidatorIndex][]phase0.CommitteeIndex
CreateValidatorIndexToCommitteeIndicesTestData creates sync committee test data for unit tests. We produce validators with indices 0-9 and each validator is part of committee indices `(validator index * 10) + n`, where n is 0 - 4. This satisfies that each validator can be included multiple times in a committee at different indices, but no 2 validators share the same committee Index.
func HexToBytes ¶
HexToBytes converts a hex string to a byte array. This should only be used for pre-defined test strings; it will panic if the input is invalid.
func HexToBytes32 ¶ added in v1.5.1
HexToBytes32 converts a hex string to a 32-byte array. This should only be used for pre-defined test strings; it will panic if the input is invalid.
func HexToDomain ¶
HexToDomain converts a hex string to a spec domain. This should only be used for pre-defined test strings; it will panic if the input is invalid.
func HexToDomainType ¶
func HexToDomainType(input string) phase0.DomainType
HexToDomainType converts a hex string to a spec domain type. This should only be used for pre-defined test strings; it will panic if the input is invalid.
func HexToPubKey ¶
HexToPubKey converts a hex string to a spec public key. This should only be used for pre-defined test strings; it will panic if the input is invalid.
func HexToRoot ¶
HexToRoot converts a hex string to a spec root. This should only be used for pre-defined test strings; it will panic if the input is invalid.
func HexToSignature ¶
func HexToSignature(input string) phase0.BLSSignature
HexToSignature converts a hex string to a spec signature. This should only be used for pre-defined test strings; it will panic if the input is invalid.
func HexToVersion ¶
HexToVersion converts a hex string to a spec version. This should only be used for pre-defined test strings; it will panic if the input is invalid.
Types ¶
This section is empty.