getNameAccountProgram static method
SolAddress
getNameAccountProgram({
- required List<
int> hashedName, - SolAddress? nameClass,
- SolAddress? nameParent,
find program address of name account.
Implementation
static SolAddress getNameAccountProgram({
required List<int> hashedName,
SolAddress? nameClass,
SolAddress? nameParent,
}) {
List<List<int>> seeds = [hashedName];
seeds.add(nameClass?.toBytes() ?? List<int>.filled(32, 0));
seeds.add(nameParent?.toBytes() ?? List<int>.filled(32, 0));
return SolanaUtils.findProgramAddress(
seeds: seeds,
programId: NameServiceProgramConst.programId,
).item1;
}