2

Is there a way to do multisig transactions on EOS? Which wallets support such a feature to split up a private key and requires all parties to be present before spending it?

2

Yes, multisig is natively supported in the permission model of EOSIO. There used to be an article in the official documentation in previous versions, but there doesn't seem to be a page on this yet in the v1.3.0 docs.

However, it is quite straightforward to enable a multisig mechanism on an account. For instance, for a multisig account that requires 2-of-2 signatures for using the active permission, you can set the weight threshold required to 2, and the weight of each of the two active permissions of the accounts to 1. Thus, to reach the threshold, you'd need both accounts to provide an added weight of 2. This can be done using cleos as follows:

$ cleos set account permission <multisig-account> active '{"threshold":2,"keys":[],"accounts":[{"permission":{"actor":"<first-account>","permission":"active"},"weight":1},{"permission":{"actor":"<second-account>","permission":"active"},"weight":1}],"waits":[]}' owner -p <multi-sig-account>@owner

Another example would be setting <multisig-account>@owner to reflect a 2-of-3 permission that requires owner permissions from at least 2 accounts as below:

$ cleos set account permission <multisig-account> owner '{"threshold":2,"keys":[],"accounts":[{"permission":{"actor":"<first-account>","permission":"owner"},"weight":1},{"permission":{"actor":"<second-account>","permission":"owner"},"weight":1},{"permission":{"actor":"<third-account>","permission":"owner"},"weight":1}],"waits":[]}' -p <multi-sig>@owner

There are blog posts that attempt to give more examples, and for a more detailed discussion of the ideas of permissions and accounts in EOSIO, the whitepaper has a section on it and provides a visualisation of the concept as below:

UI diagram from the paper


Beyond working directly with the native permissions system, one could use the eosio.msig contract that is accessible via the cleos multisig subcommand to emulate multisig. This way, one can make proposals that can be reviewed and approved by others. The README.md file provides more details on the process.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.