bounty postinitial solution. While Crokkon's solution is a good one and he got there first, I think it has some usability issues that are fairly easily resolved, so I thought I would write them up.This is in response to @timcliff's and @crokkon's
here.This tutorial requires the tools Beem and Beempy by @holger80, for which installation instructions can be found
Setting up our multiauth account
Beempy makes this surprisingly easy. We need to have the active key for the target account imported into the wallet, but then we can do this easily from the command line with the allow
command, which takes several arguments. The generic form of the command is:
allow -a [Target account] --permissions [Permission] --weight [Weight] --threshold [Threshold] [Authorized account or public key]
I used the heron-themed accounts I have, with @green-heron the account being saddled with multi-sig permissions. The goal was to have two accounts with 25% weight, and five accounts with 10% weight, with a final required weight of 40%.
beempy allow -a green-heron --permission active --weight 25 tcpolymath
beempy allow -a green-heron --permission active --weight 25 herons-unlimited
beempy allow -a green-heron --permission active --weight 10 great-blue-heron
beempy allow -a green-heron --permission active --weight 10 night-heron
beempy allow -a green-heron --permission active --weight 10 goliath-heron
beempy allow -a green-heron --permission active --weight 10 snowy-egret
beempy allow -a green-heron --permission active --weight 10 --threshold 40 whistling-heron
Saving the threshold value for last is necessary because we're using the active key and also setting it to multi-auth; if we set the threshold beforehand we'll have to either import the owner key for the account or set up a multi-auth transaction in order to make the new authorizations.
This isn't necessary for setting up multi-auth on the posting key, which can be done simply by removing the "--permission active" option from the commands.
Using our multi-auth account to send transfers algorithmically
Here we do need Beem's transaction builder, but we can be fairly simple about it. First we load the required functions, initialize the Steem instance, and begin a transaction:
from beem import Steem
from beem.transactionbuilder import TransactionBuilder
from beembase.operations import Transfer
stm=Steem()
tx = TransactionBuilder(steem_instance=stm)
Then we build our basic transfer transaction and add it to the transaction object, which Beem makes very easy and self-explanatory:
transfer={"from": "green-heron", "to": "tcpolymath", "amount": "1 STEEM", "memo": "multisig transaction example"}
tx.appendOps(Transfer(transfer))
After this, we need to get the signatures, and sign the transaction. If we have them all available in our Beem wallet this is again very simple:
tx.appendSigner('herons-unlimited', 'active')
tx.appendSigner('great-blue-heron', 'active')
tx.appendSigner('night-heron', 'active')
As long as we're signing things algorithmically, where the same program would be attaching all of the signatures - say, for instance, we're a front end collecting signatures from the users - this method works well even when we pass the transaction object tx
throughout our program and sign it at different times. It is possible to pass the transaction manually between humans in different locations extremely clumsily by exporting the signed transaction as a JSON and having each person sign it individually, but practically it's hard to see a real-life application for that process. It would be easier to spin up a simple web front end to get the necessary signatures than to do the manual process more than about three times.
However we've acquired the necessary signatures, once we have them we simply sign and broadcast the transaction:
tx.sign()
tx.broadcast()
And then we're done. It's actually surprisingly easy. You can see my example transaction here.
![Steem.png](https://images.hive.blog/768x0/https://cdn.steemitimages.com/DQmVJ2rJuhqEmhknNUjqyTWJ6w7SRQoWekDZtJMzWym9u25/Steem.png)
.
I fixed the sign and broadcast operation of beempy now. It was some work, let's see what will happen with the bounty...
@buildteam and @steemvoter are proud to award you a Steemvoter Guild vote for your efforts in contributing to the multisig bounty.
Hi @tcpolymath!
Your UA account score is currently 4.725 which ranks you at #1483 across all Steem accounts.
Your rank has dropped 2 places in the last three days (old rank 1481).Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
In our last Algorithmic Curation Round, consisting of 207 contributions, your post is ranked at #17.
Evaluation of your UA score:
Feel free to join our @steem-ua Discord server
This post has been included in today's SOS Daily News - a digest of all you need to know about the State of Steem.
Editor of the The State of Steem SoS Daily News.
Promoter of The State of Steem SoS Weekly Forums.
Editor of the weekly listing of steem radio shows, podcasts & social broadcasts.
Founder of the A Dollar A Day charitable giving project.
You got a 52.34% upvote from @ocdb courtesy of @tcpolymath!
Discord channel for more information.@ocdb is a non-profit bidbot for whitelisted Steemians, current max bid is 12 SBD and the respective amount in Steem. Check our website https://thegoodwhales.io/ for the whitelist, queue and delegation info. Join our
ocd-witness through SteemConnect or on the Steemit Witnesses page. :)If you like what @ocd does, consider voting for
This post has received a 1.56 % upvote from @drotto thanks to: @sbi-booster.
Congratulations!
Enjoy the Bliss!
Join us on Discord!This post has been granted a 100% upvote, courtesy to @wokeprincess, from BlissFish!
Congrats @tcpolymath, you are one of the finalists for the Multisig bounty, BuildTeam will be sponsoring a Steemvoter Guild vote in addition to any other bounty you may receive. Incoming shortly.