[{"data":1,"prerenderedAt":558},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fcli\u002Fatomic-swaps-cli-user-guide":3,"docs-surround-\u002Fdocs\u002Fcli\u002Fatomic-swaps-cli-user-guide":548},{"id":4,"title":5,"body":6,"description":539,"extension":540,"image":541,"meta":542,"navTitle":541,"navigation":543,"path":544,"seo":545,"stem":546,"__hash__":547},"docs\u002Fdocs\u002Fcli\u002Fatomic-swaps-cli-user-guide.md","Atomic Swaps CLI User Guide",{"type":7,"value":8,"toc":521},"minimark",[9,13,17,23,28,33,53,69,74,77,82,95,98,108,113,119,123,129,133,137,146,149,155,159,165,169,175,179,182,188,193,200,210,214,220,224,230,234,237,243,250,253,259,266,272,275,281,285,288,294,316,319,322,325,329,332,336,344,347,351,357,361,367,370,373,378,381,385,391,395,401,404,406,412,416,420,429,432,438,441,447,451,453,459,464,466,472,476,481,483,489,492,495,499,513,515,518],[10,11,5],"h1",{"id":12},"atomic-swaps-cli-user-guide",[14,15,16],"p",{},"Atomic Swaps are a peer-to-peer marketplace built directly into your Beam wallet that allows users to swap Beam for another cryptocurrency. Trade your Beam for Bitcoin, Ehtereum, LiteCoin, DOGE, and more!",[14,18,19],{},[20,21,22],"strong",{},"Atomic Swaps is in beta.",[14,24,25],{},[20,26,27],{},"DO NOT USE THIS HIGHLY ADVANCED FEATURE FOR LARGE SUMS OF MONEY",[14,29,30],{},[20,31,32],{},"For Electrum we support only Legacy type seeds and SSL connection",[14,34,35,38,50],{},[20,36,37],{},"For Bitcoin use version",[39,40,44],"a",{"href":41,"rel":42},"https:\u002F\u002Fbitcoin.org\u002Fen\u002Fdownload",[43],"nofollow",[20,45,46],{},[47,48,49],"code",{},"Bitcoin_core_v0.17.1",[20,51,52],{},".",[14,54,55,58,67],{},[20,56,57],{},"For Litecoin use version",[39,59,62],{"href":60,"rel":61},"https:\u002F\u002Flitecoin.org\u002F#download",[43],[20,63,64],{},[47,65,66],{},"Litecoin_v0.17.1",[20,68,52],{},[70,71,73],"h2",{"id":72},"perform-an-atomic-swap-with-litecoin","Perform an Atomic Swap with LiteCoin",[14,75,76],{},"Using Alice and Bob as an example, we will go over how to perform an Atomic Swap of Alice's Beam for Bob's LiteCoin (LTC).",[78,79,81],"h3",{"id":80},"run-a-full-ltc-node","Run a full LTC node",[14,83,84,85,88,89,94],{},"Bob and Alice must configure their LTC node to allow RPC access either through the command line or edit their",[47,86,87],{},"config","file according to the ",[39,90,93],{"href":91,"rel":92},"https:\u002F\u002Flitecoin.info\u002Findex.php\u002FLitecoin.conf",[43],"LTC documentation"," (for this example, we will use standard node and RPC ports).",[14,96,97],{},"Alice and Bob can run a full LTC node by entering the following command:",[99,100,105],"pre",{"className":101,"code":103,"language":104},[102],"language-text"," .\u002Flitecoind -server -datadir=\"path_to_litecoin_wallet_data\" -rpcuser= -rpcpassword= -printtoconsole\n","text",[47,106,103],{"__ignoreMap":107},"",[109,110,112],"h4",{"id":111},"alices-ltc-node","Alice's LTC node",[99,114,117],{"className":115,"code":116,"language":104},[102],".\u002Flitecoind -server -datadir=\"Alice\u002Fpath_to_litecoin_wallet_data\" -rpcuser=Alice -rpcpassword=123 -printtoconsole\n",[47,118,116],{"__ignoreMap":107},[109,120,122],{"id":121},"bobs-ltc-node","Bob's LTC node",[99,124,127],{"className":125,"code":126,"language":104},[102]," .\u002Flitecoind -server -datadir=\"Bob\u002Fpath_to_litecoin_wallet_data\" -rpcuser=Bob -rpcpassword=123 -printtoconsole\n",[47,128,126],{"__ignoreMap":107},[109,130,132],{"id":131},"the-nodes-must-be-synced-to-the-current-blockchain-height-before-an-atomic-swap-can-occur","The nodes must be synced to the current blockchain height before an Atomic Swap can occur.",[78,134,136],{"id":135},"run-a-full-beam-node","Run a full Beam node",[14,138,139,140,145],{},"Please refer to this ",[39,141,144],{"href":142,"rel":143},"https:\u002F\u002Fbeamx.gitbook.io\u002Fcli-guide\u002F#synching-with-a-specific-node",[43],"guide"," for setting up a full Beam node.",[14,147,148],{},"Users can check their LTC balance by entering the following command:",[99,150,153],{"className":151,"code":152,"language":104},[102],".\u002Flitecoin-cli -rpcuser= -rpcpassword= getbalance\n",[47,154,152],{"__ignoreMap":107},[109,156,158],{"id":157},"alices-ltc-balance","Alice's LTC balance",[99,160,163],{"className":161,"code":162,"language":104},[102]," .\u002Flitecoin-cli -rpcuser=Alice -rpcpassword=123 getbalance\n",[47,164,162],{"__ignoreMap":107},[109,166,168],{"id":167},"bobs-ltc-balance","Bob's LTC balance",[99,170,173],{"className":171,"code":172,"language":104},[102]," .\u002Flitecoin-cli -rpcuser=Bob -rpcpassword=123 getbalance\n",[47,174,172],{"__ignoreMap":107},[78,176,178],{"id":177},"initialize-atomic-swap-settings","Initialize Atomic Swap settings",[14,180,181],{},"To configure the Atomic Swap settings, enter the following command:",[99,183,186],{"className":184,"code":185,"language":104},[102]," .\u002Fbeam-wallet set_swap_settings --swap_coin=ltc --swap_wallet_addr= --swap_wallet_user= --swap_wallet_pass= --swap_feerate=\u003CLitecoin fee rate(Photons\u002FKb)> --active_connection=core\n",[47,187,185],{"__ignoreMap":107},[14,189,190,52],{},[20,191,192],{},"Each cryptocurrency has its own transaction fees",[14,194,195,196,199],{},"Avoid transaction jamming or failure by double-checking the",[47,197,198],{},"--swap_feerate","for each currency before initiating an Atomic Swap.",[14,201,202,203,205,206,209],{},"LTC, for example, has a",[47,204,198],{},"per 1KB of transaction size. LiteCoin's",[47,207,208],{},"--swap_amount","is denominated in \"photons.\" 1 LTC = 1000000 photons, which is denominated in Beams while also offering fixed fee rates, regardless of transaction size.",[109,211,213],{"id":212},"configuring-swap-settings-for-alice","Configuring swap settings for Alice",[99,215,218],{"className":216,"code":217,"language":104},[102]," .\u002Fbeam-wallet set_swap_settings --swap_coin=ltc --swap_wallet_addr=127.0.0.1:13300 --swap_wallet_user=Alice --swap_wallet_pass=123 --swap_feerate=90000 --active_connection=core\n",[47,219,217],{"__ignoreMap":107},[109,221,223],{"id":222},"configuring-swap-settings-for-bob","Configuring swap settings for Bob",[99,225,228],{"className":226,"code":227,"language":104},[102]," .\u002Fbeam-wallet set_swap_settings --swap_coin=ltc --swap_wallet_addr=127.0.0.1:13400 --swap_wallet_user=Bob --swap_wallet_pass=123 --swap_feerate=90000 --active_connection=core\n",[47,229,227],{"__ignoreMap":107},[78,231,233],{"id":232},"swapping-ltc-for-beam","Swapping LTC for Beam",[14,235,236],{},"Both parties can initiate the Atomic Swap by entering the following command:",[99,238,241],{"className":239,"code":240,"language":104},[102]," .\u002Fbeam-wallet swap_init -n  --amount= --swap_coin=ltc --swap_amount= --swap_beam_side\n",[47,242,240],{"__ignoreMap":107},[14,244,245,246,249],{},"The parameter",[47,247,248],{},"--swap_beam_side"," is used when the other party (Alice) swaps Beam for a different cryptocurrency.",[14,251,252],{},"Bob enters the following command:",[99,254,257],{"className":255,"code":256,"language":104},[102]," -.\u002Fbeam-wallet swap_init -n \"eu-node01.mainnet.beam.mw:8100\" --amount=10 --swap_coin=ltc --swap_amount=2000000000\n",[47,258,256],{"__ignoreMap":107},[14,260,261,262,265],{},"Bob must copy the swap token and forward it to Alice. After, Bob can enter the",[47,263,264],{},"--wallet_listen","command:",[99,267,270],{"className":268,"code":269,"language":104},[102],".\u002Fbeam-wallet listen -n \"eu-node01.mainnet.beam.mw:8100\"\n",[47,271,269],{"__ignoreMap":107},[14,273,274],{},"Alice can accept the swap by entering the following command:",[99,276,279],{"className":277,"code":278,"language":104},[102]," .\u002Fbeam-wallet swap_accept -n \"eu-node01.mainnet.beam.mw:8100\" --swap_token=316sveQtJrhxzuBy2zJHTp8aHfPgdz2FycrR8n9fs5CbXqoq1Be4Z9qEPnz5HjxuBZgmQpxWd8Dy9icQYKVn1e23cP7x5FHcteyEXk11QQ6CQLQJ3ERk653xgzXnBNfiiX8Pw8acyuNqCHPsF699oiDkxgEAXtV5mrKmYWh1zW\n",[47,280,278],{"__ignoreMap":107},[78,282,284],{"id":283},"accepting-swap-offer","Accepting swap offer",[14,286,287],{},"If Alice accepts the swap, it will create a swap transaction, and the LTC and Beam will lock on Bob's blockchain.",[14,289,290,293],{},[20,291,292],{},"Each blockchain has its own block generation time",". Average block generation times (roughly):",[295,296,297,304,310],"ul",{},[298,299,300,303],"li",{},[20,301,302],{},"LiteCoin",": two and a half (2.5) minutes.",[298,305,306,309],{},[20,307,308],{},"Beam",": one minute.",[298,311,312,315],{},[20,313,314],{},"Bitcoin",": ten minutes.",[14,317,318],{},"After six blocks, Bob will redeem Alice's Beam coins, revealing a secret transaction code and completing Bob's portion of the Atomic Swap. ‌",[14,320,321],{},"Alice will redeem Bob's LTCs using the secret transaction code revealed to her, completing the Atomic Swap.",[14,323,324],{},"Bob and Alice can return to their respective Beam and LTC wallets to confirm the details of the Atomic Swap.",[70,326,328],{"id":327},"perform-an-atomic-swap-with-bitcoin","Perform an Atomic Swap with Bitcoin",[14,330,331],{},"Using Alice and Bob as an example, we will go over how to perform an Atomic Swap of Alice's Beam coins for Bob's Bitcoin (BTC).",[78,333,335],{"id":334},"run-a-full-btc-node","Run a full BTC node",[14,337,338,339,94],{},"Bob and Alice must configure their BTC node to allow RPC access either through the command line or edit their config files according to the ",[39,340,343],{"href":341,"rel":342},"https:\u002F\u002Fen.bitcoin.it\u002Fwiki\u002FRunning_Bitcoin",[43],"BTC documentation",[14,345,346],{},"Alice and Bob can run a full BTC node by entering the following command:",[109,348,350],{"id":349},"alices-btc-node","Alice's BTC node",[99,352,355],{"className":353,"code":354,"language":104},[102],".\u002Fbitcoind -server -datadir=\"Alice\u002Fpath_to_litecoin_wallet_data\" -rpcuser=Alice -rpcpassword=123 -printtoconsole\n",[47,356,354],{"__ignoreMap":107},[109,358,360],{"id":359},"bobs-btc-node","Bob's BTC node",[99,362,365],{"className":363,"code":364,"language":104},[102],".\u002Fbitcoind -server -datadir=\"Bob\u002Fpath_to_litecoin_wallet_data\" -rpcuser=Bob -rpcpassword=123 -printtoconsole\n",[47,366,364],{"__ignoreMap":107},[109,368,132],{"id":369},"the-nodes-must-be-synced-to-the-current-blockchain-height-before-an-atomic-swap-can-occur-1",[78,371,136],{"id":372},"run-a-full-beam-node-1",[14,374,139,375,145],{},[39,376,144],{"href":142,"rel":377},[43],[14,379,380],{},"Alice and Bob can check their BTC balance by entering the following command",[109,382,384],{"id":383},"alices-btc-balance","Alice's BTC balance",[99,386,389],{"className":387,"code":388,"language":104},[102],".\u002Fbitcoin-cli -rpcuser=Alice -rpcpassword=123 getbalance\n",[47,390,388],{"__ignoreMap":107},[109,392,394],{"id":393},"bobs-btc-balance","Bob's BTC balance",[99,396,399],{"className":397,"code":398,"language":104},[102],".\u002Fbitcoin-cli -rpcuser=Bob -rpcpassword=123 getbalance\n",[47,400,398],{"__ignoreMap":107},[78,402,178],{"id":403},"initialize-atomic-swap-settings-1",[14,405,181],{},[99,407,410],{"className":408,"code":409,"language":104},[102],".\u002Fbeam-wallet set_swap_settings --swap_coin=btc --swap_wallet_addr= --swap_wallet_user= --swap_wallet_pass= --swap_feerate=\u003CBitcoin fee rate(Satoshs\u002FKb)> --active_connection=core\n",[47,411,409],{"__ignoreMap":107},[14,413,414,52],{},[20,415,192],{},[14,417,195,418,199],{},[47,419,198],{},[14,421,422,423,425,426,428],{},"BTC, for example, has a",[47,424,198],{},"per 1KB of transaction size. Bitcoin's",[47,427,208],{},"is denominated in \"satoshis.\" 1 BTC = 1000000 satoshis, compared to Beam, which is denominated in Beams while also offering fixed fee rates, regardless of transaction size.",[109,430,213],{"id":431},"configuring-swap-settings-for-alice-1",[99,433,436],{"className":434,"code":435,"language":104},[102],".\u002Fbeam-wallet set_swap_settings --swap_coin=btc --swap_wallet_addr=127.0.0.1:13300 --swap_wallet_user=Alice --swap_wallet_pass=123 --swap_feerate=90000 --active_connection=core\n",[47,437,435],{"__ignoreMap":107},[109,439,223],{"id":440},"configuring-swap-settings-for-bob-1",[99,442,445],{"className":443,"code":444,"language":104},[102],".\u002Fbeam-wallet set_swap_settings --swap_coin=ltc --swap_wallet_addr=127.0.0.1:13400 --swap_wallet_user=Bob --swap_wallet_pass=123 --swap_feerate=90000 --active_connection=core\n",[47,446,444],{"__ignoreMap":107},[78,448,450],{"id":449},"swapping-btc-for-beam","Swapping BTC for Beam",[14,452,236],{},[99,454,457],{"className":455,"code":456,"language":104},[102],".\u002Fbeam-wallet swap_init -n  --amount= --swap_coin=btc --swap_amount= --swap_beam_side\n",[47,458,456],{"__ignoreMap":107},[14,460,245,461,463],{},[47,462,248],{},"is used when the other party (Alice) swaps Beam for a different cryptocurrency.",[14,465,252],{},[99,467,470],{"className":468,"code":469,"language":104},[102],".\u002Fbeam-wallet swap_init -n \"eu-node01.mainnet.beam.mw:8100\" --amount=10 --swap_coin=btc --swap_amount=100000000\n",[47,471,469],{"__ignoreMap":107},[14,473,261,474,265],{},[47,475,264],{},[99,477,479],{"className":478,"code":269,"language":104},[102],[47,480,269],{"__ignoreMap":107},[14,482,274],{},[99,484,487],{"className":485,"code":486,"language":104},[102]," .\u002Fbeam-wallet swap_accept -n \"eu-node01.mainnet.beam.mw:8100\" --swap_token=316w4oB5hCz2qeVNrtteAEZXhxxx2HBX8v1Ped1FhveJor5JbChz2xXGfi2LkKqVLu8kU4vEoZCV3UbmwoBZX2ABJzmbxLPxpCTVZr1oefwsJDzYU2BUXXDTf4VjtBJfsP3yrozPT4bz1ZTdDTzRS2yU3VYvnamuSRSfEPatha\n",[47,488,486],{"__ignoreMap":107},[78,490,284],{"id":491},"accepting-swap-offer-1",[14,493,494],{},"If Alice accepts the swap, it will create a swap transaction, and the BTC and Beam will lock on Bob's blockchain.",[14,496,497,293],{},[20,498,292],{},[295,500,501,505,509],{},[298,502,503,303],{},[20,504,302],{},[298,506,507,309],{},[20,508,308],{},[298,510,511,315],{},[20,512,314],{},[14,514,318],{},[14,516,517],{},"Alice will redeem Bob's BTCs using the secret transaction code revealed to her, completing the Atomic Swap.",[14,519,520],{},"Bob and Alice can return to their respective Beam and BTC wallets to confirm the details of the Atomic Swap.",{"title":107,"searchDepth":522,"depth":522,"links":523},2,[524,532],{"id":72,"depth":522,"text":73,"children":525},[526,528,529,530,531],{"id":80,"depth":527,"text":81},3,{"id":135,"depth":527,"text":136},{"id":177,"depth":527,"text":178},{"id":232,"depth":527,"text":233},{"id":283,"depth":527,"text":284},{"id":327,"depth":522,"text":328,"children":533},[534,535,536,537,538],{"id":334,"depth":527,"text":335},{"id":372,"depth":527,"text":136},{"id":403,"depth":527,"text":178},{"id":449,"depth":527,"text":450},{"id":491,"depth":527,"text":284},"The command line guide for Atomic Swaps, i.e., exchanging two different cryptocurrencies from separate blockchains in a trust-less and decentralized manner.","md",null,{},true,"\u002Fdocs\u002Fcli\u002Fatomic-swaps-cli-user-guide",{"title":5,"description":539},"docs\u002Fcli\u002Fatomic-swaps-cli-user-guide","zUuYCpquLSpHsRUS56T1Vv6KfnU9ph7H9MsTSjXGV3E",[549,554],{"title":550,"path":551,"stem":552,"description":553,"children":-1},"Beam command line (CLI) guide","\u002Fdocs\u002Fcli\u002Freadme","docs\u002Fcli\u002FREADME","The official Beam command line reference guide!",{"title":555,"path":556,"stem":557,"description":107,"children":-1},"Beam Wallet CLI Guide Over TOR Network","\u002Fdocs\u002Fcli\u002Fbeam-wallet-cli-guide-over-tor-network","docs\u002Fcli\u002Fbeam-wallet-cli-guide-over-tor-network",1783006042697]