View Source blockfrost_core (blockfrost_erlang v0.1.1)

Summary

Functions

Query all results, until we get less than maximum items per page.

Setup Blockfrost API client using BLOCKFROST_TOKEN_PATH environment variable
Setup Blockfrost API client from string containing Blockfrost project token, i.e. mainnet1A2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P

Types

-type error() :: #error{}.
-type network() :: mainnet | preprod | preview | sanchonet | ipfs.
-type paged() :: #paged{}.
-type sort_order() :: #sort_order{}.

Functions

-spec all_pages(fun((paged()) -> any())) -> {ok, any()} | error.

Query all results, until we get less than maximum items per page.

Usage: blockfrost:all_pages(fun(P) -> blockfrost:get_latest_block_txs(P, #sort_order{}) end).
-spec init() -> ok.
-spec perform_request(string()) -> {ok, jsx:json_term()} | error.
Link to this function

perform_request(URL, QS)

View Source
-spec perform_request(string(), hackney_url:qs_vals()) -> {ok, jsx:json_term()} | error.
Link to this function

perform_request(URL, QS, Method, Payload)

View Source
-spec perform_request(string(), hackney_url:qs_vals(), term(), term()) -> {ok, jsx:json_term()} | error.
-spec setup() -> ok | {error, string()}.
Setup Blockfrost API client using BLOCKFROST_TOKEN_PATH environment variable
-spec setup(string()) -> ok | {error, string()}.
Setup Blockfrost API client from string containing Blockfrost project token, i.e. mainnet1A2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P