In case we want to adapt accounts-password package to support Doichain we would run into several issues. So the solution will be:
Create a Doichain npm package for the core-doichain-api (without the REST-stuffs)
let the meteor-api use accounts-password and the old REST but move all core Doichain functions into the new npm package.
So we can put this doichain npm package into any JS project, allowing them to communicate with a Doichain blockchain node without having the necessity to use all the REST stuffs.
Remark:
Bob will call Alice in order to get the Email template via REST and also inform Alice when a DOI was confirmed - so those REST functions still need to be there.
That sounds like we need to replace nimble:restivus@0.8.12 with a NPM Rest package too!
bitcore-doichain library (https://github.com/Doichain/bitcore-doichain) is already what we kind of want here, but the bitcore library we used has too many old vulnerabilities, so we need to write our own using bitcoin-js lib. Also coding style is more then not optimal, so doichain npm needs to be rewritten from scratch!
old school RPC needs to be replaced with with https://libp2p.io/ (needs to be evaluated and investigated first)
https://github.com/Doichain/meteor-api is a meteor package that references account-password inside the nimble:restivus@0.8.12 package.
In case we want to adapt accounts-password package to support Doichain we would run into several issues. So the solution will be:
Create a Doichain npm package for the core-doichain-api (without the REST-stuffs) let the meteor-api use accounts-password and the old REST but move all core Doichain functions into the new npm package.
So we can put this doichain npm package into any JS project, allowing them to communicate with a Doichain blockchain node without having the necessity to use all the REST stuffs.
Remark: Bob will call Alice in order to get the Email template via REST and also inform Alice when a DOI was confirmed - so those REST functions still need to be there.
That sounds like we need to replace nimble:restivus@0.8.12 with a NPM Rest package too!
Please see https://bounties.doichain.org/ how to apply for Doichain bounties.