Multisig Vault proposal

Introduction

For now we need a multi-signature Vault but the concept of multi-sig will be needed in other contexts as well.

For this reason, the multi-sig component should be decoupled from the vault implementation as the vault is just one of its possible usages.

The design of the Vault should be done such that most of the implementation is shared between the single-sig and the multi-sig implementation. 

NOTE: I'm not up to date with the design of the deployerId / rootAuth so that part might not fit with the current work but it can certainly be adapted without too much effort.

Components

MultiSigVault

create : (owners : List[(PublicKey, Int)], requiredWeight : Int) → Vault

transfer : (deployerId : DeployerId, to : RevAddress, amount : Int)

Signer

create : (owners : List[(PublicKey, Int)], requiredWeight : Int, whenSigned : (signers : List[PublicKey], message : List[Any]) → Unit) → Signer

sign : (this : Signer, (message : List[Any]) → SigningSession

SigningSession

create : (owners : List[(PublicKey, Int)], requiredWeight : Int, deployerId : DeployerId, message : List[Any]) → SigningSession

sign : (deployerId : DeployerId, message : List[Any]) → Unit