It seems Solscan defaults to setting onCurve
to false for addresses that don't have any transactions associated to it. How can I reliably check if a given address is on curve or not?
1 Answer
We can use the isOnCurve
method of PublicKey
from web3.js:
const onCurve = PublicKey.isOnCurve('ACYz3rCamFVGdub1BZ43yUnemp9PWNQBbn4KvPrrMeS1');
PS: It appears solana.fm doesn't have this bug, so can also just use that.
-
1@Jimii check out docs.rs/solana-program/latest/solana_program/pubkey/… Commented Jun 7 at 6:22