Secp256r1PrivateKey
type Secp256r1PrivateKey
type Secp256r1PrivateKey struct {
// contains filtered or unexported fields
}
func LiftFromExternalSecp256r1PrivateKey
func LiftFromExternalSecp256r1PrivateKey(handle uint64) *Secp256r1PrivateKey
func NewSecp256r1PrivateKey
func NewSecp256r1PrivateKey(bytes []byte) (*Secp256r1PrivateKey, error)
func Secp256r1PrivateKeyFromBech32
func Secp256r1PrivateKeyFromBech32(value string) (*Secp256r1PrivateKey, error)
Decode a private key from `flag || privkey` in Bech32 starting with "iotaprivkey".
func Secp256r1PrivateKeyFromDer
func Secp256r1PrivateKeyFromDer(bytes []byte) (*Secp256r1PrivateKey, error)
Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary format).
func Secp256r1PrivateKeyFromMnemonic
func Secp256r1PrivateKeyFromMnemonic(phrase string, accountIndex uint64, password string) (*Secp256r1PrivateKey, error)
Construct the private key from a mnemonic phrase
func Secp256r1PrivateKeyFromMnemonicWithPath
func Secp256r1PrivateKeyFromMnemonicWithPath(phrase string, path string, password string) (*Secp256r1PrivateKey, error)
Create an instance from a mnemonic phrase and a derivation path like `"m/74'/4218'/0'/0/0"`
func Secp256r1PrivateKeyFromPem
func Secp256r1PrivateKeyFromPem(s string) (*Secp256r1PrivateKey, error)
Deserialize PKCS#8-encoded private key from PEM.
func Secp256r1PrivateKeyRandom
func Secp256r1PrivateKeyRandom() *Secp256r1PrivateKey
Generate a new random Secp256r1PrivateKey
func (*Secp256r1PrivateKey) DebugString
func (_self *Secp256r1PrivateKey) DebugString() string
func (*Secp256r1PrivateKey) Destroy
func (object *Secp256r1PrivateKey) Destroy()
func (*Secp256r1PrivateKey) Eq
func (_self *Secp256r1PrivateKey) Eq(other *Secp256r1PrivateKey) bool
func (*Secp256r1PrivateKey) Ne
func (_self *Secp256r1PrivateKey) Ne(other *Secp256r1PrivateKey) bool
func (*Secp256r1PrivateKey) PublicKey
func (_self *Secp256r1PrivateKey) PublicKey() *Secp256r1PublicKey
Get the public key corresponding to this private key.
func (*Secp256r1PrivateKey) Scheme
func (_self *Secp256r1PrivateKey) Scheme() SignatureScheme
func (*Secp256r1PrivateKey) SignPersonalMessage
func (_self *Secp256r1PrivateKey) SignPersonalMessage(message *PersonalMessage) (*UserSignature, error)
Sign a personal message and return a UserSignature.
func (*Secp256r1PrivateKey) SignTransaction
func (_self *Secp256r1PrivateKey) SignTransaction(transaction *Transaction) (*UserSignature, error)
Sign a transaction and return a UserSignature.
func (*Secp256r1PrivateKey) ToBech32
func (_self *Secp256r1PrivateKey) ToBech32() (string, error)
Encode this private key as `flag || privkey` in Bech32 starting with "iotaprivkey" to a string.
func (*Secp256r1PrivateKey) ToBytes
func (_self *Secp256r1PrivateKey) ToBytes() []byte
Serialize this private key to bytes.
func (*Secp256r1PrivateKey) ToDer
func (_self *Secp256r1PrivateKey) ToDer() ([]byte, error)
Serialize this private key as DER-encoded PKCS#8
func (*Secp256r1PrivateKey) ToPem
func (_self *Secp256r1PrivateKey) ToPem() (string, error)
Serialize this private key as PEM-encoded PKCS#8
func (*Secp256r1PrivateKey) TrySign
func (_self *Secp256r1PrivateKey) TrySign(message []byte) (*Secp256r1Signature, error)
Sign a message and return a Secp256r1Signature.
func (*Secp256r1PrivateKey) TrySignSimple
func (_self *Secp256r1PrivateKey) TrySignSimple(message []byte) (*SimpleSignature, error)
Sign a message and return a SimpleSignature.
func (*Secp256r1PrivateKey) TrySignUser
func (_self *Secp256r1PrivateKey) TrySignUser(message []byte) (*UserSignature, error)
Sign a message and return a UserSignature.
func (*Secp256r1PrivateKey) VerifyingKey
func (_self *Secp256r1PrivateKey) VerifyingKey() *Secp256r1VerifyingKey