Skip to main content

Ed25519PrivateKeyInterface

type Ed25519PrivateKeyInterface

type Ed25519PrivateKeyInterface interface {
PublicKey() *Ed25519PublicKey
Scheme() SignatureScheme
// Sign a personal message and return a UserSignature.
SignPersonalMessage(message *PersonalMessage) (*UserSignature, error)
// Sign a transaction and return a UserSignature.
SignTransaction(transaction *Transaction) (*UserSignature, error)
// Encode this private key as `flag || privkey` in Bech32 starting with
// "iotaprivkey" to a string.
ToBech32() (string, error)
// Serialize this private key to bytes.
ToBytes() []byte
// Serialize this private key as DER-encoded PKCS#8
ToDer() ([]byte, error)
// Serialize this private key as PEM-encoded PKCS#8
ToPem() (string, error)
TrySign(message []byte) (*Ed25519Signature, error)
TrySignSimple(message []byte) (*SimpleSignature, error)
TrySignUser(message []byte) (*UserSignature, error)
VerifyingKey() *Ed25519VerifyingKey
}