cyber.msig
system smart contract is used to both sign and send multi-signature transactions to the blockchain, as well as to offer the transaction to another user for signing.threshold=3
is considered to be obtained if the signature is affixed either with one account with the same threshold value, or with two accounts with values of «2» and «1», or three with «1».propose
action is used to create a multi-signature transaction offer (proposed transaction), which requires permission from third-party accounts.proposer
— name of account, author of a multi-signature transaction.proposal_name
— the unique name assigned to the multi-signature transaction when it is created. This parameter, in conjunction with the proposer parameter, uniquely identifies a multi-signature transaction.requested
— the unique name assigned to the multi-signature transaction when it is created. This parameter, in conjunction with the proposer parameter, uniquely identifies a multi-signature transaction.trx
— proposed transaction.description
— a field to describe a proposal. alice
, bob
, and carol
accounts created a common multisig account, for which transactions on behalf of which 2 signatures from 3 are sufficient. To work with this account, bob
and alice
decided to use separate keys, adding them to the msig
permission. Now, to send a transaction to the network, alice
can offer it for signing, indicating all three participants (with the required permissions) in the requested list:Side note After the multi-subscription transaction is completed, its nameproposal_name
can be reused for other transactions (by theproposer
account). However, thisproposal_name
cannot be reused unless permission was not obtained to execute a multi-subscription transaction.
approve
action is used to send permission from an account in the requested list to execute a multi-subscription transaction.proposer
— name of account, author of a multi-signature transaction..proposal_name
— The unique name assigned to the multi-signature transaction when it is created. This parameter, in conjunction with the proposer parameter, uniquely identifies a multi-signature transaction.level
— permission by which the account gives its consent to the implementation of the transaction proposed for signing.proposal_hash
— optional parameter, «hash amount» of the multi-signature transaction. The parameter is used to control the occurrence of changes in a multi-signature transaction since the call to propose. Level permission is not issued in the event of a «hash amounts» mismatch specified by proposal_hash and obtained for an incoming transaction. alice
, member accounts must approve with the permission specified in propose and sign the transaction with a signature that satisfies this permission. For greater security, the proposal_hash
parameter can be used:unapprove
action is used by an account in the requested list to revoke permission previously granted by this account to execute a multi-signature transaction in case of a change in decision.proposer
— name of account, author of a multi-signature transaction.proposal_name
— the unique name assigned to the multi-signature transaction when it is created. This parameter, in conjunction with the proposer parameter, uniquely identifies a multi-signature transaction.level
— revoked permissionunapprove
action, authorization of the account specified in the level parameter is required.alice
should unapprove with the permission specified in propose and sign the transaction with a signature that satisfies this permission:cancel
action is used to cancel a multi-signature transaction offer.proposer
— name of account, author of a multi-signature transaction.proposal_name
— the unique name assigned to the multi-signature transaction when it is created. This parameter, in conjunction with the proposer parameter, uniquely identifies a multi-signature transaction.canceler
— the name of the account that cancels its execution. alice
has made a decision not to send it to the network (see examples above). She can cancel the transaction as the creator of the proposed transaction:schedule
action is intended to record a fact of reaching a consensus. The transaction will need to be executed using exec
after a delay. Proposal signers can withdraw their signature while waiting. In this case, proposed transaction can not be executed if it does not have enough permissions to perform all operations.proposer
— account, author of a multi-signature transaction.proposal_name
— unique name assigned to multi-signature transaction when it is created.actor
— account whose signature is required to execute multi-signature transaction.exec
action is called to execute a multi-signature transaction.proposer
— name of account, author of a multi-signature transaction.proposal_name
— the unique name assigned to the multi-signature transaction when it is created. This parameter, in conjunction with the proposer parameter, uniquely identifies a multi-signature transaction.executer
— the name of the account performing the multi-signature transaction. An executor account can be either an actor or any other user who provides payment for the resources used. A transaction is executed if it contains the required number of permissions. exec
action, authorization of the account specified in the executer parameter is required.exec
:invalidate
action is used to revoke all permissions previously issued by the account for performing multi-signature transactions. The action applies to all proposed transactions that are at the voting stage.account
— the name of the account whose previously issued permissions to perform multi-signature transactions must be invalidated. carol
learned that her key was stolen. It's time to cancel all proposed transactions (and change the key):