I have read about the ATOMIC SWAP
, I could find only the concept level and could not find technically. Is there any doc about atomic swap to achieve that technically and code sources to achieve this.
3 Answers
Currently atmoic swaps aren't really done except in really special occasions and with specially crafted transactions. There aren't really services that offer atomic swaps and existing software cannot perform atomic swaps without special modifications.
There is currently ongoing work on creating actually usable and easy to use atomic swap software. Most of this is working through the Lightning Network and HTLCs.
Some links that may help you do atomic swaps using Hashed Time-Lock Contracts:
Doing it with bitcoin-qt: HTLC (Hash Time Lock Contract) using bitcoin-qt
Doing it with libbitcoin: http://aaronjaramillo.org/libbitcoin-cross-chain-swaps-with-htlcs
To my knowledge, there are no wallets that currently support atomic swaps using HTLC. But the links above should give you some help in doing it somewhat "manually".
Here is a relevant article https://web.archive.org/web/20181003140221/https://wiki.swap.online/atomic-swap-on-tether/ with technical details how to perform BTC to USDT atomic swap. And it actually works in their crypto wallet project.