49 releases (major breaking)

40.1.0 Apr 3, 2025
39.1.0 Mar 27, 2025
39.0.0 Jan 7, 2025
38.0.0 Sep 25, 2024
2.0.0-rc5 Jul 24, 2020

#15 in #swap

Download history 29093/week @ 2025-01-16 28833/week @ 2025-01-23 24757/week @ 2025-01-30 28192/week @ 2025-02-06 37708/week @ 2025-02-13 17997/week @ 2025-02-20 3068/week @ 2025-02-27 3775/week @ 2025-03-06 2604/week @ 2025-03-13 2332/week @ 2025-03-20 3019/week @ 2025-03-27 2226/week @ 2025-04-03 2384/week @ 2025-04-10 2346/week @ 2025-04-17 2394/week @ 2025-04-24 2596/week @ 2025-05-01

10,327 downloads per month
Used in 37 crates (via polkadot-sdk)

Apache-2.0

53KB
573 lines

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

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

Dependencies

~23–39MB
~650K SLoC