From 2c5ed2c94afb2428a0cc4b846706b57edd1db50a Mon Sep 17 00:00:00 2001 From: Sosthene Date: Fri, 29 Nov 2024 09:08:55 +0100 Subject: [PATCH] Tsify Process --- src/process.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/process.rs b/src/process.rs index c745fe5..c117193 100644 --- a/src/process.rs +++ b/src/process.rs @@ -14,7 +14,8 @@ use crate::{ MutexExt, }; -#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)] +#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, Tsify)] +#[tsify(into_wasm_abi)] pub struct ProcessState { pub commited_in: OutPoint, pub pcd_commitment: Value, // If we can't modify a field, we just copy the previous value @@ -169,7 +170,8 @@ impl ProcessState { /// A process is basically a succession of states /// If a process has nothing to do with us, impending_requests will be empty /// The latest state MUST be an empty state with only the commited_in field set at the last unspent outpoint -#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize)] +#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize, Tsify)] +#[tsify(into_wasm_abi)] pub struct Process { states: Vec, impending_requests: Vec,