Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
WalletPath string `yaml:"wallet_path"` // wallet path to the wallet gob file
WalletPasswd string `yaml:"wallet_passwd"` // password to the wallet gob file in hex format
WalletPemPath string `yaml:"pem_path"` // path to ed25519 pem file
CAPath string `yaml:"ca_cert"` // path to ed25519 pem file
}
Config holds configuration of the file operator Helper.
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
Helper holds all file operation methods.
func (Helper) ReadFromPem ¶
ReadFromPem creates Wallet from PEM format file. Uses both private and public key.
func (Helper) ReadWallet ¶
RereadWallet reads wallet from the file from GOB format. It uses decryption key to perform wallet decoding.
func (Helper) SaveToPem ¶
SaveToPem saves wallet private and public key to the PEM format file. Saved files are like in the example: - PRIVATE: "your/path/name" - PUBLIC: "your/path/name.pub" Pem saved wallet is not sealed cryptographically and keys can be seen by anyone having access to the machine.
func (Helper) SaveWallet ¶
SaveWallet saves wallet to the file in GOB format. GOB file is secured cryptographically by the key, so it is safer option to move your wallet between machines in that format. This wallet can only be red by the Go wallet implementation. For transferring wallet to other implementations use PEM format.