Closed exzachlyvv closed 2 years ago
I love the idea of a separate repo. Do you want to make it Tighten as well, same reason you answered it for this one?
Yeah that sounds like a great idea to me, let's house it under Tighten. The typical naming convention of the other borsh implementations is borsh-{$language}
. So let's use borsh-php.
@mattstauffer this is now ready for review and merging. I can move this to an isolated repository whenever that is ready.
Do you know of a real-world example I could use to verify in a unit test?
@exzachlyvv here is an example I have been working with:
array:2 [▼
"context" => array:1 [▶]
"value" => array:5 [▼
"data" => array:2 [▼
0 => "BIcWwV2E66FeoVKsjwmsBS9m/7at6DThr7bqkd00fgolgBxluIzeDkDdQE+sVaYh9cprZWqk51KFpY8WDbHI5dUgAAAAUG93ZXIgUGxhbnQAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAATVNQUDEAAAAAAMgAAABodHRwczovL2dhbGF4eS5zdGFyYXRsYXMuY29tL25mdHMvOWQ2SlFTV3JYVkVqeEJOcmVqN2VmQ1VkYzdaQ1JwYUhzZE4yQ0g2c0Vhd24AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== ◀"
1 => "base64"
]
"executable" => false
"lamports" => 5616720
"owner" => "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
"rentEpoch" => 232
]
]
Fetched using:
$account = $client->call('getAccountInfo', ['DSQiKA3zxbvXwJMT8kjUCVPRn9WbEnps18BoQPyRhxQp', ["encoding" => "base64"]]);
@exzachlyvv Great, thanks! Just added you as an admin on https://github.com/tighten/borsh-php.
@exzachlyvv I'm ready to merge as soon as you feel comfortable with it. You can either merge it or add a unit test and merge. Thanks!!
Let me know if I can test something regarding that. Glad if I can be of any help.
Let's merge this in. We can move the borsh functionality over for the borsh-php
repo in a separate PR.
Known limitation:
Todo in the future: