SDK for Rust on-chain solana programs to interact with streamflow protocol
Declare a dependency in your program's Cargo.toml
streamflow_sdk = {version = "0.5.1", features = ["cpi"]}
In your program's instruction which should invoke streamflow's create instruction:
``` use anchorlang::prelude::*; use streamflowsdk::cpi::accounts::Create use streamflow_sdk::cpi;
let accs = Create { sender: ctx.accounts.sender.toaccountinfo(), sendertokens: ctx.accounts.sendertokens.toaccountinfo(), ... }
let cpictx = CpiContext::new( ctx.accounts.timelockprogram.toaccountinfo(), accs );
streamflowsdk::cpi::create( cpictx, starttime, netamount_deposited ... };
```
For a more detailed example, check ./programs/example/lib.rs
Streamflow protocol program:
Streamflow fees oracle:
Streamflow treasury: 5SEpbdjFK5FxwTvfsGMXVQTD2v4M2c5tyRTxhdsPkgDw
Streamflow withdrawor: wdrwhnCv4pzW8beKsbPa4S2UDZrXenjg16KJdKSpb5u
Rust program that provides SPL timelock functionalities
Functionalities are:
- create
a vesting contract.
- withdraw
from a vesting contract.
- cancel
a vesting contract.
- transfer_recipient
of a vesting contract.
Streamflow protocol transfer 0.25% of contract total amount (netamountdeposit) to streamflow treasury to cover costs of building and maintaining protocl.
Streamflow protocol supports integrating partner fees for other protocols built on top of streamflow. For more information, reach us out on discord. link