Documentation ¶
Index ¶
- type Factory
- func (rf *Factory) GetTopBlock() (int64, error)
- func (rf *Factory) GetWalletWithAccessKey(apiKey, apiSecret string) (wallet.DataWallet, error)
- func (rf *Factory) GetWalletWithCredentials(userID, secret string) (wallet.DataWallet, error)
- func (rf *Factory) GetWalletWithTokenAndKey(jwtToken string, managedKey *model.AESKey) (wallet.DataWallet, error)
- func (rf *Factory) RegisterAccount(acctTemplate *account.Account, passwd string, opts ...account.Option) (wallet.DataWallet, *wallet.RecoveryDetails, error)
- type IndexClientSourceFn
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 (*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 (*Factory) RegisterAccount ¶
type IndexClientSourceFn ¶
type IndexClientSourceFn func(userID string, httpCaller *caller.MetaLockerHTTPCaller) (index.Client, error)
func WithIndexClient ¶
func WithIndexClient(indexClient index.Client) IndexClientSourceFn
Click to show internal directories.
Click to hide internal directories.