getAddressLookupTable method
Future<AddressLookupTableAccount?>
getAddressLookupTable(
- Pubkey pubkey, {
- GetAddressLookupTableConfig? config,
Returns the address lookup table of the provided pubkey.
Implementation
Future<AddressLookupTableAccount?> getAddressLookupTable(
final Pubkey pubkey, {
final GetAddressLookupTableConfig? config,
}) async {
final AccountInfo? accountInfo = await getAccountInfo(
pubkey,
config: GetAccountInfoConfig(
commitment: config?.commitment,
encoding: AccountEncoding.base64,
minContextSlot: config?.minContextSlot,
)
);
final state = AddressLookupTableState.tryFromBorshBase64(accountInfo?.binaryData);
return state != null ? AddressLookupTableAccount(key: pubkey, state: state) : null;
}