StellarBase.StrKey (Elixir Stellar Base v0.6.1) View Source

Allows encoding and decoding signatures used in the Stellar network.

Link to this section Summary

Link to this section Types

Specs

binary_data() :: binary() | nil

Specs

checksum() :: integer()

Specs

data() :: String.t() | nil

Specs

decoded_components() :: {:ok, {version_bytes(), binary(), checksum()}} | error()

Specs

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

Specs

validation() :: :ok | error()

Specs

version() ::
  :ed25519_public_key
  | :ed25519_secret_seed
  | :pre_auth_tx
  | :sha256_hash
  | :muxed_account

Specs

version_bytes() :: integer()

Link to this section Functions

Specs

decode(data :: data(), version :: version()) :: {:ok, binary()} | error()

Specs

decode!(data :: data(), version :: atom()) :: binary() | no_return()

Specs

encode(data :: binary_data(), version :: version()) ::
  {:ok, String.t()} | {:error, atom()}

Specs

encode!(data :: binary_data(), version :: version()) :: String.t() | no_return()