ore-legacy-api 0.1.0

Solana native store of value.
Documentation
use steel::*;

// Legacy instructions

#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)]
pub enum OREV2Instruction {
    OREV2Claim = 0,
}

#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct OREV2Claim {
    pub amount: [u8; 8],
}

instruction!(OREV2Instruction, OREV2Claim);

// Pool instructions

#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)]
pub enum PoolInstruction {
    PoolClaim = 0,
    PoolUnstake = 4,
}

#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct PoolClaim {
    pub amount: [u8; 8],
    pub pool_bump: u8,
}

#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct PoolUnstake {
    pub amount: [u8; 8],
}

instruction!(PoolInstruction, PoolClaim);
instruction!(PoolInstruction, PoolUnstake);

// Boost instructions

#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)]
pub enum BoostV2Instruction {
    BoostV2Claim = 0,
    BoostV2Withdraw = 5,
}

#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct BoostV2Claim {
    pub amount: [u8; 8],
}

#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct BoostV2Withdraw {
    pub amount: [u8; 8],
}

instruction!(BoostV2Instruction, BoostV2Claim);
instruction!(BoostV2Instruction, BoostV2Withdraw);