BlockchainCommons/bc-envelope-cli-rust

Byteword "mysteries"

cyberphone opened this issue · 1 comments

Since I'm a total n00b regarding the CLI, Envelopes and Rust, I may have gotten things wrong...

Question 1: Is this table still valid?
https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-012-bytewords.md#word-list
My experiments with the CLI do not match:

C:\arplay\rust\bc-envelope-cli-rust>envelope subject type string "Hello"
ur:envelope/tpcsihfdihjzjzjllgcllact

C:\arplay\rust\bc-envelope-cli-rust>envelope format --type=diag ur:envelope/tpcsihfdihjzjzjllgcllact
200(   / envelope /
   24("Hello")   / leaf /
)

C:\arplay\rust\bc-envelope-cli-rust>envelope format --type=cbor ur:envelope/tpcsihfdihjzjzjllgcllact
d8c8d8186548656c6c6f

The CBOR hex does not follow the table when converted back to Bytewords. c8 => cs seems to be wrong.

Question 2: in which Rust file is this encoding/decoding performed?

Than Wolf, ur:envelope/ signifies the envelope tag 200() and is thus not a part of the ByteWords "payload".