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");
  }

  _ledgerKey = XdrLedgerKey(XdrLedgerEntryType.OFFER);

  XdrAccountID sellerID =
      XdrAccountID(KeyPair.fromAccountId(accountId).xdrPublicKey);
  XdrUint64 offId = XdrUint64(offerId);
  _ledgerKey!.offer = XdrLedgerKeyOffer(sellerID, offId);
  return this;
}