GitBook: [#15] Mention to add .env file in .gitignore

This commit is contained in:
Akshay Patel 2022-08-03 10:50:04 +00:00 committed by gitbook-bot
parent f23230541b
commit 88774e3834
No known key found for this signature in database
GPG Key ID: 07D2180C7B12D0FF
30 changed files with 19 additions and 11 deletions

View File

@ -2,7 +2,7 @@
### Obtaining API key for Ethereum node provider
Ocean libraries need an Ethereum node provider API key to send transactions to the Ocean Protocol's Smart contracts. See this [guide](../obtaining-api-key.md) on getting an API key to interact with EVM compatible networks. The supported networks are listed [here](../../core-concepts/networks.md).
Ocean libraries need an Ethereum node provider API key to send transactions to the Ocean Protocol's Smart contracts. See this [guide](../obtaining-api-key.md) on getting an API key to interact with EVM compatible networks. The supported networks are listed [here](../../core-concepts/networks.md).
### Create a directory
@ -26,10 +26,10 @@ In the working directory create a `.env` file. The content of this file will sto
| **PROVIDER\_URL** | The URL of the Provider. This value is needed when publishing a new asset or update an existing asset. | No |
{% hint style="info" %}
Treat this file as a secret and do not commit this file to git or share the content publicly.
Treat this file as a secret and do not commit this file to git or share the content publicly. If you are using git, then include this file name in `.gitignore` file.
{% endhint %}
The below tabs show partially filled `.env` file content for some of the supported networks. 
The below tabs show partially filled `.env` file content for some of the supported networks.
{% tabs %}
{% tab title="Mainnet" %}
@ -112,7 +112,7 @@ pip3 install ocean-lib python-dotenv web3
A configuration file will read the content of the `.env` file and initialize the required configuration objects which will be used in the further tutorials. The below scripts creates a Web3 wallet instance and a Ocean's configuration object.
Create the configuration file in the working directory i.e. at the same path where the `.env` is located. 
Create the configuration file in the working directory i.e. at the same path where the `.env` is located.
{% tabs %}
{% tab title="ocean.js" %}

View File

@ -311,6 +311,8 @@ An asset with a service of `type` `compute` has the following additional attribu
| `boolean` | **✓** | If `true`, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be `false` by default in all implementations. |
| Type | Required | Description |
| `boolean` | **✓** | If `true`, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be `false` by default in all implementations. |
| Type | Required | Description |
| `boolean` | **✓** | If `true`, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be `false` by default in all implementations. |
| <p><strong><code>allowNetworkAccess</code></strong></p><table><thead><tr><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>boolean</code></td><td><strong></strong></td><td>If <code>true</code>, the algorithm job will have network access.</td></tr></tbody></table> | | |
| Type | Required | Description |
| `boolean` | **✓** | If `true`, the algorithm job will have network access. |
@ -322,6 +324,8 @@ An asset with a service of `type` `compute` has the following additional attribu
| `boolean` | **✓** | If `true`, the algorithm job will have network access. |
| Type | Required | Description |
| `boolean` | **✓** | If `true`, the algorithm job will have network access. |
| Type | Required | Description |
| `boolean` | **✓** | If `true`, the algorithm job will have network access. |
| <p><strong><code>publisherTrustedAlgorithmPublishers</code></strong></p><table><thead><tr><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td>Array of <code>string</code></td><td><strong></strong></td><td>If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed.</td></tr></tbody></table> | | |
| Type | Required | Description |
| Array of `string` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed. |
@ -333,6 +337,8 @@ An asset with a service of `type` `compute` has the following additional attribu
| Array of `string` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed. |
| Type | Required | Description |
| Array of `string` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed. |
| Type | Required | Description |
| Array of `string` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed. |
| <p><strong><code>publisherTrustedAlgorithms</code></strong></p><table><thead><tr><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td>Array of <code>publisherTrustedAlgorithms</code></td><td><strong></strong></td><td>If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. Otherwise only the algorithms defined in the array are allowed. (see below).</td></tr></tbody></table> | | |
| Type | Required | Description |
| Array of `publisherTrustedAlgorithms` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. Otherwise only the algorithms defined in the array are allowed. (see below). |
@ -344,6 +350,8 @@ An asset with a service of `type` `compute` has the following additional attribu
| Array of `publisherTrustedAlgorithms` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. Otherwise only the algorithms defined in the array are allowed. (see below). |
| Type | Required | Description |
| Array of `publisherTrustedAlgorithms` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. Otherwise only the algorithms defined in the array are allowed. (see below). |
| Type | Required | Description |
| Array of `publisherTrustedAlgorithms` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. Otherwise only the algorithms defined in the array are allowed. (see below). |
The `publisherTrustedAlgorithms` is an array of objects with the following structure:

View File

@ -10,27 +10,27 @@ description: Tutorial about how to set up MetaMask for Chrome.
1. Go to the [Chrome Web Store for extensions](https://chrome.google.com/webstore/category/extensions) and search for MetaMask.
![metamask-chrome-store](../.gitbook/assets/metamask-chrome-extension.png)
![metamask-chrome-store](../building-with-ocean/images/metamask-chrome-extension.png)
* Install MetaMask. The wallet provides a friendly user interface that will help you through each step. MetaMask gives you two options: importing an existing wallet or creating a new one. Choose to `Create a Wallet`:
![Create a wallet](../.gitbook/assets/create-new-metamask-wallet.png)
![Create a wallet](../building-with-ocean/images/create-new-metamask-wallet.png)
* In the next step create a new password for your wallet. Read through and accept the terms and conditions. After that, MetaMask will generate Secret Backup Phrase for you. Write it down and store it in a safe place.
![Secret Backup Phrase](../.gitbook/assets/secret-backup-phrase.png)
![Secret Backup Phrase](../building-with-ocean/images/secret-backup-phrase.png)
* Continue forward. On the next page, MetaMask will ask you to confirm the backup phrase. Select the words in the correct sequence:
![Confirm secret backup phrase](../.gitbook/assets/confirm-backup-phrase.png)
![Confirm secret backup phrase](../building-with-ocean/images/confirm-backup-phrase.png)
* Voila! Your account is now created. You can access MetaMask via the browser extension in the top right corner of your browser.
![MetaMask browser extension](../.gitbook/assets/metamask-browser-extension.png)
![MetaMask browser extension](../building-with-ocean/images/metamask-browser-extension.png)
* You can now manage Ether and Ocean Tokens with your wallet. You can copy your account address to the clipboard from the options. When you want someone to send Ether or Ocean Tokens to you, you will have to give them that address. It's not a secret.
![Manage tokens](../.gitbook/assets/manage-tokens.png)
![Manage tokens](../building-with-ocean/images/manage-tokens.png)
You can also watch our [tutorial video snippets](https://www.youtube.com/playlist?list=PL\_dn0wVs9kWolBCbtHaFxsi408cumOeth) if you want more help setting up MetaMask.
@ -40,7 +40,7 @@ Sometimes it is required to use custom or external networks in MetaMask. We can
Open the Settings menu and find the `Networks` option. When you open it, you'll be able to see all available networks your MetaMask wallet currently use. Click the `Add Network` button.
![Add custom/external network](../.gitbook/assets/metamask-add-network.png)
![Add custom/external network](../building-with-ocean/images/metamask-add-network.png)
There are a few empty inputs we need to fill:

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB