Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Wiezzel/stream-payments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stream payments

License Rust check

This pallet supports creating streams i.e. ongoing payments. Once a stream is opened, on every block a specified amount of funds will be transferred from the origin account to the given target account, until the stream is closed.

Interface

Config

  • MaxStreams: u32 – The maximum number of streams per account.

Dispatchable functions

  • open_stream(origin, target, spend_rate)
    Open a new stream. From the next block on, on each block spend_rate will be transferred to the target account. The stream can be closed by calling close_stream.
  • close_stream(origin, index)
    Close a stream. From the next block on, transfers will stop.

Planned features

  • Add an optional total spend limit for stream and reserve funds for limited streams.
  • Use fixed stream identifiers instead of indices.
  • Introduce fees/deposits for opening streams.
  • Keep the starting block and total amount transferred (stats for front-end).
  • Introduce payment block interval and grace period.

Releases

No releases published

Packages

No packages published

Languages