remote

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 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 Factory

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

func NewWalletFactory

func NewWalletFactory(url string, indexClientSourceFn IndexClientSourceFn, accountCacheLifeSpan time.Duration) (*Factory, error)

NewWalletFactory creates a new data wallet factory. This factory can instantiate data wallets that interact with MetaLocker node using API.

func (*Factory) GetTopBlock

func (rf *Factory) GetTopBlock() (int64, error)

func (*Factory) GetWalletWithAccessKey

func (rf *Factory) GetWalletWithAccessKey(apiKey, apiSecret string) (wallet.DataWallet, error)

func (*Factory) GetWalletWithCredentials

func (rf *Factory) GetWalletWithCredentials(userID, secret string) (wallet.DataWallet, error)

func (*Factory) GetWalletWithTokenAndKey

func (rf *Factory) GetWalletWithTokenAndKey(jwtToken string, managedKey *model.AESKey) (wallet.DataWallet, error)

func (*Factory) RegisterAccount

func (rf *Factory) RegisterAccount(acctTemplate *account.Account, passwd string, opts ...account.Option) (wallet.DataWallet, *wallet.RecoveryDetails, error)

type IndexClientSourceFn

type IndexClientSourceFn func(userID string, httpCaller *caller.MetaLockerHTTPCaller) (index.Client, error)

func WithIndexClient

func WithIndexClient(indexClient index.Client) IndexClientSourceFn

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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