forMethod static method
Future<AnchorInstruction>
forMethod({
- required Ed25519HDPublicKey programId,
- required String method,
- required String namespace,
- required List<
AccountMeta> accounts, - ByteArray arguments = const ByteArray.empty(),
Implementation
static Future<AnchorInstruction> forMethod({
required Ed25519HDPublicKey programId,
required String method,
required String namespace,
required List<AccountMeta> accounts,
ByteArray arguments = const ByteArray.empty(),
}) async =>
AnchorInstruction._(
programId: programId,
accounts: accounts,
data: await arguments.addDiscriminator(namespace, method),
);