26
26
#[ cfg( not( target_os = "solana" ) ) ]
27
27
use {
28
28
solana_zk_sdk:: {
29
- encryption:: { auth_encryption :: AeCiphertext , elgamal:: ElGamalPubkey } ,
29
+ encryption:: elgamal:: ElGamalPubkey ,
30
30
zk_elgamal_proof_program:: {
31
31
instruction:: ProofInstruction ,
32
32
proof_data:: {
@@ -291,8 +291,8 @@ pub struct BurnInstructionData {
291
291
pub fn initialize_mint (
292
292
token_program_id : & Pubkey ,
293
293
mint : & Pubkey ,
294
- supply_elgamal_pubkey : PodElGamalPubkey ,
295
- decryptable_supply : PodAeCiphertext ,
294
+ supply_elgamal_pubkey : & PodElGamalPubkey ,
295
+ decryptable_supply : & DecryptableBalance ,
296
296
) -> Result < Instruction , ProgramError > {
297
297
check_program_account ( token_program_id) ?;
298
298
let accounts = vec ! [ AccountMeta :: new( * mint, false ) ] ;
@@ -303,8 +303,8 @@ pub fn initialize_mint(
303
303
TokenInstruction :: ConfidentialMintBurnExtension ,
304
304
ConfidentialMintBurnInstruction :: InitializeMint ,
305
305
& InitializeMintData {
306
- supply_elgamal_pubkey,
307
- decryptable_supply,
306
+ supply_elgamal_pubkey : * supply_elgamal_pubkey ,
307
+ decryptable_supply : * decryptable_supply ,
308
308
} ,
309
309
) )
310
310
}
@@ -317,7 +317,7 @@ pub fn rotate_supply_elgamal_pubkey(
317
317
mint : & Pubkey ,
318
318
authority : & Pubkey ,
319
319
multisig_signers : & [ & Pubkey ] ,
320
- new_supply_elgamal_pubkey : ElGamalPubkey ,
320
+ new_supply_elgamal_pubkey : & PodElGamalPubkey ,
321
321
ciphertext_equality_proof : ProofLocation < CiphertextCiphertextEqualityProofData > ,
322
322
) -> Result < Vec < Instruction > , ProgramError > {
323
323
check_program_account ( token_program_id) ?;
@@ -349,7 +349,7 @@ pub fn rotate_supply_elgamal_pubkey(
349
349
TokenInstruction :: ConfidentialMintBurnExtension ,
350
350
ConfidentialMintBurnInstruction :: RotateSupplyElGamalPubkey ,
351
351
& RotateSupplyElGamalPubkeyData {
352
- new_supply_elgamal_pubkey: PodElGamalPubkey :: from ( new_supply_elgamal_pubkey) ,
352
+ new_supply_elgamal_pubkey: * new_supply_elgamal_pubkey,
353
353
proof_instruction_offset,
354
354
} ,
355
355
) ] ;
@@ -366,7 +366,7 @@ pub fn update_decryptable_supply(
366
366
mint : & Pubkey ,
367
367
authority : & Pubkey ,
368
368
multisig_signers : & [ & Pubkey ] ,
369
- new_decryptable_supply : AeCiphertext ,
369
+ new_decryptable_supply : & DecryptableBalance ,
370
370
) -> Result < Instruction , ProgramError > {
371
371
check_program_account ( token_program_id) ?;
372
372
let mut accounts = vec ! [
@@ -382,7 +382,7 @@ pub fn update_decryptable_supply(
382
382
TokenInstruction :: ConfidentialMintBurnExtension ,
383
383
ConfidentialMintBurnInstruction :: UpdateDecryptableSupply ,
384
384
& UpdateDecryptableSupplyData {
385
- new_decryptable_supply : new_decryptable_supply. into ( ) ,
385
+ new_decryptable_supply : * new_decryptable_supply,
386
386
} ,
387
387
) )
388
388
}
@@ -417,7 +417,7 @@ pub fn confidential_mint_with_split_proofs(
417
417
BatchedGroupedCiphertext3HandlesValidityProofData ,
418
418
> ,
419
419
range_proof_location : ProofLocation < BatchedRangeProofU128Data > ,
420
- new_decryptable_supply : AeCiphertext ,
420
+ new_decryptable_supply : & DecryptableBalance ,
421
421
) -> Result < Vec < Instruction > , ProgramError > {
422
422
check_program_account ( token_program_id) ?;
423
423
let mut accounts = vec ! [ AccountMeta :: new( * token_account, false ) ] ;
@@ -473,7 +473,7 @@ pub fn confidential_mint_with_split_proofs(
473
473
TokenInstruction :: ConfidentialMintBurnExtension ,
474
474
ConfidentialMintBurnInstruction :: Mint ,
475
475
& MintInstructionData {
476
- new_decryptable_supply: new_decryptable_supply. into ( ) ,
476
+ new_decryptable_supply: * new_decryptable_supply,
477
477
mint_amount_auditor_ciphertext_lo: * mint_amount_auditor_ciphertext_lo,
478
478
mint_amount_auditor_ciphertext_hi: * mint_amount_auditor_ciphertext_hi,
479
479
equality_proof_instruction_offset,
@@ -495,7 +495,7 @@ pub fn confidential_burn_with_split_proofs(
495
495
token_account : & Pubkey ,
496
496
mint : & Pubkey ,
497
497
supply_elgamal_pubkey : Option < ElGamalPubkey > ,
498
- new_decryptable_available_balance : DecryptableBalance ,
498
+ new_decryptable_available_balance : & DecryptableBalance ,
499
499
burn_amount_auditor_ciphertext_lo : & PodElGamalCiphertext ,
500
500
burn_amount_auditor_ciphertext_hi : & PodElGamalCiphertext ,
501
501
authority : & Pubkey ,
@@ -559,7 +559,7 @@ pub fn confidential_burn_with_split_proofs(
559
559
TokenInstruction :: ConfidentialMintBurnExtension ,
560
560
ConfidentialMintBurnInstruction :: Burn ,
561
561
& BurnInstructionData {
562
- new_decryptable_available_balance,
562
+ new_decryptable_available_balance: * new_decryptable_available_balance ,
563
563
burn_amount_auditor_ciphertext_lo: * burn_amount_auditor_ciphertext_lo,
564
564
burn_amount_auditor_ciphertext_hi: * burn_amount_auditor_ciphertext_hi,
565
565
equality_proof_instruction_offset,
0 commit comments