Bitcoinex.Secp256k1.PrivateKey (bitcoinex v0.1.6) View Source

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

sign returns an ECDSA signature using the privkey and z where privkey is a PrivateKey object and z is an integer. The nonce is derived using RFC6979.

to_point calculate Point from private key

wif returns the base58check encoded private key as a string assumes all keys are compressed

Link to this section Types

Specs

t() :: %Bitcoinex.Secp256k1.PrivateKey{d: non_neg_integer()}

Link to this section Functions

Link to this function

deterministic_k(private_key, raw_z)

View Source

Specs

new(non_neg_integer()) :: {:ok, t()}

new creates a private key from an integer

Specs

parse_wif(String.t()) :: {:ok, t(), atom(), boolean()}

returns the base58check encoded private key as a string assumes all keys are compressed

Specs

parse_wif_bin(binary()) :: {:ok, t(), atom(), boolean()}
Link to this function

serialize_private_key(prvkey)

View Source

Specs

serialize_private_key(t()) :: String.t()

serialize_private_key serializes a private key into hex

Specs

sign returns an ECDSA signature using the privkey and z where privkey is a PrivateKey object and z is an integer. The nonce is derived using RFC6979.

Specs

to_point(t()) :: Bitcoinex.Secp256k1.Point.t()

to_point calculate Point from private key

Link to this function

wif!(prvkey, network_name)

View Source

Specs

wif returns the base58check encoded private key as a string assumes all keys are compressed