wallets

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2023 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWalletDoesNotExists = errors.New("wallet does not exist")

Functions

func InitialiseStore

func InitialiseStore(vegaHome string) (*wstorev1.Store, error)

InitialiseStore builds a wallet Store specifically for users wallets.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(store Store) *Handler

func (*Handler) CreateWallet

func (h *Handler) CreateWallet(name, passphrase string) (string, error)

func (*Handler) GenerateKeyPair

func (h *Handler) GenerateKeyPair(name, passphrase string, meta []wallet.Meta) (wallet.KeyPair, error)

func (*Handler) GetPublicKey

func (h *Handler) GetPublicKey(name, pubKey string) (wallet.PublicKey, error)

func (*Handler) GetWalletPath

func (h *Handler) GetWalletPath(name string) (string, error)

func (*Handler) ImportWallet

func (h *Handler) ImportWallet(name, passphrase, recoveryPhrase string, version uint32) error

func (*Handler) ListKeyPairs

func (h *Handler) ListKeyPairs(name string) ([]wallet.KeyPair, error)

func (*Handler) ListPublicKeys

func (h *Handler) ListPublicKeys(name string) ([]wallet.PublicKey, error)

func (*Handler) ListWallets

func (h *Handler) ListWallets() ([]string, error)

func (*Handler) LoginWallet

func (h *Handler) LoginWallet(name, passphrase string) error

func (*Handler) LogoutWallet

func (h *Handler) LogoutWallet(name string)

func (*Handler) SecureGenerateKeyPair

func (h *Handler) SecureGenerateKeyPair(name, passphrase string, meta []wallet.Meta) (string, error)

func (*Handler) SignAny

func (h *Handler) SignAny(name string, inputData []byte, pubKey string) ([]byte, error)

func (*Handler) SignTx

func (*Handler) TaintKey

func (h *Handler) TaintKey(name, pubKey, passphrase string) error

func (*Handler) UntaintKey

func (h *Handler) UntaintKey(name string, pubKey string, passphrase string) error

func (*Handler) UpdateMeta

func (h *Handler) UpdateMeta(name, pubKey, passphrase string, meta []wallet.Meta) error

func (*Handler) VerifyAny

func (h *Handler) VerifyAny(inputData, sig []byte, pubKey string) (bool, error)

func (*Handler) WalletExists

func (h *Handler) WalletExists(name string) bool

type Store

type Store interface {
	WalletExists(name string) bool
	SaveWallet(w wallet.Wallet, passphrase string) error
	GetWallet(name, passphrase string) (wallet.Wallet, error)
	GetWalletPath(name string) string
	ListWallets() ([]string, error)
}

Store abstracts the underlying storage for wallet data.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL