Solana Conditional Liquidity
This crate contains tooling for Solana DEXs to support conditional liquidity. The primary functions
it exposes are is_invoked_by_segmenter
and verify_origin
, which can be used to branch based on
whether an instruction invocation was signed by a segmenter and based on the application or frontend
that originated the invocation.
is_invoked_by_segmenter
Checks whether the invocation was signed by a segmenter. Use this if you don't need to branch on the origin of the invocation.
use is_invoked_by_segmenter;
use AccountInfo;
verify_origin
Checks whether the invocation was signed by a segmenter and verifies the origin of the invocation. Use this if you want to branch on the origin of the invocation.
use ;
use AccountInfo;