Skip to main content

Secp256k1PrivateKey

type Secp256k1PrivateKey

type Secp256k1PrivateKey struct {
// contains filtered or unexported fields
}

func LiftFromExternalSecp256k1PrivateKey

func LiftFromExternalSecp256k1PrivateKey(handle uint64) *Secp256k1PrivateKey

func NewSecp256k1PrivateKey

func NewSecp256k1PrivateKey(bytes []byte) (*Secp256k1PrivateKey, error)

func Secp256k1PrivateKeyFromBech32

func Secp256k1PrivateKeyFromBech32(value string) (*Secp256k1PrivateKey, error)

Decode a private key from `flag || privkey` in Bech32 starting with "iotaprivkey".

func Secp256k1PrivateKeyFromDer

func Secp256k1PrivateKeyFromDer(bytes []byte) (*Secp256k1PrivateKey, error)

Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary format).

func Secp256k1PrivateKeyFromMnemonic

func Secp256k1PrivateKeyFromMnemonic(phrase string, accountIndex uint64, password string) (*Secp256k1PrivateKey, error)

Construct the private key from a mnemonic phrase

func Secp256k1PrivateKeyFromMnemonicWithPath

func Secp256k1PrivateKeyFromMnemonicWithPath(phrase string, path string, password string) (*Secp256k1PrivateKey, error)

Create an instance from a mnemonic phrase and a derivation path like `"m/54'/4218'/0'/0/0"`

func Secp256k1PrivateKeyFromPem

func Secp256k1PrivateKeyFromPem(s string) (*Secp256k1PrivateKey, error)

Deserialize PKCS#8-encoded private key from PEM.

func Secp256k1PrivateKeyRandom

func Secp256k1PrivateKeyRandom() *Secp256k1PrivateKey

func (*Secp256k1PrivateKey) DebugString

func (_self *Secp256k1PrivateKey) DebugString() string

func (*Secp256k1PrivateKey) Destroy

func (object *Secp256k1PrivateKey) Destroy()

func (*Secp256k1PrivateKey) Eq

func (_self *Secp256k1PrivateKey) Eq(other *Secp256k1PrivateKey) bool

func (*Secp256k1PrivateKey) Ne

func (_self *Secp256k1PrivateKey) Ne(other *Secp256k1PrivateKey) bool

func (*Secp256k1PrivateKey) PublicKey

func (_self *Secp256k1PrivateKey) PublicKey() *Secp256k1PublicKey

func (*Secp256k1PrivateKey) Scheme

func (_self *Secp256k1PrivateKey) Scheme() SignatureScheme

func (*Secp256k1PrivateKey) SignPersonalMessage

func (_self *Secp256k1PrivateKey) SignPersonalMessage(message *PersonalMessage) (*UserSignature, error)

Sign a personal message and return a UserSignature.

func (*Secp256k1PrivateKey) SignTransaction

func (_self *Secp256k1PrivateKey) SignTransaction(transaction *Transaction) (*UserSignature, error)

Sign a transaction and return a UserSignature.

func (*Secp256k1PrivateKey) ToBech32

func (_self *Secp256k1PrivateKey) ToBech32() (string, error)

Encode this private key as `flag || privkey` in Bech32 starting with "iotaprivkey" to a string.

func (*Secp256k1PrivateKey) ToBytes

func (_self *Secp256k1PrivateKey) ToBytes() []byte

Serialize this private key to bytes.

func (*Secp256k1PrivateKey) ToDer

func (_self *Secp256k1PrivateKey) ToDer() ([]byte, error)

Serialize this private key as DER-encoded PKCS#8

func (*Secp256k1PrivateKey) ToPem

func (_self *Secp256k1PrivateKey) ToPem() (string, error)

Serialize this private key as PEM-encoded PKCS#8

func (*Secp256k1PrivateKey) TrySign

func (_self *Secp256k1PrivateKey) TrySign(message []byte) (*Secp256k1Signature, error)

func (*Secp256k1PrivateKey) TrySignSimple

func (_self *Secp256k1PrivateKey) TrySignSimple(message []byte) (*SimpleSignature, error)

func (*Secp256k1PrivateKey) TrySignUser

func (_self *Secp256k1PrivateKey) TrySignUser(message []byte) (*UserSignature, error)

func (*Secp256k1PrivateKey) VerifyingKey

func (_self *Secp256k1PrivateKey) VerifyingKey() *Secp256k1VerifyingKey