From 13f56dad180f87e2c7c9cbbdf8d4b9adc9b26b5b Mon Sep 17 00:00:00 2001 From: 22388o <22388o@users.noreply.github.com> Date: Sat, 25 Jan 2025 08:00:07 -0300 Subject: [PATCH] Initial Liquid integration --- Cargo.toml | 3 ++- README.md | 2 +- src/crates/Cargo.toml | 1 + src/crates/circuit.rs | 3 +++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cf0d70f..1b0c6a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,4 +19,5 @@ serde_json = "1.0.134" rustls = "0.23.20" idna = "1.0.0" bdk_electrum = "0.20.1" -lightning = "=0.1.0" \ No newline at end of file +lightning = "=0.1.0" +elements = "0.25.1" \ No newline at end of file diff --git a/README.md b/README.md index 290ef61..5a65e05 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,6 @@ zk_coinjoin_lib = "1.0.1-beta" ## Roadmap -- [ ] Liquid +- [x] Liquid (WIP) - [ ] Fix bugs and issues diff --git a/src/crates/Cargo.toml b/src/crates/Cargo.toml index 7c9f2f7..d502d35 100644 --- a/src/crates/Cargo.toml +++ b/src/crates/Cargo.toml @@ -11,6 +11,7 @@ reqwest = "0.12.7" pairing = "0.23.0" serde = { version = "1.0.215", features = ["derive"] } serde_json = "1.0.128" +elements = "0.25.1" [package.metadata.docs.rs] all-features = true diff --git a/src/crates/circuit.rs b/src/crates/circuit.rs index 07909a0..5ef2805 100644 --- a/src/crates/circuit.rs +++ b/src/crates/circuit.rs @@ -2,6 +2,7 @@ use crate::Proofs; use bellman::groth16::{create_random_proof, generate_parameters, prepare_verifying_key, verify_proof, Proof, VerifyingKey}; use bellman::pairing::bn256::{Bn256, Fr}; use serde::{Deserialize, Serialize}; +use public_elements::cofidental::Asset; use std::fs::File; use std::io::{self, BufReader, BufWriter, Write}; use rand::thread_rng; @@ -17,6 +18,8 @@ pub struct CoinjoinProof { pub public_inputs: Vec, pub taproot_data: TaprootData, pub confidential_proof: ConfidentialProof, + pub asset: Asset, + } pub struct TaprootData {