ExStacks

Introduction

ExStacks is a library that serves as a interface to integrate Stacks Blockchain into your project.

Setup

  1. Add ex_stacks to you mix.exs
  2. Retrieve your desired node base URL - required
  3. In case you want to receive event updates directly from the blockchain through the websocket, you need the websocket base url - optional
  4. Add the following config to your configuration file:
    config :ex_stacks,
    node_url: "your_node_url",
    node_ws_url: "your_optional_node_websocket_url"

Usage

As of now, the following Stacks Blockchain API actions are supported:

You can retrieve the process listening to the websocket events ID through ExStacks.WebSocketClient.get_process_id/0, and implement it in any way you want.