Documentation ¶
Index ¶
- Constants
- Variables
- type IWallet
- type Session
- func (s *Session) ChangePassword(password string) error
- func (s *Session) EnterPassword(password string) error
- func (s *Session) Export(path string) error
- func (s *Session) GenerateChangeBlock(account types.Address, representative types.Address) (types.Block, error)
- func (s *Session) GenerateReceiveBlock(sendBlock types.Block) (types.Block, error)
- func (s *Session) GenerateSendBlock(source types.Address, token types.Hash, to types.Address, amount types.Balance) (types.Block, error)
- func (s *Session) GetAccounts() ([]types.Address, error)
- func (s *Session) GetBalances() (map[types.Hash]types.Balance, error)
- func (s *Session) GetDeterministicIndex() (int64, error)
- func (s *Session) GetRawKey(account types.Address) (*types.Account, error)
- func (s *Session) GetRepresentative() (types.Address, error)
- func (s *Session) GetSeed() ([]byte, error)
- func (s *Session) GetVersion() (int64, error)
- func (s *Session) GetWalletId() ([]byte, error)
- func (s *Session) GetWork(account types.Address) (types.Work, error)
- func (s *Session) Import(content string, password string) error
- func (s *Session) IsAccountExist(addr types.Address) bool
- func (s *Session) ResetDeterministicIndex() error
- func (s *Session) SearchPending() error
- func (s *Session) SetDeterministicIndex(index int64) error
- func (s *Session) SetRepresentative(address types.Address) error
- func (s *Session) SetVersion(version int64) error
- func (s *Session) ValidPassword() bool
- func (s *Session) VerifyPassword(password string) (bool, error)
- type WalletStore
- func (ws *WalletStore) Close() error
- func (ws *WalletStore) CurrentId() (types.Address, error)
- func (ws *WalletStore) IsWalletExist(address types.Address) (bool, error)
- func (ws *WalletStore) NewSession(walletId types.Address) *Session
- func (ws *WalletStore) NewWallet() (types.Address, error)
- func (ws *WalletStore) NewWalletBySeed(seed, password string) (types.Address, error)
- func (ws *WalletStore) RemoveWallet(id types.Address) error
- func (ws *WalletStore) WalletIds() ([]types.Address, error)
Constants ¶
View Source
const (
Version = 1
)
Variables ¶
View Source
var (
EmptyIdErr = errors.New("empty wallet id")
)
View Source
var (
ErrEmptyCurrentId = errors.New("can not find any wallet id")
)
Functions ¶
This section is empty.
Types ¶
type Session ¶
func (*Session) ChangePassword ¶
func (*Session) EnterPassword ¶
func (*Session) GenerateChangeBlock ¶
func (*Session) GenerateReceiveBlock ¶
func (*Session) GenerateSendBlock ¶
func (*Session) GetDeterministicIndex ¶
func (*Session) GetVersion ¶
func (*Session) GetWalletId ¶
func (*Session) ResetDeterministicIndex ¶
func (*Session) SearchPending ¶
func (*Session) SetDeterministicIndex ¶
func (*Session) SetRepresentative ¶
func (*Session) SetVersion ¶
func (*Session) ValidPassword ¶
type WalletStore ¶
func NewWalletStore ¶
func NewWalletStore(cfg *config.Config) *WalletStore
func (*WalletStore) Close ¶
func (ws *WalletStore) Close() error
func (*WalletStore) IsWalletExist ¶
func (ws *WalletStore) IsWalletExist(address types.Address) (bool, error)
IsWalletExist check is the wallet exist by master address
func (*WalletStore) NewSession ¶
func (ws *WalletStore) NewSession(walletId types.Address) *Session
func (*WalletStore) NewWallet ¶
func (ws *WalletStore) NewWallet() (types.Address, error)
NewWallet create new wallet and save to db
func (*WalletStore) NewWalletBySeed ¶
func (ws *WalletStore) NewWalletBySeed(seed, password string) (types.Address, error)
NewWalletBySeed create wallet from hex seed string
func (*WalletStore) RemoveWallet ¶
func (ws *WalletStore) RemoveWallet(id types.Address) error
Click to show internal directories.
Click to hide internal directories.