Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.
public final class SystemProgram
- Object
- SystemProgram
Instructions of the System Program. Amounts are lamports, 10^9 to the SOL, and are
written as unsigned 64-bit values.
Fields
public static final long LAMPORTS_PER_SOL = 1000000000L | Lamports in one SOL. |
Methods
Inherited methods
Field details
LAMPORTS_PER_SOL
public static final long LAMPORTS_PER_SOL = 1000000000LLamports in one SOL.
Method details
transfer
public static Instruction transfer(SolanaAddress from, SolanaAddress to, long lamports)Moves lamports between two system accounts;
from signs.createAccount
public static Instruction createAccount(SolanaAddress payer, SolanaAddress newAccount, long lamports, long space, SolanaAddress owner)Creates an account owned by a program, funded with
lamports and sized space bytes;
both the payer and the new account sign.assign
public static Instruction assign(SolanaAddress account, SolanaAddress owner)Assigns an account to a program.
allocate
public static Instruction allocate(SolanaAddress account, long space)Allocates space in an account.
advanceNonceAccount
public static Instruction advanceNonceAccount(SolanaAddress nonceAccount, SolanaAddress authority)Advances a durable nonce. It must be the first instruction of a transaction whose
recent blockhash is the nonce value.