Skip to content

tierralibre/arlix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arlix

TODO: Add description

Installation

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):

  1. load the key file wallet = :rpc.call(:"name@host", :ar_wallet, :load_keyfile, ["/file/path/arveawe/host/file/wallet.json"])
  2. read the file {:ok, file} = :rpc.call(:"name@host", :file, :read_file, ["/file/path/arveawe/host/file"])
  3. queue = :rpc.call(:"name@host", :app_queue, :start, [wallet])
  4. create transaction record record = tx(tags: [{"Content-Type", "text/plain"}], data: file)
  5. :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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages