user27079: Can somebody help me with step-by-step list of how to create a multi signature 2-of-3 transaction using bitcoinj api?

user30396: you have an exemple in bitcoinj documentation :
https://bitcoinj.github.io/working-with-contracts
Let’s see how to do it:
// Create a random key.
ECKey clientKey = new ECKey();
// We get the other parties public key from somewhere ...
ECKey serverKey = new ECKey(null, publicKeyBytes);

// Prepare a template for the contract.
Transaction contract = new Transaction(params);
List<ECKey> keys = ImmutableList.of(clientKey, serverKey);
// Create a 2-of-2 multisig output script.
Script script = ScriptBuilder.createMultiSigOutputScript(2, keys);
// Now add an output for 0.50 bitcoins that uses that script.
Coin amount = Coin.valueOf(0, 50);
contract.addOutput(amount, script);

// We have said we want to make 0.5 coins controlled by us and them.
// But it's not a valid tx yet because there are no inputs.
Wallet.SendRequest req = Wallet.SendRequest.forTx(contract);
wallet.completeTx(req);   // Could throw InsufficientMoneyException

// Broadcast and wait for it to propagate across the network.
// It should take a few seconds unless something went wrong.
peerGroup.broadcastTransaction(req.tx).get();


user3697: ECKey keyA = <something>
ECKey keyB = <something>
ECKey keyC = <something>

Transaction aTransaction = new Transaction(params);
List<ECKey> keyList = ImmutableList.of(keyA, keyB, keyC);


Script script = ScriptBuilder.createMultiSigOutputScript(2, keyList); //2 of 3 multisig
Coin value = Coin.valueOf(0,10); // 0.1 btc
aTransaction.addOutput(value, script);
Wallet.SendRequest request = Wallet.SendRequest.forTx(aTransaction.addOutput);
wallet.completeTx(request); // fill in coins

See mikes documentation

27079: <p>Can somebody help me with step-by-step list of how to create a multi signature 2-of-3 transaction using bitcoinj api?</p>
 30396: <p>you have an exemple in bitcoinj documentation :</p>

<p><a href="https://bitcoinj.github.io/working-with-contracts" rel="nofollow">https://bitcoinj.github.io/working-with-contracts</a></p>

<p>Let’s see how to do it:</p>

<pre><code>// Create a random key.
ECKey clientKey = new ECKey();
// We get the other parties public key from somewhere ...
ECKey serverKey = new ECKey(null, publicKeyBytes);

// Prepare a template for the contract.
Transaction contract = new Transaction(params);
List&lt;ECKey&gt; keys = ImmutableList.of(clientKey, serverKey);
// Create a 2-of-2 multisig output script.
Script script = ScriptBuilder.createMultiSigOutputScript(2, keys);
// Now add an output for 0.50 bitcoins that uses that script.
Coin amount = Coin.valueOf(0, 50);
contract.addOutput(amount, script);

// We have said we want to make 0.5 coins controlled by us and them.
// But it's not a valid tx yet because there are no inputs.
Wallet.SendRequest req = Wallet.SendRequest.forTx(contract);
wallet.completeTx(req);   // Could throw InsufficientMoneyException

// Broadcast and wait for it to propagate across the network.
// It should take a few seconds unless something went wrong.
peerGroup.broadcastTransaction(req.tx).get();
</code></pre>
 3697: <pre><code>ECKey keyA = &lt;something&gt;
ECKey keyB = &lt;something&gt;
ECKey keyC = &lt;something&gt;

Transaction aTransaction = new Transaction(params);
List&lt;ECKey&gt; keyList = ImmutableList.of(keyA, keyB, keyC);


Script script = ScriptBuilder.createMultiSigOutputScript(2, keyList); //2 of 3 multisig
Coin value = Coin.valueOf(0,10); // 0.1 btc
aTransaction.addOutput(value, script);
Wallet.SendRequest request = Wallet.SendRequest.forTx(aTransaction.addOutput);
wallet.completeTx(request); // fill in coins
</code></pre>

<p>See mikes <a href="http://bitcoinj.github.io/working-with-contracts#creating-multi-signature-outputs" rel="nofollow">documentation</a></p>
