Skip to content

Commit

Permalink
Add debugging information
Browse files Browse the repository at this point in the history
  • Loading branch information
Inkvi committed Jan 9, 2025
1 parent 5fad47b commit a208ada
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { KMSProviderGCP } from "./KMSProviderGCP";
import { KMSWallets } from "./web3-kms-signer/kms-wallets";
import { Signer } from "./web3-kms-signer/core";
import { loadKZG } from "kzg-wasm";
import * as console from "node:console";


const app = fastify({
Expand Down Expand Up @@ -62,6 +63,7 @@ app.post('/', async (request, reply) => {
return reply.code(200).send({result: 'ok'});
case 'sign':
const signature = await wallets.ecsign({keyId: keyId}, Buffer.from(params[0].slice(2), 'hex'), 1);
console.log('Signature r, s, v:', signature.r.toString('hex'), signature.s.toString('hex'), signature.v.toString(16));
const res = Buffer.concat([signature.r, signature.s, bigintToBuffer(signature.v)]).toString('hex');
return reply.code(200).send({result: res});
default:
Expand Down

0 comments on commit a208ada

Please sign in to comment.