The basic idea is to follow the regular instructions for atomic exchanges but replace a number of stages as follows:
- On the first side, instead of preparelockunspentfrom use createrawsendfrom + signrawtransaction (with the private key passed as a parameter) + sendrawtransaction to create an unspent transaction output (UTXO) with the desired amount. Use the lock keyword with createrawsendfrom to protect the UTXOs used during this process.
- On the first side, instead of createrawexchange use createrawtransaction (with the transaction output made in the step described above) + signrawtransaction (again with the private key passed) to create the offer of exchange. Set the sighashtype of signrawtransaction to SINGLE|ANYONECANPAY here, to ensure the transaction is not finalized and can be added to on the second side.
- On the second side, instead of preparelockunspentfrom use the same steps described in step 1 above.
- On the second side, instead of appendrawexchange (or completerawexchange) use appendrawtransaction (with the transaction output created in step 3) + signrawtransaction (again passing the private key) to accept the offer of exchange before transmitting it in the usual way via sendrawtransaction.
We'll aim to produce some actual step-by-step documentation for this shortly.