Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A
$ dcrctl --testnet --rpcuser=0920 --rpcpass=password --wallet getnewaddress
TsfxqUymvKKP9eGPkwewk4puJEf5hGt4cfB
B
$ monacoin-cli getnewaddress
n1rEm8ZgDA5gLD8xLnPoxBDZHiM7QyFcoE
A
$ monaatomicswap --testnet --rpcuser=0920 --rpcpass=password initiate n1rEm8ZgDA5gLD8xLnPoxBDZHiM7QyFcoE 1.0
Secret: ccdc45c37013b9bd3044c8600fa29a26da151cff9697ee8be309e69d8a0c4c98
Secret hash: 4580b4b41d371c57b5c5e5ef67bfe642ed5533f9eee0a02d98893565392d9efc
Contract fee: 0.00224 BTC (0.01000000 MONA/kB)
Refund fee: 0.00293 BTC (0.01020906 MONA/kB)
Contract (2N3bM5iLWfZkmoM2hvKzWGMHhPXy3cJnbF9):
63a8204580b4b41d371c57b5c5e5ef67bfe642ed5533f9eee0a02d98893565392d9efc8876a914df082a2f2b290d5f875a416f1c046af04f39dac467041b74635ab17576a914a849c5c4d196904d6486e99082a5d91ad8704e6e6888ac
Contract transaction (5a69c741466c9ea819f5552dbc55475406277cdc21faf8ba04b0c82384681127):
020000000165e5dbe3d67dc49a7cc244cd2d71646e75a1f427ec54582f897d62f40e23425c000000006b483045022100e038e007ba98ddacb09b9851c9b13ba91dcff172a7f6c2bbdf0c2870067b213602203f2f54a6cbbb10f283a7755713b33ce974cb2ec008251fc15314d31d5b1393160121035a26390e1be6237f2dd0a60c593481772da7783e17511de52eddf931277b6715feffffff0200962a0d050000001976a914ce11d30c974f5b3234a45956866cc468d6723cd388ac00e1f5050000000017a914717f7f9f3dfdc1f659b4361cdc3763bf8e43418a8700000000
Refund transaction (171927056b6e219d9543d99256174e762416da997b2d12d045ea8f5a2d1d9ced):
02000000012711688423c8b004baf8fa21dc7c2706544755bc2d55f519a89e6c4641c7695a01000000ca4730440220518f0d933cee33cef0bd929ba8a13e9b2c6e7e2173d7cef401cfe29abcf9d4bf02206b46553b5d85142917fa0b8d45a042d8a56a1891dfd3ba4f5cd4e2b01b3f0ef40121030c03daca82a38d5e7afd077110387c4471c9874872c91565c4b8d9cb04e2f042004c5d63a8204580b4b41d371c57b5c5e5ef67bfe642ed5533f9eee0a02d98893565392d9efc8876a914df082a2f2b290d5f875a416f1c046af04f39dac467041b74635ab17576a914a849c5c4d196904d6486e99082a5d91ad8704e6e6888ac00000000017868f105000000001976a91460f70f3388447edeb99d04ffec2191c13acb799f88ac1b74635a
Publish contract transaction? [y/N] y
Published contract transaction (5a69c741466c9ea819f5552dbc55475406277cdc21faf8ba04b0c82384681127)
B
$ monaatomicswap --testnet auditcontract 63a8204580b4b41d371c57b5c5e5ef67bfe642ed5533f9eee0a02d98893565392d9efc8876a914df082a2f2b290d5f875a416f1c046af04f39dac467041b74635ab17576a914a849c5c4d196904d6486e99082a5d91ad8704e6e6888ac 020000000165e5dbe3d67dc49a7cc244cd2d71646e75a1f427ec54582f897d62f40e23425c000000006b483045022100e038e007ba98ddacb09b9851c9b13ba91dcff172a7f6c2bbdf0c2870067b213602203f2f54a6cbbb10f283a7755713b33ce974cb2ec008251fc15314d31d5b1393160121035a26390e1be6237f2dd0a60c593481772da7783e17511de52eddf931277b6715feffffff0200962a0d050000001976a914ce11d30c974f5b3234a45956866cc468d6723cd388ac00e1f5050000000017a914717f7f9f3dfdc1f659b4361cdc3763bf8e43418a8700000000
Contract address: pFthJ8nkaK9ZC71rzBgKxSnYfgcXV8DwNz
Contract value: 1 BTC
Recipient address: n1rEm8ZgDA5gLD8xLnPoxBDZHiM7QyFcoE
Author's refund address: mvrnC61DVQ5hVJXaSGwgk18EjPuJo1vWwu
Secret hash: 4580b4b41d371c57b5c5e5ef67bfe642ed5533f9eee0a02d98893565392d9efc
Locktime: 2018-01-20 16:53:47 +0000 UTC
Locktime reached in 47h52m57s
$ dcratomicswap --testnet participate TsfxqUymvKKP9eGPkwewk4puJEf5hGt4cfB 1.0 4580b4b41d371c57b5c5e5ef67bfe642ed5533f9eee0a02d98893565392d9efc
Passphrase:
Contract fee: 0.000417 DCR (0.00100725 DCR/kB)
Refund fee: 0.000313 DCR (0.00100643 DCR/kB)
Contract (TcvY6V2Z9W2mHs26QmG8U1R5SxwgAXuDrzB):
63c0204580b4b41d371c57b5c5e5ef67bfe642ed5533f9eee0a02d98893565392d9efc8876a914a3ea743b2371c4ede74b1bec8194d965ddce937e67040229625ab17576a9149594d157fe61496f2cf601116875a8cc02289ec16888ac
Contract transaction (c2fab8bc15de010ecaf3d8acc2626e7858218da49eaab8325fd423835a16fd44):
0100000002517a16641e51f9999262df77afcf0b1addb1302bb55ddd848e643359433f96b10000000000fffffffff73002e96627e462a37dfbd9b825a275f645c732795a216dfb63eef1c35517cc0100000000ffffffff0210bdea0b0000000000001976a9140feac8952b03279f0293ef4f9ef3059cc33c712488ac00e1f50500000000000017a914fc89082b628837b8185c824034cb941f996aa79c87000000000000000002ffffffffffffffff00000000ffffffff6b483045022100bc007d280eec407aaf54a7a25dad3d7249d48b0ed8b7f3febea2262e93fe6a0402203fba3629bda3cc8e5080c06ba610364a465f9144036f21ee3b7ec2c00cac4d65012103e8d0d2068c5d0d281a52e43415100aef13a689a1a4da0884aaaa2d04680822ccffffffffffffffff00000000ffffffff6a47304402205e3642ed0fe34392ed9f65261ad5f5c214c840a9233894ca43999b462fa2e94c02205a2a5cc0b9540927a5d3868d67fb1bd08d25595c1d03cf69213f108d8a97129301210363bb47a965eeff6cdef18231b996c2d3aae4e7f6617e0400316a484aab771f6d
Refund transaction (8ca11492d2a335433de82b30c90d1bfc0495184fca779f7cb2d44eb4ecda7faf):
010000000144fd165a8323d45f32b8aa9ea48d2158786e62c2acd8f3ca0e01de15bcb8fac201000000000000000001bc66f5050000000000001976a9143568ef9286f7ad2f279c77f6395c2d9ee7508f6988ac0229625a0000000001ffffffffffffffff00000000ffffffffca47304402205c82dca97f085efc50694f454b1cb4b53cc24f0703b7c365054e4b2713d54bdb022029c5f0142ad8293ed56d4ab247d5210807bda4052528438e2f371511d562440b012103dbdd6741bd02555c07bd2ac89ca4642e2bbb0029ac1507e0ece0c68b3c9bf6c0004c5d63c0204580b4b41d371c57b5c5e5ef67bfe642ed5533f9eee0a02d98893565392d9efc8876a914a3ea743b2371c4ede74b1bec8194d965ddce937e67040229625ab17576a9149594d157fe61496f2cf601116875a8cc02289ec16888ac
Publish contract transaction? [y/N] y
Published contract transaction (c2fab8bc15de010ecaf3d8acc2626e7858218da49eaab8325fd423835a16fd44)
A
dcratomicswap --testnet auditcontract 63c0204580b4b41d371c57b5c5e5ef67bfe642ed5533f9eee0a02d98893565392d9efc8876a914a3ea743b2371c4ede74b1bec8194d965ddce937e67040229625ab17576a9149594d157fe61496f2cf601116875a8cc02289ec16888ac 0100000002517a16641e51f9999262df77afcf0b1addb1302bb55ddd848e643359433f96b10000000000fffffffff73002e96627e462a37dfbd9b825a275f645c732795a216dfb63eef1c35517cc0100000000ffffffff0210bdea0b0000000000001976a9140feac8952b03279f0293ef4f9ef3059cc33c712488ac00e1f50500000000000017a914fc89082b628837b8185c824034cb941f996aa79c87000000000000000002ffffffffffffffff00000000ffffffff6b483045022100bc007d280eec407aaf54a7a25dad3d7249d48b0ed8b7f3febea2262e93fe6a0402203fba3629bda3cc8e5080c06ba610364a465f9144036f21ee3b7ec2c00cac4d65012103e8d0d2068c5d0d281a52e43415100aef13a689a1a4da0884aaaa2d04680822ccffffffffffffffff00000000ffffffff6a47304402205e3642ed0fe34392ed9f65261ad5f5c214c840a9233894ca43999b462fa2e94c02205a2a5cc0b9540927a5d3868d67fb1bd08d25595c1d03cf69213f108d8a97129301210363bb47a965eeff6cdef18231b996c2d3aae4e7f6617e0400316a484aab771f6d
Contract address: TcvY6V2Z9W2mHs26QmG8U1R5SxwgAXuDrzB
Contract value: 1 DCR
Recipient address: TsfxqUymvKKP9eGPkwewk4puJEf5hGt4cfB
Author's refund address: Tsef3SBTYdX8dXn8N3jCP5ig7bEUs51UyHH
Secret hash: 4580b4b41d371c57b5c5e5ef67bfe642ed5533f9eee0a02d98893565392d9efc
Locktime: 2018-01-19 17:21:06 +0000 UTC
Locktime reached in 23h48m8s
$ dcratomicswap --testnet redeem 63c0204580b4b41d371c57b5c5e5ef67bfe642ed5533f9eee0a02d98893565392d9efc8876a914a3ea743b2371c4ede74b1bec8194d965ddce937e67040229625ab17576a9149594d157fe61496f2cf601116875a8cc02289ec16888ac 0100000002517a16641e51f9999262df77afcf0b1addb1302bb55ddd848e643359433f96b10000000000fffffffff73002e96627e462a37dfbd9b825a275f645c732795a216dfb63eef1c35517cc0100000000ffffffff0210bdea0b0000000000001976a9140feac8952b03279f0293ef4f9ef3059cc33c712488ac00e1f50500000000000017a914fc89082b628837b8185c824034cb941f996aa79c87000000000000000002ffffffffffffffff00000000ffffffff6b483045022100bc007d280eec407aaf54a7a25dad3d7249d48b0ed8b7f3febea2262e93fe6a0402203fba3629bda3cc8e5080c06ba610364a465f9144036f21ee3b7ec2c00cac4d65012103e8d0d2068c5d0d281a52e43415100aef13a689a1a4da0884aaaa2d04680822ccffffffffffffffff00000000ffffffff6a47304402205e3642ed0fe34392ed9f65261ad5f5c214c840a9233894ca43999b462fa2e94c02205a2a5cc0b9540927a5d3868d67fb1bd08d25595c1d03cf69213f108d8a97129301210363bb47a965eeff6cdef18231b996c2d3aae4e7f6617e0400316a484aab771f6d ccdc45c37013b9bd3044c8600fa29a26da151cff9697ee8be309e69d8a0c4c98
Passphrase:
Redeem fee: 0.000346 DCR (0.00100290 DCR/kB)
Redeem transaction (2e0fe3509b4ea1003a90d5bc1406d03810fdd03dbb8cd4a673b1e8999e828cd2):
010000000144fd165a8323d45f32b8aa9ea48d2158786e62c2acd8f3ca0e01de15bcb8fac20100000000ffffffff01d859f5050000000000001976a914d3f3a963d818a5c760f8f50de372a2c611d3046a88ac0229625a0000000001ffffffffffffffff00000000ffffffffec483045022100ff34986a00d7cc06ac9162f83cc340600e34819d96b24b16832a315aebda294e02205a64afc97948803e2fc3f4d3249bb4150863fcb40971dcafa1f88a1063a713050121025bec058fa731b520ef4f3c3edb72c9f44f0a4c8cf02aa8aaf7b59b935c06140020ccdc45c37013b9bd3044c8600fa29a26da151cff9697ee8be309e69d8a0c4c98514c5d63c0204580b4b41d371c57b5c5e5ef67bfe642ed5533f9eee0a02d98893565392d9efc8876a914a3ea743b2371c4ede74b1bec8194d965ddce937e67040229625ab17576a9149594d157fe61496f2cf601116875a8cc02289ec16888ac
Publish redeem transaction? [y/N] y
Published redeem transaction (2e0fe3509b4ea1003a90d5bc1406d03810fdd03dbb8cd4a673b1e8999e828cd2)
B
$ dcratomicswap --testnet extractsecret 010000000144fd165a8323d45f32b8aa9ea48d2158786e62c2acd8f3ca0e01de15bcb8fac20100000000ffffffff01d859f5050000000000001976a914d3f3a963d818a5c760f8f50de372a2c611d3046a88ac0229625a0000000001ffffffffffffffff00000000ffffffffec483045022100ff34986a00d7cc06ac9162f83cc340600e34819d96b24b16832a315aebda294e02205a64afc97948803e2fc3f4d3249bb4150863fcb40971dcafa1f88a1063a713050121025bec058fa731b520ef4f3c3edb72c9f44f0a4c8cf02aa8aaf7b59b935c06140020ccdc45c37013b9bd3044c8600fa29a26da151cff9697ee8be309e69d8a0c4c98514c5d63c0204580b4b41d371c57b5c5e5ef67bfe642ed5533f9eee0a02d98893565392d9efc8876a914a3ea743b2371c4ede74b1bec8194d965ddce937e67040229625ab17576a9149594d157fe61496f2cf601116875a8cc02289ec16888ac 4580b4b41d371c57b5c5e5ef67bfe642ed5533f9eee0a02d98893565392d9efc
Secret: ccdc45c37013b9bd3044c8600fa29a26da151cff9697ee8be309e69d8a0c4c98
$ monaatomicswap --testnet --rpcuser=0920 --rpcpass=password redeem 63a8204580b4b41d371c57b5c5e5ef67bfe642ed5533f9eee0a02d98893565392d9efc8876a914df082a2f2b290d5f875a416f1c046af04f39dac467041b74635ab17576a914a849c5c4d196904d6486e99082a5d91ad8704e6e6888ac 020000000165e5dbe3d67dc49a7cc244cd2d71646e75a1f427ec54582f897d62f40e23425c000000006b483045022100e038e007ba98ddacb09b9851c9b13ba91dcff172a7f6c2bbdf0c2870067b213602203f2f54a6cbbb10f283a7755713b33ce974cb2ec008251fc15314d31d5b1393160121035a26390e1be6237f2dd0a60c593481772da7783e17511de52eddf931277b6715feffffff0200962a0d050000001976a914ce11d30c974f5b3234a45956866cc468d6723cd388ac00e1f5050000000017a914717f7f9f3dfdc1f659b4361cdc3763bf8e43418a8700000000 ccdc45c37013b9bd3044c8600fa29a26da151cff9697ee8be309e69d8a0c4c98
warning: falling back to mempool relay fee policy
Redeem fee: 0.000326 BTC (0.00101558 MONA/kB)
Redeem transaction (93a1bd6f11d2f16fd92e91e2887424a95932c1b40f987b46f1c92acfb552c505):
02000000012711688423c8b004baf8fa21dc7c2706544755bc2d55f519a89e6c4641c7695a01000000ec483045022100bf36602422aacfa020c4b2fe8ca73719f13e6354e45d0d321254a398cf536f0d02200e3121e655afb1af25fde87f0434a97a1a7627227bf8a7af090324ee4a34dfca01210293e40f6599727e901ee5f712581da5296979eb1ad447ed86e20b5bd03685b68920ccdc45c37013b9bd3044c8600fa29a26da151cff9697ee8be309e69d8a0c4c98514c5d63a8204580b4b41d371c57b5c5e5ef67bfe642ed5533f9eee0a02d98893565392d9efc8876a914df082a2f2b290d5f875a416f1c046af04f39dac467041b74635ab17576a914a849c5c4d196904d6486e99082a5d91ad8704e6e6888acffffffff01a861f505000000001976a914d593554813f3797017175e85caae1b857286acc788ac1b74635a
Publish redeem transaction? [y/N] y
Published redeem transaction (93a1bd6f11d2f16fd92e91e2887424a95932c1b40f987b46f1c92acfb552c505)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment