wallet

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 16 Imported by: 0

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) AccountSeeds added in v0.10.4

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

func (*EmbeddedWalletImpl) Load added in v0.5.0

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

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) AccountSeeds added in v0.10.4

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

func (Stub) Load added in v0.8.0

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

func (Stub) SignTransactionWith added in v0.8.0

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

type Wallet

type Wallet interface {
	AccountSeeds() [][]byte
	AddAccountSeed([]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) AccountSeeds added in v0.10.4

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

func (*WalletImpl) AddAccountSeed added in v0.10.4

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

func (*WalletImpl) Encode added in v0.5.0

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

Jump to

Keyboard shortcuts

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