+-+-+ +-+ +-+-+-+-+
|G|O| |4| |H|I|V|E|
+-+-+ +-+ +-+-+-+-+

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

Help with steem-python's TransactionBuilder?

BY: @zcgolf16 | CREATED: June 9, 2017, 3:47 p.m. | VOTES: 21 | PAYOUT: $15.48 | [ VOTE ]

I am currently working on a soft GUI wallet (keys are not stored) using python. I am working with steem-python's TransactionBuilder and I am having some trouble:

Here is the code that I am using to send a transaction:

https://steemitimages.com/DQmQaNNjhimLBkc6pwUQzaxDfSuguk9jRxT49vBx4tSr2AT/Screen%20Shot%202017-06-09%20at%2011.38.46%20AM.png

First, I set up the transfer and the TransactionBuilder and then use operations.Transfer() to make my transfer readable for the TransactionBuilder. Next, I use appendMissingSignatures() to add the WIF active key that the user has provided to the TransactionBuilder, and then attempt to sign and broadcast the transaction (no_broadcast = True, as I am just testing).

Obviously, the way that I am adding the WIF key to the TransactionBuilder is incorrect, as the following MissingKeyError is raised:

https://steemitimages.com/DQmeYG5zS3Nj1CxtcFUvrVh78C9ezwgSiwf6rxH1VD6i7ZF/Screen%20Shot%202017-06-09%20at%2011.39.46%20AM.png

What am I doing wrong here? I appreciate your help.

TAGS: [ #steem-dev ] [ #steemdev ] [ #steem-project ] [ #steem ] [ #steemit ]

Replies

@jesta | June 9, 2017, 4:17 p.m. | Votes: 8 | [ VOTE ]

I'm going to assume from your tests a few minutes ago you figured this out? :)

@zcgolf16 | June 9, 2017, 4:23 p.m. | Votes: 1 | [ VOTE ]

Yes, I did! :)

All I needed was a self.tb.appendWif(self.privatekey) before appending missing signatures.

@randowhale | June 12, 2017, 2:46 a.m. | Votes: 0 | [ VOTE ]

This post received a 41% upvote from @randowhale thanks to @zcgolf16! For more information, click here!

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