SystemInstruction.authorizeNonceAccount constructor
SystemInstruction.authorizeNonceAccount({
- required Ed25519HDPublicKey nonce,
- required Ed25519HDPublicKey nonceAuthority,
- required Ed25519HDPublicKey newAuthority,
Change the entity authorized to execute nonce instructions on the account.
Implementation
factory SystemInstruction.authorizeNonceAccount({
required Ed25519HDPublicKey nonce,
required Ed25519HDPublicKey nonceAuthority,
required Ed25519HDPublicKey newAuthority,
}) =>
SystemInstruction._(
accounts: [
AccountMeta.writeable(pubKey: nonce, isSigner: false),
AccountMeta.readonly(pubKey: nonceAuthority, isSigner: true),
],
data: ByteArray.merge([
SystemProgram.authorizeNonceAccountInstructionIndex,
newAuthority.toByteArray(),
]),
);