NEM Library - Community Proposal

NEM Library Community Proposal

Learn it once, Code everything

Introduction

NEM Library is an abstraction for NEM Blockchain using a Reactive approach for creating Blockchain applications.
This project is being proposed to be funded with 1 million XEM from the Community Fund.

Active members: @guillem – Developer @aleix_mp – Developer, who have been active in the NEM Community. @jabo38 as Advisor

Community Voting has finished

The Community voted yes with a 4.86753% POI

The Poll account:
NCYTMBMTZDUKGCFEH7OCRAGMUL3MCXT6MLVF7V6P

Getting started with voting

Start the newest NanoWallet version >= 1.4.10 and login to your account. (only mainnet)

Click on Services and start the Voting module (“see polls”).

Watch out for the vote:

“Community Funding Proposal Vote for NEM Library - September 2017”

Goal

The NEM Blockchain provides an easy integration via its API, enabling any developer to choose his/her favorite programming language to use NEM.

This approach allows every developer to use the NEM Blockchain in his/her own manner, making it difficult for NEM Developers/Projects to share a code base due to the lack of standardized tools.

We have noticed the need of creating a stable tool that provides a common/standard way to interact with NEM using the common programming paradigms. We wanted to address it and we started developing the NEM Library.

NEM Library aims to address the NEM development issues to have stronger and more cohesive NEM Developers, accelerating the NEM adoption by the industry, increasing the development speed and lowering the learning curve.

NEM Library first version is developed using TypeScript language, providing support for TypeScript, ECMA2015 & ECMA2016. It will support automatically ECMA2017 when TypeScript will add the support.

NEM Library main characteristics are:

  • Usage of standard paradigms as Object Oriented Programming to model the different concepts of NEM, encapsulating the data and the behaviour.
  • Usage of the n-tier architecture
  • Multi platform support: Support for Browser, Backend and Mobile Applications from scratch.
  • High availability library: Ensuring a high uptime of the applications with a Connection Pool. If some node is offline, it will retry the request with other node automatically.
  • Testable components
  • Detailed documentation
    More characteristics can be found here

technologies-supported

NEM Library core values are:

  • Standardized Contracts: Guaranteeing interoperability and harmonization of data models.
  • Loose Coupling: Reducing the degree of component coupling fosters.
  • Abstraction: Increasing long-term consistency of interoperability and allowing underlying components to evolve independently.
  • Reusability: Enabling high-level interoperability between services and potential component consumers.
  • Stateless: Increasing availability and scalability of components allowing them to interoperate more frequent and reliable.
  • Composability: For components to be effectively composable they must be interoperable.

For these reasons, it empowers the actual developers and newcomers to cooperate in the actual or new NEM projects, being productive from the minute zero thanks to this shared knowledge base and the usage of a common language.

Open Source MIT License

Once the version 1.0 is released, it will be published under Open Source MIT License.

Future

When the version 1.0 is published, our work will be support and help NEM to grow as much as we can.

  • NEM Library development of new features
  • NEM Library documentation maintenance
  • NEM Library formation
  • Cooperation with NEM
  • Port the NEM Library to other languages

Milestones

Milestone 1 - 35 % (350.000 XEM) Accomplished

  • Project definition and structure
  • Immutable data interfaces
  • Client side signatures
  • Repositories AccountHttp and TransactionHttp, BlockHttp, ChainHttp, NodeHttp, NamespaceHttp and MosaicHttp.
  • Endpoints return immutable models instead of immutable interfaces
  • Transaction, account, namespace, mosaic and blockchain models
  • Transaction fees
  • WebSocket support
  • Listeners
  • Wallets (simple wallet and brain wallet)
  • Encrypted Messages
  • Pagination in transaction and harvest info requests
  • Enable Https protocol
  • Documentation nemlibrary.com

Milestone 2 - 25% (250.000 XEM) Accomplished

  • Paginated models structure is Reactive Modeled
  • Secure brain wallet password must be at least 12 seed word password to avoid collisions and increase security
  • Transaction request by hash
  • Persistent Wallets
  • Model MosaicTransferable to calculate mosaic transfer transaction fees
  • XEM, EcobitEco, DimCoin, DimToken mosaics
  • Connection pool
  • Enable select manually the NIS nodes
  • AccountOwnedMosaicService to get all MosaicTransferables of an account.
  • MosaicService to fetch the Mosaic information and calculate the levy of a Transfer Transaction with Mosaics
  • QRService generating and decrypting account private key, address, and transaction QR codes
  • Angular 4 seed project
  • Ionic 2 seed project
  • TypeScript Sample code repository
  • Documentation

Milestone 3 - 40% (400.000 XEM) Q4 2017

  • Mijin integration
  • Enable multiple environments
  • Translate documentation to Japanese
  • Error handling strategies
  • Concurrent data fetching
  • Standardize the method to share the private key between devices using cryptography
  • Enable multiple strategies to send Encrypted Messages via a Multisig Transfer Transaction
  • Create strategies to handle the confirmation of the transactions included in a block
  • Release under Open Source License (MIT)
  • Documentation

Future work

  • Development of new features
  • Documentation maintenance
  • Formation
  • Cooperation with NEM Foundation
  • Port the NEM Library to other languages

NEM Library Angular 2 and Ionic 2 seeds

We have created two seeds as part of the NEM Library project with the following goals:

  • Help new developers start coding with NEM Blockchain using the seeds and understanding how NEM works, as well as which are the main NEM functionalities and benefits.
  • Allow developers bootstrap them NEM projects into an Angular and/or Ionic project.
  • Together with the community, extend these projects and add functionalities, making it become a huge NEM Blockchain knowledge base to help the two first goals.

Test the angular 2 seed at https://guillemsole.github.io/nem-library-angular2-seed/
Source code angular 2 seed: https://github.com/guillemsole/nem-library-angular2-seed
Source code ionic 2 seed: https://github.com/guillemsole/nem-library-ionic2-seed

image

Angular 2 seed view

Ionic 2 seed view

Integrated projects

NEM Authenticator

NEM Authenticator is a 100% decentralized 2 Factor Confirmation system to secure your account assets from being stolen using the NEM Blockchain native features. The system consists in two applications:

  • Web Page: Generates and manages the NEM Authenticator accounts to secure the assets via a clean and easy to use interface.
  • Mobile Application: Lists all pending transactions to be confirmed by the account owner, displaying all the critical information of each transaction before the transaction is signed.

NEM Authenticator system is aimed to prevent the user to loose its assets when a device is compromised and it gives an easy way to remove the compromised account when the private key is stolen by a evil user. So, the evil user cannot move your assets without the confirmation of the second device, making it a robust system to manage your assets and an easy method to operate with them without compromise the security.

The system works for NEM MainNet and TestNet.

Source code: https://github.com/aleixmorgadas/NEM-Authenticator
Post How NEM Authenticator is made

NEM Pay

NEMPay is a mobile app developed by Atraura Blockchain that allows sending and receiving NEM mosaics easily and securely. Just selecting the asset to be sent from the balance, typing recipient’s address and the amount to be sent, a quick transaction could be sent just in some seconds. Distributed as an open source solution, organizations and individuals can take advantage of NEMPay, using it as a boilerplate for creating their own NEM applications. An example of use case is the creation of an app to transfer assets such as tickets, coupons, stocks or even share representation, cutting cost of acquisition, as there is no need to code a new app.

Source code: https://github.com/dgarcia360/NEMPay

Social Media

Inside NEM https://youtu.be/viRR05IBsUc?t=9m52s
NEM of Tony https://youtu.be/vZ2-22PGse4?t=2m51s
KingofDew https://youtu.be/-1CrtlVU8LM?t=4m36s
CryptoGordo https://youtu.be/XONDxy-Pnoo?t=18m41s
NEM Library launch medium https://medium.com/@aleixmorgadas/releasing-nem-library-edcda90f45fd
NEM Library angular 2 seed medium https://medium.com/@gsolecubilo/nem-library-meets-angular-2-33a154047ab9
NEM Library ionic 2 seed medium https://medium.com/@gsolecubilo/nem-library-meets-ionic-2-a157d4862584

Statistics

NEM Library can be downloaded using the node package management (https://www.npmjs.com/package/nem-library), project statistics in terms of downloads are:

  • 2.678 downloads in the last week
  • 9.255 downloads in the last month
  • 20.099 downloads in the last year

https://npm-stat.com/charts.html?package=nem-library

Relevant information

Project Details and Summary: Discussed above, but more details will be given on the forum or to the core team for review upon vote.
Real Identity: Aleix and Guillem will be revealing their identity during the project applications process to the Core Team reviewing the proposal.

Change log

31/08/2017

  • Added the poll address
  • Added the voting information

3/09/2017

  • Specified the first language that we support (TypeScript)
  • Specified in the future work that we will support more languages
11 Likes

This is really awesome, you guys rock!!! As a developer myself, I think you really nailed what our community needs: a clear and fully disclosed roadmap, user-friendly tools/libraries and documentation, cutting edge dev using latest technology with a focus on integration and future evolution.
Huge thank you guys!!! That’s what nem and this community is all about.

1 Like

I really appreciate you guys working on this and I think so far this has been a great addition to the ecosystem.

The only problem I have is that 1 million XEM is imho too much to pay for this.
I mean just forget what we’re talking about and here look at the mere setup of the project.
2 devs, work for, let’s be gracious, say 2 years.
That’s 500k per dev for 2 years i.e. 250k vor 1 dev per year.
That is a yearly salary of (as of right now per cmc) 67,805.00 USD.
Now fine, for a decent developer working full time that’s not too much but is that’s what happening ? Are you guys working fulltime on nem for 2 years (of course including the time you already spent and we all saw good results for) ?

If so, I’m all for it. This is imho definitely a worthy innitiative.

2 Likes

Hi patmast3r, we appreciate your comment and your involvement in NEM community.

NEM Library is more than just a roadmap, it starts for contribute indefinitely on the community. It has to evolve and become better side by side with NEM Blockchain core development.

Because of NEM Library is the layer between the business logic and NEM, its development comes with a huge responsibility that we are ready to assume.

As we posted, our tasks are not just the development of NEM Library by itself, it includes:

  • Keep the documentation updated
  • Keep the integration updated
  • Bug/Security Fixes (obvious?)
  • Include more features based on the NEM developers needs
  • Support other NEM Projects
  • Help people adopt NEM

to name some.

We are aware that Catapult will be huge game change for the whole Blockchain ecosystem, but it does not stop us to create new NEM based solutions with the current implementation (that it’s still awesome :-)). We plan to migrate the NEM Library to Catapult as soon as it is released. This is because of our passion and dedication into this platform and community.

Thanks patmast3r

I’ve started to use Nem-Library in the dev guide, and I must say I am impressed.
It covers most NEM features, makes those features easy to use and approachable by any developer.
The documentation is top notch, and the developers are responsive. It has seen a lot of updates recently.
Yes, I am enthousiastic about it :wink:

As for the amount request, it seems reasonable. If you compute the salary it translates to as @patmaster, it gives a reasonable amount for a qualified developer. And don’t forget you need to substract taxes…

Given the huge added value for the NEM project, I hope this proposal gets through!

3 Likes

Vote has started

The voting for this proposal has already started. You can vote this proposal with the NanoWallet using the Voting Center.

The Poll account:
NCYTMBMTZDUKGCFEH7OCRAGMUL3MCXT6MLVF7V6P

Getting started with voting

Start the newest NanoWallet version >1.4.10 and login to your account. (only mainnet)
Click on Services and start the Voting module (“see polls”).

IMPORTANT, use NanoWallet 1.4.10 or above!

Watch out for the vote:

“Community Funding Proposal Vote for NEM Library - September 2017”


Thanks for your participation, your voice counts!

3 Likes

Quality of documentation, work to date and release cadence is very impressive. I think this is a hugely beneficial initiative to the NEM ecosystem.

I also think that the commitment and drive shown by Alex and Guillem to date, the quality of the work and the working reference apps are demonstrating what an asset they are to the NEM community. It would suggest they will be able to not only develop a functional library but also converse with other developers new to blockchain and NEM. instilling best practices, accelerating the development of applications on the NEM blockchain and providing an abstraction layer between the core should also mean acceleration of development at the core layer.

It’s going to be a yes from me

KC

1 Like

Voting method other than NanoWallet

If you are using the mobile wallet you can also just send zero xem and an yes or no message to following accounts:

Yes - NDBUXIM4OEIZGLFHSWS7XORGHDXIFV6UXVCSOIJL with “yes” as a message

No - NDSOJMVNJKISW6K7IRWQ6J52IG3DXC33AGKPA6MV with “no” as a message

Either one can vote.
Voting for both will be invalid.

I like your project. I see it’s an open source project. Do you plan to somehow “commercialize” this or is your only anticipated source of income the NEM Community Funding?
Am going to vote in your favour now :slight_smile:

1 Like

hi r3n3,

first of all, thanks for support the project :slight_smile:

No, we don’t plan to commercialize NEM Library.

We want to help other developers start building new solutions with NEM Blockchain, and the best approach for us is released it under open source license to lower the barriers.

This is exactly the type of thing the community fund should be supporting over commercial prospects. If a commercial idea is good enough it can get backing elsewhere.

2 Likes

For the fast and efficient adoption of NEM, I feel this is crucial for the community abroad. Definitely supporting this.

1 Like

I’m in, count on me.

1 Like

I’ve tentatively voted yes, but I share @patmast3r’s concerns that this is a lot of money, and I haven’t seen any mention of whether this will be a full-time endeavour for you both, as it’s definitely full-time money. But I also appreciate you’ve both been very active and have contributed a lot to the NEM ecosystem so far, with projects backed by comprehensive documentation, which stands for a lot.

I’m not really sure I understand the meaning of Reactive in your post. Does this mean you create a library which follows the reactive programming paradigm? Could you please elaborate this a bit more?

Hi @csl,

Thanks to support this project :smile:

We are aware that’s a lot of money if we compare it with the non-blockchain projects that we are familiar (I suppose you’re a developer). If we have considered the risk that we taken when we “jumped” into NEM Development living from our savings, and the duty that we have to keep this tool update in the future, that’s the reason of the amount we asked for.

We are already in full-time dedication since we started the nem library project (and the other projects), so, yes, we’re full-time on this :slight_smile:

4 Likes

Sure, technical questions are the funnier to answer :smile:

When I said:

I meant that NEM Library follows the the Reactive Programming Paradigm, yes. Everywhere? No.

We have considered the next points:

  • Immutable data structures: The information resides in the Blockchain, once it is confirmed, we cannot change the past. So, NEM Library cannot allow change the information received from the NIS.
  • Observable Pattern: The usage of the Observable provided by RxJS gives the developer enough features to apply composition, transform immutable data, and a long etc.
  • React to changes in the Blockchain: When some transaction is included in the Blockchain, the software may need to update the state according to the new transaction, and propagate the state.
  • Asynchronicity: Because of we interact with an HTTP API, all the calls have to me made asynchronous. The async error handling could become easily a nightmare for the programmer. RxJS solves it.
  • Functional: The programmer can use clean input/output functions over observable streams.
  • Concurrency: allow the programmer to abstract away low-level threading, synchronization, and concurrency issues
  • Create the software with less lines of code: Solve hard problems with less lines of code, improving the code maintainability (that’s not always true, I agree). Check this sample code that works as payout system for an ICO, it is not stable and it will change a lot in the future, but to get an idea.
  • Testing: Testing, and more testing. We have to create NEM Software that are easy to test and NEM Library has to provide the tools to ensure the correct behavior of the application that programmers are developing.

Meanwhile the interaction with NEM Blockchain is done via Observable, and it allows the programmer create a reactive application, not everything is done in that way.

For example, the Transactions, Accounts, Mosaics, Wallets, … they all are modeled following the Object Oriented Programming.

Why? It’s more easier for model with a solution via objects. In the same ICO example, we have modeled the token that we used in just extending TransferableMosaic (code here)

I just wanted to mention some points, and I hope that you could have a better idea of what we want to create.

In case that you are familiar with akka.io and the Reactive Manifesto, we are far from that. It could require even more time to be developed, and we think that we have to prioritize release an stable version and then keep the library evolving rather than have a 100% reactive library from scratch.

4 Likes

I’ve talked to the guys and they don’t have 250 posts on the forum but I have talked to them a lot on Telegram and they have even attended events and talked about NEM publicly so they are know members. So I’ll vouche for them meeting the community awareness requirement if the proposal.

1 Like

Excellent. Then it’ll be great to have you both on board maintaining standardised libraries for the dev community. :+1:

1 Like

strange, why am I getting opposite results for the voting, or am I missing something?