Skip to main content

Secp256k1PrivateKeyInterface

type Secp256k1PrivateKeyInterface

type Secp256k1PrivateKeyInterface interface {
PublicKey() *Secp256k1PublicKey
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) (*Secp256k1Signature, error)
TrySignSimple(message []byte) (*SimpleSignature, error)
TrySignUser(message []byte) (*UserSignature, error)
VerifyingKey() *Secp256k1VerifyingKey
}