https://github.com/arcblock/ocap-rpc
blockchain RPC for elixir. Support various chains
https://github.com/arcblock/ocap-rpc
Last synced: about 1 year ago
JSON representation
blockchain RPC for elixir. Support various chains
- Host: GitHub
- URL: https://github.com/arcblock/ocap-rpc
- Owner: ArcBlock
- Created: 2018-07-26T16:11:10.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-12-31T00:27:08.000Z (over 6 years ago)
- Last Synced: 2025-05-06T23:16:22.855Z (about 1 year ago)
- Language: Elixir
- Size: 1.81 MB
- Stars: 8
- Watchers: 28
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Block Chain RPC
Provide basic RPC functionalities for various Chain, in elixir way.
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `ocap_rpc` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:ocap_rpc, "~> 0.0.0"}
]
end
```
## Configuration
```elixir
config :ocap_rpc, :eth,
conn: %{
hostname: "localhost",
port: 8545
},
timeout: 5_000
config :ocap_rpc, :btc,
conn: %{
hostname: "localhost",
port: 8332
},
timeout: 5_000
config :ocap_rpc, :ipfs,
conn: %{
hostname: "localhost",
port: 5001
},
timeout: 5_000
config :ocap_rpc, :cmt,
conn: %{
hostname: "localhost",
port: 8545
},
timeout: 5_000
```
## Environment Variable Dependencies
To let ocap_rpc work correctly, please make sure you have following environment variables set in runtime environment.
- BTC_RPC_HOST
- BTC_RPC_USER
- BTC_RPC_PASS
- ETH_RPC_HOST
- CMT_RPC_HOST
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/ex_bitcoin](https://hexdocs.pm/ex_bitcoin).