Tsify Process

This commit is contained in:
Sosthene 2024-11-29 09:08:55 +01:00
parent 541ad36d13
commit 2c5ed2c94a

View File

@ -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<ProcessState>,
impending_requests: Vec<Prd>,