Documentation ¶
Overview ¶
Package memory provides a basis for file based and in-memory vaults
Index ¶
- type Importer
- type PrivateKey
- type UnparsedKey
- type Vault
- func (v *Vault) GetPublicKey(ctx context.Context, keyID string) (vault.StoredKey, error)
- func (v *Vault) ImportKey(ctx context.Context, priv crypt.PrivateKey, opt utils.Options) (vault.StoredKey, error)
- func (v *Vault) ListPublicKeys(ctx context.Context) vault.StoredKeysIterator
- func (v *Vault) Name() string
- func (v *Vault) SignMessage(ctx context.Context, message []byte, k vault.StoredKey) (sig crypt.Signature, err error)
- func (v *Vault) Unlock(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrivateKey ¶
type PrivateKey struct { PrivateKey crypt.PrivateKey KeyID string }
func (*PrivateKey) PublicKey ¶
func (f *PrivateKey) PublicKey() crypt.PublicKey
PublicKey get the public key associated with this key
type UnparsedKey ¶
type Vault ¶
type Vault struct {
// contains filtered or unexported fields
}
Vault is a file system based vault
func New ¶
func New(src []*PrivateKey, name string) (*Vault, error)
New create a new in-mempory vault. Call Unlock before use
func NewUnparsed ¶
func NewUnparsed(data []*UnparsedKey, name string) *Vault
NewUnparsed create a new in-mempory vault from Tezos encoded data. Call Unlock before use
func (*Vault) GetPublicKey ¶
GetPublicKey retrieve a public key
func (*Vault) ListPublicKeys ¶
func (v *Vault) ListPublicKeys(ctx context.Context) vault.StoredKeysIterator
ListPublicKeys list all public key available on disk
Click to show internal directories.
Click to hide internal directories.