@@ -52,7 +52,7 @@ impl SupplyAccountInfo {
52
52
/// Computes the current supply from the decryptable supply and the
53
53
/// difference between the decryptable supply and the ElGamal encrypted
54
54
/// supply ciphertext
55
- pub fn decrypt_current_supply (
55
+ pub fn decrypted_current_supply (
56
56
& self ,
57
57
aes_key : & AeKey ,
58
58
elgamal_keypair : & ElGamalKeypair ,
@@ -86,12 +86,12 @@ impl SupplyAccountInfo {
86
86
/// `RotateSupplyElgamalPubkey` instruction
87
87
pub fn generate_rotate_supply_elgamal_pubkey_proof (
88
88
& self ,
89
- aes_key : & AeKey ,
90
89
current_supply_elgamal_keypair : & ElGamalKeypair ,
91
90
new_supply_elgamal_keypair : & ElGamalKeypair ,
91
+ aes_key : & AeKey ,
92
92
) -> Result < CiphertextCiphertextEqualityProofData , TokenError > {
93
93
let current_supply =
94
- self . decrypt_current_supply ( aes_key, current_supply_elgamal_keypair) ?;
94
+ self . decrypted_current_supply ( aes_key, current_supply_elgamal_keypair) ?;
95
95
96
96
let new_supply_opening = PedersenOpening :: new_rand ( ) ;
97
97
let new_supply_ciphertext = new_supply_elgamal_keypair
@@ -142,10 +142,10 @@ impl SupplyAccountInfo {
142
142
pub fn new_decryptable_supply (
143
143
& self ,
144
144
mint_amount : u64 ,
145
- aes_key : & AeKey ,
146
145
elgamal_keypair : & ElGamalKeypair ,
146
+ aes_key : & AeKey ,
147
147
) -> Result < AeCiphertext , TokenError > {
148
- let current_decrypted_supply = self . decrypt_current_supply ( aes_key, elgamal_keypair) ?;
148
+ let current_decrypted_supply = self . decrypted_current_supply ( aes_key, elgamal_keypair) ?;
149
149
let new_decrypted_available_balance = current_decrypted_supply
150
150
. checked_add ( mint_amount)
151
151
. ok_or ( TokenError :: Overflow ) ?;
0 commit comments