Add decodeValue api

This commit is contained in:
Sosthene 2025-06-23 19:45:21 +02:00
parent 17bdcec317
commit 50a92995d7

View File

@ -1042,6 +1042,15 @@ export default class Services {
}
}
async decodeValue(value: number[]): Promise<any | null> {
try {
return this.sdkClient.decode_value(value);
} catch (e) {
console.error(`Failed to decode value: ${e}`);
return null;
}
}
async decryptAttribute(processId: string, state: ProcessState, attribute: string): Promise<any | null> {
let hash = state.pcd_commitment[attribute];
if (!hash) {