Function pallet_atomic_swap::source ·
pallet:: dispatchables:: create_swap
pub fn create_swap<T: Config>( target: T::AccountId, hashed_proof: HashedProof, action: T::SwapAction, duration: T::BlockNumber )
Register a new atomic swap, declaring an intention to send funds from origin to target
on the current blockchain. The target can claim the fund using the revealed proof. If
the fund is not claimed after
duration blocks, then the sender can cancel the swap.
The dispatch origin for this call must be Signed.
target: Receiver of the atomic swap.
hashed_proof: The blake2_256 hash of the secret proof.
balance: Funds to be sent from origin.
duration: Locked duration of the atomic swap. For safety reasons, it is recommended that the revealer uses a shorter duration than the counterparty, to prevent the situation where the revealer reveals the proof too late around the end block.
NOTE: This function is an automatically generated, doc only, uncallable stub.
designed to document the
create_swap variant of
Call enum. You should not attempt to call this function