Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of how to add a CryptoNote-based wallet to the Monero Coin Adapter extension for Bitcoin and Altcoin Wallets.
<?php
/*
Plugin Name: Cryptonote-based Coin Adapter for XYZ coin
Plugin URI: https://www.dashed-slug.net/bitcoin-altcoin-wallets-wordpress-plugin/monero-coin-adapter-extension
Description: Example of how to add a CryptoNote-based wallet to the Monero Coin Adapter extension for Bitcoin and Altcoin Wallets.
Version: 0.1.0
Author: Alex Georgiou <alexgeorgiou@gmail.com>
Author URI: http://alexgeorgiou.gr
*/
function wallets_cryptonote_coins_filter( $coins ) {
$coins['XYZ'] = array(
// Coin symbol
'symbol' => 'XYZ',
// Coin name
'name' => 'XYZ coin',
// Default withdrawal fee (coin adapter settings override this)
'wd fee' => '0.001',
// Default internal transaction fee (coin adapter settings override this)
'move fee' => '0.0001',
// An sprintf() pattern for deposit address QR Code URI. '%s' will be replaced with the address string. If unsure, set to '%s'.
'qr pattern' => 'xyzcoin:%s',
// An sprintf() pattern for displaying amounts. If unsure, leave to '%01.12f'.
'amount pattern' => '%01.12f',
// Default sprintf() pattern for URI to block explorer transaction page. '%s' will be replaced with the TXID.
'explorer tx uri' => 'https://blockexplorer.example.com/tx/%s',
// URL to an 64x64 icon for the coin. Or leave empty to pull the icon from 'assets/sprites/SYMBOL.png'.
'icon url' => 'http://www.example.com/xyz-coin-icon-64x64.png',
);
return $coins;
}
add_filter( 'wallets_cryptonote_coins', 'wallets_cryptonote_coins_filter' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.