Add decodeValue api
This commit is contained in:
parent
17bdcec317
commit
50a92995d7
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user