Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
deserialize(type, array) {
const buffer = new Serialize.SerialBuffer({textEncoder: new TextEncoder, textDecoder: new TextDecoder, array});
let result = Serialize.getType(this.types, type).deserialize(buffer, new Serialize.SerializerState({bytesAsUint8Array: true}));
if (buffer.readPos !== array.length)
throw new Error('oops: ' + type); // todo: remove check
// {
// console.log(result.actions[0].authorization[0].actor);
// //console.log('oops: ' + type);
// }
return result;
}