Skip to content

Commit 498726f

Browse files
gitmachtlKtorZ
authored and
Ryan Williams
committed
CIP-0020 | Update with new Implementors, Screenshots ... (cardano-foundation#394)
* Create cip0020-encryption-modes.json * Update cip0020-encryption-modes.json * Update README.md * Update README.md * Update README.md * Create demo_via_nodeJS.js * Create demo_via_PHP.php * Update demo_via_nodeJS.js * Update README.md * Update README.md * Update README.md * Create cip0020-democode-PHP.php * Delete demo_via_PHP.php * Create cip0020-democode-NODEJS.js * Delete demo_via_nodeJS.js * Create normal-message-metadata.json * Create encrypted-message-metadata.json * Create cip0020-democode-BASH.sh * Update cip0020-democode-BASH.sh * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Added 'SPO Scripts' as an encrypted msg integration example * Delete cip0020-encryption-modes.json * Delete cip0020-democode-BASH.sh * Delete cip0020-democode-NODEJS.js * Delete cip0020-democode-PHP.php * Delete encrypted-message-metadata.json * Delete normal-message-metadata.json * Updating README with updated Implementors - This update uses the new Header-Scheme, added Implementors and updated some Screenshots * Adjust authors list (remove markdown) + adjust section titles levels. Co-authored-by: KtorZ <matthias.benkort@gmail.com>
1 parent d9521a8 commit 498726f

File tree

1 file changed

+79
-41
lines changed

1 file changed

+79
-41
lines changed

CIP-0020/README.md

+79-41
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,154 @@
11
---
22
CIP: 20
33
Title: Transaction message/comment metadata
4-
Authors: Martin Lang <martin@martinlang.at>, Ola Ahlman <ola@ahlnet.nu>, Andrew Westberg <andrewwestberg@gmail.com>
5-
Comments-URI: no comments yet
64
Status: Active
7-
Type: Informational
5+
Category: Metadata
6+
Authors:
7+
- Martin Lang <martin@martinlang.at>
8+
- Ola Ahlman <ola@ahlnet.nu>
9+
- Andrew Westberg <andrewwestberg@gmail.com>
10+
Implementors:
11+
- CNTools <https://cardano-community.github.io/guild-operators/#/Scripts/cntools>
12+
- JorManager <https://bitbucket.org/muamw10/jormanager/>
13+
- StakePoolOperator Scripts <https://github.com/gitmachtl/scripts>
14+
- Cardanoscan.io <https://cardanoscan.io>
15+
- AdaStat.net <https://adastat.net>
16+
- Eternl Wallet <https://eternl.io>
17+
- CardanoWall <https://cardanowall.com>
18+
- Nami Wallet <https://namiwallet.io>
19+
- CNFT <https://cnft.io>
20+
- Cardano Explorer <https://cexplorer.io>
21+
- SundaeSwap <https://https://sundaeswap.finance/>
22+
- Minswap <https://minswap.org/>
23+
- MuesliSwap <https://muesliswap.com/>
24+
- DripDropz.io <https://dripdropz.io/>
25+
- Typhon Wallet <https://typhonwallet.io/>
26+
- Ledger Live <https://www.ledger.com/>
27+
Discussions:
28+
- https://github.com/cardano-foundation/CIPs/pull/100
29+
- https://github.com/cardano-foundation/CIPs/pull/394
830
Created: 2021-06-13
931
License: CC-BY-4.0
1032
---
1133

12-
# Abstract
34+
# CIP-0020: Transaction message/comment metadata
35+
36+
## Abstract
1337

1438
This CIP describes a basic JSON schema to add messages/comments/memos as transaction metadata by using the metadatum label **674**.
1539
Adding **informational text, invoice-numbers or similar** to a transaction on the cardano blockchain.
1640

17-
# Motivation
41+
## Motivation
1842

1943
We have the utilities on the cardano blockchain now since the introduction of the "allegra-era". A simple consens about adding messages, comments or memos to transactions is still missing.
2044
So the CIP authors came together to form a first implementation of this. It is straight and simple, additional keys and content can be added later.
2145
The IOG main wallet `Daedalus` can now also directly show attached metadata information in the transaction details view. This CIP is the missing link to bring it together.
2246

23-
Current Tools/Sites/Explorers that have implemented it already or have plans to implement it:
47+
Some of the current Tools/Sites/Explorers that have implemented it already:
2448
* [CNTools](https://cardano-community.github.io/guild-operators/#/Scripts/cntools)
2549
* [JorManager](https://bitbucket.org/muamw10/jormanager/)
2650
* [StakePoolOperator Scripts](https://github.com/gitmachtl/scripts)
2751
* [Cardanoscan.io](https://cardanoscan.io)
2852
* [AdaStat.net](https://adastat.net)
29-
* [CardanoCommunityWallet](https://ccwallet.io)
53+
* [Eternl Wallet](https://eternl.io)
3054
* [CardanoWall](https://cardanowall.com)
55+
* [Nami Wallet](https://namiwallet.io)
3156
* [CNFT](https://cnft.io)
57+
* [Cardano Explorer](https://cexplorer.io)
58+
* [SundaeSwap](https://https://sundaeswap.finance/)
59+
* [Minswap](https://minswap.org/)
60+
* [MuesliSwap](https://muesliswap.com/)
61+
* [DripDropz.io](https://dripdropz.io/)
62+
* [Typhon Wallet](https://typhonwallet.io/)
63+
* [Ledger Live](https://www.ledger.com/)
3264

33-
# Specification
65+
## Specification
3466

3567
The specification for the individual strings follow the general design specification for JSON metadata, which is already implemented and in operation on the cardano blockchain.
3668
The used metadatum label is **`"674":`**, this number was choosen because it is the T9 encoding of the string "msg".
37-
The message content has the key **`"msg":`** and consists of an **array** of individual **message-strings**.
69+
The message content has the key **`"msg":`** and consists of an **array** of individual **message-strings**.
3870
The number of theses **message-strings** must be at least one for a single message, more for multiple messages/lines. Each of theses individual **message-strings** array entries must be at most 64 bytes when UTF-8 encoded.
3971

40-
Format:
41-
```
42-
{
72+
### Format:
73+
```
74+
{
4375
"674":
44-
{ "msg":
45-
[
76+
{
77+
"msg":
78+
[
4679
"message-string 1" //Optional: ,"message-string 2","message-string 3" ...
4780
]
4881
}
4982
}
5083
```
5184

52-
53-
54-
Example for a single message/comment/memo:
85+
### Example for a single message/comment/memo:
5586
``` json
56-
{
87+
{
5788
"674":
58-
{ "msg":
59-
[
89+
{
90+
"msg":
91+
[
6092
"This is a comment for the transaction xyz, thank you very much!"
6193
]
6294
}
6395
}
6496
```
6597

66-
Example for multiple messages/comments/memos:
98+
### Example for multiple messages/comments/memos:
6799
``` json
68-
{
100+
{
69101
"674":
70-
{ "msg":
71-
[
102+
{
103+
"msg":
104+
[
72105
"Invoice-No: 1234567890",
73106
"Customer-No: 555-1234",
74107
"P.S.: i will shop again at your store :-)"
75108
]
76109
}
77110
}
78111
```
79-
Example above in **Daedalus** currently (could be improved if CIP is implemented):
80-
![image](https://user-images.githubusercontent.com/47434720/121822100-85b38a80-cc9d-11eb-9d13-1869746a69b2.png)
81112

82-
## Some Integration examples
113+
&nbsp;<p>
114+
115+
### Some Integration examples
116+
117+
**Ledger Live** is offering a memo field
118+
![image](https://user-images.githubusercontent.com/47434720/204649383-c34ae733-e136-41b8-8fa8-619dde978621.png)
119+
120+
**Daedalus** shows the metadata text (could be improved if CIP is implemented):
121+
![image](https://user-images.githubusercontent.com/47434720/121822100-85b38a80-cc9d-11eb-9d13-1869746a69b2.png)
83122

84123
**Cardanoscan.io**, **Adastat.net** and other tools implemented it already, to show messages along transactions:
85-
![image](https://user-images.githubusercontent.com/47434720/124379245-1f2af680-dcb6-11eb-97b7-10f70d840e88.png)
86-
![image](https://user-images.githubusercontent.com/47434720/124381343-3ff94900-dcc2-11eb-8d03-8fbacd3322b0.png)
124+
![image](https://user-images.githubusercontent.com/47434720/204633595-d865c7ee-0c30-4af1-bb55-3c0ad323b58c.png)
125+
![image](https://user-images.githubusercontent.com/47434720/204634111-256c6c18-974a-41f5-a6e4-b9edee8f9d62.png)
87126

88-
**ccwallet.io** has added it with a message field on the sending-page, and shows it also on the transactions-page:
89-
![image](https://user-images.githubusercontent.com/47434720/127367420-b360972d-c6e0-4002-865e-df070904bd30.png)
90-
![image](https://user-images.githubusercontent.com/47434720/127367228-339ac059-007a-40fd-a6c0-97f890e93964.png)
91-
![image](https://user-images.githubusercontent.com/47434720/127368912-c85dc9f0-6ee3-4cc1-a24b-9716a20f27d3.png)
127+
**eternl.io** has added it with a message field on the sending-page, and shows it also on the transactions-page:
128+
![image](https://user-images.githubusercontent.com/47434720/204632224-5be33098-00f6-41da-a2f0-7c138b28354f.png)
129+
![image](https://user-images.githubusercontent.com/47434720/204632802-33f1afa5-d9b2-494f-84fe-d7f0594a7f1b.png)
92130

93-
**StakePool Operator Tools**: It works on the commandline like any other script of the collection by just adding the "msg: ..." parameter to a transaction. This automatically generates the needed metadata.json structure and attaches it to the transaction itself.
131+
**StakePool Operator Scripts**: It works on the commandline like any other script of the collection by just adding the "msg: ..." parameter to a transaction. This automatically generates the needed metadata.json structure and attaches it to the transaction itself.
94132
![image](https://user-images.githubusercontent.com/47434720/129110626-6bc5b3c3-102d-4793-b508-7d4190b31cf7.png)
95133

96134
**CNTools**:<br>
97135
![image](https://user-images.githubusercontent.com/47434720/130353491-fc0f3a69-1937-4e72-b680-c04cc069b5c4.png)
98136

99137

100-
# Rationale
138+
## Rationale
101139

102140
This design is simple, so many tools on the cardano blockchain can implement it easily. The array type was choosen to have consistency, no need to switch between a string or
103-
an array format, or testing against a string or array format. Updates in the future are possible, like adding a versioning key `"ver":`, adding a key `"utxo":` to provide specific data for every tx-out#idx in the transaction, making subarrays in the message-strings, etc. But for now, we need a common agreement to provide general messages/comments/memos with this CIP. The starting design war choosen as simple as possible to keep the additional transaction fees as low as possible.
141+
an array format, or testing against a string or array format. Updates in the future are possible, like adding a versioning key `"ver":`, adding a key `"utxo":` to provide specific data for every tx-out#idx in the transaction, adding the `"enc":` key like for encrypted messages, making subarrays in the message-strings, etc. But for now, we need a common agreement to provide general messages/comments/memos with this CIP. The starting design war choosen as simple as possible to keep the additional transaction fees as low as possible.
104142

105-
## Wallet Implementation
143+
### Wallet Implementation
106144

107145
Would be a good idea to hide the message/comment/note behind a "show unmoderated content" button/drop-down. Like the Metadata display on the Cardano Explorer. Also, it should be displayed as plain-text non-clickable. To enhance security further, URLs could be automatically deleted or hidden from such comments, to not welcome bad actors with phishing attempts. Another solution to start with would be to really limit the character space for display in Wallets, like limiting it to `a-zA-z0-9` and a handful of special chars like `+-_#()[]:` without a `.<>"/\` chars, so a domain or html code would not work. Last points are worth for discussions of course, because it would also filter out unicode.
108146

109-
## Handling ill-formed 674 metadata ##
147+
### Handling ill-formed 674 metadata
110148

111-
It is up to the wallet-/display-/receiver-implementor to parse and check the provided metadata. As for the current state, its not possible to have the same label "674" more than once in a cardano transaction. So a check about that can be ignored at the moment. This CIP provides the correct implementation format, the parsing should search for the "674" metadata label and the "msg" key underneath it. There should also be a check, that the provided data within that "msg" key is an array. All other implementations like a missing "msg" key, or a single string instead of an array, should be marked by the display-implementor as "invalid". Additional keys within the "674" label should not affect the parsing of the "msg" key. As written above, we will likely see more entries here in the future like a "version" key for example, so additional keys should not harm the parsing of the "msg" key.
149+
It is up to the wallet-/display-/receiver-implementor to parse and check the provided metadata. As for the current state, its not possible to have the same label "674" more than once in a cardano transaction. So a check about that can be ignored at the moment. This CIP provides the correct implementation format, the parsing should search for the "674" metadata label and the "msg" key underneath it. There should also be a check, that the provided data within that "msg" key is an array. All other implementations like a missing "msg" key, or a single string instead of an array, should be marked by the display-implementor as "invalid". Additional keys within the "674" label should not affect the parsing of the "msg" key. As written above, we will likely see more entries here in the future like a "version" key for example, so additional keys should not harm the parsing of the "msg" key.
112150

113-
## Implementation conclusion ##
151+
### Implementation conclusion
114152

115153
A transaction message should be considered valid if the following apply:
116154

@@ -129,6 +167,6 @@ _Optional to consider for the implementer:_
129167

130168
The implementation format in this CIP should be the ground base for transaction messages/comments/memos and should be respected by creator-/sender-implementations as well as in wallet-/receiver-/display-implementations.
131169

132-
# Copyright
170+
## Copyright
133171

134172
This CIP is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode)

0 commit comments

Comments
 (0)