Skip to content

an Erlang/Elixir websockets client library for Graphene 2.0

License

Notifications You must be signed in to change notification settings

nmywn/graphene_client_ex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elixir client for Bitshares/Graphene 2.0 websocket API

Provides an interface to Bitshares/ Graphene 2.0 JSONRPC protocol. Graphene_client_ex is a supervised application, so don't forget to add it to applications in mix.exs

Installation

If available in Hex, the package can be installed as:

  1. Add graphene_client_ex to your list of dependencies in mix.exs:
```elixir
def deps do
  [{:graphene_client_ex, "~> 0.2.0"}]
end
```
  1. Ensure graphene_client_ex is started before your application:
```elixir
def application do
  [applications: [:graphene_client_ex]]
end
```

Example

First, add a websockets url for the graphene daemon, for example, wss://bitshares.openledger.info/ws to the config.

    config :graphene_client_ex,
      url: "GRAPHENE_URL"

The main module function is Graphene.call. It will block the calling process and return a success tuple with a "result" data from the JSONRPC call response. JSONRPC call ids are handled automatically.

About

an Erlang/Elixir websockets client library for Graphene 2.0

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 100.0%