While reviewing the Solana codebase, I came across the invoke_signed function, which is commonly used for cross-program invocations. I'm particularly interested in understanding if it's possible to utilize invoke_signed within a Solana native program, such as the Stake program.
My goal is to explore the feasibility of implementing staking functionality in a Solana native program while using SPL (Solana Program Library) tokens as the staked assets. In essence, I would like to know if it's possible to call SPL token methods via invoke_signed or any other suitable method within a native program. This would involve the ability to add or subtract SPL tokens from a wallet in a staking context.
I would greatly appreciate any insights, recommendations, or references to relevant code examples or documentation that can shed light on this matter. If invoke_signed is not the appropriate approach for this use case, I would welcome suggestions on alternative methods to achieve the desired functionality within a Solana native program.