solana-web3.js
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
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?