Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/BeSpiral/eosrpc-elixir-wrapper
EOSRPC API Wrapper for Elixir
https://github.com/BeSpiral/eosrpc-elixir-wrapper
elixir eos eos-sdk eosio eosrpc-apis
Last synced: 3 months ago
JSON representation
EOSRPC API Wrapper for Elixir
- Host: GitHub
- URL: https://github.com/BeSpiral/eosrpc-elixir-wrapper
- Owner: cambiatus
- License: gpl-3.0
- Created: 2018-04-20T00:59:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-12T23:06:45.000Z (over 3 years ago)
- Last Synced: 2024-04-10T17:19:26.532Z (7 months ago)
- Topics: elixir, eos, eos-sdk, eosio, eosrpc-apis
- Language: Elixir
- Homepage:
- Size: 96.7 KB
- Stars: 19
- Watchers: 15
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-eos - eosrpc-elixir-wrapper - EOS RPC Api Wrapper for elixir (Language Support / Elixir)
- awesome-EOS - eosrpc-elixir-wrapper - EOS API wrapper for Elixir. (Language Support / Elixir)
README
# EOSRPC
[![Build Status](https://travis-ci.org/BeSpiral/eosrpc-elixir-wrapper.svg?branch=master)](https://travis-ci.org/BeSpiral/eosrpc-elixir-wrapper)
[![Hex.pm](https://img.shields.io/hexpm/v/eosrpc.svg)](https://hex.pm/packages/eosrpc)Simple EOSRPC Wrapper for Elixir.
Based on [EOS RPC Official Docs](https://developers.eos.io/eosio-nodeos/reference)## Installation
```elixir
def deps do
[
{:eosrpc, "~> 0.6.0"}
]
end
```You need to setup the Chain, Wallet and Account History URLs. This is the default configuration:
```elixir
config :eosrpc, EOSRPC.Wallet,
url: "http://127.0.0.1:8999/v1/wallet"config :eosrpc, EOSRPC.Chain,
url: "http://127.0.0.1:8888/v1/chain"config :eosrpc, EOSRPC.History,
url: "http://127.0.0.1:8888/v1/history"
```## Examples
Autosigning and pushing a transaction.
```elixir
actions = [
%{
account: "eosio.token",
authorization: [%{actor: "eosio.token", permission: "active"}],
data: %{issuer: "eosio", max_supply: "10000.00 LEO"},
name: "create"
}
]EOSRPC.Helper.auto_push(actions)
```Creating a new account `leo` under the owner `eosio`
```elixir
EOSRPC.Helper.new_account("eosio", "leo", "EOS_OWNER_PUB_KEY", "EOS_ACTIVE_PUB_KEY")
```All of the EOSRPC APIs are in `EOSRPC.Wallet`, `EOSRPC.Chain` and `EOSRPC.History`
For complete transactions signature and submission flow examples check `EOSRPC.Helper`
## License
This project is licensed under the GNU GPLv3 License - see the [LICENSE](LICENSE) file for details