StreamFlow

This repository contains the Solana program source code.

It is laid out as a standard crate, and the program code can be found in src/lib.rs.

Build and tests

Deployment

Usage

See cli/strfi.js to get an understanding.

initialize_stream

This instruction is used to initialize the stream, and save the data and lock the funds for streaming on a given account.

Note that the implementation sends DEFAULT_TARGET_LAMPORTS_PER_SIGNATURE immetiately to the recipient, so they don't have to have previous funds in order to issue a withdraw instruction in the future.

withdraw_unlocked

This instruction is used by the stream recipient, and will transfer a given amount of lamports, if unlocked, from the stream account to the caller.

If the requested amount if lamports is 0 (zero), then all unlocked funds will be withdrawn.

cancel_stream

This instruction is used by the stream initializer, and will cancel the given stream, returning all locked funds to the caller and purging the account.

License

StreamFlow Rust code is licensed AGPL-3.