View Source StellarBase.StrKey (Elixir Stellar Base v0.16.0)
Allows encoding and decoding signatures used in the Stellar network.
Summary
Types
@type binary_data() :: binary() | nil
@type checksum() :: integer()
@type data() :: String.t() | nil
@type decoded_components() :: {:ok, {version_bytes(), binary(), checksum()}} | error()
@type error() :: {:error, atom()}
@type validation() :: :ok | error()
@type version() ::
:ed25519_public_key
| :ed25519_secret_seed
| :pre_auth_tx
| :sha256_hash
| :muxed_account
| :signed_payload
| :contract
@type version_bytes() :: integer()
Functions
@spec encode(data :: binary_data(), version :: version()) :: {:ok, String.t()} | {:error, atom()}
@spec encode!(data :: binary_data(), version :: version()) :: String.t() | no_return()