First, you need to create a receiving address that holds your "2 of 3 spendable" funds.
For that, you need three pubkeys (pubA, pubB and pubC).
Form a multisig script/address with those three pubkeys.
You can use Bitcoin Cores call
addmultisigaddress nrequired ["key",...].
All three participants should do that with the exact same order of the pubkeys.
addmultisigaddress 2 <pubA> <pubB> <pubC>
This will spitt out a multisig address.
The 2 stands for how many signatures are required to sign the input later.
If you want the redeem-script (expert users), call
(there is a string object called
Receive coins with your new created multisig address.
Spending the coins/inputs requires now 2 signatures. If you use bitcoin-core, you need to create a (raw)transaction spending that particular input.
For that, you need to know the transaction-id and the output index of the received coin you want to spend.
Do something like
You will get a raw transaction which you then can sign (on your side, first signature or two required).
signrawtransaction <hex from createrawtransaction>
You can pass the partial signed transaction to other participants and let them so the same thing:
signrawtransaction <hex from partial signed transaction>
If you use
addmultisigaddress you don't need to pass around the reedem-script and
signtransaction's parameters are much simpler.