1

I don't have experience with solana yet and I have question in my work. I see that it is possible to generate a key pair with web3.js But is it possible to generate a new pshair with php ?

2 Answers 2

3

Looks like you can do it with the solana-php-sdk https://github.com/verze-app/solana-php-sdk with:

use Tighten\SolanaPhpSdk\Keypair;

$keypair = new Keypair();
// OR
$keypair = Keypair::generate();

Ripped off from the tests at https://github.com/verze-app/solana-php-sdk/blob/main/tests/Unit/KeypairTest.php

4
1

Solana uses ed25519 keypairs so if you can find a PHP library to do that, absolutely.

EDIT: Such as this one https://github.com/encedo/php-ed25519-ext

1
  • sorry, can you give an example code for creating an account using php ?
    – Leo Loki
    Commented Feb 8, 2023 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.