Documentation
¶
Index ¶
- Constants
- Variables
- func InitEcdsaAccountsDB()
- func InitValidatorDB() *memdb.MemDB
- func InsertEcdsaAccounts(ctx context.Context, accounts []zeus_ecdsa.Account)
- func InsertValidatorsInMemDb(ctx context.Context, vs []Validator)
- func RandomHex(n int) (string, error)
- func ReadOnlyEcdsaAccountFromInMemDb(ctx context.Context, a zeus_ecdsa.Account) zeus_ecdsa.Account
- type DecryptedValidators
- type EthereumBLSKeySignatureRequest
- type EthereumBLSKeySignatureRequests
- type EthereumBLSKeySignatureResponse
- type EthereumBLSKeySignatureResponses
- type Validator
Constants ¶
View Source
const EcdsaAccountsTable = "ecdsa_accounts"
View Source
const ValidatorsTable = "validators"
Variables ¶
View Source
var EcdsaAccountsInMemDB *memdb.MemDB
View Source
var ValidatorInMemDB *memdb.MemDB
Functions ¶
func InitEcdsaAccountsDB ¶
func InitEcdsaAccountsDB()
func InitValidatorDB ¶
func InitValidatorDB() *memdb.MemDB
func InsertEcdsaAccounts ¶
func InsertEcdsaAccounts(ctx context.Context, accounts []zeus_ecdsa.Account)
func InsertValidatorsInMemDb ¶
func ReadOnlyEcdsaAccountFromInMemDb ¶
func ReadOnlyEcdsaAccountFromInMemDb(ctx context.Context, a zeus_ecdsa.Account) zeus_ecdsa.Account
Types ¶
type DecryptedValidators ¶
func (*DecryptedValidators) ReadValidatorFromKeystoreAndGenerateRawKeyfiles ¶
func (dv *DecryptedValidators) ReadValidatorFromKeystoreAndGenerateRawKeyfiles(filepath string) error
ReadValidatorFromKeystoreAndGenerateRawKeyfiles provides a lightweight format decrypted output
func (*DecryptedValidators) ReadValidatorsFromKeystores ¶
func (dv *DecryptedValidators) ReadValidatorsFromKeystores(filepath string) error
func (*DecryptedValidators) ReadValidatorsFromLightweightKeystores ¶
func (dv *DecryptedValidators) ReadValidatorsFromLightweightKeystores(filepath string) error
ReadValidatorsFromLightweightKeystores uses pubkey as filename, sk as the file contents
type EthereumBLSKeySignatureRequest ¶
type EthereumBLSKeySignatureRequest struct {
Message string `json:"message"`
}
type EthereumBLSKeySignatureRequests ¶
type EthereumBLSKeySignatureRequests struct {
Map map[string]EthereumBLSKeySignatureRequest `json:"map"`
}
type EthereumBLSKeySignatureResponse ¶
type EthereumBLSKeySignatureResponse struct {
Signature string `json:"signature"`
}
type EthereumBLSKeySignatureResponses ¶
type EthereumBLSKeySignatureResponses struct {
Map map[string]EthereumBLSKeySignatureResponse `json:"responses"`
}
func SignValidatorMessagesFromInMemDb ¶
func SignValidatorMessagesFromInMemDb(ctx context.Context, signReqs EthereumBLSKeySignatureRequests) (EthereumBLSKeySignatureResponses, error)
func (*EthereumBLSKeySignatureResponses) VerifySignatures ¶
func (sr *EthereumBLSKeySignatureResponses) VerifySignatures(ctx context.Context, sigRequests EthereumBLSKeySignatureRequests, isHexPayload bool) ([]string, error)
VerifySignatures returns a slice of pubkeys that have been verified with the given signed message, it returns the pubkeys with a 0x prefix string yous should only use this to verify hex payloads, normal strings likely won't work
type Validator ¶
type Validator struct {
bls_signer.EthBLSAccount
}
func NewValidator ¶
func NewValidator(blsKey bls_signer.EthBLSAccount) Validator
Click to show internal directories.
Click to hide internal directories.