Say I have given a versioned transaction and I want to get the accounts in the same format my smart contract will see it in. How do I do this?
Edit: I've tried the below, but this always gives me Error: Failed to get account keys because address table lookups were not resolved
, which makes sense since this is a synchronous method and I didn't fetch the LUTs onchain anywhere else.
const allAccs = transaction.message.getAccountKeys().keySegments().reduce((acc, cur) => acc.concat(cur), []);