Solana.SystemProgram (Solana v0.2.0) View Source
Functions for interacting with Solana's System Program
Link to this section Summary
Functions
Generates instructions to allocate space to an account.
Generates instructions to assign account ownership to a program.
Generates instructions to create a new account.
The System Program's program ID.
Generates instructions to transfer lamports from one account to another.
Link to this section Functions
Generates instructions to allocate space to an account.
Accepts an account
address generated via Solana.Key.with_seed/3
, as long
as the base
key, program_id
, and seed
used to generate that address are
provided.
Options
:account
- Required. Public key for the account to allocate:space
- Required. Amount of space in bytes to allocate:program_id
- Program ID to assign as the owner of the allocated account:base
- Base public key to use to derive the allocated account address:seed
- Seed to use to derive the allocated account address
Generates instructions to assign account ownership to a program.
Accepts an account
address generated via Solana.Key.with_seed/3
, as long
as the base
key and seed
used to generate that address are provided.
Options
:account
- Required. Public key for the account which will receive a new owner:program_id
- Required. Program ID to assign as the owner:base
- Base public key to use to derive the assigned account address:seed
- Seed to use to derive the assigned account address
Generates instructions to create a new account.
Accepts a new
address generated via Solana.Key.with_seed/3
, as long as the
base
key and seed
used to generate that address are provided.
Options
:lamports
- Required. Amount of lamports to transfer to the created account:space
- Required. Amount of space in bytes to allocate to the created account:from
- Required. The account that will transfer lamports to the created account:new
- Required. Public key of the created account:program_id
- Required. Public key of the program which will own the created account:base
- Base public key to use to derive the created account's address:seed
- Seed to use to derive the created account's address
The System Program's program ID.
Generates instructions to transfer lamports from one account to another.
Accepts a from
address generated via Solana.Key.with_seed/3
, as long as the
base
key, program_id
, and seed
used to generate that address are
provided.
Options
:lamports
- Required. Amount of lamports to transfer:from
- Required. Account that will transfer lamports:to
- Required. Account that will receive the transferred lamports:base
- Base public key to use to derive the funding account address:seed
- Seed to use to derive the funding account address:program_id
- Program ID to use to derive the funding account address