Documentation ¶
Index ¶
- Variables
- type FileStore
- func (s *FileStore) Close()
- func (s *FileStore) CreateWallet(ctx context.Context, w wallet.Wallet, passphrase string) error
- func (s *FileStore) DeleteWallet(ctx context.Context, name string) error
- func (s *FileStore) GetWallet(ctx context.Context, name string) (wallet.Wallet, error)
- func (s *FileStore) GetWalletPath(name string) string
- func (s *FileStore) GetWalletsPath() string
- func (s *FileStore) IsWalletAlreadyUnlocked(ctx context.Context, name string) (bool, error)
- func (s *FileStore) ListWallets(ctx context.Context) ([]string, error)
- func (s *FileStore) LockWallet(ctx context.Context, name string) error
- func (s *FileStore) OnUpdate(callbackFn func(context.Context, wallet.Event))
- func (s *FileStore) RenameWallet(ctx context.Context, currentName, newName string) error
- func (s *FileStore) UnlockWallet(ctx context.Context, name, passphrase string) error
- func (s *FileStore) UpdatePassphrase(ctx context.Context, name, newPassphrase string) error
- func (s *FileStore) UpdateWallet(ctx context.Context, w wallet.Wallet) error
- func (s *FileStore) WalletExists(ctx context.Context, name string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type FileStore ¶
type FileStore struct {
// contains filtered or unexported fields
}
func InitialiseStore ¶
func (*FileStore) CreateWallet ¶
CreateWallet creates a wallet, and automatically load it as an unlocked wallet.
func (*FileStore) DeleteWallet ¶
DeleteWallet deletes the wallet file in place. It does not require the wallets to be unlocked, but lock it if so.
func (*FileStore) GetWallet ¶
GetWallet requires the wallet to be unlocked first, using FileStore.UnlockWallet().
func (*FileStore) GetWalletPath ¶
func (*FileStore) GetWalletsPath ¶
func (*FileStore) IsWalletAlreadyUnlocked ¶
func (*FileStore) ListWallets ¶
ListWallets list all existing wallets stored locally. It does not require the wallets to be unlocked. It assumes that all the file under the "walletHome" are wallets. It does not ensure the files are actual wallets. Hidden files are excluded.
func (*FileStore) LockWallet ¶
func (*FileStore) RenameWallet ¶
RenameWallet renames a wallet file in place. It does not require the wallets to be unlocked, but updates the unlocked wallet if so.
func (*FileStore) UnlockWallet ¶
func (*FileStore) UpdatePassphrase ¶
UpdatePassphrase update the passphrase used to encrypt the wallet. It requires the wallet to be unlocked.
func (*FileStore) UpdateWallet ¶
UpdateWallet updates an unlocked wallet. If this method is called with a wallet that had the name changed, a new file is written and the previous one is not deleted. To rename the wallet in-place, the method FileStore.RenameWallet() should be used instead.