63 Commits

Author SHA1 Message Date
Sosthene
90dfb8017e Cargo fmt 2025-08-27 13:57:59 +02:00
Sosthene
0109b6ba51 Rm all ciborium code from pcd 2025-08-27 13:57:58 +02:00
Sosthene
ac39fc5b7c Add get_as methods for Pcd 2025-08-27 13:57:58 +02:00
Sosthene
f8b46420c8 Use PcdSerializable in TryFrom impl for Pcd 2025-08-27 13:57:58 +02:00
Sosthene
132565e0b5 Define and implement PcdSerializable trait 2025-08-27 13:57:58 +02:00
Sosthene
f2a51aa6af Add const PCD_VERSION and ZSTD_COMPRESSION_LEVEL 2025-08-27 13:57:57 +02:00
Sosthene
cadc098883 Make FileBlob pub and reexport js_sys 2025-08-27 13:57:57 +02:00
eab279acab Move hashing into hash mod and refactor hash code 2025-08-27 13:57:57 +02:00
1929153e8c Add is_empty method to Roles 2025-08-27 13:57:56 +02:00
8a95dbffda Separate handling of the files data when encoding pcd 2025-08-27 13:57:56 +02:00
2ee37599ed Update pcd tests 2025-08-27 13:57:56 +02:00
b5c1c1ea79 Pcd is BTreeMap<String, Vec<u8>> 2025-08-27 13:57:55 +02:00
8eb3baaf9f Upgrade to latest sp_client 2025-08-27 13:57:54 +02:00
a3de9e4666 OutPointProcessMap PcdCommitments serialization 2025-08-27 13:57:54 +02:00
1f9192a8e0 Update tests 2025-08-27 13:57:52 +02:00
bde7900562 Implement get_mut for Roles 2025-08-27 13:57:52 +02:00
80853ba4bd More check on quorum for ValidationRule 2025-08-27 13:57:52 +02:00
f88bae7354 Implement contains_key for PcdCommitments + change keys() return value 2025-08-27 13:57:52 +02:00
6fc0a9b1ff derive from_wasm_abi for Pcd 2025-08-27 13:57:52 +02:00
84ba054632 PcdCommitments new refactor 2025-08-27 13:57:52 +02:00
f4bfc6dda6 Update tests 2025-08-27 13:57:51 +02:00
857dce9704 Remove dead code 2025-08-27 13:57:51 +02:00
70616dfc94 Replace Member with Outpoint in RoleDefinition 2025-08-27 13:57:51 +02:00
2b511caa14 Remove empty member condition 2025-08-27 13:57:51 +02:00
2cbbfa3eae Add PcdCommitments::is_empty() 2025-08-27 13:57:50 +02:00
c7c6a1b6a4 Rename PcdCommitments::emtpy() to new_empty() 2025-08-27 13:57:50 +02:00
57182efbbc Complete overhaul of the pcd/process logic, with sensible custom types and less serialization 2025-08-27 13:57:50 +02:00
46d405f046 Roles is now part of ProcessState out of the pcd 2025-08-27 13:57:48 +02:00
0e9121e604 Implement Display for Member 2025-08-27 13:57:47 +02:00
0231c6a92b Update Member 2025-08-27 13:57:46 +02:00
6365c2ccdd Reimplement PartialEq, Eq and Hash for Member 2025-08-27 13:57:46 +02:00
Sosthene
eda4b18770 Fix pcd to_sorted_key_values to sort recursively 2025-08-27 13:57:45 +02:00
Sosthene
60ff6c1aba Add Pcd::to_sorted_key_values, and hash values with a counter 2025-08-27 13:57:44 +02:00
Sosthene
f03b1594af AnkPcdHash from_value_with_outpoint takes &[u8] 2025-08-27 13:57:44 +02:00
Sosthene
de93b1e568 Fix pcd tests 2025-08-27 13:57:43 +02:00
Sosthene
da2cd5d62a Refactor is_hex_string 2025-08-27 13:57:43 +02:00
Sosthene
eef48ce834 decrypt_all check is the value is clear or a commitment 2025-08-27 13:57:43 +02:00
Sosthene
6fbc3f6f4a Encrypt_fields check for existing keys and don't overwrite values 2025-08-27 13:57:43 +02:00
Sosthene
e9261c0d62 Use commited_in instead of root_commitment as salt 2025-08-27 13:57:43 +02:00
Sosthene
46dc67839d Remove dead code 2025-08-27 13:57:43 +02:00
Sosthene
f44751f7d7 Add storages to RoleDefinition 2025-08-27 13:57:43 +02:00
Sosthene
defc715275 fix pcd tests 2025-08-27 13:57:42 +02:00
Sosthene
928a3d5946 [bug] correct hash construction 2025-08-27 13:57:42 +02:00
Sosthene
13e8b827ec Add is_hexstring to Pcd trait 2025-08-27 13:57:42 +02:00
Sosthene
47eda1d26c create_merkle_tree() sorts leaves 2025-08-27 13:57:42 +02:00
Sosthene
6310ad158e Add RoleDefinition is_member_validation_needed() 2025-08-27 13:57:42 +02:00
Sosthene
2c92c9340c Update ValidationRule is_satisfied() 2025-08-27 13:57:42 +02:00
Sosthene
e60ef13133 Add ValidationRule::allows_modification() 2025-08-27 13:57:42 +02:00
Sosthene
ec447ca409 Make Pcd::decrypt_fields() replace encrypted by commitments 2025-08-27 13:57:41 +02:00
Sosthene
390b8d176f Update create_merkle_tree 2025-08-27 13:57:41 +02:00