Documentation
¶
Index ¶
Constants ¶
View Source
const DST = string("BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_")
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PrivateKey ¶
type PrivateKey interface {
// Private to public
Public() []byte
// private key signature
Sign([]byte) (*crypto.Signature, error)
// private key data
Bytes() []byte
// key address, depends on network changes
Address() (address.Address, error)
// key sign type
Type() types.SigType
// key type
KeyType() types.KeyType
// map to keyInfo
ToKeyInfo() *types.KeyInfo
}
private key constraints in wallet
func GeneratePrivateKey ¶
func GeneratePrivateKey(st types.SigType) (PrivateKey, error)
func NewKeyFromData ¶
func NewKeyFromData(st types.SigType, prv []byte) (PrivateKey, error)
func NewKeyFromData2 ¶
func NewKeyFromData2(kt types.KeyType, prv []byte) (PrivateKey, error)
func NewKeyFromKeyInfo ¶
func NewKeyFromKeyInfo(ki *types.KeyInfo) (PrivateKey, error)
Click to show internal directories.
Click to hide internal directories.