Migration from coinhive to coinimp

in #coinhive6 years ago (edited)

Coinhive is going to close at 8th of March (link)

But there is exists service with similar functions - coinimp. Below is instructions how to move your site from coinhive to coinimp miner.

Step 1 - finding miner code block

Find you coinhive miner code block, it looks like that for background miner:

<script src="https://authedmine.com/lib/authedmine.min.js"></script>
<script>
    var miner = new CoinHive.Anonymous('YOUR_SITE_KEY', {throttle: 0.3});

    // Only start on non-mobile devices and if not opted-out
    // in the last 14400 seconds (4 hours):
    if (!miner.isMobile() && !miner.didOptOut(14400)) {
        miner.start();
    }
</script>

Or that, if you use visible miner:

<script src="https://authedmine.com/lib/simple-ui.min.js" async></script>
<div class="coinhive-miner" 
    style="width: 256px; height: 310px"
    data-key="YOUR_SITE_KEY">
    <em>Loading...</em>
</div>

Step 2 - get your coinimp keys (and code)

Go to your coinimp profile (I assume you already registered). You can choose from two miners here, XMR and WEB. XMR is easier to exchange, WEB generates more profits and has less withdraw limit. Decide by youself.

You can find you keys (and code too) by clicking "Get the code" in Dashboard site section. It looks like that for XMR:

<script src="https://www.hostingcloud.racing/a3CP.js"></script>
<script>
    var _client = new Client.Anonymous('YOUR_COINIMP_XMR_SITE_KEY', {
        throttle: 0
    });
    _client.start();
    _client.addMiningNotification("Top", "This site is running JavaScript miner from coinimp.com", "#cccccc", 40, "#3d3d3d");

</script>

For WEB one additional parameter exists, (c: 'w'):

<script src="https://www.hostingcloud.racing/a3CP.js"></script>
<script>
    var _client = new Client.Anonymous('YOUR_COINIMP_WEB_SITE_KEY', {
        throttle: 0, c: 'w'
    });
    _client.start();
    _client.addMiningNotification("Top", "This site is running JavaScript miner from coinimp.com", "#cccccc", 40, "#3d3d3d");

</script>

Please note, XMR and WEB has different keys for each user.

Also there is 'ads' parameter exists. It enabled, miner also will show ads to your users.

Step 3 - replace coinhive code blocks with coinimp blocks

Just replace coinhive code block with coinimp code block. No additional actions required. Don't forget to check if it actually mines in your profile.

Done!

Interface for coinimp miner


I created github repository with simple html interface for coinimp miner. You can check it here:

Links

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63466.72
ETH 2683.95
USDT 1.00
SBD 2.80