radixdlt-scrypto icon indicating copy to clipboard operation
radixdlt-scrypto copied to clipboard

Various enhancements to SBOR protocol

Open iamyulong opened this issue 2 years ago • 0 comments

Changes:

  • Renamed flag with_type to with_static_info
    • Static info includes type IDs and static sizes
    • Although, in the future, we may introduce dynamic type ID to support Any type
  • Renamed read/write/check_type to read/write/check_type_id
  • Split read/write_u8 into
    • read/write_variant_index
    • read/write_byte
  • Added read/write_variant_label
    • In the future, we may use less bytes to represent the label size
    • May also replace label with index
  • Split read/write_len into
    • read/write_dynamic_size
    • read/write_static_size
  • Made Encode::encode_type_id a static function

iamyulong avatar Aug 05 '22 11:08 iamyulong