BSV.JungleBus.Client (bsv_sdk v1.1.0)

Copy Markdown View Source

HTTP client for the JungleBus API.

Summary

Functions

Get full transaction details for an address.

Get address transaction metadata.

Get a block header by hash or height.

List block headers starting from a given block.

Get a transaction by its ID.

Create a new JungleBus client with the given configuration.

Types

t()

@type t() :: %BSV.JungleBus.Client{
  config: BSV.JungleBus.Config.t(),
  req: Req.Request.t()
}

Functions

get_address_transaction_details(client, address)

@spec get_address_transaction_details(t(), String.t()) ::
  {:ok, [BSV.JungleBus.Types.Transaction.t()]} | {:error, term()}

Get full transaction details for an address.

get_address_transactions(client, address)

@spec get_address_transactions(t(), String.t()) ::
  {:ok, [BSV.JungleBus.Types.AddressInfo.t()]} | {:error, term()}

Get address transaction metadata.

get_block_header(client, block)

@spec get_block_header(t(), String.t()) ::
  {:ok, BSV.JungleBus.Types.BlockHeader.t()} | {:error, term()}

Get a block header by hash or height.

get_block_headers(client, from_block, limit)

@spec get_block_headers(t(), String.t(), non_neg_integer()) ::
  {:ok, [BSV.JungleBus.Types.BlockHeader.t()]} | {:error, term()}

List block headers starting from a given block.

get_transaction(client, txid)

@spec get_transaction(t(), String.t()) ::
  {:ok, BSV.JungleBus.Types.Transaction.t()} | {:error, term()}

Get a transaction by its ID.

new(config)

@spec new(BSV.JungleBus.Config.t()) :: t()

Create a new JungleBus client with the given configuration.