SystemProgram.nonceInitialize constructor

SystemProgram.nonceInitialize({
  1. required SolAddress noncePubKey,
  2. required SystemInitializeNonceAccountLayout layout,
})

Initialize nonce account system

Implementation

factory SystemProgram.nonceInitialize(
    {
    /// Nonce account which will be initialized
    required SolAddress noncePubKey,
    required SystemInitializeNonceAccountLayout layout}) {
  return SystemProgram(
      layout: layout,
      keys: [
        noncePubKey.toWritable(),
        SystemProgramConst.sysvarRecentBlockhashesPubkey.toReadOnly(),
        SystemProgramConst.sysvarRentPubkey.toReadOnly(),
      ],
      programId: SystemProgramConst.programId);
}