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) 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 ¶ added in v0.68.0
type FileStore struct {
// contains filtered or unexported fields
}
func InitialiseStore ¶
func (*FileStore) CreateWallet ¶ added in v0.68.0
CreateWallet creates a wallet, and automatically load it as an unlocked wallet.
func (*FileStore) DeleteWallet ¶ added in v0.68.0
DeleteWallet deletes the wallet file in place. It does not require the wallets to be unlocked, but lock it if so.
func (*FileStore) GetWallet ¶ added in v0.68.0
GetWallet requires the wallet to be unlocked first, using FileStore.UnlockWallet().
func (*FileStore) GetWalletPath ¶ added in v0.68.0
func (*FileStore) IsWalletAlreadyUnlocked ¶ added in v0.69.0
func (*FileStore) ListWallets ¶ added in v0.68.0
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 ¶ added in v0.68.0
func (*FileStore) RenameWallet ¶ added in v0.68.0
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 ¶ added in v0.68.0
func (*FileStore) UpdatePassphrase ¶ added in v0.68.0
UpdatePassphrase update the passphrase used to encrypt the wallet. It requires the wallet to be unlocked.
func (*FileStore) UpdateWallet ¶ added in v0.68.0
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.