revokeAccountSponsorship method

RevokeSponsorshipOperationBuilder revokeAccountSponsorship (
  1. String accountId
)

Implementation

RevokeSponsorshipOperationBuilder revokeAccountSponsorship(String accountId) {
  if (_ledgerKey != null || _signerKey != null) {
    throw new Exception("can not revoke multiple entries per builder");
  }
  checkNotNull(accountId, "accountId cannot be null");
  _ledgerKey = XdrLedgerKey();
  _ledgerKey.discriminant = XdrLedgerEntryType.ACCOUNT;
  XdrLedgerKeyAccount lacc = XdrLedgerKeyAccount();
  XdrAccountID accId = XdrAccountID();
  accId.accountID = KeyPair.fromAccountId(accountId).xdrPublicKey;
  lacc.accountID = accId;
  _ledgerKey.account = lacc;
  return this;
}