Modify ts type for ProcessState fields

This commit is contained in:
Sosthene 2024-12-17 22:37:15 +01:00 committed by Nicolas Cantu
parent f1ba34eddd
commit d135b8a66f

View File

@ -19,11 +19,15 @@ use crate::{
#[tsify(into_wasm_abi)]
pub struct ProcessState {
pub commited_in: OutPoint,
#[tsify(type = "Record<string, string>")]
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<string, string>")]
pub encrypted_pcd: Value, // Some fields may be clear, if the owner of the process decides so
#[tsify(type = "Record<string, string>")]
pub keys: Map<String, Value>, // We may not always have all the keys
pub validation_tokens: Vec<Proof>, // Signature of the hash of the encrypted pcd tagged with some decision like "yes" or "no"
#[tsify(type = "Record<string, string>")]
pub descriptions: Map<String, Value>, // long descriptions that can be used for the ihm
}