verze-app / solana-php-sdk

Simple PHP SDK for Solana JSON RPC endpoints
MIT License
88 stars 45 forks source link

Add DidSolProgram feature #53

Open chongkan opened 4 months ago

chongkan commented 4 months ago

Add DidSolProgram class to interact with DidSolProgram Accounts, containing 3 static methods:

Add Accounts/DidData Struct/SCHEME + Accounts/DidData/ServiceStruct + Accounts/DidData/class VerificationMethodStruct, based on the DidSol Program IDL.

References:

DID Spec: https://w3c.github.io/did-core/ DID Method Spec: The did:sol Method v3.0 - A DID Method on the Solana Blockchain GitHub: https://github.com/identity-com/sol-did DidSolProgram: didso1Dpqpm4CsiCjzP766BGY89CAdD6ZBL68cRhFPc


what-the-diff[bot] commented 4 months ago

PR Summary

neverything commented 4 months ago

Hi there @chongkan and thank you for this PR. I haven't touched this project in a long long time and moved on to other projects. Would you like to take it over?

chongkan commented 4 months ago

Hi @neverything! - I would be really happy to do so. :-)

chongkan commented 4 months ago

@neverything funny how we are both interested in about the same stuff. -> https://silvanhagen.com/writing/passwordless-login-with-laravel-breeze/

I have a similar setup using either Email or SMS for OTPs + WebAuthn or Web3 after confirming a phone number or email. Except I ended up using the Vue+Inertia stack. The reason for me wanting to continue with this project is because I have my BE in Laravel 11.

I made a new package: https://github.com/Attestto-com/solana-php-sdk

Added you in the list of credit and will be editing the readme and references to Verze this week. ( removing them )

neverything commented 4 months ago

@chongkan cool, if you want I can make you the owner of this project, so you don't need to continue using the fork or I can link from this package to use your fork instead and archive it publicly. Let me know what works for you?

I remember doing auth using web3 on verze and it was so much fun nowadays I'm building other stuff, but processing large amounts of background jobs helps with all the new projects I'm working on.

chongkan commented 4 months ago

@neverything I think that linking to the new repo would be better because to be honest, I am not quite sure of what I am doing :-p

I made a new Repo and have been refactoring a lot, sometimes with errors and somewhat disorganized. e.g. Never used GitActions in the past and made a lot of commits in the main branch on day one just to get that working.

I am now getting more organized and maybe I will later do a fresh repo or not.

I have refactored the Borsh Implementation to get rid of the Dynamic Properties deprecation warnings, added some more coverage and something I am still not quote sure about is a refactor of the RPC client to enable Dep. Injection to be able to mock the HTTP client responses without calling the real RPCs. -- Not sure if there is a reason for doing so, or if I should later test the real RPC calls separately ( I think that is the right path but haven't discussed it with anyone )

I just changed the main README.md a lot, and added a docs folder where I am planning to put diverse docs as I go.


Not sure if I understand this right: "but processing large amounts of background jobs helps with all the new projects I'm working on."


I am understanding that you are interested in the PHP SDK because it helps a lot with BG Jobs for projects you have?

That is one of the reasons why I insisted on looking, trying and continuing with this project, because I am leveraging Laravel to handle a lot of Jobs (queues) and the DB + VUE to produce a faster UX for my project. I still feel uncertain but it seems to me that it is really possible, I think the most difficult part was the BORSH Serialization/Deserialization process because the rest is pretty much based on RPC calls.

If you could link my Repo from yours, I would really appreciated, beyond the chance to get some help, this is my very first real project and if my personal project doesn't go thru, I am thinking on looking for web3 related jobs etc, so, having some exposure would be really good.

I have no team since 2018, which is also why I like laravel ( being one person, it is easier for me to mainatain the entire stack with Laravel )

Take a look at the readme, I included you in the bottom : https://github.com/Attestto-com/solana-php-sdk