From bfe5f9a060ef1817219318e0b7851e6dad294b65 Mon Sep 17 00:00:00 2001 From: soralit Date: Mon, 18 Nov 2024 17:23:23 +0800 Subject: [PATCH] feat: add zcash interfaces --- rust/apps/zcash/src/lib.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/rust/apps/zcash/src/lib.rs b/rust/apps/zcash/src/lib.rs index 2eac94a3a..5babeb162 100644 --- a/rust/apps/zcash/src/lib.rs +++ b/rust/apps/zcash/src/lib.rs @@ -7,7 +7,11 @@ pub mod pczt; use errors::{Result, ZcashError}; -use alloc::string::{String, ToString}; +use alloc::{ + string::{String, ToString}, + vec::Vec, +}; +use pczt::structs::ParsedPczt; use zcash_vendor::{ zcash_keys::keys::{UnifiedAddressRequest, UnifiedFullViewingKey}, zcash_protocol::consensus::MainNetwork, @@ -22,6 +26,18 @@ pub fn get_address(ufvk_text: &str) -> Result { Ok(address.encode(&MainNetwork)) } +pub fn check_pczt(pczt: &[u8], ufvk_text: &str, seed_fingerprint: &[u8; 32]) -> Result<()> { + unimplemented!() +} + +pub fn parse_pczt(pczt: &[u8], ufvk_text: &str, seed_fingerprint: &[u8; 32]) -> Result { + unimplemented!() +} + +pub fn sign_pczt(pczt: &[u8], seed: &[u8]) -> Result> { + unimplemented!() +} + // pub fn sign_transaction(tx: &[u8], seed: &[u8]) -> Result> { // let mut transaction = tx.clone(); // let pczt = PartiallyCreatedTransaction::decode(transaction)?;