Skip to content

Commit

Permalink
Fixed KeylessSignature serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
hardsetting committed Mar 19, 2024
1 parent bd371ed commit 42785c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/crypto/keyless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,13 @@ export class SignedGroth16Signature extends Signature {

static load(deserializer: Deserializer): SignedGroth16Signature {
const proof = Groth16Zkp.deserialize(deserializer);
const expHorizonSecs = deserializer.deserializeU64();
const hasExtraField = deserializer.deserializeUleb128AsU32();
const extraField = hasExtraField ? deserializer.deserializeStr() : undefined;
const hasOverrideAudVal = deserializer.deserializeUleb128AsU32();
const overrideAudVal = hasOverrideAudVal ? deserializer.deserializeStr() : undefined;
const [trainingWheelsSignature] = deserializer.deserializeVector(EphemeralSignature);
return new SignedGroth16Signature({ proof, trainingWheelsSignature, extraField, overrideAudVal });
return new SignedGroth16Signature({ proof, expHorizonSecs, trainingWheelsSignature, extraField, overrideAudVal });
}

// static isSignature(signature: Signature): signature is OpenIdSignature {
Expand Down

0 comments on commit 42785c2

Please sign in to comment.