View Source Stellar.KeyPair.Spec behaviour (Elixir Stellar SDK v0.22.0)
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.
Summary
Types
Callbacks
@callback from_raw_muxed_account(binary()) :: public_key()
@callback from_raw_public_key(binary()) :: public_key()
@callback from_secret_seed(secret_seed()) :: {public_key(), secret_seed()}
@callback random() :: {public_key(), secret_seed()}
@callback raw_muxed_account(public_key()) :: binary()
@callback raw_pre_auth_tx(public_key()) :: binary()
@callback raw_public_key(public_key()) :: binary()
@callback raw_secret_seed(public_key()) :: binary()
@callback raw_sha256_hash(public_key()) :: binary()
@callback raw_signed_payload(public_key()) :: binary()
@callback sign(binary(), secret_seed()) :: binary() | error()
@callback valid_signature?(binary(), binary(), public_key()) :: boolean()
@callback validate_contract(contract()) :: validation()
@callback validate_muxed_account(public_key()) :: validation()
@callback validate_pre_auth_tx(public_key()) :: validation()
@callback validate_public_key(public_key()) :: validation()
@callback validate_secret_seed(public_key()) :: validation()
@callback validate_sha256_hash(public_key()) :: validation()
@callback validate_signed_payload(public_key()) :: validation()