Documentation
¶
Index ¶
- type InMemStore
- func (store *InMemStore) DeleteAccount(accountID uuid.UUID) error
- func (store *InMemStore) ListAccounts() ([]core.ValidatorAccount, error)
- func (store *InMemStore) MarshalJSON() ([]byte, error)
- func (store *InMemStore) Name() string
- func (store *InMemStore) Network() core.Network
- func (store *InMemStore) OpenAccount(accountID uuid.UUID) (core.ValidatorAccount, error)
- func (store *InMemStore) OpenWallet() (core.Wallet, error)
- func (store *InMemStore) RetrieveHighestAttestation(pubKey []byte) (*phase0.AttestationData, bool, error)
- func (store *InMemStore) RetrieveHighestProposal(pubKey []byte) (phase0.Slot, bool, error)
- func (store *InMemStore) SaveAccount(account core.ValidatorAccount) error
- func (store *InMemStore) SaveHighestAttestation(pubKey []byte, attestation *phase0.AttestationData) error
- func (store *InMemStore) SaveHighestProposal(pubKey []byte, slot phase0.Slot) error
- func (store *InMemStore) SaveWallet(wallet core.Wallet) error
- func (store *InMemStore) SetEncryptor(encryptor encryptor2.Encryptor, password []byte)
- func (store *InMemStore) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemStore ¶
type InMemStore struct {
// contains filtered or unexported fields
}
InMemStore implements core.Storage using in-memory store.
func NewInMemStore ¶
func NewInMemStore(network core.Network) *InMemStore
NewInMemStore is the constructor of InMemStore.
func NewInMemStoreWithEncryptor ¶
func NewInMemStoreWithEncryptor(network core.Network, encryptor encryptor2.Encryptor, password []byte) *InMemStore
NewInMemStoreWithEncryptor is the constructor of InMemStore.
func (*InMemStore) DeleteAccount ¶
func (store *InMemStore) DeleteAccount(accountID uuid.UUID) error
DeleteAccount deletes account by its ID
func (*InMemStore) ListAccounts ¶
func (store *InMemStore) ListAccounts() ([]core.ValidatorAccount, error)
ListAccounts returns an empty array for no accounts
func (*InMemStore) MarshalJSON ¶
func (store *InMemStore) MarshalJSON() ([]byte, error)
MarshalJSON is the custom JSON marshaler
func (*InMemStore) Name ¶
func (store *InMemStore) Name() string
Name provides the name of the store.
func (*InMemStore) Network ¶
func (store *InMemStore) Network() core.Network
Network returns the network.
func (*InMemStore) OpenAccount ¶
func (store *InMemStore) OpenAccount(accountID uuid.UUID) (core.ValidatorAccount, error)
OpenAccount returns nil,nil if no account was found
func (*InMemStore) OpenWallet ¶
func (store *InMemStore) OpenWallet() (core.Wallet, error)
OpenWallet returns nil,nil if no wallet was found
func (*InMemStore) RetrieveHighestAttestation ¶
func (store *InMemStore) RetrieveHighestAttestation(pubKey []byte) (*phase0.AttestationData, bool, error)
RetrieveHighestAttestation retrieves highest attestation
func (*InMemStore) RetrieveHighestProposal ¶
RetrieveHighestProposal returns highest proposal
func (*InMemStore) SaveAccount ¶
func (store *InMemStore) SaveAccount(account core.ValidatorAccount) error
SaveAccount saves the given account
func (*InMemStore) SaveHighestAttestation ¶
func (store *InMemStore) SaveHighestAttestation(pubKey []byte, attestation *phase0.AttestationData) error
SaveHighestAttestation saves the given highest attestation
func (*InMemStore) SaveHighestProposal ¶
func (store *InMemStore) SaveHighestProposal(pubKey []byte, slot phase0.Slot) error
SaveHighestProposal saves the given highest attestation
func (*InMemStore) SaveWallet ¶
func (store *InMemStore) SaveWallet(wallet core.Wallet) error
SaveWallet implements core.Storage interface.
func (*InMemStore) SetEncryptor ¶
func (store *InMemStore) SetEncryptor(encryptor encryptor2.Encryptor, password []byte)
SetEncryptor is the encryptor setter
func (*InMemStore) UnmarshalJSON ¶
func (store *InMemStore) UnmarshalJSON(data []byte) error
UnmarshalJSON is the custom JSON unmarshaler