create account

Python Hot Signing Link Generation Tool for HiveEngine transfers by anthonyadavisii

View this thread on: hive.blogpeakd.comecency.com
· @anthonyadavisii · (edited)
$2.59
Python Hot Signing Link Generation Tool for HiveEngine transfers
    Generating hot signing links using python had been a roadblock for our bot development.

### After a bit of trial by error, found the issue and the solution.

     Long story short, it was a encoding issue corrected by enclosing the required_auths and required_posting_auths arrays in doublequotes as follows:

```
...
		"required_auths": "[\"anthonyadavisii\"]",
		"required_posting_auths": "[]",
...
```

     The latter didn't matter so much as it was an empy array but the former had double quotes which were being encoded as single quotations(%27) as a result. This led to an "Invalid cast from string_type to Array" error when attempting the link.

*Anyways, glad this was figured out so we can move forward with the next phases of development.*

![image.png](https://images.ecency.com/DQmSM3gjcQqHZ53kd5W56F9SPxmBo1FVkcEMBHVZ9qEzxMa/image.png)

<center>https://i.imgur.com/LpeiYAd.gif</center>

**Repository:**

https://github.com/anthonyadavisii/get_hive_engine_hc_hot_link

# get_hive_engine_hc_hot_link
Python utility generates Hive Connect hot signing links for perform Hive-Engine token transactions

### Prerequisites:
- Python3 and greater

- hivesigner-python-client by @emrebeyler [Link](https://github.com/emre/hivesigner-python-client)

### Installation:
```
pip install hivesigner
```

- Usage:

Import script as module.

```
import get_hive_engine_hc_hot_link

#Example usage
get_hive_engine_hc_hot_link.get_he_hc_hot_link('anthonyadavisii','HDR','1','test post id')
```

Should output as follows:

```
'https://hivesigner.com/sign/custom_json?authority=active&required_auths=%5B%22anthonyadavisii%22%5D&required_posting_auths=%5B%5D&id=ssc-mainnet-hive&json=%7B%22contractName%22%3A%22tokens%22%2C%22contractAction%22%3A%22transfer%22%2C%22contractPayload%22%3A%7B%22symbol%22%3A%22HDR%22%2C%22to%22%3A%22hive-dr%22%2C%22quantity%22%3A%221%22%2C%22memo%22%3A%22test+post+id%22%7D%7D'
```
### Test Results

![image.png](https://images.ecency.com/DQmRzRAQXS89oJqnvLdb9gR7AtfLWaEmSr78M4MEcZnqrkA/image.png)
https://hiveblocks.com/tx/602b425598f18fb2ca2d6d0b1da274dd64f1fb9f

![image.png](https://images.ecency.com/DQmb2Y4bLtAEFGTK4Hjbe2PwXuFPjzEu9YNgKz8T6Zi3zyp/image.png)

I plan on refining this so it may be run as a script in addition to interactively. Feel free to fork and suit to your purpose. I will be using it as part of the abuse reporting functionality for Hive Downvote Rewards project (@hive-dr) formerly @steemflagrewards.

### Thank you for your time and supporting this work

---

### Additional Links:

*HiveEngine*

https://hive-engine.com/

(Below included in Github repo for onboarding potential)
Are you interested in the HIVE social media blockchain? Get started with my links below:

*Ecency Referral Link*

https://ecency.com/?referral=anthonyadavisii

*HiveOnboard*

https://hiveonboard.com?ref=anthonyadavisii

https://media.giphy.com/media/3oEdva9BUHPIs2SkGk/giphy.gif
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 3 others
👎  ,
properties (23)
authoranthonyadavisii
permlinkpython-hot-signing-link-generation-tool-for-hiveengine-transfers
categoryhive-139531
json_metadata{"links":["https://github.com/anthonyadavisii/get_hive_engine_hc_hot_link","https://github.com/emre/hivesigner-python-client","https://hivesigner.com/sign/custom_json?authority=active&required_auths=%5B%22anthonyadavisii%22%5D&required_posting_auths=%5B%5D&id=ssc-mainnet-hive&json=%7B%22contractName%22%3A%22tokens%22%2C%22contractAction%22%3A%22transfer%22%2C%22contractPayload%22%3A%7B%22symbol%22%3A%22HDR%22%2C%22to%22%3A%22hive-dr%22%2C%22quantity%22%3A%221%22%2C%22memo%22%3A%22test+post+id%22%7D%7D","https://hiveblocks.com/tx/602b425598f18fb2ca2d6d0b1da274dd64f1fb9f","https://hive-engine.com/","https://ecency.com/?referral=anthonyadavisii","https://hiveonboard.com?ref=anthonyadavisii"],"image":["https://images.ecency.com/DQmSM3gjcQqHZ53kd5W56F9SPxmBo1FVkcEMBHVZ9qEzxMa/image.png","https://i.imgur.com/LpeiYAd.gif","https://images.ecency.com/DQmRzRAQXS89oJqnvLdb9gR7AtfLWaEmSr78M4MEcZnqrkA/image.png","https://images.ecency.com/DQmb2Y4bLtAEFGTK4Hjbe2PwXuFPjzEu9YNgKz8T6Zi3zyp/image.png","https://media.giphy.com/media/3oEdva9BUHPIs2SkGk/giphy.gif"],"users":["emrebeyler","steemflagrewards"],"tags":["hive-139531","opensource","python","hiveconnect","hiveengine","hive","hotsigning","palnet","neoxian"],"app":"ecency/3.0.9-mobile","format":"markdown+html"}
created2020-10-24 21:56:15
last_update2020-10-26 13:39:03
depth0
children2
last_payout2020-10-31 21:56:15
cashout_time1969-12-31 23:59:59
total_payout_value1.298 HBD
curator_payout_value1.287 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,978
author_reputation196,074,471,102,788
root_title"Python Hot Signing Link Generation Tool for HiveEngine transfers"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id100,238,647
net_rshares12,833,090,701,971
author_curate_reward""
vote details (69)
@ecency ·
Your post has been **voted** as a part of [Encouragement program](https://ecency.com/esteem/@good-karma/encouragement-program-continues-82eafcd10a299). Keep up the good work! <br>Dear reader, follow and support this author, Install Android: https://android.ecency.com, iOS: https://ios.ecency.com mobile app or desktop app for Windows, Mac, Linux: https://desktop.ecency.com<br>Learn more: https://ecency.com <br>Join our discord: https://discord.me/ecency
properties (22)
authorecency
permlinkre-20201026t142441718z
categoryhive-139531
json_metadata{"tags":["ecency"],"app":"ecency/3.0.5-welcome","format":"markdown+html"}
created2020-10-26 13:24:42
last_update2020-10-26 13:24:42
depth1
children0
last_payout2020-11-02 13:24:42
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_length456
author_reputation549,971,547,212,413
root_title"Python Hot Signing Link Generation Tool for HiveEngine transfers"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id100,260,529
net_rshares0
@poshbot ·
https://twitter.com/Bhattg18/status/1320205816146788352
properties (22)
authorposhbot
permlinkre-python-hot-signing-link-generation-tool-for-hiveengine-transfers-20201025t033249z
categoryhive-139531
json_metadata"{"app": "beem/0.24.8"}"
created2020-10-25 03:32:51
last_update2020-10-25 03:32:51
depth1
children0
last_payout2020-11-01 03:32:51
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_length55
author_reputation5,554,335,374,496
root_title"Python Hot Signing Link Generation Tool for HiveEngine transfers"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id100,241,300
net_rshares0