View Source Signet.Solana.SystemProgram (Signet v1.6.0)
Instructions for the Solana System Program.
The System Program (address: 11111111111111111111111111111111, 32 zero bytes)
handles basic operations like SOL transfers and account creation.
Summary
Functions
Build a create_account instruction.
Returns the System Program pubkey (32 zero bytes).
Build a transfer instruction (SOL transfer).
Functions
@spec create_account( <<_::256>>, <<_::256>>, non_neg_integer(), non_neg_integer(), <<_::256>> ) :: Signet.Solana.Transaction.Instruction.t()
Build a create_account instruction.
System Program instruction index 0.
Examples
iex> ix = Signet.Solana.SystemProgram.create_account(<<1::256>>, <<2::256>>, 1_000_000, 165, <<3::256>>)
iex> ix.program_id
<<0::256>>
iex> byte_size(ix.data)
52
@spec program_id() :: <<_::256>>
Returns the System Program pubkey (32 zero bytes).
Delegates to Signet.Solana.Programs.system_program/0.
@spec transfer(<<_::256>>, <<_::256>>, non_neg_integer()) :: Signet.Solana.Transaction.Instruction.t()
Build a transfer instruction (SOL transfer).
System Program instruction index 2.
Examples
iex> ix = Signet.Solana.SystemProgram.transfer(<<1::256>>, <<2::256>>, 1_000_000_000)
iex> ix.program_id
<<0::256>>
iex> byte_size(ix.data)
12