createAndInitializeAccountWithSeed static method
List<Instruction>
createAndInitializeAccountWithSeed({
- required Ed25519HDPublicKey fundingAccount,
- required Ed25519HDPublicKey newAccount,
- required Authorized authorized,
- required Ed25519HDPublicKey base,
- required String seed,
- required int lamports,
- Lockup lockup = const Lockup.none(),
Implementation
static List<Instruction> createAndInitializeAccountWithSeed({
required Ed25519HDPublicKey fundingAccount,
required Ed25519HDPublicKey newAccount,
required Authorized authorized,
required Ed25519HDPublicKey base,
required String seed,
required int lamports,
Lockup lockup = const Lockup.none(),
}) =>
[
SystemInstruction.createAccountWithSeed(
fundingAccount: fundingAccount,
newAccount: newAccount,
lamports: lamports,
space: StakeProgram.neededAccountSpace,
owner: Ed25519HDPublicKey.fromBase58(StakeProgram.programId),
seed: seed,
base: base,
),
StakeInstruction.initialize(
stake: newAccount,
authorized: authorized,
lockup: lockup,
),
];