Changeset 205

Show
Ignore:
Timestamp:
03/15/08 16:23:08 (4 years ago)
Author:
ocnils
Message:

Introducing TRANSFER_TOKEN_REQUEST option "type="

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/standards/protocol.txt

    r204 r205  
    3232   - replace "COIN_SPEND" with "SPEND_TOKEN" 
    3333   - throw out reduntant "TRANSFER_TOKEN" explanatoins 
    34    - Warning that TRANSFER_TOKEN option "type=" will move forward 
    3534   - add authentication and authorization, at least for "target" 
    3635     when minting 
     
    156155    
    157156        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 
    161166  to IS (issuer service), where  
    162167 
    163168  * 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. 
    176178 
    177179  If at least one of the blinds or tokens is rejected, the issuer answers 
    178180 
    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), ... )  ) 
    182185 
    183186  where "reason" may be some general failure like "500 minting not available". 
    184187  If the request is accepted with no delay, IS answers 
    185188 
    186     TRANSFER_TOKEN_ACCEPT( transaction_id, message, list_of_signed_blinds) 
     189        TRANSFER_TOKEN_ACCEPT(  
     190            transaction_id, message, list_of_signed_blinds) 
    187191 
    188192  (with list_of_singed_blinds empty if no minting was required) 
    189193  If minting was requested and acccepted but postponed, IS answers 
    190194 
    191     TRANSFER_TOKEN_DELAY( transaction_id, message ) 
     195        TRANSFER_TOKEN_DELAY( transaction_id, message ) 
    192196 
    193197  In this case, the wallet can fetch the signed blinds later by  
    194198 
    195     TRANSFER_TOKEN_RESUME( transaction_id ) 
     199        TRANSFER_TOKEN_RESUME( transaction_id ) 
    196200 
    197201 
     
    200204* Send [was: MINT_REQUEST] 
    201205 
    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, ) 
    204208 
    205209  to issuer service 
     
    208212  is not current): 
    209213 
    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)  ) 
    213216 
    214217  ElseIf minting is done just-in-time, IS answers 
    215218 
    216     TRANSFER_TOKEN_ACCEPT( transaction_id, message, list_of_signed_blinds) 
     219        TRANSFER_TOKEN_ACCEPT( transaction_id, message, list_of_signed_blinds) 
    217220 
    218221  Else IS queues blind to the mint and tells wallet to wait 
    219222 
    220     TRANSFER_TOKEN_DELAY( transaction_id, reason ) 
     223        TRANSFER_TOKEN_DELAY( transaction_id, reason ) 
    221224 
    222225  Session is terminated. 
     
    231234* Wallet asks issuer service [was: FETCH_MINTED_REQUEST] 
    232235 
    233     TRANSFER_TOKEN_RESUME( transaction_id ) 
     236        TRANSFER_TOKEN_RESUME( transaction_id ) 
    234237 
    235238* IS either rejects finally 
    236239 
    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) ) 
    239242  
    240243  with reasons like "TID Unknown", "TID expired", "TID rejected", ..., 
    241244  or tells to wait longer 
    242245 
    243     TRANSFER_TOKEN_DELAY( transaction_id, reason ) 
     246        TRANSFER_TOKEN_DELAY( transaction_id, reason ) 
    244247     
    245248  (question: what about key expiration while request is in mining queue) 
     
    248251  or passes signed blinds to wallet Bob, must preserve order 
    249252 
    250     TRANSFER_TOKEN_ACCEPT( transaction_id, message, list_of_singed_blinds ) 
     253        TRANSFER_TOKEN_ACCEPT( transaction_id, message, list_of_singed_blinds ) 
    251254     
    252255  Session terminates