Payzum.Currencies (Payzum v0.1.0)

Copy Markdown View Source

The platform-wide catalogue.

It is not a merchant's allowlist: no endpoint exposes that outside a draft, so an integration must not build its own coin picker from this list.

There is no cache here. Elixir has no shared mutable state without a process, and adding one to a payment client is a decision the caller should make; fetch once and keep the list.

Summary

Functions

The entry for an exact code, when the catalogue has it.

Every (asset, chain) pair from currencies_detailed.

Every asset the catalogue lists on a chain.

Functions

find(client, code)

@spec find(Payzum.Client.t(), String.t()) ::
  {:ok, map() | nil} | {:error, Exception.t()}

The entry for an exact code, when the catalogue has it.

list(client)

@spec list(Payzum.Client.t()) :: {:ok, [map()]} | {:error, Exception.t()}

Every (asset, chain) pair from currencies_detailed.

on_chain(client, network)

@spec on_chain(Payzum.Client.t(), String.t()) ::
  {:ok, [map()]} | {:error, Exception.t()}

Every asset the catalogue lists on a chain.