revokeEd25519Signer method

RevokeSponsorshipOperationBuilder revokeEd25519Signer (
  1. String signerAccountId,
  2. String ed25519AccountId
)

Implementation

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

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

  _signerKey = XdrSignerKey();
  _signerKey.discriminant = XdrSignerKeyType.SIGNER_KEY_TYPE_ED25519;
  _signerKey.ed25519 = XdrUint256();
  _signerKey.ed25519.uint256 = StrKey.decodeStellarAccountId(ed25519AccountId);

  _signerAccountId = signerAccountId;

  return this;
}