revokeClaimableBalanceSponsorship method

RevokeSponsorshipOperationBuilder revokeClaimableBalanceSponsorship (
  1. String balanceId
)

Implementation

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

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

  XdrClaimableBalanceID bId = XdrClaimableBalanceID();
  bId.discriminant = XdrClaimableBalanceIDType.CLAIMABLE_BALANCE_ID_TYPE_V0;
  List<int> list = balanceId.codeUnits;
  Uint8List bytes = Uint8List.fromList(list);
  bId.v0.hash = bytes;
  _ledgerKey.balanceID = bId;

  return this;
}