* As per T1967, this diff upgrades the OP_RETURN message logic to propose a Cashtab prefix for messages sent from Cashtab, in addition to the existing prefix which differentiates message transactions from eToken transactions.
* The parsing logic is also updated to delineate between a Cashtab generated message vs an externally generated message (e.g. electrum) in transaction history.
When sending OP_RETURN messages from within Cashtab, the following script is proposed (see useBCH.js)
> OP_RETURN opcode
> [Transaction Type]
> [Protocol ID]
> [Message] - the message content
The following prefix hex codes are proposed in this diff and will be added to an eCash specific prefix standard separately:
> opReturn: {
> opReturnPrefixHex: '6a',
> opReturnPushDataHex: '04',
> opReturnAppPrefixLengthHex: '04',
> appPrefixesHex: {
> eToken: '534c5000',
> cashtab: '00746162',
> },
> },
When parsing OP_RETURN messages, the parseTxData() logic in useBCH.js is now updated as follows:
* checks whether an output contains addresses, if not, assume its either a message or eToken tx
* if the output's hex property contains the eToken prefix, then apply eToken logic
* if the output's hex property contains the cashtab message prefix, then apply cashtab message rendering logic
* else, assume it is an external message e.g. from electrum and apply external message rendering logic
{F5146574}