ipld/edelweiss

add type ByteString for backwards compat with IPLD schema

オープン

#16 opened on 2022/03/11

 (5 件のコメント) (0 件のリアクション) (0 人の担当者)Go (5 件のフォーク)auto 404
good first issue

Repository metrics

Stars
 (17 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド