NEO: Why get different address from privatekey using neon-js?

22 views Asked by At

I'm using this js code to get NEO address from WIF or privatekey but get a different addres than when I import the WIF to NeoLine wallet.

const privateKey = "KwnETPM2m8wTAY3qySvDVLf3Vpfg77nvJhxR2Qyi8uMWKoqP1Q3f"; //mock key

const publicKey = Neon.get.publicKeyFromPrivateKey(privateKey);

const scriptHash = Neon.get.scriptHashFromPublicKey(publicKey);

const address = Neon.get.addressFromScriptHash(scriptHash);

I get: NaLyj8U5yndNVLQQfnyHQ4Z4AYGZazC3ma

But in NeoLine i get: AUMgtJsw3kBrcA7poBYNaonZTGMNoqZNLy

Why?

0

There are 0 answers