-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(experimental): add blockhash codec and type assertions
Similar to the `AddressCodec` in `@solana/addresses`, we could use a typed 32-byte codec that can chain base64 encoding into its serialization, for `Blockhash`. Here I've added the same kind of combined codec as `getAddressCodec` to the `blockhash` type in `@solana/rpc-types`. Note: The implementation is almost identical, with the exception of the types, and the tests are exactly the same as `getAddressCodec`. I've also added some more assertions to `blockhash` to keep the API consistent.
- Loading branch information
1 parent
f9509c7
commit 19f6725
Showing
2 changed files
with
176 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters