Skip to content

Latest commit

 

History

History
103 lines (72 loc) · 4.78 KB

Configure_Wallet.md

File metadata and controls

103 lines (72 loc) · 4.78 KB
logo

MindLake Tutorial: Configure Wallet

A step-by-step cookbook for Wallet Configuration to access Mind Lake !

📔 Table of Contents

🌟 0. Step by step tutorial

This is part of support chapter for MindLake step-by-step tutorial for Python

🌟 4. Prepare env.py

env.py contains the settings of parameters used in examples and use cases, you can copy env_template.py to the name env.py and modify it as per your requirement. If you want to run the examples of QuickStart, Use Case 1 and Use Case 2, you only need to fill out walletAddressAlice, walletPrivateKeyAlice and appKey. If you want to run Use Case 3, you need to fill out the walltes info for all of Alice, Bob and Charlie. env_template env

🎨 4.1. Prepare Wallet

🎯 4.1.1 Install Wallet

  1. Install MetaMask plugins in Chrome Browser
  2. Sign up a MetaMask Wallet
  3. Change the network to Goerli TestNet. If the TestNets aren't displayed, turn on "Show test networks" in Settings. MetaMask TestNet
  4. Goerli Faucet for later gas fee if does not have: Alchemy Goerli Faucet, Quicknode Goerli Faucet, Moralis Goerli Faucet Note that you need to get test coin from faucets for ALL of the wallets specified in env.py

image

🎯 4.1.2 Wallet Sign In: https://scan.mindnetwork.xyz

  1. Open a browser and visit mind-scan
  2. Click "Sign in" buttom

image

2.1 During the 'Connect' procedure, the wallet will prompt the user 2-3 times as follows: Sign a nonce for login authentication.

image

2.2 If the user's account keys are already on the chain: Decrypt the user's account keys using the wallet's private key.

image

2.3 If the user's account keys do not exist yet: Obtain the public key of the wallet, which is used to encrypt the randomly generated account keys.

image

2.4 Sign the transaction to upload the encrypted key ciphers to the smart contract on the chain.

image

🎯 4.1.3 Copy the wallet address from MetaMask to env.py

Click the copy icon beside the wallet address in UI of MetaMask, and paste into env.py

🎯 4.1.4 Export private key from MetaMask to env.py

These are the steps outlined in the MetaMask support documentation.

  1. Click on the identicon in the top right.
  2. Select the account you'd like to export.
  3. On the account page, click on the menu (three dots) in the upper right corner, and then on the "Account Details" button.
  4. Click “Export Private Key”.
  5. To access your private key, you'll now need to enter your wallet password. Once you've done so, click “Confirm” to proceed.
  6. Your private key will now be revealed. Click to copy it, and paste into env.py.
  7. Click “Done” to close the screen.

Export Private Key

🎨 4.2. Prepare appKey

🎯 4.2.1 create Dapp
  1. Click myDapp in left side manu

image

  1. Click "Create Dapp"

image

  1. Input your Dapp name and then click "Create"

image

  1. copy appKey value into env.py to update "appKey"

image