preAuthTx method

XdrSignerKey preAuthTx (
  1. Transaction tx
)

Create preAuthTx XdrSignerKey from a Transaction tx.

Implementation

static XdrSignerKey preAuthTx(Transaction tx) {
  checkNotNull(tx, "tx cannot be null");
  XdrSignerKey signerKey = new XdrSignerKey();
  XdrUint256 value = SignerKey._createUint256(tx.hash());

  signerKey.discriminant = XdrSignerKeyType.SIGNER_KEY_TYPE_PRE_AUTH_TX;
  signerKey.preAuthTx = value;

  return signerKey;
}