client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2018 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright (C) 2018 go-dappley authors

This file is part of the go-dappley library.

the go-dappley library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

the go-dappley library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the go-dappley library. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

View Source
const WalletFile = "../bin/wallets.dat"

Variables

This section is empty.

Functions

This section is empty.

Types

type Wallet

type Wallet struct {
	Key       *core.KeyPair
	Addresses []core.Address
}

func NewWallet

func NewWallet() Wallet

func (Wallet) ContainAddress

func (w Wallet) ContainAddress(address core.Address) bool

func (Wallet) GetAddress

func (w Wallet) GetAddress() core.Address

func (Wallet) GetAddresses

func (w Wallet) GetAddresses() []core.Address

func (Wallet) GetKeyPair

func (w Wallet) GetKeyPair() *core.KeyPair

type Wallets

type Wallets struct {
	Wallets []Wallet
}

func NewWallets

func NewWallets() (*Wallets, error)

func (*Wallets) CreateWallet

func (ws *Wallets) CreateWallet() Wallet

func (*Wallets) DeleteWallet

func (ws *Wallets) DeleteWallet(key *core.KeyPair) error

func (*Wallets) DeleteWallets

func (ws *Wallets) DeleteWallets() error

func (*Wallets) GetAddresses

func (ws *Wallets) GetAddresses() []core.Address

func (Wallets) GetKeyPairByAddress

func (ws Wallets) GetKeyPairByAddress(address core.Address) core.KeyPair

func (Wallets) GetWalletByAddress

func (ws Wallets) GetWalletByAddress(address core.Address) Wallet

func (*Wallets) LoadWalletFromFile

func (ws *Wallets) LoadWalletFromFile() error

func (Wallets) SaveWalletToFile

func (ws Wallets) SaveWalletToFile()

SaveToFile saves wallets to a file

Jump to

Keyboard shortcuts

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