import { Field, PrivateKey, Signature } from "o1js"; import { injectable } from "tsyringe"; import { AppChainModule } from "@proto-kit/sequencer"; export interface Signer { sign: (signatureData: Field[]) => Promise; } export interface InMemorySignerConfig { signer: PrivateKey; } @injectable() export class InMemorySigner extends AppChainModule implements Signer { public constructor() { super(); } public async sign(signatureData: Field[]): Promise { return Signature.create(this.config.signer, signatureData); } }