I use cardano-cli-js on TESTNET
After run the file, I get this error:
cardano-cli: HandshakeError (Refused NodeToClientV_12 "version data mismatch: NodeToClientVersionData {networkMagic = NetworkMagic {unNetworkMagic = 1097911063}} /= NodeToClientVersionData {networkMagic = NetworkMagic {unNetworkMagic = 764824073}}")node:child_process:902
throw err;
^
Error: Command failed: cardano-cli query utxo --mainnet --address addr1qxex9tgp7qmwtd402fmgyl6xg3lsg6mw8wpngykxjulps25q7m2wz09ygqe3kpfutf32axdr84euxqv4ds9ek9q0fsrqyennfp --cardano-mode
cardano-cli: HandshakeError (Refused NodeToClientV_12 "version data mismatch: NodeToClientVersionData {networkMagic = NetworkMagic {unNetworkMagic = 1097911063}} /= NodeToClientVersionData {networkMagic = NetworkMagic {unNetworkMagic = 764824073}}")
my code:
const CardanocliJs = require( **"cardanocli-js"** );
const shelleyGenesisPath = **"testnet-shelley-genesis.json"** ;
const cardano = **new** CardanocliJs({ shelleyGenesisPath });
const createWallet = (account) => {
const payment = cardano.addressKeyGen(account);
const stake = cardano.stakeAddressKeyGen(account);
cardano.stakeAddressBuild(account);
cardano.addressBuild(account, {
paymentVkey: payment.vkey,
stakeVkey: stake.vkey,
});
return cardano.wallet(account);
};
const openWallet = (account) => {
return cardano.wallet(account);
};
const wallet = openWallet( **"A"** )