# `BSV.Tokens.Error`
[🔗](https://github.com/Bittoku/bsv_sdk_elixir/blob/main/lib/bsv/tokens/error.ex#L1)

Token error types.

# `error_type`

```elixir
@type error_type() ::
  :invalid_scheme
  | :amount_mismatch
  | :invalid_script
  | :invalid_destination
  | :invalid_authority
  | :signing_failed
  | :not_splittable
  | :insufficient_funds
  | :bundle_error
```

# `t`

```elixir
@type t() :: %BSV.Tokens.Error{
  __exception__: true,
  message: String.t(),
  type: error_type()
}
```

# `amount_mismatch`

```elixir
@spec amount_mismatch(non_neg_integer(), non_neg_integer()) :: t()
```

Create an amount mismatch error.

# `insufficient_funds`

```elixir
@spec insufficient_funds(non_neg_integer(), non_neg_integer()) :: t()
```

Create an insufficient funds error.

# `invalid_authority`

```elixir
@spec invalid_authority(String.t()) :: t()
```

Create an invalid authority error.

# `invalid_destination`

```elixir
@spec invalid_destination(String.t()) :: t()
```

Create an invalid destination error.

# `invalid_scheme`

```elixir
@spec invalid_scheme(String.t()) :: t()
```

Create an invalid scheme error.

# `invalid_script`

```elixir
@spec invalid_script(String.t()) :: t()
```

Create an invalid script error.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
