Installing near-cli for Windows

In order to create a NEAR wallet, just go to https://wallet.testnet.near.org/ and click “Create Account” in the window that appears, enter the name of the wallet you want to use

Select a method to secure and recover your account. This will be used to verify important activity, recover your account and access your account from other devices.

This is necessary for successful login through near-cli, the main thing is to stay in the same browser window where the wallet is open

WSL supports a variety of Linux distributions, including the latest Ubuntu release, Ubuntu 20.04 LTS and Ubuntu 18.04 LTS. You can find them by opening the Microsoft store app and searching for Ubuntu. Choose the distribution you prefer and then click on Get as shown in the following screenshot:

Open installed Ubuntu at least version 18. On the command line, write the following commands one by one

sudo apt update && sudo apt upgrade -y

sudo apt install python3 python3-pip python3-dev git curl make llvm clang jq build-essential -y
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash

source ~/.profile && source ~/.bashrc

nvm install v12.0.0
node -v && npm -v
Node.js v12.0.0 & npm 6.9.0
npm i -g near-cli — unsafe-perm
export NODE_ENV=testnet
echo -n “export NODE_ENV=testnet” >> ~/.profile

source ~/.profile

Now by default the connection will go to the testnet network

the wallet must be logged in to the browser

near login

Near will ask you to authorize it in our account, a page will open in the browser (if not, then copy the link and follow it)

click next

click Connect

and enter the name of our wallet and click Confirm

Done
near send account_test.testnet account_test.testnet 10

where
1st wallet — from which we send
2nd wallet — to whom we send
10 — number of coins

cd && nano .profile

move to the end of the file with the down arrow, at the end of the files add the line

export NODE_ENV=mainnet

and before the line export NODE_ENV=testnet we add #, thereby making this line inactive — ex. #export NODE_ENV=testnet

We do this so that in the future it will be possible to switch between testnet and mainnet networks.

For the changes to take effect, press Ctrl + X, then Y and Enter

source ~/.profile

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store