How can I generate a Dogecoin address from a Litecoin private key? I'd like to do the following:


I use dumpprivkey to get the private key from Litecoin wallet.
I import this private key into Dogecoin wallet
Which will generate a new Dogecoin address. Both will share the same private key.


The most related post I found is: What happens if you send Bitcoin to a Litecoin address?

However, when I try to directly import, it will give me  the 
error:
{"code":-5,"message":"Invalid private key encoding"}

So now, how can I dump the private key and decode into hex and move the prefix from "L" to "D" and regenerate a WIF for dogecoin?

Is there any existing solution for it?
Let's assume we have this compressed Litecoin WIF private key:  T4DRLwPgnkg9jyivjbbnmqJZjHRxeYTy4idAV5uwEuFdyJBGuxXE.

% echo T4DRLwPgnkg9jyivjbbnmqJZjHRxeYTy4idAV5uwEuFdyJBGuxXE | bx base58check-decode



wrapper
{
    checksum 625264444
    payload 22b207aa76eb058876c667dc64ab8eeaa0a073bc018561c2463d438a0444b70501
    version 176
}


ANSWER for Doge WIF Key:

% bx base58check-encode -v 158 22b207aa76eb058876c667dc64ab8eeaa0a073bc018561c2463d438a0444b70501


QPn542uVdzBgCfV6nEViShboFTpDd1at8mQpQugEQHgpuLbsgcZe

VALIDATION CHECK:

% echo QPn542uVdzBgCfV6nEViShboFTpDd1at8mQpQugEQHgpuLbsgcZe | bx base58check-decode


wrapper
{
    checksum 2298567751
    payload 22b207aa76eb058876c667dc64ab8eeaa0a073bc018561c2463d438a0444b70501
    version 158
}


Examine 158, base58check-decode and base58check-encode for more details.