Skip to content

Commit

Permalink
Test on curve public key
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielkoerich committed Apr 28, 2022
1 parent 3cb4b01 commit 0304a28
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/Unit/PublicKeyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,11 @@ public function it_isOnCurve()
// for curve25519 point decompression :/
$offCurve = new PublicKey('12rqwuEgBYiGhBrDJStCiqEtzQpTTiZbh7teNVLuYcFA');
$this->assertFalse(PublicKey::isOnCurve($offCurve));

/**
* @see https://github.com/verze-app/solana-php-sdk/issues/31
*/
$onCurve = new PublicKey('q5xfHVuAsGmKRTmJNshERHHkVnHKxRX3cKzz5cYnFRn');
$this->assertTrue(PublicKey::isOnCurve($onCurve));
}
}

0 comments on commit 0304a28

Please sign in to comment.