changeTwitterRegistryData static method
TransactionInstruction
changeTwitterRegistryData({
- required String twitterHandle,
- required SolAddress verifiedPubkey,
- required int offset,
- required List<
int> inputData,
Overwrite the data that is written in the user facing registry
Implementation
static TransactionInstruction changeTwitterRegistryData({
required String twitterHandle,
required SolAddress verifiedPubkey,
required int offset,
required List<int> inputData,
}) {
final hashedTwitterHandle =
NameServiceProgramUtils.getHashedName(twitterHandle);
final twitterHandleRegistryKey =
NameServiceProgramUtils.getNameAccountProgram(
hashedName: hashedTwitterHandle,
nameParent: NameServiceProgramConst.twitterRootPrentRegisteryKey,
);
return NameServiceProgram.update(
nameAccountKey: twitterHandleRegistryKey,
layout: NameServiceUpdateLayout(inputData: inputData, offset: offset),
nameUpdateSigner: verifiedPubkey,
);
}