Added a new redeemer SpendWithExtension, and extension field to one-way swap datum. This allows extending the capability of cardano-swaps by attaching a stake validator or stake key to a swap. If an extension is added to a swap UTXO, then the funds in the UTXO can be withdrawn upon authorization of the stake key. This allows users to give 'power of attorney' to other smart contracts or third parties.
For example, a user may want to authorize a smart contract to forward their tokens to a final destination upon the completion of the swap; they can now do this by attaching a parameterized staking validator to their one-way swap request, and register the staking validator when the swap is created.
Context: #16
Added a new redeemer
SpendWithExtension
, andextension
field to one-way swap datum. This allows extending the capability of cardano-swaps by attaching a stake validator or stake key to a swap. If anextension
is added to a swap UTXO, then the funds in the UTXO can be withdrawn upon authorization of the stake key. This allows users to give 'power of attorney' to other smart contracts or third parties.For example, a user may want to authorize a smart contract to forward their tokens to a final destination upon the completion of the swap; they can now do this by attaching a parameterized staking validator to their one-way swap request, and register the staking validator when the swap is created.