SystemProgram.nonceAuthorize constructor

SystemProgram.nonceAuthorize({
  1. required SolAddress authorizedPubkey,
  2. required SolAddress noncePubKey,
  3. required SystemAuthorizeNonceAccountLayout layout,
})

Authorize nonce account system transaction

Implementation

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

  /// Nonce account
  required SolAddress noncePubKey,
  required SystemAuthorizeNonceAccountLayout layout,
}) {
  return SystemProgram(
    layout: layout,
    keys: [
      AccountMeta(publicKey: noncePubKey, isSigner: false, isWritable: true),
      AccountMeta(
        publicKey: authorizedPubkey,
        isSigner: true,
        isWritable: false,
      ),
    ],
    programId: SystemProgramConst.programId,
  );
}