View Source Bitcoinex.Secp256k1.PrivateKey (bitcoinex v0.1.8)
Contains an integer used to create a Point and sign.
Link to this section Summary
Functions
new creates a private key from an integer
returns the base58check encoded private key as a string assumes all keys are compressed
serialize_private_key serializes a private key into hex
to_point calculate Point from private key or integer
wif returns the base58check encoded private key as a string assumes all keys are compressed
Link to this section Types
@type t() :: %Bitcoinex.Secp256k1.PrivateKey{d: non_neg_integer()}
Link to this section Functions
@spec new(non_neg_integer()) :: {:ok, t()} | {:error, String.t()}
new creates a private key from an integer
returns the base58check encoded private key as a string assumes all keys are compressed
serialize_private_key serializes a private key into hex
@spec to_point(t() | non_neg_integer()) :: Bitcoinex.Secp256k1.Point.t() | {:error, String.t()}
to_point calculate Point from private key or integer
@spec wif!(t(), Bitcoinex.Network.network_name()) :: String.t()
wif returns the base58check encoded private key as a string assumes all keys are compressed