closeAccount method

Future<Transaction?> closeAccount(
  1. CloseAccountOptions options
)

Implementation

Future<Transaction?> closeAccount(CloseAccountOptions options) async {
  var appConfig = _ensureAppConfig();
  Commitment commitment = _getCommitment(options.commitment);
  AppConfigMint? mint = _getAppMint(appConfig, options.mint);

  final request = CloseAccountRequest(
    account: options.account,
    commitment: commitment,
    environment: sdkConfig.environment,
    index: sdkConfig.index,
    mint: mint.publicKey,
    referenceId: options.referenceId,
    referenceType: options.referenceType,
  );

  return accountApi.closeAccount(request);
}