create account

Multisignature Transaction Guide for beempy by holger80

View this thread on steemit.com
· @holger80 · (edited)
$81.52
Multisignature Transaction Guide for beempy
This guide will describe how to broadcast a multisignature transactions to the steem blockchain using beempy. It is my  submission to  this [bounty](https://steemit.com/steem/@timcliff/steem-developer-bounty-1500-steem-multisignature-transaction-guide-details-inside).

beempy is the command line tool provided by the python library [beem](https://github.com/holgern/beem). It is installed when the beem library is installed.

## Installation
There are three different ways to install beem/beempy:
### Install beem through pip / pip3
Assuming that python and pip is already installed, beem can be installed by
```
pip install beem
```
This does not work on windows.
### Install beem through conda
When anaconda is used, beempy can be installed by
```
conda install beem
```
This works also on windows
### Unzip beempy provided by pyinstaller for windows
Download the newest beempy zip file from the [release](https://github.com/holgern/beem/releases) site and unpack it.

A more detailed installation guide can be found in the [readme file](https://github.com/holgern/beem/blob/master/README.rst).

This guide is only valid for beempy version 0.20.16 or higher. The version can be checked by:
```
beempy --version
```
The guide will not work for versions below 0.20.16!
## Setting up multisignature authority for the active authority - Part 1
In order to change the active authority permissions, the active key of the account that should be changed, must be stored in the key wallet.
It can be checked if there is already a wallet by:
```
 beempy  walletinfo
```
When there is no, it can be created by:
```
beempy createwallet
```
Now we can add the active key:
```
beempy addkey
```
There will be two prompts, the first will ask for the wallet master password and the second will ask for the active key.

At first we should  check if the account which should be set up, already has more than one permission.
```
beempy permissions <account_name>
```
If there is more than one Key listed and all accounts that were given active authority  permission should be removed, it can be done by:
```
beempy disallow --permission active -a <account_name> <account_with_active_permission>
```

Now, active permissions can be granted to other accounts by using the  `allow` command. Lets assume we want to allow N accounts / keys  for active permission.
when adding the first N-1 accounts/keys we must not define the treshold T:
```
beempy allow --permission active -a <account_name> --weight W_1 <pubkey_or_accountname_1>
beempy allow --permission active -a <account_name> --weight W_2 <pubkey_or_accountname_2>
...
beempy allow --permission active -a <account_name> --weight W_n-1 <pubkey_or_accountname_n-1>
```
Now we can set the threshold `T` for the last account/key:
```
beempy allow --permission active -a <account_name> --weight W_n --threshold T <pubkey_or_accountname_n>
```
### Posting authority
When permissions to the posting authority should be changed, 
```
--permission active
```
must be replaced by
```
--permission posting
```
### Example
We want to setup the active authority with  7 keys:
 >  A user wants to have their active authority setup with seven keys. Keys one and two each have a weight of 25%. Keys three, four, five, six, and seven each have a weight of 10%. In order for a transaction to be valid, it must have at least 40% weighted signatures.

```
beempy allow --permission active -a testholger --weight 25 STM6bVMCVr4FcLmbcckEgaHcHmcfytzoanTW1FrnTQ6rL5NWuBeGA  

beempy allow --permission active -a testholger --weight 25 STM8RsufKpLfEeirs6WYDJm93UT1U5ntQqkSZrumWhv9Tw8B1NWTx

beempy allow --permission active -a testholger --weight 10 STM58dtFYRZviGgbm4nhnELczhGDK78R3Vi7M1VCdkNS2vZG8pkbJ 

beempy allow --permission active -a testholger --weight 10 STM8A2zgE2wouhMfd6ycAvpboB6m2PKwa31pih49yZTsbD5jGMT3t 

beempy allow --permission active -a testholger --weight 10 STM5qoHyJrKCsW4FFhrrbWPuS52N2FUjQTFiHJVHfuBykEVvENrvS 

beempy allow --permission active -a testholger --weight 10 STM8LaqooL399EZXUacyBVFCXJiGRnQsyw6YYGEN7UqQksdH5oAta  

beempy allow --permission active -a testholger --weight 10 --threshold 40 STM8Y8aYJC7EbFRZ34imY2sJ7b78WprTMWiQAp4hbYcg2JCr4EcT9  
```

Let's check if everything has worked out:
```
 beempy permissions testholger
+------------+-----------+------------------------------------------------------------+
| Permission | Threshold |                                                Key/Account |
+------------+-----------+------------------------------------------------------------+
|      owner |         1 |  STM8k9awBgjduUdkoTyP1DFSLYNrtqgnCeeETFFWHeox4BKybT71n (1) |
|     active |        40 | STM58dtFYRZviGgbm4nhnELczhGDK78R3Vi7M1VCdkNS2vZG8pkbJ (10) |
|            |           | STM5qoHyJrKCsW4FFhrrbWPuS52N2FUjQTFiHJVHfuBykEVvENrvS (10) |
|            |           | STM6bVMCVr4FcLmbcckEgaHcHmcfytzoanTW1FrnTQ6rL5NWuBeGA (25) |
|            |           | STM8A2zgE2wouhMfd6ycAvpboB6m2PKwa31pih49yZTsbD5jGMT3t (10) |
|            |           | STM8LaqooL399EZXUacyBVFCXJiGRnQsyw6YYGEN7UqQksdH5oAta (10) |
|            |           | STM8RsufKpLfEeirs6WYDJm93UT1U5ntQqkSZrumWhv9Tw8B1NWTx (25) |
|            |           | STM8Y8aYJC7EbFRZ34imY2sJ7b78WprTMWiQAp4hbYcg2JCr4EcT9 (10) |
|            |           |  STM8YQFkpJrj74SdR8JWRv12DHVRn3eKoAaEcwrj1QmLGArZY39o8 (1) |
|    posting |         1 |  STM52tq9RWwdYJ3gzxz2fzhcg9HCBfouqcHBYVU439tLdk73Ed7SM (1) |
+------------+-----------+------------------------------------------------------------+
```

## Setting up multisignature authority for the active authority - Part 2
When an account has more than one key assigned to the active permission, broadcasting is successfully when at least the weight sum of all signed keys is at least the threshold T.

At first we need to create a unsigned transaction.  We can do this with beempy by:
```
beempy -xd -e 3600 <command> <options> > unsigned_transaction.json
```
The parameter x and d prevent that the transaction is signed and broadcasted. `-e 3600` increases the expiration time to the maximum time of 1 hour. This means that all participants have 1 hour to sign and finally to broadcast.


We need the key that should sign in the wallet:
```
beempy addkey
```
Signing can than be done by
```
beempy sign --file unsigned_transaction.json -o signed_1_transaction.json
```
The next signer with has the next key in its wallet can  sign with:
```
beempy sign --file signed_1_transaction.json -o signed_2_transaction.json
```
This is repeated until the weight sum of signer exceed the threshold.

Broadcasting can then be done by:
```
beempy broadcast --file signed_2_transaction.json
```

### Example
Let's continue our example and transfer some STEEM:
> One of the key holders of the account wants to transfer 5.0 STEEM tokens to another user. The transaction should be signed with keys one, four, and five (which would exceed the 40% threshold).

We need to create the unsigned transaction first:
```
 beempy -xd -e 3600 transfer -a testholger holger80 5.000 STEEM > unsigned_transaction.json
```
Then the first signer will sign. The first key must be stored in the wallet
```
beempy addkey
```
and we can sign:
```
beempy sign --file unsigned_transaction.json -o signed_1_transaction.json
```
Now we delete the key with:
```
beempy delkey STM6bVMCVr4FcLmbcckEgaHcHmcfytzoanTW1FrnTQ6rL5NWuBeGA  
```

Now the forth key should sign and we add this key to the wallet
```
beempy addkey
```
and we can sign:
```
beempy sign --file signed_1_transaction.json -o signed_2_transaction.json
```
Now we delete the key with:
```
beempy delkey STM8A2zgE2wouhMfd6ycAvpboB6m2PKwa31pih49yZTsbD5jGMT3t 
```

Now the fifth key will sign. We will add it first:
```
beempy addkey
```
and we can sign:
```
beempy sign --file signed_2_transaction.json -o signed_3_transaction.json
```

We have enough signer and we can now broadcast the transaction by:
```
beempy broadcast --file signed_3_transaction.json
```

Let's see if it has worked:

![image.png](https://ipfs.busy.org/ipfs/QmXK6zSnkQZfWRxsRrotuB7iD4YK65xc7xJSgewqnMQpa4)
There are the three signatures, so everything worked out!
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 1051 others
properties (23)
post_id68,372,792
authorholger80
permlinkmultisignature-transaction-guide-for-beempy
categorysteem
json_metadata{"community":"busy","image":["https:\/\/ipfs.busy.org\/ipfs\/QmXK6zSnkQZfWRxsRrotuB7iD4YK65xc7xJSgewqnMQpa4"],"format":"markdown","tags":["steem","steemdev","multisignature","beem","busy"],"app":"steemit\/0.1","links":["https:\/\/steemit.com\/steem\/@timcliff\/steem-developer-bounty-1500-steem-multisignature-transaction-guide-details-inside","https:\/\/github.com\/holgern\/beem","https:\/\/github.com\/holgern\/beem\/releases","https:\/\/github.com\/holgern\/beem\/blob\/master\/README.rst"]}
created2019-01-05 00:04:09
last_update2019-01-05 00:11:06
depth0
children10
net_rshares153,350,215,971,219
last_payout2019-01-12 00:04:09
cashout_time1969-12-31 23:59:59
total_payout_value62.205 SBD
curator_payout_value19.316 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length8,126
author_reputation74,893,554,750,345
root_title"Multisignature Transaction Guide for beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars0
author_curate_reward""
vote details (1115)
@steemprojects ·
This post has been just added as new item to _[timeline of beem on Steem Projects](https://steemprojects.com/projects/p/beem/?utm_source=comment_timeline&utm_medium=steem&utm_campaign=new_event&utm_content=c1)_.

If you want to be notified about new updates from this project, register on Steem Projects and add beem to your favorite projects.
properties (22)
post_id68,373,166
authorsteemprojects
permlinkre-multisignature-transaction-guide-for-beempy-20190105t001815
categorysteem
json_metadata{}
created2019-01-05 00:18:15
last_update2019-01-05 00:18:15
depth1
children0
net_rshares0
last_payout2019-01-12 00:18:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length345
author_reputation27,968,338,463
root_title"Multisignature Transaction Guide for beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@tts ·
To listen to the audio version of this article click on the play image.
[![](https://s18.postimg.org/51o0kpijd/play200x46.png)](http://ec2-52-72-169-104.compute-1.amazonaws.com/holger80__multisignature-transaction-guide-for-beempy.mp3)
Brought to you by [@tts](https://steemit.com/tts/@tts/introduction). If you find it useful please consider upvoting this reply.
properties (22)
post_id68,373,273
authortts
permlinkre-multisignature-transaction-guide-for-beempy-20190105t002128
categorysteem
json_metadata{}
created2019-01-05 00:21:30
last_update2019-01-05 00:21:30
depth1
children0
net_rshares0
last_payout2019-01-12 00:21:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length363
author_reputation6,118,805,757,518
root_title"Multisignature Transaction Guide for beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@partiko ·
Thank you so much for participating the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.00% upvote! Together, let’s change the world!
properties (22)
post_id68,373,520
authorpartiko
permlinkre-multisignature-transaction-guide-for-beempy-20190105t003036
categorysteem
json_metadata{}
created2019-01-05 00:30:39
last_update2019-01-05 00:30:39
depth1
children0
net_rshares0
last_payout2019-01-12 00:30:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length210
author_reputation29,136,973,866,985
root_title"Multisignature Transaction Guide for beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@attoan.cmt ·
Awesome tutorial for setting up multi-signature payment for Steem!
properties (22)
post_id68,384,989
authorattoan.cmt
permlinkre-holger80-multisignature-transaction-guide-for-beempy-20190105t072255436z
categorysteem
json_metadata{"tags":["steem"],"app":"steemit\/0.1"}
created2019-01-05 07:22:57
last_update2019-01-05 07:22:57
depth1
children0
net_rshares0
last_payout2019-01-12 07:22:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length66
author_reputation34,320,654,044,759
root_title"Multisignature Transaction Guide for beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@steem-plus ·
SteemPlus upvote
Hi, @holger80!

You just got a **2.49%** upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in [here](https://steemit.com/@steem-plus) to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.
properties (22)
post_id68,390,719
authorsteem-plus
permlinkmultisignature-transaction-guide-for-beempy---vote-steemplus
categorysteem
json_metadata{}
created2019-01-05 11:00:21
last_update2019-01-05 11:00:21
depth1
children0
net_rshares0
last_payout2019-01-12 11:00:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length435
author_reputation99,235,409,613,209
root_title"Multisignature Transaction Guide for beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@steem-ua ·
#### Hi @holger80!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your **UA** account score is currently 7.291 which ranks you at **#64** across all Steem accounts.
Your rank has not changed in the last three days.

In our last Algorithmic Curation Round, consisting of 207 contributions, your post is ranked at **#4**.
##### Evaluation of your UA score:

* Your follower network is great!
* The readers appreciate your great work!
* Good user engagement!


**Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
properties (22)
post_id68,390,997
authorsteem-ua
permlinkre-multisignature-transaction-guide-for-beempy-20190105t110836z
categorysteem
json_metadata{"app":"beem\/0.20.14"}
created2019-01-05 11:08:39
last_update2019-01-05 11:08:39
depth1
children0
net_rshares0
last_payout2019-01-12 11:08:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length595
author_reputation19,448,624,389,373
root_title"Multisignature Transaction Guide for beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@pennsif ·
This post has been included in today's  [**SOS Daily News**](https://steemit.com/steem/@pennsif/sosdailynewsnewsaboutthestateofsteem4january2019-r5y1nirbvb) - a digest of all you need to know about the State of Steem.

***

* *Editor of the [**The State of Steem SoS Daily News**](https://steemit.com/steem/@pennsif/sosdailynewsnewsaboutthestateofsteem4january2019-r5y1nirbvb).*

* *Promoter of [**The State of Steem SoS Weekly Forums**](https://steemit.com/dtube/@pennsif/amwntxt3).*

* *Editor of the [**weekly listing of steem radio shows, podcasts & social broadcasts**](https://steemit.com/mspwaves/@pennsif/schedule-of-radio-shows-podcasts-and-social-broadcasts-supported-by-dsound-week-beginning-31-december-2018).*

* *Founder of the [**A Dollar A Day**](https://steemit.com/adollaraday/@adollaraday/a-dollar-a-day-charitable-giving-project-ususd-5000-donated-in-8-months-we-made-it) charitable giving project.*

https://pennsif.com/wp-content/uploads/2018/08/adollaraday-linear-400x98.jpg

***
properties (22)
post_id68,395,923
authorpennsif
permlinkre-holger80-multisignature-transaction-guide-for-beempy-20190105t131955046z
categorysteem
json_metadata{"image":["https:\/\/pennsif.com\/wp-content\/uploads\/2018\/08\/adollaraday-linear-400x98.jpg"],"tags":["steem"],"app":"steemit\/0.1","links":["https:\/\/steemit.com\/steem\/@pennsif\/sosdailynewsnewsaboutthestateofsteem4january2019-r5y1nirbvb","https:\/\/steemit.com\/dtube\/@pennsif\/amwntxt3","https:\/\/steemit.com\/mspwaves\/@pennsif\/schedule-of-radio-shows-podcasts-and-social-broadcasts-supported-by-dsound-week-beginning-31-december-2018","https:\/\/steemit.com\/adollaraday\/@adollaraday\/a-dollar-a-day-charitable-giving-project-ususd-5000-donated-in-8-months-we-made-it"]}
created2019-01-05 13:19:57
last_update2019-01-05 13:19:57
depth1
children0
net_rshares0
last_payout2019-01-12 13:19:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length1,002
author_reputation117,189,550,617,766
root_title"Multisignature Transaction Guide for beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@thecryptodrive ·
$0.07
Congrats @holger80, 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.
πŸ‘  
properties (23)
post_id68,527,116
authorthecryptodrive
permlinkre-holger80-multisignature-transaction-guide-for-beempy-20190108t065102963z
categorysteem
json_metadata{"tags":["steem"],"app":"steemit\/0.1","users":["holger80"]}
created2019-01-08 06:51:03
last_update2019-01-08 06:51:03
depth1
children1
net_rshares138,043,297,017
last_payout2019-01-15 06:51:03
cashout_time1969-12-31 23:59:59
total_payout_value0.054 SBD
curator_payout_value0.018 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length193
author_reputation29,361,468,835,118
root_title"Multisignature Transaction Guide for beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@holger80 ·
Thanks a lot for the votes.
πŸ‘  
properties (23)
post_id68,545,718
authorholger80
permlinkre-thecryptodrive-re-holger80-multisignature-transaction-guide-for-beempy-20190108t152009980z
categorysteem
json_metadata{"tags":["steem"],"app":"steemit\/0.1"}
created2019-01-08 15:20:12
last_update2019-01-08 15:20:12
depth2
children0
net_rshares602,302,447
last_payout2019-01-15 15:20:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length27
author_reputation74,893,554,750,345
root_title"Multisignature Transaction Guide for beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@steemvoter ·
@buildteam and @steemvoter are proud to award you a Steemvoter Guild vote for your efforts in contributing to the multisig bounty.

<center>https://steemitimages.com/DQmQyUEXjJ16T7Gz76ZxrsykLPgrN2SYW26ike8kWpKJ3ea/image.png</center>
πŸ‘  
properties (23)
post_id68,527,235
authorsteemvoter
permlinkre-holger80-multisignature-transaction-guide-for-beempy-20190108t065450547z
categorysteem
json_metadata{"image":["https:\/\/steemitimages.com\/DQmQyUEXjJ16T7Gz76ZxrsykLPgrN2SYW26ike8kWpKJ3ea\/image.png"],"tags":["steem"],"app":"steemit\/0.1","users":["buildteam","steemvoter"]}
created2019-01-08 06:54:51
last_update2019-01-08 06:54:51
depth1
children0
net_rshares12,183,389,372
last_payout2019-01-15 06:54:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length232
author_reputation199,016,410,471,466
root_title"Multisignature Transaction Guide for beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)