Enum solana_sdk::system_instruction::SystemInstruction[][src]

[]
pub enum SystemInstruction {
    CreateAccount {
        lamports: u64,
        space: u64,
        owner: Pubkey,
    },
    Assign {
        owner: Pubkey,
    },
    Transfer {
        lamports: u64,
    },
    CreateAccountWithSeed {
        base: Pubkey,
        seed: String,
        lamports: u64,
        space: u64,
        owner: Pubkey,
    },
    AdvanceNonceAccount,
    WithdrawNonceAccount(u64),
    InitializeNonceAccount(Pubkey),
    AuthorizeNonceAccount(Pubkey),
    Allocate {
        space: u64,
    },
    AllocateWithSeed {
        base: Pubkey,
        seed: String,
        space: u64,
        owner: Pubkey,
    },
    AssignWithSeed {
        base: Pubkey,
        seed: String,
        owner: Pubkey,
    },
    TransferWithSeed {
        lamports: u64,
        from_seed: String,
        from_owner: Pubkey,
    },
}

Variants

CreateAccount
[]

Create a new account

Account references

  1. [WRITE, SIGNER] Funding account
  2. [WRITE, SIGNER] New account
[]

Fields of CreateAccount

lamports: u64

Number of lamports to transfer to the new account

space: u64

Number of bytes of memory to allocate

owner: Pubkey

Address of program that will own the new account

Assign
[]

Assign account to a program

Account references

  1. [WRITE, SIGNER] Assigned account public key
[]

Fields of Assign

owner: Pubkey

Owner program account

Transfer
[]

Transfer lamports

Account references

  1. [WRITE, SIGNER] Funding account
  2. [WRITE] Recipient account
[]

Fields of Transfer

lamports: u64
CreateAccountWithSeed
[]

Create a new account at an address derived from a base pubkey and a seed

Account references

  1. [WRITE, SIGNER] Funding account
  2. [WRITE] Created account
  3. [SIGNER] (optional) Base account; the account matching the base Pubkey below must be provided as a signer, but may be the same as the funding account and provided as account 0
[]

Fields of CreateAccountWithSeed

base: Pubkey

Base public key

seed: String

String of ASCII chars, no longer than Pubkey::MAX_SEED_LEN

lamports: u64

Number of lamports to transfer to the new account

space: u64

Number of bytes of memory to allocate

owner: Pubkey

Owner program account address

AdvanceNonceAccount
[]

Consumes a stored nonce, replacing it with a successor

Account references

  1. [WRITE] Nonce account
  2. [] RecentBlockhashes sysvar
  3. [SIGNER] Nonce authority
WithdrawNonceAccount(u64)
[]

Withdraw funds from a nonce account

Account references

  1. [WRITE] Nonce account
  2. [WRITE] Recipient account
  3. [] RecentBlockhashes sysvar
  4. [] Rent sysvar
  5. [SIGNER] Nonce authority

The u64 parameter is the lamports to withdraw, which must leave the account balance above the rent exempt reserve or at zero.

InitializeNonceAccount(Pubkey)
[]

Drive state of Uninitalized nonce account to Initialized, setting the nonce value

Account references

  1. [WRITE] Nonce account
  2. [] RecentBlockhashes sysvar
  3. [] Rent sysvar

The Pubkey parameter specifies the entity authorized to execute nonce instruction on the account

No signatures are required to execute this instruction, enabling derived nonce account addresses

AuthorizeNonceAccount(Pubkey)
[]

Change the entity authorized to execute nonce instructions on the account

Account references

  1. [WRITE] Nonce account
  2. [SIGNER] Nonce authority

The Pubkey parameter identifies the entity to authorize

Allocate
[]

Allocate space in a (possibly new) account without funding

Account references

  1. [WRITE, SIGNER] New account
[]

Fields of Allocate

space: u64

Number of bytes of memory to allocate

AllocateWithSeed
[]

Allocate space for and assign an account at an address derived from a base public key and a seed

Account references

  1. [WRITE] Allocated account
  2. [SIGNER] Base account
[]

Fields of AllocateWithSeed

base: Pubkey

Base public key

seed: String

String of ASCII chars, no longer than pubkey::MAX_SEED_LEN

space: u64

Number of bytes of memory to allocate

owner: Pubkey

Owner program account

AssignWithSeed
[]

Assign account to a program based on a seed

Account references

  1. [WRITE] Assigned account
  2. [SIGNER] Base account
[]

Fields of AssignWithSeed

base: Pubkey

Base public key

seed: String

String of ASCII chars, no longer than pubkey::MAX_SEED_LEN

owner: Pubkey

Owner program account

TransferWithSeed
[]

Transfer lamports from a derived address

Account references

  1. [WRITE] Funding account
  2. [SIGNER] Base for funding account
  3. [WRITE] Recipient account
[]

Fields of TransferWithSeed

lamports: u64

Amount to transfer

from_seed: String

Seed to use to derive the funding account address

from_owner: Pubkey

Owner to use to derive the funding account address

Trait Implementations

impl Clone for SystemInstruction[src][+]

impl Debug for SystemInstruction[src][+]

impl<'de> Deserialize<'de> for SystemInstruction[src][+]

impl PartialEq<SystemInstruction> for SystemInstruction[src][+]

impl Serialize for SystemInstruction[src][+]

impl StructuralPartialEq for SystemInstruction[src]

Auto Trait Implementations

impl RefUnwindSafe for SystemInstruction

impl Send for SystemInstruction

impl Sync for SystemInstruction

impl Unpin for SystemInstruction

impl UnwindSafe for SystemInstruction

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src][+]

impl<T> Borrow<T> for T where
    T: ?Sized
[src][+]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src][+]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src][+]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src][+]

impl<T> MaybeDebug for T where
    T: Debug
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src][+]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src][+]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src][+]

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

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any
[+]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src][+]