Documentation ¶
Index ¶
- Variables
- func CheckFileKeystore() (bool, error)
- func CheckKeystore() (bool, error)
- func GenerateNewMnemonic() (string, error)
- func GetAddrByIndex(mnemonic string, index uint) (string, error)
- func InitKeystore(password, ksBackend string) error
- func IsInitialized() bool
- func Load(cfg *database.Wallet) error
- func RemoveSecret() error
- func RequirePassword() bool
- func SearchMnemonic() (string, bool, error)
- func Set(secret string, tradeWalletIndex uint, cfg *database.Wallet) error
- func SetKeyStoreBackend(store string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrWrongPassword = errors.New("aes.KeyUnwrap(): integrity check failed.") // nolint:revive ErrKeyringNotInitialized = errors.New("keyring not initialized") )
View Source
var ( ErrSecretNotFound = errors.New("secret not found") ErrEmptyTradeWallet = errors.New("trade wallet is empty") )
View Source
var (
KeystoreFolder string
)
Functions ¶
func CheckFileKeystore ¶
func CheckKeystore ¶
CheckKeystore checks whether the keystore already exists and if the keystore requires a password.
func GenerateNewMnemonic ¶
GenerateNewMnemonic generates a new mnemonic phrase.
func GetAddrByIndex ¶
GetAddrByIndex returns the address from the mnemonic phrase based on the index.
func InitKeystore ¶
func IsInitialized ¶
func IsInitialized() bool
func RemoveSecret ¶
func RemoveSecret() error
func RequirePassword ¶
func RequirePassword() bool
func SearchMnemonic ¶
SearchMnemnoic searches the secrets database for a mnemonic phrase.
func Set ¶
Set sets the secret in the keystore. If the secret already exists, it will be overwritten. Set will also set the private key in the wallet config.
func SetKeyStoreBackend ¶
func SetKeyStoreBackend(store string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.