Documentation ¶
Index ¶
- type BlobV1
- type KMSGCPBoxer
- type KMSGCPManager
- type KMSManager
- type PassphraseBoxer
- type PassthroughKeyManager
- type SecretBoxer
- type Vault
- func (v *Vault) AddPrivateKey(privateKey *ecc.PrivateKey) (pub ecc.PublicKey)
- func (v *Vault) NewKeyPair() (pub ecc.PublicKey, err error)
- func (v *Vault) Open(boxer SecretBoxer) error
- func (v *Vault) PrintPrivateKeys()
- func (v *Vault) PrintPublicKeys()
- func (v *Vault) Seal(boxer SecretBoxer) 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 KMSGCPBoxer ¶
type KMSGCPBoxer struct {
// contains filtered or unexported fields
}
func NewKMSGCPBoxer ¶
func NewKMSGCPBoxer(keyPath string) *KMSGCPBoxer
func (*KMSGCPBoxer) WrapType ¶
func (b *KMSGCPBoxer) WrapType() string
type KMSGCPManager ¶
type KMSGCPManager struct {
// contains filtered or unexported fields
}
func NewKMSGCPManager ¶
func NewKMSGCPManager(keyPath string) (*KMSGCPManager, error)
type KMSManager ¶
type PassphraseBoxer ¶
type PassphraseBoxer struct {
// contains filtered or unexported fields
}
func NewPassphraseBoxer ¶
func NewPassphraseBoxer(password string) *PassphraseBoxer
func (*PassphraseBoxer) WrapType ¶
func (b *PassphraseBoxer) WrapType() string
type PassthroughKeyManager ¶
type PassthroughKeyManager struct{}
func NewPassthroughKeyManager ¶
func NewPassthroughKeyManager() *PassthroughKeyManager
type SecretBoxer ¶
type SecretBoxer interface { Seal(in []byte) (string, error) Open(in string) ([]byte, error) WrapType() string }
func SecretBoxerForType ¶
func SecretBoxerForType(boxerType string, keypath string) (SecretBoxer, error)
type Vault ¶
type Vault struct { Kind string `json:"kind"` Version int `json:"version"` Comment string `json:"comment"` SecretBoxWrap string `json:"secretbox_wrap"` SecretBoxCiphertext string `json:"secretbox_ciphertext"` 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 ¶
NewVaultFromKeysFile creates a new Vault from the keys in the provided keys file. keysFile should be formatted with a single private key per line
func NewVaultFromSingleKey ¶
NewVaultFromSingleKey creates a new Vault from the provided private key.
func NewVaultFromWalletFile ¶
NewVaultFromWalletFile returns a new Vault instance from the provided filename of an eos wallet.
func (*Vault) AddPrivateKey ¶
func (v *Vault) AddPrivateKey(privateKey *ecc.PrivateKey) (pub ecc.PublicKey)
AddPrivateKey appends the provided private key into the Vault's KeyBag
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) Open ¶
func (v *Vault) Open(boxer SecretBoxer) error
func (*Vault) PrintPrivateKeys ¶
func (v *Vault) PrintPrivateKeys()
func (*Vault) PrintPublicKeys ¶
func (v *Vault) PrintPublicKeys()
PrintPublicKeys prints a PublicKey corresponding to each PrivateKey in the Vault's KeyBag.
func (*Vault) Seal ¶
func (v *Vault) Seal(boxer SecretBoxer) error
func (*Vault) WriteToFile ¶
WriteToFile writes the Vault to disk. You need to encrypt before writing to file, otherwise you might lose much :)