mmgen-wallet/test/ref
The MMGen Project ffe488ffbd
THORChain memoless swaps
Memoless swaps permit coins with long addresses and/or restricted memo space,
such as Monero, for example, to be swapped on THORChain.  They introduce added
complexity, along with certain privacy and security tradeoffs, so should only
be used for assets that cannot be swapped the usual way.

A reference request transaction (a.k.a. registration transaction) containing
the memo is sent to the THORChain network, which assigns it a number.  This
number is then encoded in the send amount of the swap transaction in lieu of
a memo.

See https://dev.thorchain.org/swap-guide/memoless-swaps.html for technical
details.

While this patch fully implements the feature in MMGen Wallet, it’s disabled
on mainnet for the time being.  Mainnet will be enabled after memoless swaps
are unhalted on THORChain mainnet and the feature can undergo live testing.

The following example is provided for purposes of illustration only. Normally
we would swap LTC to BCH the standard way.

Sample LTC-to-BCH memoless swap workflow (assumes --autosign):

    # Create the reference request transaction (pass 1):
    $ mmgen-swaptxcreate --memoless LTC 1.2345 BCH

    # Autosign the reference request transaction and send it:
    $ mmgen-txsend
    => TxID

    # Get the reference number from the THORChain network:
    $ mmgen-remote --coin=rune get_refnum TxID
    => REFNUM

    # Create the swap transaction (pass 2):
    $ mmgen-swaptxcreate --refnum=REFNUM LTC 1.2345 BCH

    # Sign and send the swap transaction:
    $ mmgen-txsend

    # Monitor your BCH wallet for the funds:
    $ mmgen-tool --coin=bch twview

Testing/demo:

    $ test/cmdtest.py -e swap.memoless

Note that the real send amount is the amount specified in the second invocation
of ‘mmgen-swaptxcreate’ (i.e. the swap transaction or second pass).  If you
omit the --trade-limit option, the amounts in the two invocations can differ,
otherwise amount and trade limit must be identical for both invocations.

Before sending, the software checks that the provided reference number is valid
and points to an address in the user’s tracking wallet.  Thus funds cannot be
sent to the wrong destination as a result of user error.

References remain valid for approximately six hours.  Before sending, the
software checks that the reference is valid, but not whether it is close to
expiration.  If the reference later expires before the swap transaction is
confirmed, there’s a danger of funds loss.  Therefore, it’s recommended to
create and broadcast the swap transaction without delay.  If necessary, the
transaction can be bumped to ensure timely confirmation.

In order to create and send the reference request transaction, the user must
have some RUNE in their wallet.  The current cost per transaction is 0.2 RUNE.

Also be aware of the privacy implications.  Swaps can easily be correlated if
their registration transactions spend from the same RUNE address, or from RUNE
addresses that can be linked via chain analysis.

More complete documentation will be provided at a later date.
2026-10-12 10:04:48 +00:00
..
altcoin bip_hd: a minimal, easy-to-use BIP-32/BIP-44 implementation 2024-01-26 10:54:03 +00:00
bitcoin_cash BCH cashaddr: full support 2024-09-29 11:59:57 +00:00
dash Key/address generation for Ethereum, Eth Classic, DASH, and Zcash 2017-12-16 09:31:00 +03:00
data_dir/altcoins/etc tx.file: new transaction file format 2024-10-12 09:14:45 +00:00
ethereum update copyright dates 2026-02-11 13:02:12 +00:00
ethereum_classic Full Ethereum Classic (ETC) + ERC20 token support 2018-10-02 21:09:48 +03:00
litecoin cmdtest.py autosign_automount: check mmgen-txsend --status with legacy TX files 2026-09-11 14:10:55 +00:00
monero mmgen-txsend -s: fix crash with XMR compat tx file in txauto dir 2026-01-14 16:27:27 +00:00
thorchain THORChain memoless swaps 2026-10-12 10:04:48 +00:00
tx btc.tx.base.decodeScriptPubKey(): reimplement, parse nulldata correctly 2025-09-29 23:09:17 +00:00
zcash test.py: update zcash address file data 2018-05-10 13:54:53 +03:00
0B8D5A[15.31789,14,tl=1320969600].rawtx test.py: rewrite create_ref_tx, update reference tx files 2018-06-05 00:15:52 +03:00
0C7115[15.86255,14,tl=1320969600].testnet.rawtx test.py: rewrite create_ref_tx, update reference tx files 2018-06-05 00:15:52 +03:00
3B13CB[30.65968918,90].rawtx new allow_legacy_tx_files and forbid_version_mismatched_tx_files options 2026-09-09 18:33:59 +00:00
25EFA3[2.34].testnet.rawtx autosign: print summary of non-MMGen output addresses and amounts 2019-04-24 17:39:22 +03:00
359FD5-BCH[6.68868,tl=1320969600].testnet.rawtx test.py: rewrite create_ref_tx, update reference tx files 2018-06-05 00:15:52 +03:00
460D4D-BCH[10.19764,tl=1320969600].rawtx test.py: rewrite create_ref_tx, update reference tx files 2018-06-05 00:15:52 +03:00
721A2C[33.55555877,90].rawtx new allow_legacy_tx_files and forbid_version_mismatched_tx_files options 2026-09-09 18:33:59 +00:00
997F55[BTC].rawmsg.json various fixes and cleanups 2022-05-03 21:01:05 +00:00
1378FC64-4DCB5174-872806A7[192,1].mmincox New 'mmgen-walletconv' utility converts to and from all available MMGen wallet 2015-04-25 19:39:25 +03:00
1378FC64-6F0F9BB4[192,1].mmdat test/test.py: 2015-04-07 17:57:17 +03:00
1378FC64-2907DE97-F980D21F[192,1].mmincog New 'mmgen-walletconv' utility converts to and from all available MMGen wallet 2015-04-25 19:39:25 +03:00
1378FC64-B55E9958-77256FC1[192,1].incog.offset123 Version 0.8.8 2016-11-23 22:04:17 +03:00
1378FC64-B55E9958-D85FF20C[192,1].incog-old.offset123 Version 0.8.8 2016-11-23 22:04:17 +03:00
1378FC64.b6d New die roll (base6d) wallet format 2019-10-28 15:19:54 +00:00
1378FC64.bip39 Complete BIP39 mnemonic support 2019-07-09 15:44:17 +03:00
1378FC64.hex new wallet format: PlainHexSeedFile (plain hexadecimal w/o checksum) 2019-10-23 12:25:24 +00:00
1378FC64.mmhex [seed]: export seed to hexadecimal (mmhex) format 2016-12-15 20:53:29 +03:00
1378FC64.mmseed test/test.py: 2015-04-07 17:57:17 +03:00
1378FC64.mmwords test/test.py: 2015-04-07 17:57:17 +03:00
98831F3A-1630A9F2-870376A9[256,1].mmincox New 'mmgen-walletconv' utility converts to and from all available MMGen wallet 2015-04-25 19:39:25 +03:00
98831F3A-5482381C-18460FB1[256,1].mmincog New 'mmgen-walletconv' utility converts to and from all available MMGen wallet 2015-04-25 19:39:25 +03:00
98831F3A-B[1,31-33,500-501,1010-1011].addrs Bech32 address support 2018-03-05 12:46:35 +03:00
98831F3A-B[1,31-33,500-501,1010-1011].testnet.addrs test.py: update testnet reference address and key-address files 2018-06-04 12:13:52 +03:00
98831F3A-F59B07A0-559CEF19[256,1].incog.offset123 Version 0.8.8 2016-11-23 22:04:17 +03:00
98831F3A-F59B07A0-848535F3[256,1].incog-old.offset123 Version 0.8.8 2016-11-23 22:04:17 +03:00
98831F3A-F825E2A0[256,1].mmdat wallet.mmgen: increase salt length to 32 bytes 2026-05-21 12:09:33 +00:00
98831F3A-S[1,31-33,500-501,1010-1011].addrs Support for Segwit (P2SH-P2WPKH) addresses: 2017-07-27 22:55:52 +03:00
98831F3A-S[1,31-33,500-501,1010-1011].testnet.addrs test.py: update testnet reference address and key-address files 2018-06-04 12:13:52 +03:00
98831F3A-фубар@crypto.org-b32-12[1,4,1100].pws passgen: code cleanups, new tests, new --passwd-fmt option 2019-10-15 15:51:43 +03:00
98831F3A-фубар@crypto.org-b32-24[1,4,1100].pws passgen: code cleanups, new tests, new --passwd-fmt option 2019-10-15 15:51:43 +03:00
98831F3A-фубар@crypto.org-b58-10[1,4,1100].pws passgen: code cleanups, new tests, new --passwd-fmt option 2019-10-15 15:51:43 +03:00
98831F3A-фубар@crypto.org-b58-20[1,4,1100].pws passgen: code cleanups, new tests, new --passwd-fmt option 2019-10-15 15:51:43 +03:00
98831F3A-фубар@crypto.org-bip39-12[1,4,1100].pws mmgen-passgen: support BIP39 passwords 2019-10-16 20:12:58 +03:00
98831F3A-фубар@crypto.org-bip39-18[1,4,1100].pws mmgen-passgen: support BIP39 passwords 2019-10-16 20:12:58 +03:00
98831F3A-фубар@crypto.org-bip39-24[1,4,1100].pws mmgen-passgen: support BIP39 passwords 2019-10-16 20:12:58 +03:00
98831F3A-фубар@crypto.org-hex-32[1,4,1100].pws passgen: allow hex passwords of 32 and 48 characters 2019-10-15 16:58:07 +03:00
98831F3A-фубар@crypto.org-hex-48[1,4,1100].pws passgen: allow hex passwords of 32 and 48 characters 2019-10-15 16:58:07 +03:00
98831F3A-фубар@crypto.org-hex-64[1,4,1100].pws passgen: code cleanups, new tests, new --passwd-fmt option 2019-10-15 15:51:43 +03:00
98831F3A-фубар@crypto.org-hex2bip39-12[1,4,1100].pws mmgen-passgen: support BIP39 passwords 2019-10-16 20:12:58 +03:00
98831F3A-фубар@crypto.org-xmrseed-25[1,4,1100].pws limited Monero mnemonic seed phrase ('xmrseed') support 2020-02-12 10:38:11 +00:00
98831F3A.b6d New die roll (base6d) wallet format 2019-10-28 15:19:54 +00:00
98831F3A.bip39 Complete BIP39 mnemonic support 2019-07-09 15:44:17 +03:00
98831F3A.hex new wallet format: PlainHexSeedFile (plain hexadecimal w/o checksum) 2019-10-23 12:25:24 +00:00
98831F3A.mmhex [seed]: export seed to hexadecimal (mmhex) format 2016-12-15 20:53:29 +03:00
98831F3A.mmseed test/test.py: 2015-04-07 17:57:17 +03:00
98831F3A.mmwords test/test.py: 2015-04-07 17:57:17 +03:00
98831F3A[1,31-33,500-501,1010-1011].addrs test/test.py: 2015-04-07 17:57:17 +03:00
98831F3A[1,31-33,500-501,1010-1011].akeys.mmenc test/test.py: 2015-04-07 17:57:17 +03:00
98831F3A[1,31-33,500-501,1010-1011].testnet.addrs test.py: update testnet reference address and key-address files 2018-06-04 12:13:52 +03:00
98831F3A[1,31-33,500-501,1010-1011].testnet.akeys.mmenc test.py: update testnet reference address and key-address files 2018-06-04 12:13:52 +03:00
542169[5.68152,34].sigtx unit_tests.py tx: test signed and altcoin transactions 2022-02-05 13:32:54 +00:00
bad-comment-unspent.json tool.py: fix tool API; test.py: add tool_api test, minor fixes 2020-06-08 17:03:21 +00:00
btcwallet-bech32.dump Bech32: additional tests 2018-03-06 10:28:41 +03:00
btcwallet-segwit.dump test/gentest.py: add p2sh-segwit wallet dump 2018-03-06 10:31:57 +03:00
btcwallet-testnet.dump mmgen-regtest: test suite support, mswin bugfixes 2017-09-19 22:14:00 +03:00
btcwallet.dump mmgen-regtest: test suite support, mswin bugfixes 2017-09-19 22:14:00 +03:00
ED405C[BTC].rawmsg.json various fixes and cleanups 2022-05-03 21:01:05 +00:00
FE3C6545-161E495F-9860A85B[128,1].incog-old.offset123 Version 0.8.8 2016-11-23 22:04:17 +03:00
FE3C6545-161E495F-BEB7548E[128,1].incog-offset123 Version 0.8.8 2016-11-23 22:04:17 +03:00
FE3C6545-BC4BE3F2-32586837[128,1].mmincox New 'mmgen-walletconv' utility converts to and from all available MMGen wallet 2015-04-25 19:39:25 +03:00
FE3C6545-D782B529[128,1].mmdat test/test.py: 2015-04-07 17:57:17 +03:00
FE3C6545-E29303EA-5E229E30[128,1].mmincog New 'mmgen-walletconv' utility converts to and from all available MMGen wallet 2015-04-25 19:39:25 +03:00
FE3C6545.b6d New die roll (base6d) wallet format 2019-10-28 15:19:54 +00:00
FE3C6545.bip39 Complete BIP39 mnemonic support 2019-07-09 15:44:17 +03:00
FE3C6545.hex new wallet format: PlainHexSeedFile (plain hexadecimal w/o checksum) 2019-10-23 12:25:24 +00:00
FE3C6545.mmhex [seed]: export seed to hexadecimal (mmhex) format 2016-12-15 20:53:29 +03:00
FE3C6545.mmseed test/test.py: 2015-04-07 17:57:17 +03:00
FE3C6545.mmwords test/test.py: 2015-04-07 17:57:17 +03:00
keyaddrfile_password tooltest2.py - add BTC test vectors 2019-03-06 23:58:59 +03:00
mmgen.cfg new mnemonic entry modes, new 'mn2hex_interactive' tool command 2020-03-12 17:12:43 +00:00
overflow128.b6d dieroll wallet: truncate seed to correct length 2019-10-30 09:20:47 +00:00
sample-text.mmenc New 'mmgen-walletconv' utility converts to and from all available MMGen wallet 2015-04-25 19:39:25 +03:00
tx_valid.json test suite: vendor tx_valid.json from Bitcoin Core repo (v28.0) 2024-12-30 11:31:39 +00:00
wallet-spaced.mmbrain Old non-oo wallet code and files removed 2015-05-01 10:39:45 +03:00
wallet.mmbrain Old non-oo wallet code and files removed 2015-05-01 10:39:45 +03:00