pub enum ProgramInstruction {
Show 23 variants CreateCentralState, CreateStakePool, ActivateStakePool, CreateStakeAccount, Stake, Unstake, ClaimPoolRewards, ClaimRewards, Crank, CloseStakePool, CloseStakeAccount, ChangeInflation, CreateBond, SignBond, UnlockBondTokens, ClaimBond, ClaimBondRewards, ChangePoolMinimum, AdminMint, AdminFreeze, ChangePoolMultiplier, ChangeCentralStateAuthority, EditMetadata,
}

Variants§

§

CreateCentralState

Create central state

| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The central state account | | 1 | ❌ | ❌ | The system program account | | 2 | ✅ | ✅ | The fee payer account | | 3 | ❌ | ❌ | The mint of the ACCESS token |

§

CreateStakePool

Create stake pool

| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The stake pool account | | 1 | ❌ | ❌ | The system program account | | 2 | ✅ | ✅ | The fee payer account | | 3 | ❌ | ❌ | The stake pool vault account |

§

ActivateStakePool

Activate a stake pool

| Index | Writable | Signer | Description | | ———————————————————— | | 0 | ❌ | ✅ | The central state authority | | 1 | ✅ | ❌ | The stake pool to activate | | 2 | ❌ | ❌ | The account of the central state |

§

CreateStakeAccount

Create stake account

| Index | Writable | Signer | Description | | —————————————————— | | 0 | ✅ | ❌ | The stake account | | 1 | ❌ | ❌ | The system program account | | 2 | ❌ | ❌ | The stake pool account | | 3 | ✅ | ✅ | The fee payer account |

§

Stake

Stake

| Index | Writable | Signer | Description | | ————————————————————————————— | | 0 | ✅ | ❌ | The central state account | | 1 | ✅ | ❌ | The stake account | | 2 | ✅ | ❌ | The stake pool account | | 3 | ❌ | ✅ | The owner of the stake account | | 4 | ✅ | ❌ | The source account of the stake tokens | | 5 | ❌ | ❌ | The SPL token program account | | 6 | ✅ | ❌ | The stake pool vault account | | 7 | ✅ | ❌ | The stake fee account | | 8 | ❌ | ❌ | Optional bond account to be able to stake under the minimum |

§

Unstake

Unstake

| Index | Writable | Signer | Description | | ————————————————————————————— | | 0 | ✅ | ❌ | The central state account | | 1 | ✅ | ❌ | The stake account | | 2 | ✅ | ❌ | The stake pool account | | 3 | ❌ | ✅ | The owner of the stake account | | 4 | ✅ | ❌ | The destination of the staked tokens | | 5 | ❌ | ❌ | The SPL token program account | | 6 | ✅ | ❌ | The stake pool vault | | 7 | ❌ | ❌ | Optional bond account to be able to stake under the minimum |

§

ClaimPoolRewards

Claim rewards of a stake pool This instruction is used by stake pool owner for claiming their staking rewards

| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The stake pool account | | 1 | ❌ | ✅ | The stake pool owner account | | 2 | ✅ | ❌ | The rewards destination | | 3 | ❌ | ❌ | The central state account | | 4 | ✅ | ❌ | The mint address of the ACCESS token | | 5 | ❌ | ❌ | The SPL token program account |

§

ClaimRewards

Claim rewards of a stake account This instruction can be used by stakers to claim their staking rewards

| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The stake pool account | | 1 | ✅ | ❌ | The stake account | | 2 | ❌ | ✅ | The owner of the stake account | | 3 | ✅ | ❌ | The rewards destination | | 4 | ❌ | ❌ | The central state account | | 5 | ✅ | ❌ | The mint address of the ACCESS token | | 6 | ❌ | ❌ | The SPL token program account |

§

Crank

Permissionless crank to update the stake pool rewards This instructions updates the circular buffer with the pool balances multiplied by the current inflation

| Index | Writable | Signer | Description | | ———————————————————— | | 0 | ✅ | ❌ | The stake pool account | | 1 | ✅ | ❌ | The account of the central state |

§

CloseStakePool

Close a stake pool This instruction can be used to close an empty stake pool and collect the lamports

| Index | Writable | Signer | Description | | ——————————————————— | | 0 | ✅ | ❌ | The account of the stake pool | | 1 | ❌ | ❌ | Pool vault | | 2 | ✅ | ✅ | The owner of the stake pool |

§

CloseStakeAccount

Close a stake account This instruction can be used to close an empty stake account and collect the lamports

| Index | Writable | Signer | Description | | ––––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The stake account | | 1 | ✅ | ✅ | The owner of the stake account |

§

ChangeInflation

Change central state inflation

| Index | Writable | Signer | Description | | ––––––––––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The account of the central state | | 1 | ❌ | ✅ | The account of the central state authority |

§

CreateBond

Create a bond This instruction can be used by authorized sellers to create a bond

| Index | Writable | Signer | Description | | —————————————————— | | 0 | ✅ | ✅ | The bond seller account | | 1 | ✅ | ❌ | The bond account | | 2 | ❌ | ❌ | | | 3 | ❌ | ❌ | The system program account | | 4 | ✅ | ✅ | The fee account |

§

SignBond

Sign a bond This instruction is used by authorized sellers to approve the creation of a bond

| Index | Writable | Signer | Description | | ————————————— | | 0 | ❌ | ✅ | | | 1 | ✅ | ❌ | |

§

UnlockBondTokens

Unlock ACCESS tokens bought through a bond account When tokens are unlocked they are withdrawn from the pool and are not considered staked anymore

| Index | Writable | Signer | Description | | ———————————————————— | | 0 | ✅ | ❌ | The bond account | | 1 | ❌ | ✅ | The account of the bond owner | | 2 | ❌ | ❌ | The ACCESS mint token | | 3 | ✅ | ❌ | The ACCESS token destination | | 4 | ✅ | ❌ | The account of the central state | | 5 | ✅ | ❌ | The account of the staking pool | | 6 | ✅ | ❌ | The vault of the staking pool | | 7 | ❌ | ❌ | The SPL token program account |

§

ClaimBond

Claim bond This instruction allows a buyer to claim a bond once it has been signed by enough DAO members.

| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The bond account | | 1 | ❌ | ✅ | The account of the bond buyer | | 2 | ✅ | ❌ | The token account used to purchase the bond | | 3 | ✅ | ❌ | The token account where the sell proceed is sent | | 4 | ✅ | ❌ | The stake pool account | | 5 | ✅ | ❌ | The mint of the ACCESS token | | 6 | ✅ | ❌ | The vault of the stake pool | | 7 | ✅ | ❌ | The central state account | | 8 | ❌ | ❌ | The SPL token program account |

§

ClaimBondRewards

Claim bond rewards This Instruction allows bond owners to claim their staking rewards

| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The stake pool account | | 1 | ✅ | ❌ | The bond account | | 2 | ❌ | ✅ | The bond account owner | | 3 | ✅ | ❌ | The rewards destination | | 4 | ❌ | ❌ | The central state account | | 5 | ✅ | ❌ | The mint address of the ACCESS token | | 6 | ❌ | ❌ | The SPL token program account |

§

ChangePoolMinimum

Change the minimum stakeable amount of a pool This instruction allows a pool owner to adjust the price of its subscription for new joiners without impacting people who already subscribed

| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The stake pool account | | 1 | ❌ | ✅ | The stake pool owner account |

§

AdminMint

Allows central state authority to mint ACCESS tokens

| Index | Writable | Signer | Description | | ———————————————————— | | 0 | ❌ | ✅ | The central state authority | | 1 | ✅ | ❌ | The ACCESS mint token | | 2 | ✅ | ❌ | The ACCESS token destination | | 3 | ❌ | ❌ | The account of the central state | | 4 | ❌ | ❌ | The SPL token program account |

§

AdminFreeze

Freeze and unfreeze a program account This admin instruction can be dangereous 💀

| Index | Writable | Signer | Description | | ————————————————————— | | 0 | ❌ | ✅ | The central state authority | | 1 | ✅ | ❌ | The account to freeze (or unfreeze) | | 2 | ❌ | ❌ | The account of the central state |

§

ChangePoolMultiplier

| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The stake pool account | | 1 | ❌ | ✅ | The stake pool owner account |

§

ChangeCentralStateAuthority

Change central state authority

| Index | Writable | Signer | Description | | ––––––––––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The account of the central state | | 1 | ❌ | ✅ | The account of the central state authority |

§

EditMetadata

Edit metadata

| Index | Writable | Signer | Description | | ––––––––––––––––––––––––––––––––––– | | 0 | ❌ | ❌ | The central state account | | 1 | ❌ | ✅ | The account of the central state authority | | 2 | ✅ | ❌ | The metadata account | | 3 | ❌ | ❌ | The metadata program account |

Trait Implementations§

source§

impl BorshDeserialize for ProgramInstruction

source§

fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes.
source§

fn try_from_slice(v: &[u8]) -> Result<Self, Error>

Deserialize this instance from a slice of bytes.
source§

impl BorshSerialize for ProgramInstruction

source§

fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), Error>

source§

fn try_to_vec(&self) -> Result<Vec<u8>, Error>

Serialize this instance into a vector of bytes.
source§

impl FromPrimitive for ProgramInstruction

source§

fn from_i64(n: i64) -> Option<Self>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u64(n: u64) -> Option<Self>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_i128(n: i128) -> Option<Self>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u128(n: u128) -> Option<Self>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
source§

fn from_f32(n: f32) -> Option<Self>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_f64(n: f64) -> Option<Self>

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> AbiExample for T

§

default fn example() -> T

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V