ipld/edelweiss

add type ByteString for backwards compat with IPLD schema

開放

#16 建立於 2022年3月11日

 (5 則留言) (0 個反應) (0 位負責人)Go (5 個分叉)auto 404
good first issue

倉庫指標

星標
 (17 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Edelweiss type String definitionally holds valid Unicode strings only, and encodes/decodes them from IPLD strings with valid UTF8 encodings.

However, there may be pre-existing IPLD schemas that place non-UTF8 byte sequences in IPLD string objects. By design requirement, Edelweiss must provide a way for working with pre-existing schemas.

One way of doing this without violating Edelweiss's type semantics is to introduce a new Edelweiss type, say called ByteString, which:

  • is a list of bytes on the user-facing end
  • encodes/decodes as an IPLD string of arbitrary bytes on the wire

貢獻者指南