Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

I can't find the Android denpendencies #177

Closed
relaxbao opened this issue Aug 30, 2019 · 9 comments
Closed

I can't find the Android denpendencies #177

relaxbao opened this issue Aug 30, 2019 · 9 comments
Labels
question Further information is requested

Comments

@relaxbao
Copy link

relaxbao commented Aug 30, 2019

sorry, i can't find the following dependencies , how should I get them ? looking forward for your reply~ thank you very much!

implementation project(':react-native-community-netinfo')
implementation project(':@react-native-community_async-storage')
implementation project(':react-native-share')
implementation(project(':react-native-firebase')) {
    transitive = false
}
implementation project(':react-native-navigation')
implementation project(':react-native-device-info')
implementation project(':rn-fetch-blob')
implementation project(':react-native-vector-icons')
implementation project(':react-native-passcode-android')
implementation project(':react-native-randombytes')
implementation project(':react-native-image-picker')
implementation(project(':react-native-camera')) {
    exclude group: "com.google.android.gms"
    exclude group: "com.facebook.infer.annotation"
}
implementation project(':react-native-intent-launcher')

implementation project(':react-native-uport-signer')
@mirceanis
Copy link
Contributor

The Android setup depends on the javascript environment setup so please follow that.

Essentially, make sure to run yarn install after you clone

@mirceanis mirceanis added the question Further information is requested label Aug 30, 2019
@relaxbao
Copy link
Author

relaxbao commented Sep 2, 2019

@mirceanis thank you very much , but there still are some problems , after I did the following steps

>npm install yarn -g
>yarn global add react-native-cli
>yarn

i still can't find the dependencies

implementation project(':react-native-community-netinfo')
implementation project(':@react-native-community_async-storage')
implementation project(':react-native-share')
....

when I ran yarn start ,it's blocking.

➜  uport-mobile git:(develop) yarn start
yarn run v1.17.3
$ node node_modules/react-native/local-cli/cli.js start
┌──────────────────────────────────────────────────────────────────────────────┐
│                                                                              │
│  Running Metro Bundler on port 8081.                                         │
│                                                                              │
│  Keep Metro running while developing on any JS projects. Feel free to        │
│  close this tab and run your own Metro instance if you prefer.               │
│                                                                              │
│  https://github.com/facebook/react-native                                    │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

Looking for JS files in
   /Users/baolinfang/workspace/uport/uport-mobile

Loading dependency graph, done.

should I run yarn start ?
wiil I ultimately get the dependencies in the files ?

@mirceanis
Copy link
Contributor

mirceanis commented Sep 2, 2019

That is expected behavior.
What you started is a local server that can serve the debug react native bundle to the app on an emulator or connected device.

If you intend to run the app, it's easier with
react-native run-android

If you only care about the dependencies, they are in node_modules.
Look in android/settings.gradle for the path to each one.

@relaxbao
Copy link
Author

relaxbao commented Sep 4, 2019

@relaxbao thank you very much ^^ it works~
but i have another question -
-!

did we use ethr-did-registry or ethr-did or ethr-did-resolver in the uport-mobile? if we did , why i can't find it ?i searched it globally, such as the function lookupOwner .

@mirceanis
Copy link
Contributor

ethr-did is not used directly.
ethr-did-registry@0.0.3 and ethr-did-resolver@0.2.0 are used either directly or as dependencies of other libs.

I can't tell why you haven't found any result in your search. Make sure you run the search after running yarn install

@relaxbao
Copy link
Author

relaxbao commented Sep 4, 2019

@mirceanis thank you so so much ~! yes, i have ran yarn install, I can only find it in the yarn.lock , but ethr-did-registry was not imported .

actually ,i can use the app now , but i want to debug it , can I debug it on the browser ? it's an easy way to debug ~

because I want to know how we create the did and register it on the contract , especially where do we create the did document and combine it to a did so that we can get the publicKey.

@mirceanis
Copy link
Contributor

ERC1056 describes ethr-did-registry.
The key point is that fresh identities do not have to be registered onto the registry.
The registry is modified only when a DID operation needs to be executed (change owner, add or revoke a delegate, or some other property)

The DID document is not combined into a DID, it is the other way around.
A DID is resolved into a DID document (in this case using the ethr-did-resolver)

In the ethr DID context, the DID document does not exist as a file, it is constructed by the ethr-did-resolver while resolving a given DID based on events regarding the ethereumAddress of that ethr-did in the registry.
If there are no events for a given ethereumAddress, then a default DID document is returned where the public key entry is the ethereum address itself.

To create an ethr-did from an ethereumAddress, you prepend the string did:ethr: to the ethereum address.

@relaxbao
Copy link
Author

relaxbao commented Sep 5, 2019

@mirceanis wow~ it helps me a lot , I think I understand it better , you're so amazing ~ as we can derive the public key from ethereumAddress and it's signature , so we don't need to combine a DID to a document . we just need to resolve it from the DID。

other attributes were in the events of the contract (deployed by the ethr-did-registry).
am I right ?

I will read the ERC1056 again , thank you so much ~!

@relaxbao
Copy link
Author

@mirceanis hello ,

I have deeply read the ERC1056, but there is something I can't understand , can you help me ?

for example :
I have an ethereum account ,as mentioned in the ERC1056 , I have naturally have an identity right ? I don't need to register on the registry contract .

but if I don't register on the registry contract ,how can I get the public Key ? because an important feature of DID is to get the public Key from the DID , so we can use the public Key to encrypted something .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants