Home Reference Source
import {SystemProgram} from '@solana/web3'
public class | source

SystemProgram

Factory class for transactions to interact with the System program

Static Member Summary

Static Public Members
public static get

Public key that identifies the System program

Static Method Summary

Static Public Methods
public static

Generate a transaction instruction that allocates space in an account without funding

public static

Generate a transaction instruction that assigns an account to a program

public static

Generate a transaction instruction that creates a new account

public static

Generate a transaction instruction that creates a new account at an address generated with from, a seed, and programId

public static

Generate a transaction that creates a new Nonce account

public static

Generate an instruction to advance the nonce in a Nonce account

public static

Generate a transaction instruction that authorizes a new PublicKey as the authority on a Nonce account.

public static

Generate an instruction to initialize a Nonce account

public static

Generate a transaction instruction that withdraws lamports from a Nonce account

public static

Generate a transaction instruction that transfers lamports from one account to another

Static Public Members

public static get programId: PublicKey source

Public key that identifies the System program

Static Public Methods

public static allocate(params: AllocateParams | AllocateWithSeedParams): TransactionInstruction source

Generate a transaction instruction that allocates space in an account without funding

Params:

NameTypeAttributeDescription
params AllocateParams | AllocateWithSeedParams

public static assign(params: AssignParams | AssignWithSeedParams): TransactionInstruction source

Generate a transaction instruction that assigns an account to a program

Params:

NameTypeAttributeDescription
params AssignParams | AssignWithSeedParams

public static createAccount(params: CreateAccountParams): TransactionInstruction source

Generate a transaction instruction that creates a new account

Params:

NameTypeAttributeDescription
params CreateAccountParams

public static createAccountWithSeed(params: CreateAccountWithSeedParams): TransactionInstruction source

Generate a transaction instruction that creates a new account at an address generated with from, a seed, and programId

Params:

NameTypeAttributeDescription
params CreateAccountWithSeedParams

public static createNonceAccount(params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams): Transaction source

Generate a transaction that creates a new Nonce account

Params:

NameTypeAttributeDescription
params CreateNonceAccountParams | CreateNonceAccountWithSeedParams

Return:

Transaction

public static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction source

Generate an instruction to advance the nonce in a Nonce account

Params:

NameTypeAttributeDescription
params AdvanceNonceParams

public static nonceAuthorize(params: AuthorizeNonceParams): TransactionInstruction source

Generate a transaction instruction that authorizes a new PublicKey as the authority on a Nonce account.

Params:

NameTypeAttributeDescription
params AuthorizeNonceParams

public static nonceInitialize(params: InitializeNonceParams): TransactionInstruction source

Generate an instruction to initialize a Nonce account

Params:

NameTypeAttributeDescription
params InitializeNonceParams

public static nonceWithdraw(params: WithdrawNonceParams): TransactionInstruction source

Generate a transaction instruction that withdraws lamports from a Nonce account

Params:

NameTypeAttributeDescription
params WithdrawNonceParams

public static transfer(params: TransferParams | TransferWithSeedParams): TransactionInstruction source

Generate a transaction instruction that transfers lamports from one account to another

Params:

NameTypeAttributeDescription
params TransferParams | TransferWithSeedParams