use of com.radixdlt.api.core.openapitools.model.NetworkIdentifier in project radixdlt by radixdlt.
the class ConstructionBuildFeePayerTest method buildRequestWithFeePayer.
private ConstructionBuildRequest buildRequestWithFeePayer(EntityIdentifier feePayer) {
var transferAmount = getLiquidAmount().toSubunits().subtract(Amount.ofTokens(1).toSubunits());
var accountAddress = REAddr.ofPubKeyAccount(self);
var otherKey = PrivateKeys.ofNumeric(2).getPublicKey();
var otherAddress = REAddr.ofPubKeyAccount(otherKey);
return new ConstructionBuildRequest().networkIdentifier(new NetworkIdentifier().network("localnet")).feePayer(feePayer).addOperationGroupsItem(new OperationGroup().addOperationsItem(new Operation().entityIdentifier(coreModelMapper.entityIdentifier(accountAddress)).amount(coreModelMapper.nativeTokenAmount(false, transferAmount))).addOperationsItem(new Operation().entityIdentifier(coreModelMapper.entityIdentifier(otherAddress)).amount(coreModelMapper.nativeTokenAmount(true, transferAmount))));
}
use of com.radixdlt.api.core.openapitools.model.NetworkIdentifier in project radixdlt by radixdlt.
the class ConstructionBuildMessageTest method buildRequestWithMessage.
private ConstructionBuildRequest buildRequestWithMessage(String message) {
var transferAmount = UInt256.ONE;
var accountAddress = REAddr.ofPubKeyAccount(self);
var otherKey = PrivateKeys.ofNumeric(2).getPublicKey();
var otherAddress = REAddr.ofPubKeyAccount(otherKey);
return new ConstructionBuildRequest().message(message).networkIdentifier(new NetworkIdentifier().network("localnet")).feePayer(coreModelMapper.entityIdentifier(accountAddress)).addOperationGroupsItem(new OperationGroup().addOperationsItem(new Operation().entityIdentifier(coreModelMapper.entityIdentifier(accountAddress)).amount(coreModelMapper.nativeTokenAmount(false, transferAmount))).addOperationsItem(new Operation().entityIdentifier(coreModelMapper.entityIdentifier(otherAddress)).amount(coreModelMapper.nativeTokenAmount(true, transferAmount))));
}
Aggregations