Skip to content

Instantly share code, notes, and snippets.

@wakiyamap
Created January 22, 2018 17:15
Show Gist options
  • Save wakiyamap/6afdd9d445e1b99216487ceff2e746e5 to your computer and use it in GitHub Desktop.
Save wakiyamap/6afdd9d445e1b99216487ceff2e746e5 to your computer and use it in GitHub Desktop.
A
$ monacoin-cli getnewaddress
MBYkbKdtF3tjuc5q1ZkPoH1x7kErYfEqqi
B
$ bitcoin-cli getnewaddress
12W4bW2PtVmgu65XRWYXPKRrVPs8GZ2jbL
A
$ btcatomicswap --rpcuser=user --rpcpass=password initiate 12W4bW2PtVmgu65XRWYXPKRrVPs8GZ2jbL 0.1
Secret: 9d009a5b23e172bea4bfa22c854bd0cfe10059a51dafae1cd32cffffac8d4e13
Secret hash: 91dd54d0e3ff01f6b6422f2b9e7cf9e9232e859e95af8302ef3ca00e7e8ac5f3
Contract fee: 0.00023552 BTC (0.00105614 BTC/kB)
Refund fee: 0.00030808 BTC (0.00107345 BTC/kB)
Contract (3EMaegrYpegSLEXVT3wujiE9mVy2RG7Tod):
63a82091dd54d0e3ff01f6b6422f2b9e7cf9e9232e859e95af8302ef3ca00e7e8ac5f38876a9141077308295fbbe5f801903377fd567e01294bf1d670432b5685ab17576a9140d8c4afa5e06f8babd8276c5ca6b634675ead1086888ac
Contract transaction (e769e917ab4e49f6d58243efab7745dbd1550ef39610a83ed0c157867ea26079):
0200000001acb0c63314f51bbc3f9d69321a3e691872a50333fbd614d704f17a37bf2fa0b0000000006a47304402204b3cd01822576d3105334f02357df0cc373866fa523eec94c0e7a81bde60d66402201d28e9df6d65573f3118ad9f6df12a03f969b314ed7f574c52a2ea6a455c8105012102f2cdd936900b239758a68c98094ce97f7238bacf629cae8e0c33eb6a8c00cffcfeffffff02809698000000000017a9148aeca27fdbdcfc3808a72b95eedb5b96cba77a268740e60e00000000001976a914f6f81d4d4de9f74beadf821f733bf0410009e0cd88ac00000000
Refund transaction (2c1ee5701518e00019a74669faf7c2b8255e3a37ea3ae431cec9e8859e72cc92):
02000000017960a27e8657c1d03ea81096f30e55d1db4577abef4382d5f6494eab17e969e700000000ca4730440220313a32338a9b6d6b02d5e4cadbdc000cc8c6879094418aa426673a1309a4115202204de614b8c489ddf5a94d639ef8de50de036fd931ec2c08cb39abe9fa3bc0f84e012102c0780444d249f0e0292c66eaa8f6111f19eae867b66f26d912dea06235e988e6004c5d63a82091dd54d0e3ff01f6b6422f2b9e7cf9e9232e859e95af8302ef3ca00e7e8ac5f38876a9141077308295fbbe5f801903377fd567e01294bf1d670432b5685ab17576a9140d8c4afa5e06f8babd8276c5ca6b634675ead1086888ac0000000001281e9800000000001976a9146ca2f1956ac2ca688b1c306742418aa8294e3c3988ac32b5685a
Publish contract transaction? [y/N] y
Published contract transaction (e769e917ab4e49f6d58243efab7745dbd1550ef39610a83ed0c157867ea26079)
B
$ btcatomicswap auditcontract 63a82091dd54d0e3ff01f6b6422f2b9e7cf9e9232e859e95af8302ef3ca00e7e8ac5f38876a9141077308295fbbe5f801903377fd567e01294bf1d670432b5685ab17576a9140d8c4afa5e06f8babd8276c5ca6b634675ead1086888ac 0200000001acb0c63314f51bbc3f9d69321a3e691872a50333fbd614d704f17a37bf2fa0b0000000006a47304402204b3cd01822576d3105334f02357df0cc373866fa523eec94c0e7a81bde60d66402201d28e9df6d65573f3118ad9f6df12a03f969b314ed7f574c52a2ea6a455c8105012102f2cdd936900b239758a68c98094ce97f7238bacf629cae8e0c33eb6a8c00cffcfeffffff02809698000000000017a9148aeca27fdbdcfc3808a72b95eedb5b96cba77a268740e60e00000000001976a914f6f81d4d4de9f74beadf821f733bf0410009e0cd88ac00000000
Contract address: 3EMaegrYpegSLEXVT3wujiE9mVy2RG7Tod
Contract value: 0.1 BTC
Recipient address: 12W4bW2PtVmgu65XRWYXPKRrVPs8GZ2jbL
Author's refund address: 12EdrDRWPWFbBGygphnf3NYjtuXF4rknjy
Secret hash: 91dd54d0e3ff01f6b6422f2b9e7cf9e9232e859e95af8302ef3ca00e7e8ac5f3
Locktime: 2018-01-24 16:32:50 +0000 UTC
Locktime reached in 47h57m7s
$ monaatomicswap --rpcuser=user --rpcpass=password participate MBYkbKdtF3tjuc5q1ZkPoH1x7kErYfEqqi 0.1 91dd54d0e3ff01f6b6422f2b9e7cf9e9232e859e95af8302ef3ca00e7e8ac5f3
Contract fee: 0.00224 MONA (0.01000000 MONA/kB)
Refund fee: 0.00293 MONA (0.01020906 MONA/kB)
Contract (PAmUumqzfWM2hyZf7YWNnyX2wJmgv3yegb):
63a82091dd54d0e3ff01f6b6422f2b9e7cf9e9232e859e95af8302ef3ca00e7e8ac5f38876a9142804734cf343483ad46d1dae0c4b00a04d2f536167045065675ab17576a914a85a9b5e73793916ae78adabbf09ab802117853a6888ac
Contract transaction (e3cfdd63e3961a022675fe3e30df901794a6099b65d665b800aba3c28d015ba0):
02000000017e02426e55ead3e0cef0a9d7d41d3edd30bef63ca49ea2e93223842131e662ca010000006b4830450221009636f40fce9712641bbc0c5ad834b6a0e05b23e50be7fc7c72a2ed72792fa54602206cb77e253f473eeacb9ca22798dc6d463cb27ce621237edc60543dd6de7d04db01210346a785efbf0625feb189f591f62941e796408a4ec0815a8d6844c7ab93c7e1befeffffff02809698000000000017a91417e33b8320b0253cbfb81c647d7aab3b02931e988780c09100000000001976a9147e2f32241aa3287e18c832b2b0129b470a91662688ac00000000
Refund transaction (1904a86f6c17abfb1a58939652698b30a456e147fa88e7021dd8699b19c0cea9):
0200000001a05b018dc2a3ab00b865d6659b09a6941790df303efe7526021a96e363ddcfe300000000ca47304402207336b7b5e76c791066652797b2515356f59a9b4272fb9d8f2bd6d2d9d91dd8ae02206bf83483047b6c0de363edffba795b79feb5675b9894b81a688597575a155fba0121038507908676a680208a94ee0a80e71b66ff13cb6640a862efc843d67f84a100ec004c5d63a82091dd54d0e3ff01f6b6422f2b9e7cf9e9232e859e95af8302ef3ca00e7e8ac5f38876a9142804734cf343483ad46d1dae0c4b00a04d2f536167045065675ab17576a914a85a9b5e73793916ae78adabbf09ab802117853a6888ac0000000001f81d9400000000001976a914dc9fc01ef1d772193ea7ce361266c9ef4ddf9c5e88ac5065675a
Publish contract transaction? [y/N] y
Published contract transaction (e3cfdd63e3961a022675fe3e30df901794a6099b65d665b800aba3c28d015ba0)
A
$ monaatomicswap auditcontract 63a82091dd54d0e3ff01f6b6422f2b9e7cf9e9232e859e95af8302ef3ca00e7e8ac5f38876a9142804734cf343483ad46d1dae0c4b00a04d2f536167045065675ab17576a914a85a9b5e73793916ae78adabbf09ab802117853a6888ac 02000000017e02426e55ead3e0cef0a9d7d41d3edd30bef63ca49ea2e93223842131e662ca010000006b4830450221009636f40fce9712641bbc0c5ad834b6a0e05b23e50be7fc7c72a2ed72792fa54602206cb77e253f473eeacb9ca22798dc6d463cb27ce621237edc60543dd6de7d04db01210346a785efbf0625feb189f591f62941e796408a4ec0815a8d6844c7ab93c7e1befeffffff02809698000000000017a91417e33b8320b0253cbfb81c647d7aab3b02931e988780c09100000000001976a9147e2f32241aa3287e18c832b2b0129b470a91662688ac00000000
Contract address: PAmUumqzfWM2hyZf7YWNnyX2wJmgv3yegb
Contract value: 0.1 MONA
Recipient address: MBYkbKdtF3tjuc5q1ZkPoH1x7kErYfEqqi
Author's refund address: MPFLJ8rKywEHYt4tj7ZiRr88PnuXUUEebd
Secret hash: 91dd54d0e3ff01f6b6422f2b9e7cf9e9232e859e95af8302ef3ca00e7e8ac5f3
Locktime: 2018-01-23 16:39:44 +0000 UTC
Locktime reached in 23h56m21s
$ monaatomicswap --rpcuser=user --rpcpass=password redeem 63a82091dd54d0e3ff01f6b6422f2b9e7cf9e9232e859e95af8302ef3ca00e7e8ac5f38876a9142804734cf343483ad46d1dae0c4b00a04d2f536167045065675ab17576a914a85a9b5e73793916ae78adabbf09ab802117853a6888ac 02000000017e02426e55ead3e0cef0a9d7d41d3edd30bef63ca49ea2e93223842131e662ca010000006b4830450221009636f40fce9712641bbc0c5ad834b6a0e05b23e50be7fc7c72a2ed72792fa54602206cb77e253f473eeacb9ca22798dc6d463cb27ce621237edc60543dd6de7d04db01210346a785efbf0625feb189f591f62941e796408a4ec0815a8d6844c7ab93c7e1befeffffff02809698000000000017a91417e33b8320b0253cbfb81c647d7aab3b02931e988780c09100000000001976a9147e2f32241aa3287e18c832b2b0129b470a91662688ac00000000 9d009a5b23e172bea4bfa22c854bd0cfe10059a51dafae1cd32cffffac8d4e13warning: falling back to mempool relay fee policy
Redeem fee: 0.000326 MONA (0.00101875 MONA/kB)
Redeem transaction (6081adaab3d942ca6c845e7e97ec558c8f404e458ad277ac86b5abd35bf494d5):
0200000001a05b018dc2a3ab00b865d6659b09a6941790df303efe7526021a96e363ddcfe300000000eb47304402201e379a83dc490feb6ffd94b96e326616c55d26bc5380ea9e624e209f0aa0ede0022011d049c7b4bebd09c242040b3287b9b15737716cee9eb54c92640f86f9552298012103b0daad787af562ce2da8e2c9f68cb3b179eeccd864a8f512ec0a53fea98e0ca1209d009a5b23e172bea4bfa22c854bd0cfe10059a51dafae1cd32cffffac8d4e13514c5d63a82091dd54d0e3ff01f6b6422f2b9e7cf9e9232e859e95af8302ef3ca00e7e8ac5f38876a9142804734cf343483ad46d1dae0c4b00a04d2f536167045065675ab17576a914a85a9b5e73793916ae78adabbf09ab802117853a6888acffffffff0128179800000000001976a914a318ee4f3972a4960b3d7c94a2185b1da107da7288ac5065675a
Publish redeem transaction? [y/N] y
Published redeem transaction (6081adaab3d942ca6c845e7e97ec558c8f404e458ad277ac86b5abd35bf494d5)
B
$ monaatomicswap extractsecret 0200000001a05b018dc2a3ab00b865d6659b09a6941790df303efe7526021a96e363ddcfe300000000eb47304402201e379a83dc490feb6ffd94b96e326616c55d26bc5380ea9e624e209f0aa0ede0022011d049c7b4bebd09c242040b3287b9b15737716cee9eb54c92640f86f9552298012103b0daad787af562ce2da8e2c9f68cb3b179eeccd864a8f512ec0a53fea98e0ca1209d009a5b23e172bea4bfa22c854bd0cfe10059a51dafae1cd32cffffac8d4e13514c5d63a82091dd54d0e3ff01f6b6422f2b9e7cf9e9232e859e95af8302ef3ca00e7e8ac5f38876a9142804734cf343483ad46d1dae0c4b00a04d2f536167045065675ab17576a914a85a9b5e73793916ae78adabbf09ab802117853a6888acffffffff0128179800000000001976a914a318ee4f3972a4960b3d7c94a2185b1da107da7288ac5065675a 91dd54d0e3ff01f6b6422f2b9e7cf9e9232e859e95af8302ef3ca00e7e8ac5f3
Secret: 9d009a5b23e172bea4bfa22c854bd0cfe10059a51dafae1cd32cffffac8d4e13
$ btcatomicswap --rpcuser=user --rpcpass=password redeem 63a82091dd54d0e3ff01f6b6422f2b9e7cf9e9232e859e95af8302ef3ca00e7e8ac5f38876a9141077308295fbbe5f801903377fd567e01294bf1d670432b5685ab17576a9140d8c4afa5e06f8babd8276c5ca6b634675ead1086888ac 0200000001acb0c63314f51bbc3f9d69321a3e691872a50333fbd614d704f17a37bf2fa0b0000000006a47304402204b3cd01822576d3105334f02357df0cc373866fa523eec94c0e7a81bde60d66402201d28e9df6d65573f3118ad9f6df12a03f969b314ed7f574c52a2ea6a455c8105012102f2cdd936900b239758a68c98094ce97f7238bacf629cae8e0c33eb6a8c00cffcfeffffff02809698000000000017a9148aeca27fdbdcfc3808a72b95eedb5b96cba77a268740e60e00000000001976a914f6f81d4d4de9f74beadf821f733bf0410009e0cd88ac00000000 9d009a5b23e172bea4bfa22c854bd0cfe10059a51dafae1cd32cffffac8d4e13
Redeem fee: 0.00023107 BTC (0.00072209 BTC/kB)
Redeem transaction (9a4b7681e7446ee16b2d01eaa7579ee7bc1a3919bc1a9d0702f43ba2c4f9b2a4):
02000000017960a27e8657c1d03ea81096f30e55d1db4577abef4382d5f6494eab17e969e700000000eb47304402205724a7d828b23fc4e6eaaa6e69b0cad935be889c4a0478ba3058a292f72005b902206cc9fbaaca31ab66f3043974208ef1880f5eaa426ce35cb674ec180bb21c3389012102d77db735b4b0bc1acc61c32d4b7d213649650ab25c1bbce35b92bf5c0b6ce140209d009a5b23e172bea4bfa22c854bd0cfe10059a51dafae1cd32cffffac8d4e13514c5d63a82091dd54d0e3ff01f6b6422f2b9e7cf9e9232e859e95af8302ef3ca00e7e8ac5f38876a9141077308295fbbe5f801903377fd567e01294bf1d670432b5685ab17576a9140d8c4afa5e06f8babd8276c5ca6b634675ead1086888acffffffff013d3c9800000000001976a914fbd4e5e6c7e2730710df8c7f581ab37e3b9f0d3d88ac32b5685a
Publish redeem transaction? [y/N] y
Published redeem transaction (9a4b7681e7446ee16b2d01eaa7579ee7bc1a3919bc1a9d0702f43ba2c4f9b2a4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment