Skip to main content

Module sdk

Module sdk 

Source

Structs§

ProtocolAllocation
Protocol allocation info for building unwrap bundles.

Functions§

build_unwrap_bundle
Builds a bundle of unwrap instructions for withdrawing across multiple protocols.
checkpoint
Checkpoint a protocol’s exchange rate.
claim
Claim yield from a stablecoin’s position in a specific protocol.
collect_platform_fee
Collect platform fees from a position. Admin can call this to collect the protocol’s share of yield from any position.
create
Create a new stablecoin.
delete_vault
Delete the vault account (for re-initialization after schema changes). WARNING: This is destructive and should only be used during development/testing.
init
Initialize the vault with fee parameters and treasury.
init_protocol
Initialize a protocol registry.
kamino_accounts
Returns the accounts needed for Kamino protocol operations.
log
Build a Log instruction (for CPI from within the program).
perena_accounts
Returns the accounts needed for Perena protocol operations. Matches the bankineco IDL structure for mint_w_yielding_gen / burn_for_yielding_gen.
program_log
CPI call to emit a log event. The vault PDA signs.
protocol_accounts
Returns protocol accounts based on protocol ID.
rebalance
Rebalance a single stable’s position from one protocol to another.
set_paused
Pause or unpause the vault.
set_primary_protocol
Set the primary protocol for new deposits.
set_treasury
Set the treasury address for platform fee collection.
unwrap
Unwrap stablecoin to USDC from a single protocol. For large withdrawals spanning multiple protocols, use build_unwrap_bundle. Position must exist (created during wrap).
update_authority
Update stablecoin authority.
wrap
Wrap USDC into stablecoin. Creates the position account if it doesn’t exist.