preAuthTx method
- Transaction tx,
- Network network
Create preAuthTx
XdrSignerKey from a Transaction tx
.
Implementation
static XdrSignerKey preAuthTx(Transaction tx, Network network) {
checkNotNull(tx, "tx cannot be null");
XdrSignerKey signerKey = new XdrSignerKey();
XdrUint256 value = SignerKey._createUint256(tx.hash(network));
signerKey.discriminant = XdrSignerKeyType.SIGNER_KEY_TYPE_PRE_AUTH_TX;
signerKey.preAuthTx = value;
return signerKey;
}