Skip to main content

process_instruction

Function process_instruction 

Source
pub fn process_instruction(
    program_id: &Pubkey,
    accounts: &[AccountInfo],
    instruction_data: &[u8],
) -> ProgramResult
Expand description

Program entrypoint

Instruction discriminators:

  • 0: create_escrow - Create a new payment escrow
  • 1: confirm_delivery - Oracle confirms delivery, releases funds
  • 2: refund_escrow - Refund after timeout
  • 3: deposit_credits - Add prepaid credits
  • 4: spend_credits - Oracle deducts credits for mail order
  • 5: withdraw_credits - User withdraws unused credits