Documentation ¶
Index ¶
- Constants
- func ValidAddress(address string) bool
- type Wallet
- func (w *Wallet) Address() string
- func (w *Wallet) Bytes() ([]byte, error)
- func (w *Wallet) Equals(k crypto.Key) bool
- func (w *Wallet) GetPublic() crypto.PubKey
- func (w *Wallet) PrivateKey() *ecdsa.PrivateKey
- func (w *Wallet) PubKeyHash() []byte
- func (w *Wallet) PublicKey() []byte
- func (w *Wallet) Raw() ([]byte, error)
- func (w *Wallet) ReadFrom(r io.Reader) (int64, error)
- func (w *Wallet) Sign(b []byte) ([]byte, error)
- func (w *Wallet) Type() crypto_pb.KeyType
- func (w *Wallet) WriteTo(wr io.Writer) (int64, error)
Constants ¶
View Source
const Version1 byte = 0x00
Version1 is address version 1
Variables ¶
This section is empty.
Functions ¶
func ValidAddress ¶
ValidAddress will return true if the address given is a valid wallet address
Types ¶
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
Wallet is a digital wallet containing a public key and private key
func FromKey ¶
func FromKey(priv *ecdsa.PrivateKey) *Wallet
FromKey will create a wallet from an ecdsa private key
func (*Wallet) PrivateKey ¶
func (w *Wallet) PrivateKey() *ecdsa.PrivateKey
PrivateKey returns the wallet's private key
func (*Wallet) PubKeyHash ¶
PubKeyHash will generate the hash for the wallet's public key
Click to show internal directories.
Click to hide internal directories.