use of com.github.rosklyar.client.transaction.domain.importance.ImportanceTransferTransaction in project nem-library by rosklyar.
the class SecureTransactionClient method multisigImportanceTransfer.
@Override
public NemAnnounceResult multisigImportanceTransfer(String privateKey, Action action, String remoteAccountPublicKey, String multisigPublicKey, int timeToLiveInSeconds) {
Signer signer = new DefaultSigner(privateKey);
int currentTime = nodeClient.extendedInfo().nisInfo.currentTime;
String publicKey = signer.publicKey();
ImportanceTransferTransaction importanceTransferTransaction = importanceTransferTransaction(action, remoteAccountPublicKey, timeToLiveInSeconds, currentTime, publicKey);
MultisigTransaction<ImportanceTransferTransaction> transaction = MultisigTransaction.<ImportanceTransferTransaction>builder().type(MULTISIG_TRANSACTION.type).version(versionProvider.version(network, MULTISIG_TRANSACTION)).timeStamp(currentTime).signer(signer.publicKey()).fee(feeCalculator.multisigTransactionFee()).deadline(currentTime + timeToLiveInSeconds).otherTrans(importanceTransferTransaction).build();
byte[] data = transactionEncoder.dataMultisigImportanceTransfer(transaction);
return feignTransactionClient.prepare(new RequestAnnounce(hexConverter.getString(data), signer.sign(data)));
}
use of com.github.rosklyar.client.transaction.domain.importance.ImportanceTransferTransaction in project nem-library by rosklyar.
the class SecureTransactionClient method importanceTransfer.
@Override
public NemAnnounceResult importanceTransfer(String privateKey, Action action, String remoteAccountPublicKey, int timeToLiveInSeconds) {
Signer signer = new DefaultSigner(privateKey);
int currentTime = nodeClient.extendedInfo().nisInfo.currentTime;
String publicKey = signer.publicKey();
ImportanceTransferTransaction transaction = importanceTransferTransaction(action, remoteAccountPublicKey, timeToLiveInSeconds, currentTime, publicKey);
byte[] data = transactionEncoder.data(transaction);
return feignTransactionClient.prepare(new RequestAnnounce(hexConverter.getString(data), signer.sign(data)));
}
Aggregations