Skip to content

Commit

Permalink
added generateSignatureMode method
Browse files Browse the repository at this point in the history
  • Loading branch information
av-mads committed May 15, 2024
1 parent bc2927f commit c565522
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/av_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { KeyPair, Affidavit, VerifierItem, CommitmentOpening, SpoilRequestItem,
import { randomKeyPair } from './av_client/generate_key_pair';
import { generateReceipt } from './av_client/generate_receipt';
import { Buffer } from 'buffer'
import * as Crypto from "../lib/av_client/aion_crypto.js"
import jwtDecode, { JwtPayload } from "jwt-decode";

import {
Expand Down Expand Up @@ -607,6 +608,10 @@ export class AVClient implements IAVClient {
return this.keyPair.privateKey
}

public generateSignature(payload: string): string {
return Crypto.generateSchnorrSignature(payload, this.proofOfElectionCodes.mainKeyPair.privateKey)
}

/**
* Registers a voter by proof of identity
* Used when the authorization mode of the Voter Authorizer is 'proof-of-identity'
Expand Down

0 comments on commit c565522

Please sign in to comment.