Skip to content

Commit

Permalink
Remove encrypted transfers
Browse files Browse the repository at this point in the history
Removed previously deprecated encrypted transfers:
EncryptedTransferTransaction, EncryptedTransferWithMemoTransaction,
TransferToEncryptedTransaction
  • Loading branch information
Radiokot committed Sep 4, 2024
1 parent 3032c9f commit 536076f
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 1,776 deletions.
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
- Made optional the following `BakerPoolStatus` fields:
`bakerEquityCapital`, `delegatedCapital`, `delegatedCapitalCap`, `poolInfo`
- Added `BakerDelegationRemoved` and `DelegationBakerRemoved` transaction result events
- Removed previously deprecated encrypted transfers
(`EncryptedTransferTransaction`, `EncryptedTransferWithMemoTransaction`, `TransferToEncryptedTransaction`)

## 7.2.0
- Added `MessageSigningDigest` class to generate digests for message signing
Expand Down Expand Up @@ -56,7 +58,7 @@
- Removed deprecated V1 API from the SDK. Consumers of the (now removed) `getBlockSummary` endpoint should refer to `GetBlockTransactionEvents`, `GetBlockSpecialEvents` and `GetBlockPendingUpdates`.
- Added support for GRPC V2 `GetWinningBakersEpoch` for getting a list of bakers that won the lottery in a particular historical epoch. Only available when querying a node with version at least 6.1.
- Added support for GRPC V2 `GetFirstBlockEpoch` for getting the block hash of the first finalized block in a specified epoch. Only available when querying a node with version at least 6.1.
- Added support for GRPC V2 `GetBakerEarliestWinTime` for getting the projected earliest time at which a particular baker will be required to bake a block. Only available when querying a node woth version at least 6.1.
- Added support for GRPC V2 `GetBakerEarliestWinTime` for getting the projected earliest time at which a particular baker will be required to bake a block. Only available when querying a node with version at least 6.1.
- Added support for GRPC V2 `GetBakerRewardPeriodInfo` for getting all the bakers in the reward period of a block. Only available when querying a node with version at least 6.1.
- Added support for GRPC V2 `GetBlockCertificates` for retrieving certificates for a block supporting ConcordiumBF, i.e. a node with at least version 6.1.
- Extended `CurrentPaydayStatus` with `CommissionRates` that apply for the current reward period. Requires at least node version 6.1.
Expand Down Expand Up @@ -116,13 +118,13 @@
- Added support for GRPC V2 `GetAncestors` for getting specified no of ancestor blocks for the input block.
- Added support for GRPC V2 `GetBakerList` for retrieving the bakers at a certain block.
- Added support for GRPC V2 `GetAccountNonFinalizedTransactions` for querying transactions from a particular account that have not yet been finalized.
- Added support for GRPC V2 `GetBranches` for gettting branches of the chain (i.e. decendants of the last finalized block).
- Added support for GRPC V2 `GetBranches` for getting branches of the chain (i.e. descendants of the last finalized block).
- Added support for GRPC V2 `GetPassiveDelegators` for getting the passive delegators at a certain block.
- Added support for GRPC V2 `GetPoolDelegators` for getting the delegators for a specified baking pool at a certain block.
- Added support for GRPC V2 `GetElectionInfo` for getting the bakers at a certain block and other metadata of the election.
- Added support for GRPC V2 `GetInstanceState` for getting state of any Contract Instance
- Added support for GRPC V2 `InstanceStateLookup` for getting value of a particular key in Contract Instance.
- Added support for GRPC V2 `GetPoolInfo` for gettting information about a given pool at the end of a given block.
- Added support for GRPC V2 `GetPoolInfo` for getting information about a given pool at the end of a given block.
- Added support for GRPC V2 `GetModuleList` for getting list of smart contract module at the end of a given block.
- Added support for GRPC V2 `GetInstanceInfo` for getting information about a contract instance at the end of a given block.
- Added support for GRPC V2 `GetPoolDelegatorsRewardPeriod` for getting fixed list of Pool Delegators for a given pool at the end of a given block.
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.concordium.sdk.transactions;

import com.concordium.sdk.crypto.bakertransactions.BakerKeys;
import com.concordium.sdk.crypto.elgamal.ElgamalPublicKey;
import com.concordium.sdk.crypto.elgamal.ElgamalSecretKey;
import com.concordium.sdk.crypto.encryptedtransfers.EncryptedTransfers;
import com.concordium.sdk.responses.accountinfo.AccountEncryptedAmount;
Expand Down Expand Up @@ -145,112 +144,6 @@ public static TransferToPublicTransaction.TransferToPublicTransactionBuilder new
.remainingAmount(jniOutput.getRemainingAmount());
}

/**
* Creates a new {@link TransferToEncryptedTransaction.TransferToEncryptedTransactionBuilder} for
* creating a {@link TransferToEncryptedTransaction}
*
* @return the builder for a {@link TransferToEncryptedTransaction}
* @deprecated Encrypted transfers are deprecated and partially removed since protocol version 7
*/
@Deprecated
public static TransferToEncryptedTransaction.TransferToEncryptedTransactionBuilder newTransferToEncrypted() {
return TransferToEncryptedTransaction.builder();
}


/**
* Creates a new {@link EncryptedTransferTransaction.EncryptedTransferTransactionBuilder} for
* creating a {@link EncryptedTransferTransaction}
*
* @return the builder for a {@link EncryptedTransferTransaction}
* @deprecated Encrypted transfers are deprecated and partially removed since protocol version 7
*/
@Deprecated
public static EncryptedTransferTransaction.EncryptedTransferTransactionBuilder newEncryptedTransfer() {
return EncryptedTransferTransaction.builder();
}


/**
* Creates a new {@link EncryptedTransferTransaction.EncryptedTransferTransactionBuilder} for
* creating a {@link EncryptedTransferTransaction}
*
* @return the builder for a {@link EncryptedTransferTransaction}
* @deprecated Encrypted transfers are deprecated and partially removed since protocol version 7
*/
@Deprecated
public static EncryptedTransferTransaction.EncryptedTransferTransactionBuilder newEncryptedTransfer(
CryptographicParameters cryptographicParameters,
AccountEncryptedAmount accountEncryptedAmount,
ElgamalPublicKey receiverPublicKey,
ElgamalSecretKey senderSecretKey,
CCDAmount amountToSend) {
val jniOutput = EncryptedTransfers.createEncryptedTransferPayload(
cryptographicParameters,
accountEncryptedAmount,
receiverPublicKey,
senderSecretKey,
amountToSend
);

val amountTransferData = EncryptedAmountTransferData.builder()
.remainingAmount(jniOutput.getRemainingAmount())
.transferAmount(jniOutput.getTransferAmount())
.index(jniOutput.getIndex())
.proof(jniOutput.getProof()).build();

return EncryptedTransferTransaction
.builder()
.data(amountTransferData);

}

/**
* Creates a new {@link EncryptedTransferWithMemoTransaction.EncryptedTransferWithMemoTransactionBuilder} for
* creating a {@link EncryptedTransferWithMemoTransaction}
*
* @return the builder for a {@link EncryptedTransferWithMemoTransaction}
* @deprecated Encrypted transfers are deprecated and partially removed since protocol version 7
*/
@Deprecated
public static EncryptedTransferWithMemoTransaction.EncryptedTransferWithMemoTransactionBuilder newEncryptedTransferWithMemo() {
return EncryptedTransferWithMemoTransaction.builder();
}

/**
* Creates a new {@link EncryptedTransferWithMemoTransaction.EncryptedTransferWithMemoTransactionBuilder} for
* creating a {@link EncryptedTransferWithMemoTransaction}
*
* @return the builder for a {@link EncryptedTransferWithMemoTransaction}
* @deprecated Encrypted transfers are deprecated and partially removed since protocol version 7
*/
@Deprecated
public static EncryptedTransferWithMemoTransaction.EncryptedTransferWithMemoTransactionBuilder newEncryptedTransferWithMemo(
CryptographicParameters cryptographicParameters,
AccountEncryptedAmount accountEncryptedAmount,
ElgamalPublicKey receiverPublicKey,
ElgamalSecretKey senderSecretKey,
CCDAmount amountToSend) {
val jniOutput = EncryptedTransfers.createEncryptedTransferPayload(
cryptographicParameters,
accountEncryptedAmount,
receiverPublicKey,
senderSecretKey,
amountToSend
);

val amountTransferData = EncryptedAmountTransferData.builder()
.remainingAmount(jniOutput.getRemainingAmount())
.transferAmount(jniOutput.getTransferAmount())
.index(jniOutput.getIndex())
.proof(jniOutput.getProof()).build();

return EncryptedTransferWithMemoTransaction
.builder()
.data(amountTransferData);

}

/**
* Creates a new {@link ConfigureBakerTransaction.ConfigureBakerTransactionBuilder} for
* creating a {@link ConfigureBakerTransaction}
Expand Down

This file was deleted.

Loading

0 comments on commit 536076f

Please sign in to comment.