How to build & run steem cli_wallet

in steemit •  10 months ago

I am not a developer but I like playing around with something new by coding when I have free time. I have read the topic of @liberosist but it's rather old to do with cli_wallet. Moreover, I can not download the cli_wallet from his link because it was expired. Therefore, I decide to do by myself with a little knowledge of Linux. After trying, I have built successfully the cli_wallet on Windows 10 and a cheap Linux VPS.

What is steem cli_wallet?

According to pfunk,

cli_wallet is the command-line program that connects to a Steem node synced with the blockchain to create/broadcast transactions and get info about the chain. It is useful for people who wish to interact with the Steem blockchain manually and directly to a node, rather than through steemit.com. Why? There are some Steem transactions and transaction variables that can't be done with Steemit's UI. Some might want to keep their more powerful active or owner account keys out of their web browser completely. It is also a way to get raw info about the blockchain directly from a node.

Okay, here we go

Compile cli_wallet using Windows 10

I. Requirements

  • Windows 10 with appropriated linux bash. You can read HERE
  • RAM: 4GB+. Recommended 8GB+
  • Basic Linux command line knowledge

II. Step by step

Note: after "#" (octothorpe) is a comment

1 - Run bash with admin right and update as usual

sudo apt-get update -y
sudo apt-get upgrade -y

2 - Install necessary package

# Required packages
sudo apt-get install -y \
    autoconf \
    automake \
    cmake \
    g++ \
    git \
    libssl-dev \
    libtool \
    make \
    pkg-config \
    python3 \
    python3-jinja2

# Boost packages (also required)
sudo apt-get install -y \
    libboost-chrono-dev \
    libboost-context-dev \
    libboost-coroutine-dev \
    libboost-date-time-dev \
    libboost-filesystem-dev \
    libboost-iostreams-dev \
    libboost-locale-dev \
    libboost-program-options-dev \
    libboost-serialization-dev \
    libboost-signals-dev \
    libboost-system-dev \
    libboost-test-dev \
    libboost-thread-dev

# Optional packages (not required, but will make a nicer experience)
sudo apt-get install -y \
    doxygen \
    libncurses5-dev \
    libreadline-dev \
    perl

3 - Compiling cli_wallet

# Move to local disk E on Windows 10
cd /mnt/e
# Clone latest steem folder from github and compile
git clone https://github.com/steemit/steem
cd steem
git submodule update --init --recursive
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j$(nproc) cli_wallet
# Go to e:\steem\build\programs\cli_wallet\ directory
# to copy "cli_wallet" file to a desired location on your computer

III. Running:

# Move to the directory where you stored you cli_wallet
cd /mnt/d/steemit/ 
# Run cli_wallet by connecting to a Steem Full API Node
./cli_wallet -s wss://steemd.steemit.com
# Add a password to your wallet
set_password yourpassword 
# Unlock wallet before using. 
# Once you see unlocked >>> you now can go ahead
unlock yourpassword 
# Import your your private active key. 
# You can find it from your Steemit.com wallet.
import_key 5xxxxxxxxxxxxxxxxxxxxxx
# Verify if you add your account correctly
list_my_accounts
# To list all commands available in cli_wallet
help
# Detail of a command
gethelp command_name

IV. Errors

If you see errors like the photo below. Just change the new public node after the command ./cli_wallet -s new_public_node. You can get one here

Error-when-connecting-to--a-steem-node.png

Compiled cli_wallet using VPS Ubuntu 16.04.3 x64

I. Requirements

DigitalOcean-VPS-Linux.jpg

II. Step by step

You can do the same above steps on linux VPS.

In my case, I used the cheap VPS with only 2GB RAM so it was stopped during running the command make -j$(nproc) cli_wallet . To avoid this, you can do the following commands before running make -j$(nproc) cli_wallet

free
dd if=/dev/zero of=/var/swap.img bs=4096k count=1000
mkswap /var/swap.img
swapon /var/swap.img
free

Now you have cli_wallet

III. Running

Run the similar commands on Windows bash. But note that don't use ./ before telling "cli_wallet" to connect to a node. See below

Running-cli_wallet-on-Linux.jpg

Or you can download my latest compiled cli_wallet.zip here. Unzip and run on your machine!

Reference:


( ͡° ͜ʖ ͡°) => .....magicstone1412.....

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

I don't understand. Please give me detail direction. lol

·

when i was a witness they use these cli-wallet cmd.

·
·

Yes, that's right. You can do many things with cli_wallet :)

Thank you, I appretiate your help :)

·

You're welcome. I am looking forward to hearing your result about removing posting key on minnowbooster

I wish I could understand this 😂. You clearly have talent @magicstone1412

·

Thank you for your kind words and encouragement

·
·

You're welcome :)

Mầy ghi kinh Cô Ran à thằng nhỏ?

T thực sự không nhớ là đã nc vs c bh chưa. nhưng có nghe nhắc đến c một vài lần. t vừa đảo qua một vòng thì thấy c có mặt ở khắp mọi nơi. haha. Cảm giác t tìm thấy đúng người rồi. Hiện h Vietnamese steemian đang rất dàn trải. T muốn quy về một mối. Group của t hiện giờ có gần 100 member và đều đang hoạt động khá hiệu quả. Tuy nhiên hầu hết đều là newbie nên rất thiếu kiến thức về crypto. T muốn mời cậu join group của t và tham gia vào Team trainer để giúp đỡ newbie.
Meet up t tổ chức hồi tháng 1 tại hanoi đã rất thành công. Sắp tới t đang dự định tổ chức meet up cho Vietnamese steemian tại saigon. Và cực kỳ cần sự hỗ trợ của những người có kiến thức về crypto như c. Bằng tất cả thiện chí của một admin, rất mong nhận được hồi âm của c. hehe.

·

Cảm ơn lời mời của bạn. Nhưng mình khá bận có lẽ không sắp xếp được thời gian để meet-up. Về kiến thức tiền điện tử thì mình thỉnh thoảng có chia sẻ ở nhóm OpenLedgerVN. Nếu có hứng thú mời bạn ghé nhóm và thảo luận.

·
·

Ok c. t sẽ ghé. Mong là được hợp tác với cậu trong tương lại gần. :)

khó hiểu phết