TODO: Add description
If available in Hex, the package can be installed
by adding arlix
to your list of dependencies in mix.exs
:
def deps do
[
{:arlix, "~> 0.1.0"}
]
end
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/arlix.
This is just a proof of concept on how to connect to a running arweave node and use standar erlang rpc to create a transaction from elixir.
Steps (on iex):
- load the key file wallet = :rpc.call(:"name@host", :ar_wallet, :load_keyfile, ["/file/path/arveawe/host/file/wallet.json"])
- read the file {:ok, file} = :rpc.call(:"name@host", :file, :read_file, ["/file/path/arveawe/host/file"])
- queue = :rpc.call(:"name@host", :app_queue, :start, [wallet])
- create transaction record record = tx(tags: [{"Content-Type", "text/plain"}], data: file)
- :rpc.call(:"namo@host", :app_queue, :add, [queue, record])
For this to work the nodes need to be connected. A name can be given to a running node with: net_kernel:start([ar01, shortnames]).
For this example we created a cookie file so both nodes are connected automatically on the same host.
The module containing the record definition needs to be loaded in elixir iex
To connect a node in iex: Node.connect :'name@host'
ToDo: use the transaction creation directly without the queue