If the seller decides to cancel a swap and simply wants to unlock the script locked tokens, then a simple send back to the seller can be created.
This use-case describes the process of unlocking tokens without executing an atomic swap.
- Swap client
- User-goal
- Seller
- None
- The seller configured the system's settings to connect to a running Omni Core RPC server
- The seller created and verified a signed transaction stub (UC-Client-3)
- The seller previously funded a script locked destination with tokens (UC-Client-4)
- The seller requests to unlock tokens
- The seller provides the transaction stub signed by the oracle, it's transaction inputs (i.e. the hash of the signed funding transaction, the index of the funding output to the script lock destination, the corresponding scriptPubKey and the redeemScript for the locked destination), and a destination to send the tokens to
- The system determines the identifier and amount of locked tokens
- The system adds a payload to the transaction stub, sending the previously determined amount of tokens (either as "simple send" or "send all")
- The system adds a reference output to the transaction stub, with the seller's specified destination, whereby the reference amount also serves to carry change
- The system signs the transaction with the signature hash flag
"ALL"
- The system broadcasts the signed transaction
- The system returns the hash of the broadcasted transaction
3a. The system determines the locked destination has a zero balance
- The use-case continues at 5
6a. The system fails to sign the transaction
- The system indicates the failure
- The use-case ends
7a. The system fails to broadcast the funding transaction
- The system indicates the failure
- The use-case ends
- The tokens are unlocked and returned to the seller
- The script locked destination is considered as used
- Alternatively the user may provide the payload to add to the transaction, to reduce the need for a fully synchronized chain