aegis_inmemdbs

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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 []ecdsa.Account)

func InsertValidatorsInMemDb

func InsertValidatorsInMemDb(ctx context.Context, vs []Validator)

func RandomHex

func RandomHex(n int) (string, error)

func ReadOnlyEcdsaAccountFromInMemDb

func ReadOnlyEcdsaAccountFromInMemDb(ctx context.Context, a ecdsa.Account) ecdsa.Account

Types

type DecryptedValidators

type DecryptedValidators struct {
	Validators  []Validator
	HDPassword  string
	DecryptPath string
}

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 (*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

func ReadOnlyValidatorFromInMemDb

func ReadOnlyValidatorFromInMemDb(ctx context.Context, pubkey string) Validator

Jump to

Keyboard shortcuts

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