Program Functions
Detailed documentation of all available program instructions and functions
Token Program Functions
mintTokens
Mint new HOT tokens according to the emission schedule
pub fn mint_tokens( ctx: Context<MintTokens>, amount: u64, ) -> Result<()>
stake
Stake HOT tokens to earn rewards
pub fn stake( ctx: Context<Stake>, amount: u64, duration: i64, ) -> Result<()>
distributeRewards
Calculate and distribute staking rewards
pub fn distribute_rewards( ctx: Context<DistributeRewards>, reward_amount: u64, ) -> Result<()>
Marketplace Program Functions
createNFT
Create a content NFT on the marketplace
pub fn create_nft( ctx: Context<CreateNFT>, metadata_uri: String, price: u64, ) -> Result<()>
createBooking
Create a new booking with escrow
pub fn create_booking( ctx: Context<CreateBooking>, start_time: i64, duration: u64, amount: u64, ) -> Result<()>
settleBooking
Complete booking and release escrow funds
pub fn settle_booking( ctx: Context<SettleBooking>, booking_id: String, ) -> Result<()>
collectFees
Collect platform fees from transactions
pub fn collect_fees( ctx: Context<CollectFees>, transaction_amount: u64, ) -> Result<()>
Governance Program Functions
createProposal
Create a new governance proposal
pub fn create_proposal( ctx: Context<CreateProposal>, title: String, description: String, execution_hash: [u8; 32], ) -> Result<()>
vote
Cast vote on a proposal
pub fn vote( ctx: Context<Vote>, proposal_id: String, vote_for: bool, weight: u64, ) -> Result<()>
executeProposal
Execute approved proposal
pub fn execute_proposal( ctx: Context<ExecuteProposal>, proposal_id: String, ) -> Result<()>
manageTreasury
Manage treasury funds allocation
pub fn manage_treasury( ctx: Context<ManageTreasury>, recipient: Pubkey, amount: u64, ) -> Result<()>
