animo / aries-mobile-agent-react-native

Aries Mobile Agent for React Native, built using Aries Framework JavaScript
Apache License 2.0
15 stars 2 forks source link

QUESTION: Use an existing mediator/agent/blockchain #7

Closed icc-romeu closed 3 years ago

icc-romeu commented 3 years ago

Hello,

Is there a way to test this project against an existing private setup? I have setup the genesis pool, the mediator invitation, etc. I have overridden the methods that set then inside the App but I am getting a "Maximum call stack size exceeded" when I try to pass the invitation. Is there anything I have to setup/change? The mediator is a regular ACA-py but I could not even reach it.

On the other hand, how far is this App implemented? Creates the connections? Issues credentials? Is there a roadmap?

Sorry to ask so many things but there is little at the documentation and I could not make it work. 🙁

karimStekelenburg commented 3 years ago

Hi there! We're currently working on the roadmap, but sadly it's not there yet. However, the app is able to create connections and received credentials (present-proof is coming soon). At this point we've only tested the app with an aries-framework-javascript based mediator as described in the readme, so there is a chance this is causing your problems.

Also: regardless of what kind of mediator you use, you'll have to make sure it's reachable by the app. If the mediator is not publicly reachable (e.g. hosted on your development machine), the app won't be able to reach the mediator. This is why we use ngrok (as described in the readme) which creates a tunnel to the mediator.

Hope this helps! If not let us know :)

icc-romeu commented 3 years ago

Hi @karimStekelenburg thanks for the fast response.

Currently I have my own simple implementation of mediator connection and credential issuance but if there is a chance of using some standard community-driven work like Aries-javascript-framework I would prefer to.

Yes I can connect and issue credentials with my code on the ACA-py so... maybe that's the problem then. I will try to work with the Aries-JS framework itself and will come back to you if I succeed on this.

BTW, I cannot enable logs on Aries-js using the environment variable suggested at the docs to have a look at the error. Maybe because it is included a node-modules dependency? 🤷🏻‍♂️

TimoGlastra commented 3 years ago

Regarding the "maximum call stack size exceeded" could be because of a dependency from the framework. This is resolved I believe in the newest version of the framework. I'll see to update the framework that is packaged with the mobile agent.

To enable logging you should import debug and enable the logging trough the API. React Native doesn't automatically pick up environments variables

debug.enable("aries-framework-javascript")

For using another agent as mediator is not possible yet. We support mediation, however we haven't fully implemented the mediator coordination protocol yet. It's on the todo list!

icc-romeu commented 3 years ago

Thanks for all the information @TimoGlastra