local

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parameter

type Parameter interface {
	// contains filtered or unexported methods
}

Parameter is the interface for service parameters.

func WithAccountPassphrases

func WithAccountPassphrases(passphrases []string) Parameter

WithAccountPassphrases sets the account unlock passphrases.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

func WithMonitor

func WithMonitor(monitor metrics.Service) Parameter

WithMonitor sets the monitor for the module.

func WithWalletPassphrases

func WithWalletPassphrases(passphrases []string) Parameter

WithWalletPassphrases sets the wallet unlock passphrases.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is an unlocker service that holds unlock passphrases for wallets and accounts.

func New

func New(ctx context.Context, params ...Parameter) (*Service, error)

New creates a new unlocker service that holds unlock passphrases for wallets and accounts.

func (*Service) UnlockAccount

func (s *Service) UnlockAccount(ctx context.Context, wallet e2wtypes.Wallet, account e2wtypes.Account) (bool, error)

UnlockAccount attempts to unlock an account.

func (*Service) UnlockWallet

func (s *Service) UnlockWallet(ctx context.Context, wallet e2wtypes.Wallet) (bool, error)

UnlockWallet attempts to unlock a wallet.

Jump to

Keyboard shortcuts

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