revokeOfferSponsorship method

RevokeSponsorshipOperationBuilder revokeOfferSponsorship (
  1. String accountId,
  2. int offerId
)

Implementation

RevokeSponsorshipOperationBuilder revokeOfferSponsorship(
    String accountId, int offerId) {
  if (_ledgerKey != null || _signerKey != null) {
    throw new Exception("can not revoke multiple entries per builder");
  }
  checkNotNull(accountId, "accountId cannot be null");
  checkNotNull(offerId, "dataName cannot be null");

  _ledgerKey = XdrLedgerKey();
  _ledgerKey.discriminant = XdrLedgerEntryType.OFFER;

  XdrAccountID accId = XdrAccountID();
  accId.accountID = KeyPair.fromAccountId(accountId).xdrPublicKey;

  XdrLedgerKeyOffer offer = XdrLedgerKeyOffer();
  offer.sellerID = accId;
  XdrUint64 offId = XdrUint64();
  offId.uint64 = offerId;
  offer.offerID = offId;
  _ledgerKey.offer = offer;
  return this;
}