Allows the Bitcoin and Altcoin Wallets WordPress plugin to Connect to a Monero wallet, or to any other wallet that is a fork of CryptoNote.

The Bitcoin and Altcoin Wallets free WordPress plugin by default lets you connect a Bitcoin wallet daemon with your WordPress site.

To use the plugin with Monero, or other privacy-focused cryptocurrencies based on the CryptoNote protocol, first set up your full node, then use this coin adapter to connect to a running wallet.

installation instructions

a note about stagenet

What follows is instructions for connecting to Mainnet. As a test, you might want to first connect to Monero stagenet (testnet is not appropriate for integration testing). Simply add the --stagenet argument to all the shell commands. Consult the Monero documentation for details.

To test stagenet deposits, you can use the faucet at https://community.xmr.to/faucet/stagenet/.

Once you are ready to move to mainnet, you must restart the shell commands without --stagenet. You must generate a new wallet file (Run the monero-wallet-cli command without --stagenet and save the wallet key). You will also need to refresh the user deposit addresses via the plugin’s WalletsAdaptersRenew deposit addresses feature.

complete instructions

(tested with v0.16.0.0)

  1. Install and activate the Bitcoin and Altcoin Wallets plugin.
  2. Install and activate this coin adapter extension if you have not already done so.
  3. Start a Monero daemon on your server:
    monerod --rpc-bind-port 18081 --rpc-login monero_daemon_user:monero_daemon_pass --no-zmq
  4. Create a new Monero wallet that will be used with this site with the command
    monero-wallet-cli --daemon-login monero_daemon_user:monero_daemon_pass --wallet-file /path/to/monero/wallet
  5. Follow the console instructions to generate the wallet. Save the seed carefully, away from your server.
  6. Start a wallet and connect it to the daemon:
    monero-wallet-rpc --rpc-login monero_rpc_user:monero_rpc_pass --rpc-bind-port 18082 --wallet-file /path/to/monero/wallet --password wallet_pass --daemon-login monero_daemon_user:monero_daemon_pass --daemon-address=127.0.0.1:18081
    If you are connecting to a wallet on a remote machine (i.e. a machine other than your WordPress server) then please see here.
  7. In your WordPress installation, go to WalletsMonero (CryptoNote full node) (XMR)Wallet RPC API.
  8. Make sure that the RPC address and binding port of the Monero wallet match those in the Monero coin adapter settings.
  9. Make sure that the RPC login user/pass matches those in the Monero coin adapter settings.
  10. Once everything is set, go to WalletsAdapters.
  11. Check that the Adapter Status for Monero is ✅ Responding. If connection is not successful, an error will be shown instead.
  12. Please take the time to activate your installation by entering your activation code. After registering at dashed-slug.net, you will have received your activation code in an e-mail. This code is also available when you log in to dashed-slug.net. Your WordPress installation will receive updates for this plugin extension, and for all other installed dashed-slug plugins. Follow the instructions given here.

adding support for more coins

This coin adapter is named Monero Coin Adapter for SEO purposes only, since Monero is currently the most well-known coin in its family! The adapter is actually a CryptoNote coin adapter, and you can use it to connect to any number of coins based on CryptoNote. This would include coins such as Bytecoin (BCN), Boolberry (BBR), Dashcoin (DSH), DarkNetCoin (DNC), Fantomcoin (FCN), Monero (XMR), Pebblecoin (XPB), Quazarcoin (QCN), AEONDoctorByte (DB), Infinium-8 (INF8), MonetaVerde (MCN), Dosh (DOSH), MagnatojRedWind (RD), Tavos (XTV), etc.

The coins available by default are in wp-content/plugins/wallets-monero/assets/coins.csv. The extension will instantiate adapters based on this file. There is a larger list of coins available in the file wp-content/plugins/wallets-monero/assets/more-coins.csv. As a test, you can edit this CSV file to add/remove coin adapters. However, this is not recommended, since any updates to the extension will overwrite your changes. Instead, use a separate plugin to filter this list.

Here’s an example of how to add a hypothetical XYZ coin using the wallets_cryptonote_coinsfilter:

  1. Create a wallet file and start the daemon and wallet services as detailed in the installation instructions (above). Make sure to use different TCP ports for each coin.
  2. Download this PHP file.
  3. Edit the name and symbol for the coin.
  4. If possible, add a URL to a Block Explorer that will be able to display transaction information. The string “%s” in your URL will be replaced with the actual TXID. CryptoNote explorers cannot display address info, so you do not need to provide a URL for addresses.
  5. You can set the default Minimum withdrawal amount and default withdrawal and move fees. These can be overridden later in your coin adapter settings.
  6. Copy the PHP file into your wp-content/plugins directory. The file operates as a single-file WordPress plugin, so it does not need to be in a subdirectory.
  7. Go to the Plugins admin screen and activate your plugin.
  8. You can now go to Wallets → XYZ coin full node (multi) and configure your connection settings to match those of your wallet.

download

Available free of charge to all subscribers and premium members (you need to be logged in).

troubleshooting

I am trying to connect to a wallet that is a fork of Cryptonote but the coin adapter does not work with it.

This coin adapter currently relies heavily on the subaddresses feature which was introduced in Monero, but is not available in vanilla Cryptonote. Therefore, the coin adapter will only work with forks that have subaddresses. This includes many, but not all Cryptonote wallets.

Withdrawals are executed on the blockchain, but in the plugin’s ledger they remain in a “pending” state, and the number of confirmations remains at zero.

When a withdrawal is attempted, the plugin must do a /transfer RPC call to the wallet (monero-wallet-rpc). The wallet  proceeds to sign the transaction, and then responds with a TXID to the plugin. The plugin then proceeds to update the transaction state. In some tests, transaction signing took too long (longer than 30 sec in one instance). The WordPress thread that waited for the TXID then died, before it could update the DB.

How fast your server is at signing transactions will depend on many factors. Always test withdrawals before production!

To solve this issue: go to the coin adapter settings and set the max HTTP timeout to 60, or even 120 seconds (the default is 30). You would also have to increase the PHP timeout and all other server timeouts. The goal here is that the RPC API call must be allowed to run for more than 30 seconds.

support

Please visit the support area for any issues, suggestions, feedback regarding this plugin extension.

For support regarding the parent plugin, Bitcoin and Altcoin Wallets, please use the support forums on WordPress.org.

Monero Coin Adapter extension

Updated on 2021-02-15T16:17:58+00:00, by alexg.