bitshares / bitsharesjs

JavaScript tools for BitShares Encryption and Serialization
https://bitsharesjs.bitshares.org/
MIT License
96 stars 148 forks source link

public/un-encrypted memo #8

Closed baabeetaa closed 2 years ago

baabeetaa commented 7 years ago
If @ref from == @ref to and @ref from == 0 then no encryption is used, the memo is public.

https://github.com/bitshares/bitshares-core/blob/master/libraries/chain/include/graphene/chain/protocol/memo.hpp#L36

However, Im not able to set these params to null or undefined (void 0). https://github.com/bitshares/bitsharesjs/blob/master/lib/serializer/src/operations.js#L393

BTW, I can still set the message to clear text as a workaround.

Is is a bug or I am missing anything? Thank you,

xeroc commented 7 years ago

On chain, the from and to fields are not optional, but required. A work around would be to use the 'all-zero pubkey' (properly formated with checksum etc). That could be used to indicate plaintext