Skip to content

aeternity/aepp-sdk-elixir

Repository files navigation

Aepp SDK Elixir

Elixir SDK targeting the æternity node implementation.

Installation

To start using this project, simply use source code or compiled binaries, provided in our releases.

Installation as a dependency

An installation as library, basic usage guide can be found here.

Using code from master/other branches

In order to use code from master branch:

  1. First, you will need to install Java v11 or higher and Maven v3.3.3 or higher:
sudo apt-install default-jdk
sudo apt-install maven
  1. Then, you will have to set-up the project.

These dependencies are used by our OpenAPI Code Generator, which builds low-level API calls, needed for Aeternity Node and Aeternity Middleware.

Prerequisites

Using released versions: Ensure that you have Elixir and wget installed.

Using code from master/other branches, as mentioned before, additionally, you will have to install Java and Maven.

Setup the project

git clone https://github.com/aeternity/aepp-sdk-elixir
cd aepp-sdk-elixir
mix build_api v1.2.1-elixir v5.4.1 v0.13.0

Where:

Implemented functionality

Consists of definition of a client structure and other helper functions. Client structure helps us collect and manage all data needed to perform various requests to the HTTP endpoints.

Contains various functions to interact with aeternity account, e.g. getting an account, spending and etc.

In chain module we implemented chain-related activities, like getting current blocks, generations, transactions and others.

This module covers oracle-related activities such as: registering a new oracle, querying an oracle, responding from an oracle, extending an oracle, retrieving oracle and queries functionality.

Module implements functions needed to: deploy, call, compile Aeternity's Sophia smart contracts.

Naming system module has many functionalities, needed to manipulate Aeternity naming system. It allows developers to: pre-claim, claim, update, transfer and revoke names.

Module, containing implemented and tested all channel on-chain transactions and activities. They are: getting channel info by id, opening a channel, depositing to a channel, withdrawing from a channel, closing solo and closing mutually a channel and many others.

Module, which works with enoise protocol, which is used by Aeternity. Implemented connection between peers and listening for new blocks, transactions and other stuff.

Simple high-module which performs various requests to exposed endpoints in Aeternity Middleware project.

Full documentation can be found here.

Use Docker image

In order to play around with the Elixir SDK, you can use docker image:

docker pull aeternity/aepp-sdk-elixir:latest
docker run -it aeternity/aepp-sdk-elixir:latest

Example to defined a client can be found here.