SystemProgram.nonceWithdraw constructor
SystemProgram.nonceWithdraw({
- required SolAddress authorizedPubkey,
- required SolAddress noncePubKey,
- required SolAddress toPubKey,
- 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);
}