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.
MaxStreams: u32
– The maximum number of streams per account.
open_stream(origin, target, spend_rate)
Open a new stream. From the next block on, on each blockspend_rate
will be transferred to thetarget
account. The stream can be closed by callingclose_stream
.close_stream(origin, index)
Close a stream. From the next block on, transfers will stop.
- 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.