wallets

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PeriodicWalletsSyncTrigger

func PeriodicWalletsSyncTrigger(ctx context.Context, c chan bool, d time.Duration)

PeriodicWalletsSyncTrigger adds a signal to the channel once per duration.

Types

type IDPair

type IDPair = wallets.KeyIDPair

type Service

type Service struct {
	KeysForWallet map[common.Hash][]uint64       // slice of keyIDs per walletID
	Keys          map[IDPair]*pkgwallets.KeyData // key data per IDPair

	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Service) FetchBackup

func (s *Service) FetchBackup(ctx context.Context, idHash common.Hash) (*wallets.TEEBackupResponse, error)

FetchBackup fetches backup for backupIDHash

func (*Service) FetchLatestBackup

func (s *Service) FetchLatestBackup(ctx context.Context, idPair IDPair) (*wallets.TEEBackupResponse, error)

FetchLatestBackup fetches latest backup for id pair.

func (*Service) InitiateBackups

func (s *Service) InitiateBackups(ctx context.Context) error

InitiateBackups triggers TEE_BACKUP action for all stored keys.

func (*Service) KeyData

func (s *Service) KeyData(walletID common.Hash, keyID uint64) (*pkgwallets.KeyData, error)

func (*Service) KeyProof

func (s *Service) KeyProof(walletID common.Hash, keyID uint64) (*wallets.SignedKeyExistenceProof, error)

func (*Service) RunUpdateInfo

func (s *Service) RunUpdateInfo(ctx context.Context, walletSyncTrigger, backupTrigger <-chan bool, keyActions <-chan *types.ActionResult, backups chan *types.ActionResult)

func (*Service) WalletInfo

func (s *Service) WalletInfo(walletID common.Hash) (*pkgwallets.KeyExistence, error)

Jump to

Keyboard shortcuts

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