SystemProgram.transferWithSeed constructor

SystemProgram.transferWithSeed({
  1. required SolAddress from,
  2. required SolAddress to,
  3. required SolAddress baseAccount,
  4. required SystemTransferWithSeedLayout layout,
})

Transfer with seed system transaction

Implementation

factory SystemProgram.transferWithSeed({
  /// Account that will transfer lamports
  required SolAddress from,

  /// Account that will receive transferred lamports
  required SolAddress to,

  /// base address to use to derive the funding account address
  required SolAddress baseAccount,
  required SystemTransferWithSeedLayout layout,
}) {
  return SystemProgram(
      layout: layout,
      keys: [
        AccountMeta(publicKey: from, isSigner: false, isWritable: true),
        AccountMeta(
            publicKey: baseAccount, isSigner: true, isWritable: false),
        AccountMeta(publicKey: to, isSigner: false, isWritable: true)
      ],
      programId: SystemProgramConst.programId);
}