SolAddress.withSeed constructor
SolAddress.withSeed({
- required SolAddress fromPublicKey,
- required String seed,
- required SolAddress programId,
Constructs a Solana address with a seed.
Implementation
factory SolAddress.withSeed(
{required SolAddress fromPublicKey,
required String seed,
required SolAddress programId}) {
final toBytes = List<int>.from([
...fromPublicKey.toBytes(),
...StringUtils.encode(seed),
...programId.toBytes()
]);
return SolAddress.uncheckBytes(QuickCrypto.sha256Hash(toBytes));
}