Viewing a response to: @fulltimegeek/rv8nfy
See https://github.com/mahdiyari/hive-tx-js I added an example there Block explorers can easily display the public key used for signing the transaction. hivehub.dev might be interested in adding that feature. @asgarth CC @edicted @brianoflondon
author | mahdiyari |
---|---|
permlink | rv9oav |
category | hive-167922 |
json_metadata | {"links":["https://github.com/mahdiyari/hive-tx-js"],"app":"hiveblog/0.1","users":["asgarth","edicted","brianoflondon"]} |
created | 2023-05-26 13:04:09 |
last_update | 2023-05-26 13:11:03 |
depth | 3 |
children | 4 |
last_payout | 2023-06-02 13:04:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.320 HBD |
curator_payout_value | 0.320 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 246 |
author_reputation | 166,511,987,105,254 |
root_title | "Posting Authority Revoked. " |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 123,853,712 |
net_rshares | 1,400,783,143,167 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
gtg | 0 | 335,575,778,070 | 1% | ||
fulltimegeek | 0 | 705,748,514,588 | 100% | ||
justinw | 0 | 1,461,654,030 | 0.33% | ||
edicted | 0 | 357,997,196,479 | 5% |
I thought about this a few times in the past. Thanks for sharing the code, will try to include it in an upcoming release 👍
author | asgarth |
---|---|
permlink | re-mahdiyari-rv9qie |
category | hive-167922 |
json_metadata | {"tags":["hive-167922"],"app":"peakd/2023.5.1"} |
created | 2023-05-26 13:51:51 |
last_update | 2023-05-26 13:51:51 |
depth | 4 |
children | 1 |
last_payout | 2023-06-02 13:51:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.144 HBD |
curator_payout_value | 0.143 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 122 |
author_reputation | 37,723,305,336,356 |
root_title | "Posting Authority Revoked. " |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 123,854,673 |
net_rshares | 627,868,616,044 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
digitalis | 0 | 7,007,322,335 | 100% | ||
edicted | 0 | 286,614,863,042 | 4% | ||
antisocialist | 0 | 333,368,158,445 | 50% | ||
yayogerardo | 0 | 878,272,222 | 50% |
I'd advise to implement it in such a way that `sig_digest` of a transaction is taken from server (since a node already has `pack`ed version of transaction - this way you don't need to deal with differences between legacy and hf26 version of binary serialization), but the extraction of public key from signature happens on client side, preferably on demand only (that part of the process carries almost all the cost, if you do it on the server you just invite DoS attack).
author | andablackwidow |
---|---|
permlink | re-asgarth-2023527t388463z |
category | hive-167922 |
json_metadata | {"tags":["hive-167922"],"app":"ecency/3.0.31-surfer","format":"markdown+html"} |
created | 2023-05-27 01:08:09 |
last_update | 2023-05-27 01:08:09 |
depth | 5 |
children | 0 |
last_payout | 2023-06-03 01:08:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 472 |
author_reputation | 66,021,123,572,392 |
root_title | "Posting Authority Revoked. " |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 123,873,275 |
net_rshares | 0 |
Hive-tx is new to me. Was this possible before with other libraries like [hive-js](https://gitlab.syncad.com/hive/hive-js) / [dhive](https://gitlab.syncad.com/hive/dhive)? I see that you manually reconstructed the transaction to get the digest. Can that step be automated? <pre> <code> const signature = hiveTx.Signature.from('203dfa2f2620f94a033c424710bbf22c518e1d9aec4170b342789acdc714bf0b483ff1e2ec1fcd5607e5df767ba09751792484a7ac1cf31c94cf55b1e81df6be30') const trx = new hiveTx.Transaction({ ref_block_num: 30883, ref_block_prefix: 3663302639, expiration: '2023-05-26 07:49:44', operations: [[ 'vote', { voter: 'mahdiyari', author: 'afa.hb03', permlink: 'esp-engcoastal-sentry-splinterlands-art-contest-week-242-by-afahb03', weight: 2000 } ]], extensions: [] }) const { digest } = trx.digest() const publicKey = signature.getPublicKey(digest).toString() // STM8WWUYHMdHLgEHidYCztswzfZCViA16EqGkAxt7RG4dWwDpFtCF // To find which account has this public key const account = await hiveTx.call('condenser_api.get_key_references', [["STM8WWUYHMdHLgEHidYCztswzfZCViA16EqGkAxt7RG4dWwDpFtCF"]]) // steemauto </code> </pre>
author | fulltimegeek |
---|---|
permlink | rv9re1 |
category | hive-167922 |
json_metadata | {"links":["https://gitlab.syncad.com/hive/hive-js"],"app":"hiveblog/0.1"} |
created | 2023-05-26 14:10:48 |
last_update | 2023-05-26 14:10:48 |
depth | 4 |
children | 1 |
last_payout | 2023-06-02 14:10:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,217 |
author_reputation | 82,536,800,030,957 |
root_title | "Posting Authority Revoked. " |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 123,855,104 |
net_rshares | 0 |
I don't think it is possible with hivejs but might be possible with dhive. ```js const tx = await hiveTx.call("condenser_api.get_transaction", ["207c06a5448e18b501d15891aed6f3ecbeb96b83"]) const signature = hiveTx.Signature.from(tx.result.signatures[0]) const trx = new hiveTx.Transaction(tx.result) const { digest } = trx.digest() const publicKey = signature.getPublicKey(digest).toString() const account = await hiveTx.call('condenser_api.get_key_references', [[publicKey]]) console.log(publicKey, account) ```
author | mahdiyari |
---|---|
permlink | rv9rxg |
category | hive-167922 |
json_metadata | {"app":"hiveblog/0.1"} |
created | 2023-05-26 14:22:30 |
last_update | 2023-05-26 14:22:30 |
depth | 5 |
children | 0 |
last_payout | 2023-06-02 14:22:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.236 HBD |
curator_payout_value | 0.235 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 512 |
author_reputation | 166,511,987,105,254 |
root_title | "Posting Authority Revoked. " |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 123,855,350 |
net_rshares | 1,029,941,968,166 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
gtg | 0 | 335,519,552,001 | 1% | ||
fulltimegeek | 0 | 692,960,817,890 | 100% | ||
justinw | 0 | 1,461,598,275 | 0.33% |