pub enum ProgramInstruction {
Show 36 variants CreateCentralState, CreateStakePool, ActivateStakePool, CreateStakeAccount, Stake, Unstake, ClaimPoolRewards, ClaimRewards, Crank, CloseStakePool, CloseStakeAccount, ChangeInflation, CreateBond, SignBond, UnlockBondTokens, ClaimBond, ClaimBondRewards, ChangePoolMinimum, AdminMint, AdminFreeze, ChangePoolMultiplier, ChangeCentralStateAuthority, EditMetadata, CreateBondV2, AddToBondV2, ClaimBondV2Rewards, UnlockBondV2, AdminSetupFeeSplit, DistributeFees, AdminSetProtocolFee, MigrateCentralStateV2, AdminProgramFreeze, AdminRenounce, AdminChangeFreezeAuthority, CreateRoyaltyAccount, CloseRoyaltyAccount,
}

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 | | 4 | ❌ | ❌ | The central state account |

§

ActivateStakePool

Activate a stake pool

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

§

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 | | 4 | ❌ | ❌ | The central state account |

§

Stake

Stake

| Index | Writable | Signer | Description | | ———————————————————————————– | | 0 | ✅ | ❌ | The central state account | | 1 | ✅ | ❌ | The destination stake account - can be owned by anyone | | 2 | ✅ | ❌ | The stake pool account | | 3 | ❌ | ✅ | The owner of the token account - staker | | 4 | ✅ | ❌ | The source account of the stake tokens | | 5 | ❌ | ❌ | The SPL token program account | | 6 | ✅ | ❌ | The stake pool vault account | | 7 | ✅ | ❌ | The central state ATA |

§

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 |

§

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 | | 6 | ❌ | ❌ | The owner’s royalty split account to check if royalties need to be paid | | 7 | ✅ | ❌ | The royalty ATA 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 ACS token | | 6 | ❌ | ❌ | The Access NFT program signer - to handle different royalty account | | 7 | ❌ | ❌ | The SPL token program account | | 8 | ❌ | ❌ | The owner’s royalty split account to check if royalties need to be paid | | 9 | ✅ | ❌ | The royalty ATA 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 central state account |

§

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 | | 3 | ❌ | ❌ | The central state account |

§

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 | | 2 | ❌ | ❌ | The central state account |

§

ChangeInflation

Change central state inflation

| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The central state account | | 1 | ❌ | ✅ | The central state account authority | | 2 | ❌ | ❌ | The mint address of the ACCESS token |

§

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 | | 5 | ❌ | ❌ | The central state 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 | ✅ | ❌ | | | 2 | ❌ | ❌ | |

§

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 central state account | | 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 | | 2 | ❌ | ❌ | The central state 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 central state account | | 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 central state account |

§

ChangePoolMultiplier

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

§

ChangeCentralStateAuthority

Change central state authority

| Index | Writable | Signer | Description | | ————————————————————— | | 0 | ✅ | ❌ | The central state account | | 1 | ❌ | ✅ | The central state account authority |

§

EditMetadata

Edit metadata

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

§

CreateBondV2

Create a Bond V2

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

§

AddToBondV2

Add more tokens to an existing Bond V2

| Index | Writable | Signer | Description | | ———————————————————–– | | 0 | ✅ | ✅ | The bond seller account | | 1 | ✅ | ❌ | From ATA | | 2 | ✅ | ❌ | The bond account | | 3 | ✅ | ❌ | Central state | | 4 | ✅ | ❌ | The vault of the central state | | 5 | ✅ | ❌ | The pool account | | 6 | ✅ | ❌ | The vault of the pool | | 7 | ✅ | ❌ | The mint address of the ACS token | | 8 | ❌ | ❌ | The SPL token program account | | 9 | ❌ | ❌ | The system program account |

§

ClaimBondV2Rewards

Claim rewards of a bond V2 from the Access NFT Program

| Index | Writable | Signer | Description | | ————————————————————————————————— | | 0 | ✅ | ❌ | The stake pool account | | 1 | ✅ | ❌ | The Bond V2 account | | 2 | ❌ | ✅ | The owner of the Bond V2 account | | 3 | ✅ | ❌ | The rewards destination | | 4 | ❌ | ❌ | The central state account | | 5 | ✅ | ❌ | The mint address of the ACS token | | 6 | ❌ | ❌ | The Access NFT program signer - to handle different royalty account | | 7 | ❌ | ❌ | The SPL token program account | | 8 | ❌ | ❌ | The owner’s royalty split account to check if royalties need to be paid | | 9 | ✅ | ❌ | The royalty ATA account |

§

UnlockBondV2

Unlock bond v2

| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The central state account | | 1 | ✅ | ❌ | The bond account | | 2 | ❌ | ✅ | The owner of the bond V2 account | | 3 | ✅ | ❌ | The destination of the locked tokens | | 4 | ✅ | ❌ | The pool account | | 5 | ✅ | ❌ | The pool vault | | 6 | ❌ | ❌ | The SPL token program account |

§

AdminSetupFeeSplit

Setup fee split

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

§

DistributeFees

Distribute fees to the recipients

| Index | Writable | Signer | Description | | ————————————————————————— | | 0 | ✅ | ❌ | The central state account | | 1 | ✅ | ❌ | The central state ATA | | 2 | ❌ | ❌ | The SPL token program account | | 3 | ✅ | ❌ | The mint address of the ACS token | | 4..4 + N | ✅ | ❌ | The token accounts to distribute the fees to |

§

AdminSetProtocolFee

Admin set protocol fee

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

§

MigrateCentralStateV2

Migrate the central state to the v2 format

| Index | Writable | Signer | Description | | —————————————————— | | 0 | ✅ | ❌ | The central state account | | 1 | ❌ | ❌ | The system program account | | 2 | ✅ | ✅ | The fee payer account |

§

AdminProgramFreeze

Admin program freeze instruction.

| Index | Writable | Signer | Description | | ———————————————————————————– | | 0 | ✅ | ❌ | The central state account | | 1 | ❌ | ✅ | The central state account authority or freeze authority |

§

AdminRenounce

Admin renounce functionality

| Index | Writable | Signer | Description | | ————————————————————— | | 0 | ✅ | ❌ | The central state account | | 1 | ❌ | ✅ | The central state account authority |

§

AdminChangeFreezeAuthority

Change freeze authority

| Index | Writable | Signer | Description | | ————————————————————— | | 0 | ✅ | ❌ | The central state account | | 1 | ❌ | ✅ | The central state account authority |

§

CreateRoyaltyAccount

Create royalty account

| Index | Writable | Signer | Description | | ———————————————————–– | | 0 | ✅ | ❌ | The royalty account to be created | | 1 | ✅ | ✅ | The fee payer account | | 2 | ❌ | ✅ | The royalty payer | | 3 | ❌ | ❌ | The system program account | | 4 | ❌ | ❌ | The central state account |

§

CloseRoyaltyAccount

Close a royalty account This instruction can be used to close a royalty account. The laports will be sent to the original fee payer

| Index | Writable | Signer | Description | | ––––––––––––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The royalty account | | 1 | ❌ | ✅ | The royalty payer of the royalty account | | 2 | ✅ | ❌ | The account where the funds should be returned | | 3 | ❌ | ❌ | The central state account |

Trait Implementations§

source§

impl BorshDeserialize for ProgramInstruction

source§

fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>

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§

fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>
where R: Read,

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 BorshSize for ProgramInstruction

source§

impl Clone for ProgramInstruction

source§

fn clone(&self) -> ProgramInstruction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl EnumExt for ProgramInstruction

source§

fn deserialize_variant<R: Read>( reader: &mut R, variant_idx: u8 ) -> Result<Self, Error>

Deserialises given variant of an enum from the reader. Read more
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
source§

impl Copy for ProgramInstruction

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> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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