____  ___    _  _     _   _ _____     _______
 / ___|/ _ \  | || |   | | | |_ _\ \   / / ____|
| |  _| | | | | || |_  | |_| || | \ \ / /|  _|
| |_| | |_| | |__   _| |  _  || |  \ V / | |___
 \____|\___/     |_|   |_| |_|___|  \_/  |_____|

 --- A GOPHER-LIKE INTERFACE FOR HIVE BLOCKCHAIN ---

在steem chain上發出custom JSON

BY: @kenchung | CREATED: Jan. 18, 2020, 10:30 a.m. | VOTES: 115 | PAYOUT: $0.00 | [ VOTE ]

根據steemjs的documentation,發出custom JSON的語法如下:

steem.broadcast.customJson(wif, requiredAuths, requiredPostingAuths, id, json, function(err, result) {
  console.log(err, result);
});

然後就讓我來測試一下吧:

json = JSON.stringify ({
  "光復香港":"時代革命",
  "天滅中共":"全黨死清光"
});

steem.broadcast.customJson(my_posting_key, [], ["kenchung"], "黑警死全家", json, function(err, result) {
  console.log(err, result);
});

成功了! 訊息已被紀錄在steem blockchain之上。

https://steemd.com/tx/cffcaa57e38fed005caa2e50911ac668ca3846b9
[IMAGE: https://cdn.steemitimages.com/DQmaUgCN61NNT78x8GEyKUqmatVEAuFjbUYfQjMJxCvRwJb/image.png]

測試完畢,接下來就是看看如何用custom JSON去玩一下steemmonster了。

TAGS: [ #programming ] [ #steem ] [ #steemit ] [ #coding ]

Replies

@cnbuddy | Jan. 18, 2020, 10:36 a.m. | Votes: 0 | [ VOTE ]

帅哥/美女!@wherein邀请您来参加美味就是家常味带我看看,你的城市活动,展现您的精彩生活瞬间。假如我的留言打扰到你,请回复“取消”。

@steem-ua | Jan. 18, 2020, 7:52 p.m. | Votes: 0 | [ VOTE ]

Hi @kenchung!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 4.280 which ranks you at #2913 across all Steem accounts.
Your rank has not changed in the last three days.

In our last Algorithmic Curation Round, consisting of 88 contributions, your post is ranked at #83.

Evaluation of your UA score:
  • Some people are already following you, keep going!
  • Try to show your post to more followers, for example via networking on our discord!
  • Try to work on user engagement: the more people that interact with you via the comments, the higher your UA score!

Feel free to join our @steem-ua Discord server

[ BACK TO TRENDING ] [ BACK TO MENU ]
CMD>