Kenchung avatar

在steem chain上發出custom JSON

kenchung

Published: 18 Jan 2020 › Updated: 18 Jan 2020在steem chain上發出custom JSON

在steem chain上發出custom JSON

根據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

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

Leave 在steem chain上發出custom JSON to:

Written by

A secondary school math teacher, writing blog posts for leisure :)

Read more #programming posts


Best Posts From Kenchung

We have not curated any of kenchung's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Kenchung