AnchorInstruction.withDiscriminator constructor
AnchorInstruction.withDiscriminator({
- required Ed25519HDPublicKey programId,
- required ByteArray discriminator,
- required List<
AccountMeta> accounts, - ByteArray arguments = const ByteArray.empty(),
Implementation
factory AnchorInstruction.withDiscriminator({
required Ed25519HDPublicKey programId,
required ByteArray discriminator,
required List<AccountMeta> accounts,
ByteArray arguments = const ByteArray.empty(),
}) =>
AnchorInstruction._(
programId: programId,
accounts: accounts,
data: ByteArray(discriminator.followedBy(arguments)),
);