Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Porting to PHP 8 and rewrite #124

Open
cypherbits opened this issue Mar 28, 2021 · 4 comments
Open

Porting to PHP 8 and rewrite #124

cypherbits opened this issue Mar 28, 2021 · 4 comments

Comments

@cypherbits
Copy link
Contributor

Hi, just to tell you I'm working on porting this to PHP8, using strict types and replace custom classes ( like sha3, ed25519 or base58 ) with mature php projects using strict types.

@serhack
Copy link
Member

serhack commented Mar 28, 2021

That's great! Feel free to create a PR! (or create it now with WIP tag, so I could have a look at it 😄 ).

@cypherbits
Copy link
Contributor Author

You can see it here https://github.com/cypherbits/monerophp/tree/new-generation-php8

It is early development. I deleted SHA3, ed25519 and Base58 classes since there are better and more modern projects...

I'm working on the WalletRPC at the moment and I created some classes like TransferAmount and TransferDestination to make it easy to define things...

Maybe we should make an "easy to use" Monero RPC based fully on classes like Paypal or Stripe too... IDK.

For example to define a transfer destination now you can do:

$destination = TransferDestination::create('0.0015654', TransferAmount::$TYPE_MONERO, 'address');

or create independent Amount like:

$amount = new TransferAmount('1321321654', TransferAmount::$TYPE_PICONERO);
or
$amount = new TransferAmount('0.0015654', TransferAmount::$TYPE_MONERO);

I'm removing old support like making transfers with PaymentIds (they are not on the RPC specification anymore...) or defining some inputs we didn't have yet...

What do you think?

@aguevaraIL
Copy link

Why is it now following PSR12 standard?

@cypherbits
Copy link
Contributor Author

I'm working on my fork: https://github.com/cypherbits/monerophp/tree/new-generation-php8

I'm already half-done with jsonRPCclient and the wallet rpc.

Do we really need a PHP implementation of:

  • ed25519
  • sha3
  • cryptonote

I understand we needed sha3 and ed25519 for cryptonote, in the past. Could we use PHP sodium and sha3 functions now? Or we cannot? I need help with this work...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants