Closed SionoiS closed 2 years ago
So PubSub message now deserialize to;
from -> base58btc peerid
,data -> Vec
I tried to get PeerId as Cid but it's too uncommon. Data as Vec
I will now try to send arbitrary data instead of utf8 text only.
Well nevermind..
Ideally ipfs should only i/o multibase encoded strings. For now the user will have to transcode. So I guess I'm done for now.
Let me know what you think!
Hi! Thanks for opening this. I'll try to get to it soon!
I just notice the failed test. Are empty messages even possible? I would think 'data' may be empty but 'from' and 'seqno' always present.
Maybe add a test for a message with an empty 'data' array. /shrug
Hello!
I'm trying to deserialize message correctly to fix #55. I haven't cracked the from field yet. Probably because PeerIds are now Ed25519 since go-ipfs 0.7.0
I'm not sure if having from, data and seqno as options is necessary. According to the docs those fields are not optional.
Also, where should I put the deserialize functions?
Thanks.