SystemProgram.nonceWithdraw constructor

SystemProgram.nonceWithdraw({
  1. required SolAddress authorizedPubkey,
  2. required SolAddress noncePubKey,
  3. required SolAddress toPubKey,
  4. required SystemWithdrawNonceLayout layout,
})

Withdraw nonce account system transaction

Implementation

factory SystemProgram.nonceWithdraw({
  /// address of the nonce authority
  required SolAddress authorizedPubkey,

  /// Nonce account
  required SolAddress noncePubKey,

  /// address of the account which will receive the withdrawn nonce account balance
  required SolAddress toPubKey,
  required SystemWithdrawNonceLayout layout,
}) {
  return SystemProgram(
      layout: layout,
      keys: [
        noncePubKey.toWritable(),
        toPubKey.toWritable(),
        SystemProgramConst.sysvarRecentBlockhashesPubkey.toReadOnly(),
        SystemProgramConst.sysvarRentPubkey.toReadOnly(),
        authorizedPubkey.toSigner(),
      ],
      programId: SystemProgramConst.programId);
}