Closed relaxbao closed 5 years ago
The Android setup depends on the javascript environment setup so please follow that.
Essentially, make sure to run yarn install
after you clone
@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 ?
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 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
.
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
@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.
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.
@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 ~!
@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 .
sorry, i can't find the following dependencies , how should I get them ? looking forward for your reply~ thank you very much!