Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit b5b6f39

Browse files
committed
update docs to use zk_elgamal_proof program
1 parent 58dd83b commit b5b6f39

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

token/program-2022/src/extension/confidential_transfer/instruction.rs

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use {
1313
instruction::{encode_instruction, TokenInstruction},
1414
proof::{ProofData, ProofLocation},
1515
},
16-
bytemuck::Zeroable, // `Pod` comes from zk_token_proof_instruction
16+
bytemuck::Zeroable,
1717
num_enum::{IntoPrimitive, TryFromPrimitive},
1818
solana_program::{
1919
instruction::{AccountMeta, Instruction},
@@ -75,18 +75,18 @@ pub enum ConfidentialTransferInstruction {
7575
/// `DisableNonConfidentialCredits` instructions to disable.
7676
///
7777
/// In order for this instruction to be successfully processed, it must be
78-
/// accompanied by the `VerifyPubkeyValidityProof` instruction of the
79-
/// `zk_token_proof` program in the same transaction or the address of a
78+
/// accompanied by the `VerifyPubkeyValidity` instruction of the
79+
/// `zk_elgamal_proof` program in the same transaction or the address of a
8080
/// context state account for the proof must be provided.
8181
///
8282
/// Accounts expected by this instruction:
8383
///
8484
/// * Single owner/delegate
8585
/// 0. `[writeable]` The SPL Token account.
8686
/// 1. `[]` The corresponding SPL Token mint.
87-
/// 2. `[]` Instructions sysvar if `VerifyPubkeyValidityProof` is included
87+
/// 2. `[]` Instructions sysvar if `VerifyPubkeyValidity` is included
8888
/// in the same transaction or context state account if
89-
/// `VerifyPubkeyValidityProof` is pre-verified into a context state
89+
/// `VerifyPubkeyValidity` is pre-verified into a context state
9090
/// account.
9191
/// 3. `[]` (Optional) Record account if the accompanying proof is to be
9292
/// read from a record account.
@@ -95,9 +95,9 @@ pub enum ConfidentialTransferInstruction {
9595
/// * Multisignature owner/delegate
9696
/// 0. `[writeable]` The SPL Token account.
9797
/// 1. `[]` The corresponding SPL Token mint.
98-
/// 2. `[]` Instructions sysvar if `VerifyPubkeyValidityProof` is included
98+
/// 2. `[]` Instructions sysvar if `VerifyPubkeyValidity` is included
9999
/// in the same transaction or context state account if
100-
/// `VerifyPubkeyValidityProof` is pre-verified into a context state
100+
/// `VerifyPubkeyValidity` is pre-verified into a context state
101101
/// account.
102102
/// 3. `[]` (Optional) Record account if the accompanying proof is to be
103103
/// read from a record account.
@@ -143,25 +143,25 @@ pub enum ConfidentialTransferInstruction {
143143
/// token account.
144144
///
145145
/// In order for this instruction to be successfully processed, it must be
146-
/// accompanied by the `VerifyZeroBalanceProof` instruction of the
147-
/// `zk_token_proof` program in the same transaction or the address of a
146+
/// accompanied by the `VerifyZeroCiphertext` instruction of the
147+
/// `zk_elgamal_proof` program in the same transaction or the address of a
148148
/// context state account for the proof must be provided.
149149
///
150150
/// * Single owner/delegate
151151
/// 0. `[writable]` The SPL Token account.
152-
/// 1. `[]` Instructions sysvar if `VerifyZeroBalanceProof` is included in
152+
/// 1. `[]` Instructions sysvar if `VerifyZeroCiphertext` is included in
153153
/// the same transaction or context state account if
154-
/// `VerifyZeroBalanceProof` is pre-verified into a context state
154+
/// `VerifyZeroCiphertext` is pre-verified into a context state
155155
/// account.
156156
/// 2. `[]` (Optional) Record account if the accompanying proof is to be
157157
/// read from a record account.
158158
/// 3. `[signer]` The single account owner.
159159
///
160160
/// * Multisignature owner/delegate
161161
/// 0. `[writable]` The SPL Token account.
162-
/// 1. `[]` Instructions sysvar if `VerifyZeroBalanceProof` is included in
162+
/// 1. `[]` Instructions sysvar if `VerifyZeroCiphertext` is included in
163163
/// the same transaction or context state account if
164-
/// `VerifyZeroBalanceProof` is pre-verified into a context state
164+
/// `VerifyZeroCiphertext` is pre-verified into a context state
165165
/// account.
166166
/// 2. `[]` (Optional) Record account if the accompanying proof is to be
167167
/// read from a record account.
@@ -251,10 +251,10 @@ pub enum ConfidentialTransferInstruction {
251251
/// Transfer tokens confidentially.
252252
///
253253
/// In order for this instruction to be successfully processed, it must be
254-
/// accompanied by the following list of `zk_token_proof` program
254+
/// accompanied by the following list of `zk_elgamal_proof` program
255255
/// instructions:
256-
/// - `VerifyCiphertextCommitmentEqualityProof`
257-
/// - `VerifyBatchedGroupedCiphertext3HandlesValidityProof`
256+
/// - `VerifyCiphertextCommitmentEquality`
257+
/// - `VerifyBatchedGroupedCiphertext3HandlesValidity`
258258
/// - `VerifyBatchedRangeProofU128`
259259
/// These instructions can be accompanied in the same transaction or can be
260260
/// pre-verified into a context state account, in which case, only their
@@ -267,7 +267,7 @@ pub enum ConfidentialTransferInstruction {
267267
/// 2. `[]` The token mint.
268268
/// 3. `[writable]` The destination SPL Token account.
269269
/// 4. `[]` (Optional) Instructions sysvar if at least one of the
270-
/// `zk_token_proof` instructions are included in the same transaction.
270+
/// `zk_elgamal_proof` instructions are included in the same transaction.
271271
/// 5. `[]` (Optional) Equality proof record account or context state
272272
/// account.
273273
/// 6. `[]` (Optional) Ciphertext validity proof record account or context
@@ -281,7 +281,7 @@ pub enum ConfidentialTransferInstruction {
281281
/// 2. `[]` The token mint.
282282
/// 3. `[writable]` The destination SPL Token account.
283283
/// 4. `[]` (Optional) Instructions sysvar if at least one of the
284-
/// `zk_token_proof` instructions are included in the same transaction.
284+
/// `zk_elgamal_proof` instructions are included in the same transaction.
285285
/// 5. `[]` (Optional) Equality proof record account or context state
286286
/// account.
287287
/// 6. `[]` (Optional) Ciphertext validity proof record account or context
@@ -412,13 +412,13 @@ pub enum ConfidentialTransferInstruction {
412412
/// Transfer tokens confidentially with fee.
413413
///
414414
/// In order for this instruction to be successfully processed, it must be
415-
/// accompanied by the following list of `zk_token_proof` program
415+
/// accompanied by the following list of `zk_elgamal_proof` program
416416
/// instructions:
417-
/// - `VerifyCiphertextCommitmentEqualityProof`
418-
/// - `VerifyBatchedGroupedCiphertext3HandlesValidityProof` (transfer amount
417+
/// - `VerifyCiphertextCommitmentEquality`
418+
/// - `VerifyBatchedGroupedCiphertext3HandlesValidity` (transfer amount
419419
/// ciphertext)
420-
/// - `FeeSigmaProof`
421-
/// - `VerifyBatchedGroupedCiphertext2HandlesValidityProof` (fee ciphertext)
420+
/// - `VerifyPercentageWithFee`
421+
/// - `VerifyBatchedGroupedCiphertext2HandlesValidity` (fee ciphertext)
422422
/// - `VerifyBatchedRangeProofU256`
423423
/// These instructions can be accompanied in the same transaction or can be
424424
/// pre-verified into a context state account, in which case, only their
@@ -433,7 +433,7 @@ pub enum ConfidentialTransferInstruction {
433433
/// 2. `[]` The token mint.
434434
/// 3. `[writable]` The destination SPL Token account.
435435
/// 4. `[]` (Optional) Instructions sysvar if at least one of the
436-
/// `zk_token_proof` instructions are included in the same transaction.
436+
/// `zk_elgamal_proof` instructions are included in the same transaction.
437437
/// 5. `[]` (Optional) Equality proof record account or context state
438438
/// account.
439439
/// 6. `[]` (Optional) Transfer amount ciphertext validity proof record
@@ -451,7 +451,7 @@ pub enum ConfidentialTransferInstruction {
451451
/// 2. `[]` The token mint.
452452
/// 3. `[writable]` The destination SPL Token account.
453453
/// 4. `[]` (Optional) Instructions sysvar if at least one of the
454-
/// `zk_token_proof` instructions are included in the same transaction.
454+
/// `zk_elgamal_proof` instructions are included in the same transaction.
455455
/// 5. `[]` (Optional) Equality proof record account or context state
456456
/// account.
457457
/// 6. `[]` (Optional) Transfer amount ciphertext validity proof record
@@ -511,7 +511,7 @@ pub struct ConfigureAccountInstructionData {
511511
/// The maximum number of despots and transfers that an account can receiver
512512
/// before the `ApplyPendingBalance` is executed
513513
pub maximum_pending_balance_credit_counter: PodU64,
514-
/// Relative location of the `ProofInstruction::ZeroBalanceProof`
514+
/// Relative location of the `ProofInstruction::ZeroCiphertextProof`
515515
/// instruction to the `ConfigureAccount` instruction in the
516516
/// transaction. If the offset is `0`, then use a context state account
517517
/// for the proof.
@@ -576,12 +576,12 @@ pub struct TransferInstructionData {
576576
#[cfg_attr(feature = "serde-traits", serde(with = "aeciphertext_fromstr"))]
577577
pub new_source_decryptable_available_balance: DecryptableBalance,
578578
/// Relative location of the
579-
/// `ProofInstruction::VerifyCiphertextCommitmentEqualityProof` instruction
579+
/// `ProofInstruction::VerifyCiphertextCommitmentEquality` instruction
580580
/// to the `Transfer` instruction in the transaction. If the offset is
581581
/// `0`, then use a context state account for the proof.
582582
pub equality_proof_instruction_offset: i8,
583583
/// Relative location of the
584-
/// `ProofInstruction::VerifyBatchedGroupedCiphertext3HandlesValidityProof`
584+
/// `ProofInstruction::VerifyBatchedGroupedCiphertext3HandlesValidity`
585585
/// instruction to the `Transfer` instruction in the transaction. If the
586586
/// offset is `0`, then use a context state account for the proof.
587587
pub ciphertext_validity_proof_instruction_offset: i8,
@@ -615,23 +615,23 @@ pub struct TransferWithFeeInstructionData {
615615
#[cfg_attr(feature = "serde-traits", serde(with = "aeciphertext_fromstr"))]
616616
pub new_source_decryptable_available_balance: DecryptableBalance,
617617
/// Relative location of the
618-
/// `ProofInstruction::VerifyCiphertextCommitmentEqualityProof` instruction
618+
/// `ProofInstruction::VerifyCiphertextCommitmentEquality` instruction
619619
/// to the `TransferWithFee` instruction in the transaction. If the offset
620620
/// is `0`, then use a context state account for the proof.
621621
pub equality_proof_instruction_offset: i8,
622622
/// Relative location of the
623-
/// `ProofInstruction::VerifyBatchedGroupedCiphertext3HandlesValidityProof`
623+
/// `ProofInstruction::VerifyBatchedGroupedCiphertext3HandlesValidity`
624624
/// instruction to the `TransferWithFee` instruction in the transaction.
625625
/// If the offset is `0`, then use a context state account for the
626626
/// proof.
627627
pub transfer_amount_ciphertext_validity_proof_instruction_offset: i8,
628-
/// Relative location of the `ProofInstruction::VerifyFeeSigmaProof`
628+
/// Relative location of the `ProofInstruction::VerifyPercentageWithFee`
629629
/// instruction to the `TransferWithFee` instruction in the transaction.
630630
/// If the offset is `0`, then use a context state account for the
631631
/// proof.
632632
pub fee_sigma_proof_instruction_offset: i8,
633633
/// Relative location of the
634-
/// `ProofInstruction::VerifyBatchedGroupedCiphertext2HandlesValidityProof`
634+
/// `ProofInstruction::VerifyBatchedGroupedCiphertext2HandlesValidity`
635635
/// instruction to the `TransferWithFee` instruction in the transaction.
636636
/// If the offset is `0`, then use a context state account for the
637637
/// proof.

token/program-2022/src/extension/confidential_transfer_fee/instruction.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub enum ConfidentialTransferFeeInstruction {
6161
///
6262
/// In order for this instruction to be successfully processed, it must be
6363
/// accompanied by the `VerifyCiphertextCiphertextEquality` instruction
64-
/// of the `zk_token_proof` program in the same transaction or the
64+
/// of the `zk_elgamal_proof` program in the same transaction or the
6565
/// address of a context state account for the proof must be provided.
6666
///
6767
/// Accounts expected by this instruction:
@@ -126,7 +126,7 @@ pub enum ConfidentialTransferFeeInstruction {
126126
///
127127
/// In order for this instruction to be successfully processed, it must be
128128
/// accompanied by the `VerifyWithdrawWithheldTokens` instruction of the
129-
/// `zk_token_proof` program in the same transaction or the address of a
129+
/// `zk_elgamal_proof` program in the same transaction or the address of a
130130
/// context state account for the proof must be provided.
131131
///
132132
/// Accounts expected by this instruction:

0 commit comments

Comments
 (0)