createProgramAddress static method
Finds a program address for the given seeds and program ID.
Implementation
static SolAddress createProgramAddress(
{required List<int> seedBytes, required SolAddress programId}) {
seedBytes = [
...seedBytes,
...programId.toBytes(),
...programDerivedAddressSeed.codeUnits
];
seedBytes = QuickCrypto.sha256Hash(seedBytes);
if (Ed25519PublicKey.isValidBytes(seedBytes)) {
throw const MessageException(
"Invalid seeds, address must fall off the curve");
}
return SolAddress.uncheckBytes(seedBytes);
}