• Example
  • Use Cases
  • Example
  • Use Cases
  • In IPLD DAG_CBOR there is a way to encode raw data by specifying an object with { "/": { "bytes": <BASE64-URL-Encoded-Data> } }
    This is used to encode raw binary data inside Hypermedia Permanent Data.
    Example
    As an example, lets look at a signature within a structured data block. The raw binary data is first encoded with base64url (RFC 4648 §5) so that it may be safely used in a string.
    Then the encoded value is inserted into a { "/": { "bytes": ... }} data structure. So an example signature may look like this (in the JSON representation of the CBOR data):
      "sig": {
        "/": {
          "bytes": "5gjnnpeM4WsfjtxZ7bVfojbK8lEG0i3ypypAORjiuLVZXk0t2V/yFsyM6o0PsEp4OVdk2/XKfW7KOthp1FYODA"
        }
      },
    Use Cases
    This approach is also used to encode Account IDs (public keys) when it is referenced in the permanent data.
    Discussions