Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PrivateKeyCurve = elliptic.P256()
PrivateKeyCurve is the elliptic curve in use for private key creation.
Functions ¶
func NewAddressTree ¶
Types ¶
type Account ¶
type Account interface {
PublicKeyBytes() []byte
Address() []byte
Verify(data, signature []byte) bool
}
Account is a generic interface to an account that can send and receive funding.
type AddressTreeItem ¶
type Private ¶
type Private struct {
// contains filtered or unexported fields
}
Private is a private account. A private account can verify and sign transactions.
func NewPrivate ¶
func NewPrivate() *Private
NewPrivate generates a new private-public key pair bound to an account.
func NewPrivateFromBytes ¶
NewPrivateFromBytes restores the private key from a slice of bytes.
func (*Private) PublicKeyBytes ¶
PublicKeyBytes retrieves the private keys public pair in a binary format.
type Public ¶
type Public struct {
// contains filtered or unexported fields
}
Public is a public account. Public accounts can only verify transactions.
func (*Public) PublicKeyBytes ¶
PublicKeyBytes retrieves the public key in a binary format.
Click to show internal directories.
Click to hide internal directories.