wallet_manager

package
v0.0.24-wip-2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingHdWalletResp          = errors.New("missing hd-wallet api response")
	ErrMnemonicIsNotValid           = errors.New("mnemonic wallet is not valid")
	ErrUnableDecodeGrpcErrorStatus  = errors.New("unable to decode grpc error status")
	ErrUpdatedCountNotEqualExpected = errors.New("updated count not equal expected count")
)

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(logger *zap.Logger,
	cfg configService,
	transitEncryptorSvc encryptService,
	appEncryptorSvc encryptService,
	mnemonicWalletDataSrv mnemonicWalletsDataService,
	cacheDataSvc mnemonicWalletsCacheStoreService,
	signReqDataSvc signRequestDataService,
	hdWalletClient hdwallet.HdWalletApiClient,
	eventPublisher eventPublisherService,
	txStmtManager transactionalStatementManager,
) *Service

func (*Service) AddNewWallet

func (s *Service) AddNewWallet(ctx context.Context) (*entities.MnemonicWallet, error)

func (*Service) CheckSession

func (s *Service) CheckSession(ctx context.Context,
	mnemonicUUID string,
	sessionUUID string,
) (isActive bool, err error)

func (*Service) CloseWalletSession

func (s *Service) CloseWalletSession(ctx context.Context,
	walletUUID string,
	sessionUUID string,
) (*entities.MnemonicWallet, *entities.MnemonicWalletSession, error)

func (*Service) DisableWalletByUUID

func (s *Service) DisableWalletByUUID(ctx context.Context,
	walletUUID string,
) (*entities.MnemonicWallet, error)

func (*Service) DisableWalletsByUUIDList

func (s *Service) DisableWalletsByUUIDList(ctx context.Context,
	walletUUIDs []string,
) (count uint, list []string, err error)

func (*Service) EnableWalletByUUID

func (s *Service) EnableWalletByUUID(ctx context.Context,
	walletUUID string,
) (*entities.MnemonicWallet, error)

func (*Service) EnableWalletsByUUIDList

func (s *Service) EnableWalletsByUUIDList(ctx context.Context,
	walletUUIDs []string,
) (count uint, list []string, err error)

func (*Service) GetAccount added in v0.0.25

func (s *Service) GetAccount(ctx context.Context,
	mnemonicUUID string,
	parameters *anypb.Any,
) (address *string, err error)

func (*Service) GetAddressesByRange

func (s *Service) GetAddressesByRange(ctx context.Context,
	mnemonicUUID string,
	addrParams *anypb.Any,
) (list []*pbCommon.DerivationAddressIdentity, err error)

func (*Service) GetEnabledWallets

func (s *Service) GetEnabledWallets(ctx context.Context) ([]*entities.MnemonicWallet, error)

func (*Service) GetWalletByUUID

func (s *Service) GetWalletByUUID(ctx context.Context, walletUUID string) (*entities.MnemonicWallet, error)

func (*Service) GetWalletSessionInfo

func (s *Service) GetWalletSessionInfo(ctx context.Context,
	walletUUID string,
	sessionUUID string,
) (*entities.MnemonicWallet, *entities.MnemonicWalletSession, error)

func (*Service) GetWalletSessionsByWalletUUID

func (s *Service) GetWalletSessionsByWalletUUID(ctx context.Context,
	walletUUID string,
) (*entities.MnemonicWallet, []*entities.MnemonicWalletSession, error)

func (*Service) ImportWallet

func (s *Service) ImportWallet(ctx context.Context, importedData []byte) (*entities.MnemonicWallet, error)

func (*Service) StartSessionForWallet

func (s *Service) StartSessionForWallet(ctx context.Context,
	wallet *entities.MnemonicWallet,
) (*entities.MnemonicWalletSession, error)

func (*Service) StartWalletSession

func (s *Service) StartWalletSession(ctx context.Context,
	walletUUID string,
) (*entities.MnemonicWallet, *entities.MnemonicWalletSession, error)

Jump to

Keyboard shortcuts

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