zk-token-sdk: rustfmt
This commit is contained in:
parent
f81f926a0c
commit
705084a25b
|
@ -34,7 +34,6 @@ pub struct TransferData {
|
||||||
pub new_spendable_ct: pod::ElGamalCiphertext, // 64 bytes
|
pub new_spendable_ct: pod::ElGamalCiphertext, // 64 bytes
|
||||||
|
|
||||||
// pub fee: EncryptedTransferFee,
|
// pub fee: EncryptedTransferFee,
|
||||||
|
|
||||||
/// Zero-knowledge proofs for Transfer
|
/// Zero-knowledge proofs for Transfer
|
||||||
pub proof: TransferProof,
|
pub proof: TransferProof,
|
||||||
}
|
}
|
||||||
|
@ -81,7 +80,6 @@ impl TransferData {
|
||||||
|
|
||||||
// auditor ElGamal pubkey
|
// auditor ElGamal pubkey
|
||||||
auditor_pk: ElGamalPubkey,
|
auditor_pk: ElGamalPubkey,
|
||||||
|
|
||||||
// // fee collector ElGamal pubkey
|
// // fee collector ElGamal pubkey
|
||||||
// fee_collector_pk: ElGamalPubkey,
|
// fee_collector_pk: ElGamalPubkey,
|
||||||
|
|
||||||
|
@ -164,7 +162,8 @@ impl TransferData {
|
||||||
|
|
||||||
/// Extracts the lo ciphertexts associated with a transfer data
|
/// Extracts the lo ciphertexts associated with a transfer data
|
||||||
fn ciphertext_lo(&self, role: Role) -> Result<ElGamalCiphertext, ProofError> {
|
fn ciphertext_lo(&self, role: Role) -> Result<ElGamalCiphertext, ProofError> {
|
||||||
let transfer_comm_lo: PedersenCommitment = self.encrypted_transfer_amount.amount_comm_lo.try_into()?;
|
let transfer_comm_lo: PedersenCommitment =
|
||||||
|
self.encrypted_transfer_amount.amount_comm_lo.try_into()?;
|
||||||
|
|
||||||
let decryption_handle_lo = match role {
|
let decryption_handle_lo = match role {
|
||||||
Role::Source => self.encrypted_transfer_amount.decrypt_handles_lo.source,
|
Role::Source => self.encrypted_transfer_amount.decrypt_handles_lo.source,
|
||||||
|
@ -178,7 +177,8 @@ impl TransferData {
|
||||||
|
|
||||||
/// Extracts the lo ciphertexts associated with a transfer data
|
/// Extracts the lo ciphertexts associated with a transfer data
|
||||||
fn ciphertext_hi(&self, role: Role) -> Result<ElGamalCiphertext, ProofError> {
|
fn ciphertext_hi(&self, role: Role) -> Result<ElGamalCiphertext, ProofError> {
|
||||||
let transfer_comm_hi: PedersenCommitment = self.encrypted_transfer_amount.amount_comm_hi.try_into()?;
|
let transfer_comm_hi: PedersenCommitment =
|
||||||
|
self.encrypted_transfer_amount.amount_comm_hi.try_into()?;
|
||||||
|
|
||||||
let decryption_handle_hi = match role {
|
let decryption_handle_hi = match role {
|
||||||
Role::Source => self.encrypted_transfer_amount.decrypt_handles_hi.source,
|
Role::Source => self.encrypted_transfer_amount.decrypt_handles_hi.source,
|
||||||
|
@ -431,7 +431,6 @@ pub struct TransferCommitments {
|
||||||
pub hi: pod::PedersenCommitment,
|
pub hi: pod::PedersenCommitment,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[derive(Clone, Copy, Pod, Zeroable)]
|
#[derive(Clone, Copy, Pod, Zeroable)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct EncryptedTransferFee {
|
pub struct EncryptedTransferFee {
|
||||||
|
|
Loading…
Reference in New Issue