streamflow_timelock/lib.rs
1// Copyright (c) 2021 Streamflow Labs Limited <legal@streamflowlabs.com>
2//
3// This file is part of streamflow-finance/timelock-crate
4//
5// This program is free software: you can redistribute it and/or modify
6// it under the terms of the GNU Affero General Public License version 3
7// as published by the Free Software Foundation.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU Affero General Public License for more details.
13//
14// You should have received a copy of the GNU Affero General Public License
15// along with this program. If not, see <https://www.gnu.org/licenses/>.
16
17//! The code providing timelock primitives
18//! used by [streamflow.finance](https://streamflow.finance). This is a free and open-source community version of [Streamflow Timelock](https://github.com/streamflow-finance/timelock-crate) protocol, that comes with certain limitations compared to the commercial version.
19//!
20//! This Rust crate provides SPL timelock functionalities that can be used "out of the box" and integrated in other Solana programs.
21//!
22//! Functionalities are:
23//! - `create` a vesting contract.
24//! - `withdraw` from a vesting contract. _Invoked by recipient (beneficiary)_
25//! - `cancel` a vesting contract. _Invoked by sender (creator)_
26//! - `transfer_recipient` of a vesting contract. _Invoked by recipient (beneficiary)_
27//!
28//! UI is available at https://app.streamflow.finance/vesting
29
30/// Structs and data
31pub mod state;
32/// Functions related to SPL tokens
33pub mod token;
34/// Utility functions
35pub mod utils;