__________     __ __     __  _______    ________
  / ____/ __ \   / // /    / / / /  _/ |  / / ____/
 / / __/ / / /  / // /_   / /_/ // / | | / / __/
/ /_/ / /_/ /  /__  __/  / __  // /  | |/ / /___
\____/\____/     /_/    /_/ /_/___/  |___/_____/

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

Python Hot Signing Link Generation Tool for HiveEngine transfers

BY: @anthonyadavisii | CREATED: Oct. 24, 2020, 9:56 p.m. | VOTES: 68 | PAYOUT: $2.58 | [ VOTE ]

    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: https://images.ecency.com/DQmSM3gjcQqHZ53kd5W56F9SPxmBo1FVkcEMBHVZ9qEzxMa/image.png]

https://i.imgur.com/LpeiYAd.gif

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:

Installation:

pip install hivesigner

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: https://images.ecency.com/DQmRzRAQXS89oJqnvLdb9gR7AtfLWaEmSr78M4MEcZnqrkA/image.png]
https://hiveblocks.com/tx/602b425598f18fb2ca2d6d0b1da274dd64f1fb9f

[IMAGE: 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

TAGS: [ #HiveDevs ] [ #opensource ] [ #python ] [ #hiveconnect ] [ #hiveengine ] [ #hive ] [ #hotsigning ] [ #palnet ] [ #neoxian ]

Replies

@poshbot | Oct. 25, 2020, 3:32 a.m. | Votes: 0 | [ VOTE ]

https://twitter.com/Bhattg18/status/1320205816146788352

@ecency | Oct. 26, 2020, 1:24 p.m. | Votes: 0 | [ VOTE ]

Your post has been voted as a part of Encouragement program. Keep up the good work! 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.comLearn more: https://ecency.com Join our discord: https://discord.me/ecency

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