findStakeProgramAddress static method
Find the stake account address of the given validator voteAccountAddress
and
stakePoolAddress
.
Implementation
static ProgramAddress findStakeProgramAddress(
final Pubkey voteAccountAddress,
final Pubkey stakePoolAddress, [
final bu64? seed,
]) {
return Pubkey.findProgramAddress(
[
voteAccountAddress.toBytes(),
stakePoolAddress.toBytes(),
if (seed != null)
seed.toUint8List(8),
],
StakePoolProgram.programId,
);
}