From 27ee79f31d74f073be65a5de93b0a2fa492849b3 Mon Sep 17 00:00:00 2001 From: Sosthene Date: Tue, 17 Dec 2024 22:37:15 +0100 Subject: [PATCH] Modify ts type for ProcessState fields --- src/process.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/process.rs b/src/process.rs index 0af2445..50d7a54 100644 --- a/src/process.rs +++ b/src/process.rs @@ -19,11 +19,15 @@ use crate::{ #[tsify(into_wasm_abi)] pub struct ProcessState { pub commited_in: OutPoint, + #[tsify(type = "Record")] pub pcd_commitment: Value, // If we can't modify a field, we just copy the previous value pub merkle_root: String, // the root of the tree created with all the commitments. Serves as an unique id for a state too + #[tsify(type = "Record")] pub encrypted_pcd: Value, // Some fields may be clear, if the owner of the process decides so + #[tsify(type = "Record")] pub keys: Map, // We may not always have all the keys pub validation_tokens: Vec, // Signature of the hash of the encrypted pcd tagged with some decision like "yes" or "no" + #[tsify(type = "Record")] pub descriptions: Map, // long descriptions that can be used for the ihm }