Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashMessage ¶ added in v2.4.0
HashMessage hash the message using preamble
Types ¶
type Account ¶
type Account interface { // Address returns the IoTeX address Address() address.Address // PrivateKey returns the embedded private key interface PrivateKey() crypto.PrivateKey // PublicKey returns the embedded public key interface PublicKey() crypto.PublicKey // Sign signs the message using the private key Sign([]byte) ([]byte, error) // Verify verifies the message using the public key Verify([]byte, []byte) bool // Zero zeroes the private key data Zero() // SignMessage signs the message using preamble SignMessage(data []byte) ([]byte, error) }
Account is a user account
func HexStringToAccount ¶
HexStringToAccount generates an account from private key string
func PrivateKeyToAccount ¶
func PrivateKeyToAccount(key crypto.PrivateKey) (Account, error)
PrivateKeyToAccount generates an account from an existing private key interface
type Accounts ¶
type Accounts struct {
// contains filtered or unexported fields
}
Accounts type
func (*Accounts) AddAccount ¶
AddAccount add an account
func (*Accounts) GetAccount ¶
GetAccount by address
func (*Accounts) RemoveAccount ¶
RemoveAccount removes an account
Click to show internal directories.
Click to hide internal directories.