Arweave ADT Project — Crypto Assets Archive

in #cryptocurrency6 years ago (edited)

About Arweave

Arweave is a new data storage blockchain protocol based on a novel proof of access consensus mechanism.
29132982_322902911447254_1263012043683779791_n.png

Arweave ADT

To facilitate the Dapp development using the Arweave’s Archain platform, they have released the Arweave App Developer Toolkit(ADT). The platform is built using the Erlang framework. So, Erlang can be intrinsically used for building Dapps. However, the team has also exposed REST APIs which can be implemented in any language to build their Dapps.

Erlang is not an intuitive language at all. There are some programming constructs which are confusing. The use of comma(,), semicolon(;) and dot(.) all in the same language at different positions is really confusing. However the github project contains documentation and sample dapps available in Erlang. Unfortunately there are no examples for the REST APIs. So, I decided to develop my DAPP in Erlang.

First Steps

  • Read the Whitepaper/LightPaper to get an idea of the platform architecture.
  • Clone the github project — There is only repository which contains all the code for the platform, ADT and sample Dapps.
  • Read the platform readme, ADT readme — In case you are interested in the HTTP APIs there is a separate HTTP Interface Documentation
  • Watch the Sample Dapp Youtube Videos to get an idea of how the Dapps work and how they are programmed — there are two example videos
  • Read the basics of Erlang to understand the programming constructs- Frankly I didn’t read about Erlang before building my Dapp. I just took the programming constructs already used in the samples and mapped it to my idea. I googled the rest.

Dapp Idea

The next step is to come up with a nice Dapp idea. There are already several sample Dapps in the src/apps folder of the repository with appropriate documentation. Read them and you may get your next Dapp idea.

I wanted to combine the idea of data archival and cryptocurrency. So, I decided to create a Dapp which archives every information tagged by its owner and the Crypto-ticker(BTC, ETH etc).

I forked the main-repository and added my code just so that it can be run directly by cloning my repository.

Let’s get to the details:

  • It can be used to archive any kind of data for any cryptocurrency — trades, articles, signals etc. I have the most basic string although more complex formats like json can be used.
  • Each transaction is signed by its owner(private key). The ownership of the data lies with the owner. However, for my used case, the data is not encrypted. So, if any other Dapps is listening to transactions, they can read the data. It is upto the owner to encrypt the data if he doesn’t want other dapps to read its data.
  • Each transaction is tagged with the ticker(symbol) of the concerned cryptocurrency.
    The tags are customizable and more tags can be added in the future. For example- buy/sell tags for crypto-trades, articles types(ICO, roadmap update, partnerships etc) for various articles.
  • The state is saved after every transaction. All the transactions for this Dapp are tagged by a unique tag(?CRPTO_TAG) which basically identifies the source Dapp of the transaction. The state contains the list of all transactions keyed to its owner along with the list of tickers tagged in every transaction.
  • The state can be used to retrieve all the transactions for a owner and also for a particular ticker for that owner.

There is also a test function basic_usage_test which creates two transactions for two different tickers.

Future Development:

  • The idea can easily be extended for stocks.
  • Any kind of data can be stored. The tags can be extended to determine the type of document- [trade, article, signal]
  • In the future, archived data will be very crucial in learning the behaviour of people using machine-learning models.

Do upvote the document if you find it useful and informatory.

Follow me for more such articles.

Coin Marketplace

STEEM 0.28
TRX 0.12
JST 0.033
BTC 66795.37
ETH 3087.77
USDT 1.00
SBD 3.72