verze-app / solana-php-sdk

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

Question: Maybe untangle Borsh into it's own package? #20

Closed neverything closed 2 years ago

neverything commented 2 years ago

What would this mean?

Would love to help out

neverything commented 2 years ago

Ping @mattstauffer, only if you have a moment good ser

mattstauffer commented 2 years ago

Whoops, I'm sorry I didn't see this originally! I would love to extract it... but I don't know how to answer your questions. I think exceptions are the easiest: we can just make custom exceptions in that package and update this package to be aware of them.

With Buffer, if we need to use buffers in our Borsh package, then this package can just consume those, so that's fine.

I think the same will have to be true about the PublicKey. Basically anything the Borsh package needs, should move there, and then this package can just get them from there, even if that seems a bit silly.