Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Move Indy NodeJS wrapper codebase here#1

Closed
ajile-in wants to merge 3 commits intohyperledger-aries:masterfrom
ajile-in:master
Closed

Move Indy NodeJS wrapper codebase here#1
ajile-in wants to merge 3 commits intohyperledger-aries:masterfrom
ajile-in:master

Conversation

@ajile-in
Copy link
Contributor

To start with I am moving the Indy NodeJS wrapper as it is here, with no code changes at all except few Readme changes.

ryjones and others added 3 commits June 4, 2019 10:02
Signed-off-by: Ajay Jadhav <jadhavajay@gmail.com>
Signed-off-by: Ajay Jadhav <jadhavajay@gmail.com>
Copy link

@smithbk smithbk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jadhavajay, I understand that you are just getting started, but I'd like to understand the goal of this SDK before I review. This is probably better to discuss on a call, but I assume the goal is to implement a higher level agent API.

Since Aries is supposed to allow other implementations other than indy, it would seem reasonable that we at least start by deciding on a directory structure which would allow other implementations to be plugged in.

For example, perhaps something similar to:

-- api (The Aries agent API - to be defined)
    -- spi (The service provider API which is used by the Aries agent APIs - i.e. an abstraction of the indy APIs)
        -- indy (the current indy code goes here)
            -- test (indy test code here)
        -- another implementation of the SPI in the future
-- test (test for the higher-level agent APIs)

Copy link

@matt-raffel-kiva matt-raffel-kiva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all js files: terminate each statement with semicolon. replace var with const and let in functions.

try {
this.indyCurrentErrorJson = capi.getCurrentError()
var details = JSON.parse(this.indyCurrentErrorJson)
if (typeof details.message === 'string') {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var should be replaced with const to avoid potential conflicts in global namespace

@@ -0,0 +1,80 @@
var util = require('util')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

every line should be terminated with semicolon. this is an industry standard and is enforced with linters.

this.indyBacktrace = details.backtrace
}
} catch (e) {
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to do something here. just eating the exception will make it very difficult to debug when a problem happens.

@@ -0,0 +1,27 @@
var IndyError = require('./IndyError')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all lines should be terminated with semicolon.


function wrapIndyCallback (cb, mapResponse) {
var promise
if (!cb) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var should be replaced with let

var tempy = require('tempy')

test('anoncreds', async function (t) {
var pool = await initTestPool()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local variables need to be declared with const or let.

@@ -0,0 +1,27 @@
var test = require('ava')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see my comments for the previous files. same for this one.

@@ -0,0 +1,68 @@
var test = require('ava')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see my comments for the previous files. same for this one.

@@ -0,0 +1,87 @@
var test = require('ava')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see my comments for the previous files. same for this one.

@@ -0,0 +1,62 @@
var test = require('ava')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see my comments for the previous files. same for this one.

@ajile-in
Copy link
Contributor Author

Thanks @matt-raffel-kiva for your comments on this PR.
This PR is just a code move from previous Indy Node.js wrapper repository.

We (@smithbk & me) discussed last week to have a Zoom call together and discuss the roadmap of how to take this further with Aries Framework idea in mind. We also discussed about using TypeScript instead of ES.

I will catch up with you on RocketChat and will schedule a Zoom call.

@esplinr
Copy link

esplinr commented Sep 11, 2019

I was surprised to see this PR closed. I agree with @smithbk that we should define how to be ledger-independent, but I don't think that should prevent taking the existing Indy code as the foundation for an aries-js-wrapper and then iterating. It's hard for interested contributors to know how to collaborate when the repository is completely empty. A simple README.md explaining the current state of the project and current efforts would also help a lot.

@matt-raffel-kiva
Copy link

matt-raffel-kiva commented Sep 11, 2019 via email

@ryjones
Copy link
Contributor

ryjones commented Sep 11, 2019

I apologize. I did a force-push to fix a DCO issue, because I didn't see there was a PR in flight. This is my fault.

@ryjones
Copy link
Contributor

ryjones commented Sep 11, 2019

@esplinr I can't re-open the PR b/c master changed under it.

@esplinr
Copy link

esplinr commented Sep 12, 2019

Thanks for the explanation @ryjones . That makes sense. I misinterpreted what was going on based on the comments, but now I see that @smithbk was only prompting a helpful discussion and a decision hadn't yet been made.

@matt-raffel-kiva: I think @jadhavajay can work with @ryjones to grant those rights.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants