Documentation ¶
Index ¶
- type ShamirWrapping
- type Vault
- func (v *Vault) AddPrivateKey(privateKey *ecc.PrivateKey) (pub ecc.PublicKey)
- func (v *Vault) NewKeyPair() (pub ecc.PublicKey, err error)
- func (v *Vault) OpenWithPassphrase(passphrase string) error
- func (v *Vault) PrintPublicKeys()
- func (v *Vault) SealWithPassphrase(passphrase string) error
- func (v *Vault) WriteToFile(filename string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ShamirWrapping ¶ added in v0.5.0
type Vault ¶
type Vault struct { Kind string `json:"kind"` Version int `json:"version"` Comment string `json:"comment"` Shamir *ShamirWrapping `json:"shamir,omitempty"` SecretBoxWrap string `json:"secretbox_wrap"` SecretBoxCiphertext string `json:"secretbox_ciphertext"` PublicKeys []string `json:"public_keys"` KeyBag *eos.KeyBag `json:"-"` }
Vault represents an `eosc` wallet. It contains the encrypted material to load a KeyBag, which is the signing provider for signing transactions using the `eos-go` library (which includes the embedded keosd-compatible wallet).
func NewVaultFromKeysFile ¶
func NewVaultFromSingleKey ¶
func NewVaultFromWalletFile ¶
func (*Vault) AddPrivateKey ¶
func (v *Vault) AddPrivateKey(privateKey *ecc.PrivateKey) (pub ecc.PublicKey)
func (*Vault) NewKeyPair ¶
NewKeyPair creates a new EOS keypair, saves the private key in the local wallet and returns the public key. It does NOT save the wallet, you better do that soon after.
func (*Vault) OpenWithPassphrase ¶ added in v0.5.0
OpenWithPassphrase will load the KeyBag from the decrypted material, unlocked with the passphrase.
func (*Vault) PrintPublicKeys ¶
func (v *Vault) PrintPublicKeys()
func (*Vault) SealWithPassphrase ¶ added in v0.5.0
SealWithPassphrases uses the passphrase-based encryption.
func (*Vault) WriteToFile ¶
WriteToFile writes the Vault to disk. You need to encrypt before writing to file, otherwise you might lose much :)