nonceAdvance static method

TransactionInstruction nonceAdvance({
  1. required Pubkey noncePubkey,
  2. required Pubkey authorizedPubkey,
})

Generates an instruction to advance the nonce in a Nonce account.

Keys:

  • [w] noncePubkey The nonce account.
  • [s] authorizedPubkey The public key of the nonce authority.

Implementation

static TransactionInstruction nonceAdvance({
  required final Pubkey noncePubkey,
  required final Pubkey authorizedPubkey,
}) {
  final List<AccountMeta> keys = [
    AccountMeta.writable(noncePubkey),
    AccountMeta(sysvarRecentBlockhashesPubkey),
    AccountMeta.signer(authorizedPubkey),
  ];

  return _instance.createTransactionIntruction(
    SystemInstruction.advanceNonceAccount,
    keys: keys,
  );
}