| 287 | | * Wallet Alice calculates a splitting of sum into coins (units) and |
| 288 | | creates a list of coins to send |
| 289 | | * Wallet Alice and Wallet Bob are synchronized to UTC (within some small margin of error) |
| 290 | | |
| 291 | | * Wallet Alice sends coins to Wallet Bob (this time including their clear serial and signature) |
| | 291 | * Wallet Alice calculates a splitting of sum into coins (units) |
| | 292 | and reates a list of coins to send |
| | 293 | * Wallet Alice and Wallet Bob are synchronized to UTC (within some small |
| | 294 | margin of error) |
| | 295 | |
| | 296 | |
| | 297 | * [ToDo] Handshake |
| | 298 | |
| | 299 | |
| | 300 | * Wallet Alice announces sum of tokens she wishes to spend for a certain |
| | 301 | prupose=target, wallet Bob decides if it is going to accept them: |
| | 302 | |
| | 303 | A: SUM_ANNOUNCE( transaction_id, sum, target ) |
| | 304 | B: SUM_ACCEPT( transaction_id ) |
| | 305 | or SUM_REJECT( transaction_id, "Reason" ) |
| | 306 | |
| | 307 | |
| | 308 | * Wallet Alice sends coins to Wallet Bob (this time including their clear |
| | 309 | serial and signature) |
| 293 | | COIN_SPEND( list(coin1, ...) ) |
| 294 | | |
| 295 | | * Wallet Bob checks that the coins match the blanks and that signatures are valid |
| 296 | | |
| 297 | | * Wallet Bob accepts transaction or rejects with reason (unknown, invalid) for each rejected coin |
| 298 | | |
| 299 | | COIN_REJECT( list( (coin1, "Reason1") ) ) |
| 300 | | COIN_REJECT( emptylist, "Reason") |
| 301 | | |
| 302 | | COIN_ACCEPT |
| 303 | | |
| 304 | | * Wallet Bob terminates session with Wallet Alice |
| 305 | | |
| 306 | | (in case of rejection Wallet Alice needs to do emergency meassures, quickly trying to exchange coins with IS |
| 307 | | itself etc.) |
| 308 | | |
| 309 | | * Wallet Bob sends buy request (blanks + coins) |
| 310 | | |
| 311 | | |
| 312 | | TRANSFER_TOKEN_REQUEST( transaction_id, list_of_options, "", \ |
| 313 | | list_of_blinds, list_of_coins ) |
| 314 | | |
| 315 | | |
| 316 | | * IS has to check if sum of blanks and coins are equal |
| 317 | | |
| 318 | | * (Wallet Bob and IS continue as in #4 and #8) |
| | 311 | A: COIN_SPEND( transaction_id, list(coin1, ...) ) |
| | 312 | |
| | 313 | |
| | 314 | * Wallet Bob checks if the sum of their values matches the announced sum, if |
| | 315 | they are valid and (if the former tests do not fail) tries itself to spent |
| | 316 | the tokens at the issuer with a TRANSFER_TOKEN_REQUEST of type "redeem" or |
| | 317 | "exchange", using a new, different transaction_id. If one of these fail, |
| | 318 | wallet Bob rejects the request it with a reason/reasons, otherwise accepts |
| | 319 | them: |
| | 320 | |
| | 321 | B: COIN_REJECT( transaction_id, list( (coinN, "ReasonN") ) ) |
| | 322 | or COIN_REJECT( transaction_id, emptylist, "Reason") |
| | 323 | or COIN_ACCEPT( transaction_id ) |
| | 324 | |
| | 325 | Possible reasons are "unknown", "invalid" ... [ToDo]. |
| | 326 | |
| | 327 | In case of rejection, wallet Alice itself should immediatly exchange these |
| | 328 | tokens at the issuer as an emergancy countermeasure against token theft. |
| | 329 | |
| | 330 | In case of acceptance, wallet Alice must delete all instances of the spent |
| | 331 | tokens. |