Changeset 205
- Timestamp:
- 03/15/08 16:23:08 (4 years ago)
- Files:
-
- 1 modified
-
trunk/standards/protocol.txt (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/standards/protocol.txt
r204 r205 32 32 - replace "COIN_SPEND" with "SPEND_TOKEN" 33 33 - throw out reduntant "TRANSFER_TOKEN" explanatoins 34 - Warning that TRANSFER_TOKEN option "type=" will move forward35 34 - add authentication and authorization, at least for "target" 36 35 when minting … … 156 155 157 156 TRANSFER_TOKEN_REQUEST( 158 transaction_id, list_of_options, target, list_of_blinds+keyids, list_of_tokens 159 ) 160 157 transaction_id, target, list_of_blinds+keyids, 158 list_of_tokens, list_of_options ) 159 160 [ WARNING: In future versions of this protocol, it wll change to 161 TRANSFER_TOKEN_REQUEST ( 162 transaction_id, list_of_options, 163 target, list_of_blinds+keyids, list_of_tokens ) 164 ] 165 161 166 to IS (issuer service), where 162 167 163 168 * transaction_id is a base64(random(128bit)) referencing this transaction 164 e.g. for later resume after an abort. 165 * option may contain variable=value pairs like "JITM=mandatory". 166 * target 167 * value(list_of_blinds) = value(list_of_tokens): empty 168 * value(list_of_blinds) > value(list_of_tokens): payment reference 169 * value(list_of_blinds) < value(list_of_tokens): account reference 170 171 For now, only 'pure' transactions are allowed, so one of these must 172 be empty: 173 * target : token exchange (value(list_of_blinds) = value(list_of_tokens)) 174 * list_of_tokens : mint request 175 * list_of_blinds+keyids: redemption 169 e.g. for later resume after an abort. 170 * list_of_option may contain variable=value pairs like "JITM=mandatory". 171 It must contain the option "type", which can have three values: 172 * mint : A minting request. target is a payment reference, 173 list_of_tokens must be empty. 174 * redeem : A token redemption. target is an account reference, 175 list_of_blinds+keyids must be empty. 176 * exchange: A request to mint new tokens for old ones. target must be 177 empty, value of blinds must equal value of tokens. 176 178 177 179 If at least one of the blinds or tokens is rejected, the issuer answers 178 180 179 TRANSFER_TOKEN_REJECT( transaction_id, reason, 180 list( (blind1.key_id, reason1), ... ), \ 181 list( (token1.key_id, reason1), ... ) ) 181 TRANSFER_TOKEN_REJECT( 182 transaction_id, reason, 183 list( (blind1.key_id, reason1), ... ), 184 list( (token1.key_id, reason1), ... ) ) 182 185 183 186 where "reason" may be some general failure like "500 minting not available". 184 187 If the request is accepted with no delay, IS answers 185 188 186 TRANSFER_TOKEN_ACCEPT( transaction_id, message, list_of_signed_blinds) 189 TRANSFER_TOKEN_ACCEPT( 190 transaction_id, message, list_of_signed_blinds) 187 191 188 192 (with list_of_singed_blinds empty if no minting was required) 189 193 If minting was requested and acccepted but postponed, IS answers 190 194 191 TRANSFER_TOKEN_DELAY( transaction_id, message )195 TRANSFER_TOKEN_DELAY( transaction_id, message ) 192 196 193 197 In this case, the wallet can fetch the signed blinds later by 194 198 195 TRANSFER_TOKEN_RESUME( transaction_id )199 TRANSFER_TOKEN_RESUME( transaction_id ) 196 200 197 201 … … 200 204 * Send [was: MINT_REQUEST] 201 205 202 TRANSFER_TOKEN_REQUEST( transaction_id, list_of_options, target, \203 list_of_blinds+keyids, (empty list))206 TRANSFER_TOKEN_REQUEST( transaction_id, target, 207 list_of_blinds+keyids, (empty list) , list_of_options, ) 204 208 205 209 to issuer service … … 208 212 is not current): 209 213 210 TRANSFER_TOKEN_REJECT( transaction_id, reason, 211 list( (blind1.key_id, reason1), ... ), \ 212 (empty list1) ) 214 TRANSFER_TOKEN_REJECT( transaction_id, reason, 215 list( (blind1.key_id, reason1), ... ), (empty list1) ) 213 216 214 217 ElseIf minting is done just-in-time, IS answers 215 218 216 TRANSFER_TOKEN_ACCEPT( transaction_id, message, list_of_signed_blinds)219 TRANSFER_TOKEN_ACCEPT( transaction_id, message, list_of_signed_blinds) 217 220 218 221 Else IS queues blind to the mint and tells wallet to wait 219 222 220 TRANSFER_TOKEN_DELAY( transaction_id, reason )223 TRANSFER_TOKEN_DELAY( transaction_id, reason ) 221 224 222 225 Session is terminated. … … 231 234 * Wallet asks issuer service [was: FETCH_MINTED_REQUEST] 232 235 233 TRANSFER_TOKEN_RESUME( transaction_id )236 TRANSFER_TOKEN_RESUME( transaction_id ) 234 237 235 238 * IS either rejects finally 236 239 237 TRANSFER_TOKEN_REJECT( transaction_id, reason,238 list( (blind1.key_id, reason1), ... ), (empty list) )240 TRANSFER_TOKEN_REJECT( transaction_id, reason, 241 list( (blind1.key_id, reason1), ... ), (empty list) ) 239 242 240 243 with reasons like "TID Unknown", "TID expired", "TID rejected", ..., 241 244 or tells to wait longer 242 245 243 TRANSFER_TOKEN_DELAY( transaction_id, reason )246 TRANSFER_TOKEN_DELAY( transaction_id, reason ) 244 247 245 248 (question: what about key expiration while request is in mining queue) … … 248 251 or passes signed blinds to wallet Bob, must preserve order 249 252 250 TRANSFER_TOKEN_ACCEPT( transaction_id, message, list_of_singed_blinds )253 TRANSFER_TOKEN_ACCEPT( transaction_id, message, list_of_singed_blinds ) 251 254 252 255 Session terminates
