Map 'hash' as known api type, add some more tests (#56)
Gajumaru Serialization Tests / tests (push) Successful in -2m53s

I noticed that the 'hash' serialization type wasn't in the `known_type()` set, although it was supported otherwise.
This PR adds it to the `known_type()` and also exports the type `gmser_api_encoder:known_type()`.

Also, some more tests are added to try to detect this sort of thing in the future.

Co-authored-by: Ulf Wiger <ulf@wiger.net>
Reviewed-on: #56
This commit was merged in pull request #56.
This commit is contained in:
2026-03-24 21:23:20 +09:00
parent 2b24b17af3
commit 05bbf058be
2 changed files with 65 additions and 7 deletions
+3 -1
View File
@@ -13,7 +13,8 @@
safe_decode/2,
byte_size_for_type/1]).
-export_type([encoded/0]).
-export_type([encoded/0,
known_type/0]).
-type known_type() :: key_block_hash
| micro_block_hash
@@ -38,6 +39,7 @@
| native_token
| commitment
| peer_pubkey
| hash
| state
| poi
| state_trees