create account

HiveJs Tutorials --Learning how to transfer HIVE/HBD thorugh HiveJs by pakgamer

View this thread on: hive.blogpeakd.comecency.com
· @pakgamer ·
$10.29
HiveJs Tutorials --Learning how to transfer HIVE/HBD thorugh HiveJs
## <center>Hello Everyone</center>
 

As you know we have started learning Hivejs. In the previous posts, we did a few things like voting on someone's post using hive.js. In this post, we are going to learn how to transfer some  HIVE/HBD using the Hivejs Liberty. If you you are new to these tutorials I will suggest reading the previous posts about the Hive in order to understand how things work here. If you know the JavaScript already then I am pretty sure that understand the Hibvejs will not be a big problem for you. If you don't know the Javascript we also have the Javascript tutorials for beginners. So without wasting time let's start.
![image.png](https://images.hive.blog/DQmXYPbeiMN2gguKk9QAUXueLxwQqsw2frKzKMJ6hwAQryC/image.png)



We are going to use this API. This piece of code will help us transfer our funds.
```
hive.broadcast.transfer(wif, from, to, amount, memo, function(err, result) {
  console.log(err, result);
});
```


![image.png](https://images.hive.blog/DQmZWpJP1UCyW3JFXneCgi41234FKdQDPxGxkypcHTm78sL/image.png)

It takes some parameters. Like the first one is the password(Active key as it is a transfer). The second one is from like who is sending the coins. The 3rd one of "to" who is going to receive the coins. The fourth one if ammout+ The symbol( you will learn the pattern in the post) and the last one is memo. The memo is like a message with the coins It is optional which means we can transfer without a memo.


![image.png](https://images.hive.blog/DQmQsuXXoGTHvPQqqX1V95EdmwEkbjSgYJEkqiPTvN6FHRJ/image.png)
 
When you fill it. It should look something like this. Just  For sake of example, I am sending a small amount to probithive. Ok let's run it.


![image.png](https://images.hive.blog/DQmbAv3ShBwaPhtSYY8HncB29fFxwLVBpHuQZv1RnYpt6oC/image.png)

If everything went right you should see something like this.
```
null {
  id: 'b6585c255cda88a27e5d37c4028de21282d33407',
  block_num: 44320137,
  trx_num: 1,
  expired: false,
  ref_block_num: 17774,
  ref_block_prefix: 332704036,
  expiration: '2020-06-15T18:22:06',
  operations: [ [ 'transfer', [Object] ] ],
  extensions: [],
  signatures: [
    '1f2c07a04e392c579950cb2f627ce74a8ecd7f6baf6b6536f4502d982d2deb989c0886832c8d92b1b77c33e4da61f992c0a1d2b073fa7551c5ab4acf614a97cf79'
  ]
}
```


![image.png](https://images.hive.blog/DQmRUZQe4G5mVXcUSrcX7Fi5wJYjwsbuMQfXd8pfU3u7qQe/image.png)

As you can see the transaction is completed. If you want to transfer HBD just replace the HIVE with HBD other things are same.

<center>
**I think this much is enough for today. Now if you like the post please  upvote and comment if you want to give me some advise**
![ntitled-1.png](https://images.hive.blog/DQmd3WcHH8i6U2JkmnrvEvd4FwjDQxJtG3Tnhzxdjswktdx/ntitled-1.png)</center>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 55 others
properties (23)
authorpakgamer
permlinkhivejs-tutorials-learning-how-to-transfer-hive-hbd-thorugh-hivejs
categoryhive-148441
json_metadata{"tags":["programming","hivejs"],"image":["https://images.hive.blog/DQmXYPbeiMN2gguKk9QAUXueLxwQqsw2frKzKMJ6hwAQryC/image.png","https://images.hive.blog/DQmZWpJP1UCyW3JFXneCgi41234FKdQDPxGxkypcHTm78sL/image.png","https://images.hive.blog/DQmQsuXXoGTHvPQqqX1V95EdmwEkbjSgYJEkqiPTvN6FHRJ/image.png","https://images.hive.blog/DQmbAv3ShBwaPhtSYY8HncB29fFxwLVBpHuQZv1RnYpt6oC/image.png","https://images.hive.blog/DQmRUZQe4G5mVXcUSrcX7Fi5wJYjwsbuMQfXd8pfU3u7qQe/image.png","https://images.hive.blog/DQmd3WcHH8i6U2JkmnrvEvd4FwjDQxJtG3Tnhzxdjswktdx/ntitled-1.png"],"app":"hiveblog/0.1","format":"markdown"}
created2020-06-15 18:26:54
last_update2020-06-15 18:26:54
depth0
children2
last_payout2020-06-22 18:26:54
cashout_time1969-12-31 23:59:59
total_payout_value5.254 HBD
curator_payout_value5.037 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,770
author_reputation19,304,605,112,640
root_title"HiveJs Tutorials --Learning how to transfer HIVE/HBD thorugh HiveJs"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id97,984,363
net_rshares23,490,616,994,281
author_curate_reward""
vote details (119)
@gitplait-mod2 ·
Thanks for sharing this post and also training beginners more about JavaScript.

Thanks again @pakgamer

<sub> **Your post has been curated with @gitplait community account because this is the kind of publications we like to see in our community.** </sub>

Join our [Community on Hive](https://hive.blog/trending/hive-103590) and Chat with us on [Discord](https://discord.gg/CWCj3rw).

[[Gitplait-Team]](https://gitplait.tech/)
properties (22)
authorgitplait-mod2
permlinkre-pakgamer-qc4uam
categoryhive-148441
json_metadata{"tags":["hive-148441"],"app":"peakd/2020.05.5"}
created2020-06-18 17:37:36
last_update2020-06-18 17:37:36
depth1
children0
last_payout2020-06-25 17:37:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length427
author_reputation28,898,670,427
root_title"HiveJs Tutorials --Learning how to transfer HIVE/HBD thorugh HiveJs"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,042,459
net_rshares0
@hivebuzz ·
<center>[![](https://images.hive.blog/175x175/http://hivebuzz.me/@pakgamer/level.png?202006172303)](https://hivebuzz.me/@pakgamer)
**Congratulations @pakgamer**!
You raised your level and are now a **Minnow**!</center>

###### Support the HiveBuzz project. [Vote](https://hivesigner.com/sign/update_proposal_votes?proposal_ids=%5B%22109%22%5D&approve=true) for [our proposal](https://peakd.com/me/proposals/109)!
properties (22)
authorhivebuzz
permlinkhivebuzz-notify-pakgamer-20200617t233136000z
categoryhive-148441
json_metadata{"image":["http://hivebuzz.me/notify.t6.png"]}
created2020-06-17 23:31:36
last_update2020-06-17 23:31:36
depth1
children0
last_payout2020-06-24 23:31:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length414
author_reputation369,199,176,783,453
root_title"HiveJs Tutorials --Learning how to transfer HIVE/HBD thorugh HiveJs"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,028,371
net_rshares0