Skip to content

Commit

Permalink
chore(element): update doc example
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminMoe committed Jan 5, 2022
1 parent e1fa253 commit 69e1c5e
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions packages/did-method-element/docs/local-element-ropsten-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This guide will describe how to install and run Element locally on a Linux machine
running Unbuntu 20.04.3 on either an x86_64 machine, or Raspberry Pi 4. This guide
will use the example name of `ubuntu` (with lower-case `u`) to describe the user
and default home directory of `/home/ubuntu`.
and default home directory of `/home/ubuntu`.

This document will be similar to the Ganache-dev install with the two differences
in this case are that:
Expand All @@ -12,7 +12,7 @@ in this case are that:
2. We will be using a service provider for the Etherium Blockchain

**Note** Later versions of this document will include instructions on how to
set up and run and Ethereum node locally.
set up and run and Ethereum node locally.

## Table of Contents

Expand Down Expand Up @@ -93,18 +93,18 @@ a mnomic phrase. The first step will be to goto this [Mnemonic Code Converter](h

![Element Wallet Mnemonic Code Generate](https://user-images.githubusercontent.com/86194145/145269253-6b70dae4-d750-4f63-9049-5874d9ab1363.png)

1. Make sure that `12` words are being generated
1. Make sure that `12` words are being generated
2. Click on the `GENERATE` button
3. You should have twelve words appear in the text area below

Once we have our twelve word phrase, we will use it to import a wallet.
The wallet we will use is called [MetaMask](https://metamask.io/), which is implement with a
browser extension. You can click on the following [download link](https://metamask.io/download.html) to get the appropriate install instructions for your browser.
The wallet we will use is called [MetaMask](https://metamask.io/), which is implement with a
browser extension. You can click on the following [download link](https://metamask.io/download.html) to get the appropriate install instructions for your browser.

![Element Wallet MetaMask Get Started](https://user-images.githubusercontent.com/86194145/145253613-92c3d674-8cec-47b0-aa54-b855671febc8.png)

Once the extension is installed, you will be greeted with the above welcome
screen. Click on the button to `Get Started`.
Once the extension is installed, you will be greeted with the above welcome
screen. Click on the button to `Get Started`.

![Element Wallet Metamask New](https://user-images.githubusercontent.com/86194145/145253923-0f6a77c1-864f-4617-97b5-fc9bbfd779d4.png)

Expand All @@ -115,15 +115,15 @@ new one. Since we have already created our mnemonic phrase, we want to click on
![Element Wallet MetaMask Improve](https://user-images.githubusercontent.com/86194145/145256030-884daa04-bb59-4e8d-8bba-7b044135615a.png)

From there you will be given the option to gather usage data or not. Select
the option that you prefer.
the option that you prefer.

![Element Wallet MetaMask Import](https://user-images.githubusercontent.com/86194145/145256731-82446d1a-c1bb-4041-a978-24052d815950.png)

To import your wallet, paste your twelve word mnemonic phrase that you generated
into the `Secret Recovery Phrase` field. You will be required to create a password.
You will need this password to access your wallet from the browser, so make
it secure, but keep in mind that you will need to remember it. Once you are ready
click on the `Import` button.
click on the `Import` button.

![Element Wallet MetaMask Congratulations](https://user-images.githubusercontent.com/86194145/145257109-f16a172d-0185-4bcd-9045-6e5f6e7810db.png)

Expand All @@ -133,12 +133,12 @@ button, and we will proceed to describe how to fund the wallet.
![Element Wallet MetaMask Show Test Networks](https://user-images.githubusercontent.com/86194145/145261400-9f307720-aa1e-43a6-844e-3c96716adb95.png)

The page should transition to our wallet. We want to click on the select
field in the top right hand corner that says `Ethereum Mainnet`, and then
field in the top right hand corner that says `Ethereum Mainnet`, and then
we want to click on the link that says `Show/hide` test networks.

![Element Wallet MetaMask Show Test Toggle](https://user-images.githubusercontent.com/86194145/145261611-24643f76-38d0-427e-a016-a828906fcf33.png)

This will take us to a settings option that we want to toggle to `ON`.
This will take us to a settings option that we want to toggle to `ON`.

![Element Wallet MetaMask Testnet Select](https://user-images.githubusercontent.com/86194145/145261741-f17bd790-f404-44ab-a753-e9e7d70b3a6c.png)

Expand All @@ -148,14 +148,14 @@ test network. We want to click on that because that is what we will be funding.
![Element Wallet MetaMask Ropsten Address](https://user-images.githubusercontent.com/86194145/145262097-1116e205-869b-453f-86e4-9b3af2f984d6.png)

To get our address, we can click on the header that says `Account 1` at the top
to copy the address to the clickboard.
to copy the address to the clickboard.

![Element Wallet Ropsten Ethereum Faucet](https://user-images.githubusercontent.com/86194145/145262382-c708ab4c-c020-462b-84f9-87ce75ef76b7.png)

From there we want to goto the [Ropsten Etereum Faucet](https://faucet.ropsten.be/) (recomend using incognito tab),
and paste in our address. And then click on the `Send me test Ether` button. You
should get a confirmation that says, "request added to the queue". Depending on availabity,
you might need to select a different faucet.
you might need to select a different faucet.

![Element Wallet with Funds](https://user-images.githubusercontent.com/86194145/145266785-7ce85c2b-5d71-429b-90f8-eac334297251.png)

Expand All @@ -164,7 +164,7 @@ of configuring our node to reference our wallet via the mnemonic string.
With respect to the amount of funds needed to operate a node, Element should
only use the mimimum transaction to send anchor requests to the smart contract.
So topping up your wallet is only something that should be done rarely if ever
with respect to testnet.
with respect to testnet.

**WARNING**: You should never share or publish your mnemonic phrase. If you have too
many funds in a wallet, then create a new wallet and transfer a minimum amount of
Expand All @@ -173,18 +173,18 @@ Element node.

## Start Element Testnet:ropsten Node

As stated in the abstract of this document, this section will include
instructions for how to setup a Ethereum testnet node locally.
As stated in the abstract of this document, this section will include
instructions for how to setup a Ethereum testnet node locally.

In the current form of this document, we will connect to an Ethereum
testnet blockchain Ropsten via a cloud service. We specifically recomend
[Infura](https://infura.io).
[Infura](https://infura.io).

To breifly describe the steps of getting setup with Infura.
First you can create a free account.
First you can create a free account.
Then you can create a project. Once you have created a project, you should
get an API key for the Ehtereum Testnet Ropstein. You should have a URL
that looks similar to the following structure.
that looks similar to the following structure.

```
https://ropsten.infura.io/v3/[YOUR_PROJECT_API_KEY]
Expand All @@ -193,9 +193,9 @@ https://ropsten.infura.io/v3/[YOUR_PROJECT_API_KEY]
To use this service, you MUST edit the environment variable in the Sidetree.js
repository before starting the Sidetree-Element service. Specifically we want
to set `MONGO_DB_CONNECTION_STRING` and `ELEMENT_CONTENT_ADDRESSABLE_STORE_SERVICE_URI`
to use the services running on localhost. For `ETHEREUM_RPC_URL` we want to
to use the services running on localhost. For `ETHEREUM_RPC_URL` we want to
provide our API url and key. And on `ETHEREUM_MNEMONIC` we will need to provide
the mnemonic phrase for a minimally funded wallet to use the service.
the mnemonic phrase for a minimally funded wallet to use the service.

```
$ cd /home/ubuntu/sidetree.js/packages/dashboard
Expand Down Expand Up @@ -229,19 +229,19 @@ $ npm run dev:ropsten
## Run Create / Resolve Operation

Once we have Element running on our local machine, we can then run a test
operation to see if we are able to create and then resolve a did.
operation to see if we are able to create and then resolve a did.

![Element Node Welcome Splash](https://user-images.githubusercontent.com/86194145/146037402-ae75eb83-0394-40f2-bd0e-ecfc090aed29.png)

We can start by opening up `localhost:3000` in our browser and then clicking on the `Wallet` link on the "Manage" card.
We can start by opening up `localhost:3000` in our browser and then clicking on the `Wallet` link on the "Manage" card.

![Element Node Create Wallet](https://user-images.githubusercontent.com/86194145/146037619-c62917e7-a387-40c5-8207-2e8123302627.png)

From there we can click on the `Create Wallet` button, this will create a private/public key pair to allow us to sign did's. **Note**: The wallet [will throw an error when not used on localhost or https](https://github.com/transmute-industries/sidetree.js/issues/318).

![Element Node Create Did](https://user-images.githubusercontent.com/86194145/146037904-2fc597a9-7fd2-4ae4-acd9-5f191da04ea6.png)

Once the wallet is created, you will be automatically redirected to the `create` route. Can can then click on the `CREATE DID` button to generate a did.
Once the wallet is created, you will be automatically redirected to the `create` route. Can can then click on the `CREATE DID` button to generate a did.

![Element Node Show Created Did](https://user-images.githubusercontent.com/86194145/146040055-d60694a0-88f4-4f55-b445-748a4a806aa0.png)

Expand All @@ -253,12 +253,12 @@ You should see a card that looks like the above image. You can then click on the

![Element Node Created Did Details](https://user-images.githubusercontent.com/86194145/146040842-393656b6-177a-4871-b96b-72dadca92265.png)

If you want more information on how to use the API interact with dids, you can read the documentation at `localhost:3000/docs`.
If you want more information on how to use the API interact with dids, you can read the documentation at `localhost:3000/docs`.

## Resolve an Existing Did

If you want to make sure that you can resolve an existing did, you can use
If you want to make sure that you can resolve an existing did, you can use
`did:elem:ropsten:EiCtwD11AV9e1oISQRHnMJsBC3OBdYDmx8xeKeASrKaw6A`. You should see the
following information.

![Element Node Resolve Did Confirmation](https://user-images.githubusercontent.com/86194145/146041333-5c57968c-ab2f-48d4-9248-ab4fefe3277f.png)
![Element Node Resolve Did Confirmation](https://user-images.githubusercontent.com/86194145/148271174-0726d0f6-c028-4820-8e58-bf905d317d59.png)

0 comments on commit 69e1c5e

Please sign in to comment.