root / trunk / standards / messages / all.txt

Revision 210, 5.8 kB (checked in by ocmathew, 4 years ago)

Updated wallet to wallet with SPEND_TOKEN_* from TOKEN_*

Line 
1Messages between any two parties of the network
2
3
4Wallet & Wallet         Wallet & IS
5
6=================       =====================
7= SUM           =       = MINT_KEY          =
8= SPEND_TOKEN   =       = TRANSFER_TOKEN    =
9=================       =====================
10                       
11    Prior: All messages between two entities that can occur directly before this one
12    Follow: All messages between two entities that can occur directly after this one
13   
14    Hello is the initial handshake between two entities or the state after a Goodbye
15    Goodbye is the end of a transaction, although also a Hello for a new transaction
16
17============================================================================
18
19
20********************
21* Wallet to Wallet *
22********************
23
24=================
25= SUM           =
26= SPEND_TOKEN   =
27=================
28
29SUM
30-----
31
32A:
33  SUM_ANNOUNCE  #base64(transaction_id)
34                standard identifier
35                currency identifier
36                amount
37                target (what exactly is the target? Should it be base64 encoded?)
38        Prior:  Hello
39        Follow: SUM_ACCEPT
40                SUM_REJECT
41
42B:
43  SUM_ACCEPT
44        Prior:  SUM_ANNOUNCE
45        Follow: TOKEN_REDEEM
46                       
47  SUM_REJECT
48        Prior:  SUM_ANNOUNCE
49        Follow: Goodbye
50                       
51
52
53SPEND_TOKEN
54-----------
55
56A:
57  SPEND_TOKEN_REQUEST   list(token)
58        Prior:  SUM_ACCEPT
59        Follow: TOKEN_REJECT
60                TOKEN_ACCEPT
61
62B:
63  SPEND_TOKEN_REJECT    type
64                        list(detail-reason) | list()
65                    Reasons:
66                        'Rejected'
67                        'Invalid token'
68                        'See detail':
69                            'None'
70                            All options of Reason, except 'See detail'
71        Prior:  TOKEN_REDEEM
72        Follow: TOKEN_REDEEM
73                Goodbye
74
75  SPEND_TOKEN_ACCEPT
76        Prior:  TOKEN_REDEEM
77        Follow: Goodbye
78
79
80
81
82
83============================================================================
84
85
86****************
87* Wallet to IS *
88****************
89
90=====================
91= MINT_KEY          =
92= TRANSFER_TOKEN    =
93=====================
94
95MINT_KEY
96-----------
97
98Wallet:
99  MINT_KEY_FETCH_DENOMINATION   list(denomination, ...) TIME(time)|'0'
100    Prior:  Hello
101    Follow: MINT_KEY_PASS
102            MINT_KEY_FAILURE
103           
104  MINT_KEY_FETCH_KEYID  list(#base64(key_identifier), ...)
105    Prior:  Hello
106    Follow: MINT_KEY_PASS
107            MINT_KEY_FAILURE
108
109IS:
110  MINT_KEY_PASS     list(keycertificate, ...)
111    Prior:  MINT_KEY_FETCH_DENOMINATION
112            MINT_KEY_FETCH_KEYID
113    Follow: Goodbye
114           
115  MINT_KEY_FAILURE  list(([denomination|#base64(key_identifier)], reason), ...)
116                Reasons:
117                    Unknown denomination
118                    Unknown key_identifier
119                    Revoked key_identifier
120    Prior:  MINT_KEY_FETCH_DENOMINATION
121            MINT_KEY_FETCH_KEYID
122    Follow: Goodbye
123 
124
125
126TRANSFER_TOKEN
127--------------
128
129Wallet:
130  TRANSFER_TOKEN_REQUEST    #base64(transaction_id)
131                            target
132                            list((#base64(key_identifier), list(blind,...)),...)
133                            list(token,...)
134                            list(('type', type), (option, value),...)
135                Types:
136                    'redeem'
137                    'exchange'
138                    'mint'
139    Prior:  Hello
140    Follow: TRANSFER_TOKEN_REJECT
141            TRANSFER_TOKEN_ACCEPT
142            TRANSFER_TOKEN_DELAY
143           
144  TRANSFER_TOKEN_RESUME     #base64(transaction_id)
145    Prior:  Hello
146    Follow: TRANSFER_TOKEN_REJECT
147            TRANSFER_TOKEN_ACCEPT
148            TRANSFER_TOKEN_DELAY
149               
150IS:
151  TRANSFER_TOKEN_REJECT     #base64(transaction_id)
152                            type
153                            reason
154                            list(reason-detail)|list()
155                Types:
156                    'Generic'
157                    'Option'
158                    'Target'
159                    'Token'
160                    'Blind'
161                Reasons:
162                    Generic:
163                        'Rejected'
164                    Option:
165                        'Rejected'
166                        'Unknown option'
167                        'Incorrect type'
168                        'See detail':
169                            'None'
170                            All options of Reason, except 'See detail'
171                    Target:
172                        'Rejected'
173                        'IS-Reject' + Issuer specific rejection string
174                    Token:
175                        'Rejected'
176                        'Invalid key_identifier'
177                        'Revoked key'
178                        'Invalid token'
179                        'Token already spent'
180                        'See detail':
181                            'None'
182                            All options of Reason, except 'See detail'
183                    Blind:
184                        'Rejected'
185                        'Invalid key_identifier'
186                        'Key too soon'
187                        'Key expired'
188                        'Revoked key'
189                        'Unable to sign'
190                        'See detail':
191                            'None'
192                            All options of Reason, except 'See detail'
193    Prior:  TRANSFER_TOKEN_REQUEST
194            TRANSFER_TOKEN_RESUME
195    Follow: Goodbye
196   
197  TRANSFER_TOKEN_ACCEPT     #base64(transaction_id)
198                            list(signed_blind,...)
199    Prior:  TRANSFER_TOKEN_REQUEST
200            TRANSFER_TOKEN_RESUME
201    Follow: Goodbye
202   
203  TRANSFER_TOKEN_DELAY  #base64(transaction_id) "Message"
204                    Messages:
205                        **Haven't done this yet**
206    Prior:  TRANSFER_TOKEN_REQUEST
207            TRANSFER_TOKEN_RESUME
208    Follow: Goodbye
209
210
Note: See TracBrowser for help on using the browser.