Stellar.KeyPair.Spec behaviour (Elixir Stellar SDK v0.3.0) View Source

Defines contracts to generate, validate and encode/decode Stellar KeyPairs.

This behaviour allows you to use any crypto package of your choice. The default is Ed25519.

Link to this section Summary

Link to this section Types

Specs

error() :: {:error, atom()}

Specs

public_key() :: String.t()

Specs

secret_seed() :: String.t()

Specs

validation() :: :ok | error()

Link to this section Callbacks

Link to this callback

from_raw_muxed_account(binary)

View Source (optional)

Specs

from_raw_muxed_account(binary()) :: public_key()
Link to this callback

from_raw_public_key(binary)

View Source (optional)

Specs

from_raw_public_key(binary()) :: public_key()
Link to this callback

from_secret_seed(secret_seed)

View Source

Specs

from_secret_seed(secret_seed()) :: {public_key(), secret_seed()}

Specs

random() :: {public_key(), secret_seed()}
Link to this callback

raw_muxed_account(public_key)

View Source

Specs

raw_muxed_account(public_key()) :: binary()
Link to this callback

raw_public_key(public_key)

View Source

Specs

raw_public_key(public_key()) :: binary()
Link to this callback

raw_secret_seed(public_key)

View Source

Specs

raw_secret_seed(public_key()) :: binary()
Link to this callback

sign(binary, secret_seed)

View Source

Specs

sign(binary(), secret_seed()) :: binary() | error()
Link to this callback

validate_muxed_account(public_key)

View Source (optional)

Specs

validate_muxed_account(public_key()) :: validation()
Link to this callback

validate_public_key(public_key)

View Source (optional)

Specs

validate_public_key(public_key()) :: validation()
Link to this callback

validate_secret_seed(public_key)

View Source (optional)

Specs

validate_secret_seed(public_key()) :: validation()