PHP lib for Tezos
composer require bzzhh/pezos
Handles Secp256k1 and Ed25519 keys.
$key = Pezos\Keys\Key::fromBase58(
'edskRkGanpJ2fEBdV5xjhFS6DaB5CUsGwZPuTD73VoioQYTTJJKcxJPXXa5FrjA2e8y2LKqwdXNqB9WB4yAQG3gaQTnp15LwDu',
);
$key->getPublicKey();
// "edpkvCdu6RSSe379P2ACo8rGoqNRzQRRwNmHfj1dBr4DnSTKwCNxi5"
$key->getAddress();
// "tz1PAeuxsMA76x5cnKPkWKof2iGneN3Mb1eQ"
$pubKey = Pezos\Keys\PubKey::fromBase58(
'edpkvCdu6RSSe379P2ACo8rGoqNRzQRRwNmHfj1dBr4DnSTKwCNxi5',
);
$pubKey->getAddress();
// "tz1PAeuxsMA76x5cnKPkWKof2iGneN3Mb1eQ"
$privKey->sign('05010000000548656c6c6f');
// edsigtxHb4HCsgf3zLLcTx4Rj23Y3CSJf8jaRXwoVHZJgSsMhzFoxKtinx2TT5FgYKprLVQ9nq8o93MCpmxaTuRB7igT9b6nZyf
$pubKey->verifySignature(
'edsigtxHb4HCsgf3zLLcTx4Rj23Y3CSJf8jaRXwoVHZJgSsMhzFoxKtinx2TT5FgYKprLVQ9nq8o93MCpmxaTuRB7igT9b6nZyf',
'05010000000548656c6c6f',
);
// true
RPC clients generated with jane are available.
The open api files are taken from the official Tezos repo.
- Launch services with
make up
- If possible do TDD,
make test
Thanks to these libraries from which code is just translated to PHP.