45 releases (major breaking)

37.0.0 Jul 18, 2024
36.0.0 Jul 12, 2024
35.0.0 Jun 21, 2024
34.0.0 May 23, 2024
2.0.0-rc5 Jul 24, 2020

#755 in Magic Beans

Download history 33/week @ 2024-04-01 103/week @ 2024-04-08 147/week @ 2024-04-29 160/week @ 2024-05-20 1/week @ 2024-06-10 127/week @ 2024-06-17 17/week @ 2024-06-24 96/week @ 2024-07-01 83/week @ 2024-07-08 113/week @ 2024-07-15

315 downloads per month
Used in polkadot-sdk

Apache-2.0

2.5MB
43K SLoC

Atomic Swap

A module for atomically sending funds.

Overview

A module for atomically sending funds from an origin to a target. A proof is used to allow the target to approve (claim) the swap. If the swap is not claimed within a specified duration of time, the sender may cancel it.

Interface

Dispatchable Functions

  • create_swap - called by a sender to register a new atomic swap
  • claim_swap - called by the target to approve a swap
  • cancel_swap - may be called by a sender after a specified duration

License: Apache-2.0


lib.rs:

Atomic Swap

A pallet for atomically sending funds.

Overview

A pallet for atomically sending funds from an origin to a target. A proof is used to allow the target to approve (claim) the swap. If the swap is not claimed within a specified duration of time, the sender may cancel it.

Interface

Dispatchable Functions

  • create_swap - called by a sender to register a new atomic swap
  • claim_swap - called by the target to approve a swap
  • cancel_swap - may be called by a sender after a specified duration

Dependencies

~18–32MB
~540K SLoC