wallet

package
v2.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomMnemonic12

func RandomMnemonic12() (types.Address, ed25519.PrivateKey, string, error)

func RandomMnemonic24

func RandomMnemonic24() (types.Address, ed25519.PrivateKey, string, error)

Types

type Account

type Account struct {
	interfaces.Account
	// contains filtered or unexported fields
}

func NewAccountFromHexKey

func NewAccountFromHexKey(hexPriv string) (*Account, error)

func RandomAccount

func RandomAccount() (*Account, error)

func (Account) Address

func (acct Account) Address() types.Address

func (Account) PrivateKey

func (acct Account) PrivateKey() (ed25519.PrivateKey, error)

func (Account) Sign

func (acct Account) Sign(msg []byte) (signData []byte, pub ed25519.PublicKey, err error)

func (Account) Verify

func (acct Account) Verify(pub ed25519.PublicKey, message, signdata []byte) error

type Manager

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

func New

func New(config *config.Wallet) *Manager

func (Manager) Account

func (m Manager) Account(address types.Address) (*Account, error)

func (Manager) AccountAtIndex

func (m Manager) AccountAtIndex(entryPath string, target types.Address, index uint32) (*Account, error)

func (Manager) AccountSearch

func (m Manager) AccountSearch(entryPath *string, target types.Address, passphrase string) (*Account, error)

func (*Manager) AddEntropyStore

func (m *Manager) AddEntropyStore(entropyStore string) error

if your entropyStore file is not in the standard dir you can add it so we can index it

func (Manager) AddLockEventListener

func (m Manager) AddLockEventListener(lis func(event entropystore.UnlockEvent)) int

func (Manager) ExtractMnemonic

func (m Manager) ExtractMnemonic(entropyStore string, passphrase string) (string, error)

func (Manager) GetDataDir

func (m Manager) GetDataDir() string

func (*Manager) GetEntropyStoreManager

func (m *Manager) GetEntropyStoreManager(entropyStore string) (*entropystore.Manager, error)

func (Manager) GlobalCheckAddrUnlock

func (m Manager) GlobalCheckAddrUnlock(targetAdr types.Address) bool

func (Manager) GlobalFindAddr

func (m Manager) GlobalFindAddr(targetAdr types.Address) (path string, key *derivation.Key, index uint32, err error)

func (Manager) GlobalFindAddrWithPassphrase

func (m Manager) GlobalFindAddrWithPassphrase(targetAdr types.Address, pass string) (path string, key *derivation.Key, index uint32, err error)

Deprecated

func (*Manager) IsUnlocked

func (m *Manager) IsUnlocked(entropyStore string) bool

func (Manager) ListAllEntropyFiles

func (m Manager) ListAllEntropyFiles() []string

func (Manager) ListEntropyFilesInStandardDir

func (m Manager) ListEntropyFilesInStandardDir() ([]string, error)

func (*Manager) Lock

func (m *Manager) Lock(entropyStore string) error

func (*Manager) MatchAddress

func (m *Manager) MatchAddress(EntryPath string, coinbase types.Address, index uint32) error

func (*Manager) NewMnemonicAndEntropyStore

func (m *Manager) NewMnemonicAndEntropyStore(passphrase string) (mnemonic string, em *entropystore.Manager, err error)

func (*Manager) RecoverEntropyStoreFromMnemonic

func (m *Manager) RecoverEntropyStoreFromMnemonic(mnemonic string, passphrase string) (em *entropystore.Manager, err error)

func (*Manager) RefreshCache

func (m *Manager) RefreshCache()

func (*Manager) RemoveEntropyStore

func (m *Manager) RemoveEntropyStore(entropyStore string)

func (Manager) RemoveUnlockChangeChannel

func (m Manager) RemoveUnlockChangeChannel(id int)

func (*Manager) Start

func (m *Manager) Start() error

func (*Manager) Stop

func (m *Manager) Stop()

func (*Manager) Unlock

func (m *Manager) Unlock(entropyStore, passphrase string) error

Directories

Path Synopsis
hd-bip

Jump to

Keyboard shortcuts

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