Closed exzachlyvv closed 2 years ago
Wow! So much work--I'm super impressed! Mind if I do some review and suggest some code style changes, purely personal preference stuff?
Please do, go crazy 😄
OK, so.. I got a third of the way into this review and it's clear to me you have a much greater capacity and knowledge and amount of time to work on this than me.
I want to fully offer to drop the Tighten version of this package and let you take it over under your namespace. Let me know what you think!
From a functional standpoint, I am now ready to merge this.
@exzachlyvv Thank you for your kind words!
And yah, if you'd rather be the maintainer but under the Tighten namespace, that's fine by me! Let me give you maintain permissions right now :)
@mattstauffer how are you feeling about this PR? Did you want more time to review the rest of the code? No rush, just don't want this getting stale.
Other things we should add before a v1.0 (I'll follow up with separate PR's):
Buffer
class to abstract away binary - this will probably result in breaking changes to the API.$data = [
// uint32
...unpack("C*", pack("V", self::PROGRAM_INDEX_CREATE_ACCOUNT)),
// int64
...unpack("C*", pack("P", $lamports)),
// int64
...unpack("C*", pack("P", $space)),
//
...$programId->toBytes(),
];
is not a very friendly API.
@exzachlyvv I think that I'm gonna try to take another look at it today. And then, whether or not i can review the whole thing, let's just merge.
That merge conflict hopefully will be easy to resolve; we can just re-delete the Solana class.
Great work! I'm gonna tag this as a new dot release so I can keep my old apps on the original until I update.
This PR contains a majority of the core Solana API classes and interactions. It leverages PHP's sodium library for all things related to cryptography (TY sodium!).
I have done enough to submit real transactions successfully to the Solana blockchain (see SolanaRpcClientTest@it_test_zvv_real_transaction). Some areas have not been tested thoroughly yet.
Most of my reference point was the 1st party Javascript library, but also quite a bit from the community python library and a little from the community java library.
Some helpful things to know:
Ed25519Keypair::array2bin()
andEd25519Keypair::bin2array()
TODO probably in a different PR (in no particular order):