wallet

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PublicKeyNotFound = errors.New("public key not found")

Functions

func NewCrypt

func NewCrypt(key []byte) *crypt

Types

type EmbeddedWalletImpl added in v0.5.0

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

func NewEmbeddedWallet added in v0.5.0

func NewEmbeddedWallet(path Loader, seeder seeder, scheme proto.Scheme) *EmbeddedWalletImpl

func (*EmbeddedWalletImpl) Load added in v0.5.0

func (a *EmbeddedWalletImpl) Load(password []byte) error

func (*EmbeddedWalletImpl) Seeds added in v0.5.0

func (a *EmbeddedWalletImpl) Seeds() [][]byte

func (*EmbeddedWalletImpl) SignTransactionWith added in v0.5.0

func (a *EmbeddedWalletImpl) SignTransactionWith(pk crypto.PublicKey, tx proto.Transaction) error

type Loader added in v0.5.0

type Loader interface {
	Load() ([]byte, error)
}

type LoaderImpl added in v0.5.0

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

func NewLoader added in v0.5.0

func NewLoader(path string) LoaderImpl

func (LoaderImpl) Load added in v0.5.0

func (a LoaderImpl) Load() ([]byte, error)

type Stub added in v0.8.0

type Stub struct {
	S [][]byte
}

func (Stub) Load added in v0.8.0

func (s Stub) Load(password []byte) error

func (Stub) Seeds added in v0.8.0

func (s Stub) Seeds() [][]byte

func (Stub) SignTransactionWith added in v0.8.0

func (s Stub) SignTransactionWith(pk crypto.PublicKey, tx proto.Transaction) error

type Wallet

type Wallet interface {
	Seeds() [][]byte
	AddSeed([]byte) error
	Encode(pass []byte) ([]byte, error)
}

func Decode

func Decode(walletData []byte, password []byte) (Wallet, error)

type WalletFormat

type WalletFormat struct {
	Seed [][]byte `json:"seeds"`
}

type WalletImpl added in v0.5.0

type WalletImpl struct {
	Version uint32
	// contains filtered or unexported fields
}

func NewWallet added in v0.5.0

func NewWallet() *WalletImpl

func (*WalletImpl) AddSeed added in v0.5.0

func (a *WalletImpl) AddSeed(seed []byte) error

func (*WalletImpl) Encode added in v0.5.0

func (a *WalletImpl) Encode(password []byte) ([]byte, error)

func (*WalletImpl) Seeds added in v0.5.0

func (a *WalletImpl) Seeds() [][]byte

Jump to

Keyboard shortcuts

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