solana-web3.js icon indicating copy to clipboard operation
solana-web3.js copied to clipboard

[experimental] program derived address assertion and type guard functions don't actually assert that the address is off the curve

Open steveluscher opened this issue 8 months ago • 2 comments

assertIsProgramDerivedAddress and isProgramDerivedAddress don't actually check to see if the address is off the curve. All they do is validate the format of the tuple.

Someone could supply a regular on-curve address there and have those guards pass.

The job is to add in the off-curve check, and to write tests.

NOTE: This still does nothing to assert that the bump seed is the correct one given the address supplied. Thoughts?

steveluscher avatar Oct 23 '23 00:10 steveluscher