StakeInstruction.initializeChecked constructor
StakeInstruction.initializeChecked({
- required Ed25519HDPublicKey stake,
- required Ed25519HDPublicKey stakeAuthority,
- required Ed25519HDPublicKey withdrawAuthority,
Initialize a stake with authorization information.
This instruction is similar to Initialize except that the withdraw authority must be a signer, and no lockup is applied to the account.
Implementation
factory StakeInstruction.initializeChecked({
required Ed25519HDPublicKey stake,
required Ed25519HDPublicKey stakeAuthority,
required Ed25519HDPublicKey withdrawAuthority,
}) =>
StakeInstruction._(
accounts: [
AccountMeta.writeable(pubKey: stake, isSigner: false),
AccountMeta.readonly(
pubKey: Ed25519HDPublicKey.fromBase58(Sysvar.rent),
isSigner: false,
),
AccountMeta.readonly(pubKey: stakeAuthority, isSigner: false),
AccountMeta.readonly(pubKey: withdrawAuthority, isSigner: true),
],
data: StakeProgram.initializeCheckedInstructionIndex,
);