toMessageInstruction method
Converts this TransactionInstruction into an MessageInstruction
. The keys
are an ordered
list of all
public keys referenced by this transaction.
Implementation
MessageInstruction toMessageInstruction(final List<Pubkey> keys) =>
MessageInstruction(
programIdIndex: keys.indexOf(programId),
accounts: this
.keys
.map((final AccountMeta meta) => keys.indexOf(meta.pubkey)),
data: base58.encode(Uint8List.fromList(data)),
);