getTokenAccounts method

Future<List<String>?> getTokenAccounts(
  1. GetTokenAccountsOptions options
)

Implementation

Future<List<String>?> getTokenAccounts(GetTokenAccountsOptions options) async {
  var appConfig = _ensureAppConfig();
  Commitment commitment = _getCommitment(options.commitment);
  AppConfigMint? mint = _getAppMint(appConfig, options.mint);

  List<String>? result = await accountApi.getTokenAccounts(
    sdkConfig.environment,
    sdkConfig.index,
    options.account,
    mint.publicKey,
    commitment,
  );

  return result;
}