user84987: Can't find out how to change network on BitcoinJS-lib with Coininfo and generate Dogecoin address?
In a Coininfo's example I found this: https://github.com/cryptocoinjs/coininfo#want-to-use-with-bitcore-or-bitconjs-lib
But what to do next?

user84987: Solved, and here here is my code:
const coininfo = require('coininfo');
var bitcoin = require("bitcoinjs-lib");

generateDOGE = function() {
    var coininfo = require('coininfo');
    var curr = coininfo.dogecoin.main;
    var frmt = curr.toBitcoinJS();

    const netGain = {
        messagePrefix: '\x19' + frmt.name + ' Signed Message:\n',
        bip32: {
            public: frmt.bip32.public,
            private: frmt.bip32.private
        },
        pubKeyHash: frmt.pubKeyHash,
        scriptHash: frmt.scriptHash,
        wif: frmt.wif
    }

    const keyPair = bitcoin.ECPair.makeRandom({ network: netGain })
    const wif = keyPair.toWIF()
    const address = bitcoin.payments.p2pkh({ pubkey: keyPair.publicKey, network: netGain });
}


84987: <p>Can't find out how to <strong>change</strong> network on <strong>BitcoinJS-lib</strong> with <strong>Coininfo</strong> and generate <strong>Dogecoin</strong> address?</p>

<p>In a <strong>Coininfo's</strong> example I found this: <a href="https://github.com/cryptocoinjs/coininfo#want-to-use-with-bitcore-or-bitconjs-lib" rel="nofollow noreferrer">https://github.com/cryptocoinjs/coininfo#want-to-use-with-bitcore-or-bitconjs-lib</a></p>

<p>But what to do next?</p>
 84987: <p>Solved, and here here is my code:</p>

<pre><code>const coininfo = require('coininfo');
var bitcoin = require("bitcoinjs-lib");

generateDOGE = function() {
    var coininfo = require('coininfo');
    var curr = coininfo.dogecoin.main;
    var frmt = curr.toBitcoinJS();

    const netGain = {
        messagePrefix: '\x19' + frmt.name + ' Signed Message:\n',
        bip32: {
            public: frmt.bip32.public,
            private: frmt.bip32.private
        },
        pubKeyHash: frmt.pubKeyHash,
        scriptHash: frmt.scriptHash,
        wif: frmt.wif
    }

    const keyPair = bitcoin.ECPair.makeRandom({ network: netGain })
    const wif = keyPair.toWIF()
    const address = bitcoin.payments.p2pkh({ pubkey: keyPair.publicKey, network: netGain });
}
</code></pre>
