ssbc / bendy-butt-spec

6 stars 0 forks source link

Encode as bencode instead of bipf #3

Closed arj03 closed 3 years ago

arj03 commented 3 years ago

@cryptix

arj03 commented 3 years ago

@cryptix I'm feeling quite good about this now. I can use the standard bencode library for this. Just had to wrap my head around how to go about it. I added a small example message signed with my key. It's not a real message as content is just a normal msg & I signed both msg & content, but should be a good test case as the structure should be there.

cryptix commented 3 years ago

Great! We might want to link our implementations from this document for better discoverability?

https://github.com/ssb-ngi-pointer/go-metafeed

The test vector also isn't for real metafeed messages yet but I outlined the idea here: https://gist.github.com/cryptix/676ca87e195228e9add719f6ae01215f

arj03 commented 3 years ago

Great! We might want to link our implementations from this document for better discoverability?

https://github.com/ssb-ngi-pointer/go-metafeed

Absolutely, working on a js library node. I think that can be done as separate PR.

The test vector also isn't for real metafeed messages yet but I outlined the idea here: https://gist.github.com/cryptix/676ca87e195228e9add719f6ae01215f

Agree this repo should include proper test vectors. The example in this PR is not super good. It was mostly to show the structure of the message visually.