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.
Python utility generates Hive Connect hot signing links for perform Hive-Engine token transactions
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:
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
(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