| 336 | | * Wallet locks serials at IS (see above LOCK_COIN) |
| 337 | | |
| 338 | | * Wallet sends coins + target to IS [was: REDEEM_COINS_REQUEST] |
| 339 | | |
| 340 | | TRANSFER_TOKEN_REQUEST( transaction_id, list_of_options, target, \ |
| 341 | | (empty list), list_of_coins ) |
| 342 | | |
| 343 | | target may be an account and is of the form: |
| | 335 | * Wallet sends coins + target to IS |
| | 336 | |
| | 337 | W: TRANSFER_TOKEN_REQUEST( |
| | 338 | transaction_id, list_of_options, target, (empty list), list_of_coins |
| | 339 | ) |
| | 340 | |
| | 341 | target may be an account and is of the form: |
| | 342 | |
| 359 | | - if target is valid |
| 360 | | |
| 361 | | * IS rejects with reason (key id unknown, coin outdated, coin spent, signature |
| 362 | | invalid) per coin or [was: REDEEM_COINS_REJECT] |
| 363 | | |
| 364 | | TRANSFER_TOKEN_REJECT( transaction_id, reason, |
| 365 | | (empty list), list( (coin1.key_id, reason1), ... ) ) |
| 366 | | |
| 367 | | * (IS tries to service target, rejects with reason if not possible) |
| 368 | | |
| 369 | | * IS enters serials into DSDB |
| 370 | | |
| 371 | | * IS sends accept to Wallet [was: REDEEM_COINS_ACCEPT] |
| 372 | | |
| 373 | | TRANSFER_TOKEN_ACCEPT( transaction_id, message, (empty list)) |
| | 352 | |
| | 353 | If not, IS rejects with reason (key id unknown, coin outdated, coin spent, |
| | 354 | signature invalid) per coin or sweeping |
| | 355 | |
| | 356 | IS: TRANSFER_TOKEN_REJECT( |
| | 357 | transaction_id, reason, (empty list), list( (coin1.key_id, reason1), ... ) ) |
| | 358 | ) |
| | 359 | |
| | 360 | If tokens and target are valid, IS enters the serials of the tokens into the |
| | 361 | DSDB, servers the target and replies |
| | 362 | |
| | 363 | IS: TRANSFER_TOKEN_ACCEPT( |
| | 364 | transaction_id, message, (empty list) |
| | 365 | ) |