Skip to content

Commit e6b4e2a

Browse files
author
Akash Thota
committed
fix: yarn lint
1 parent ab3fcc3 commit e6b4e2a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tests/signature-verification/tests/signature-verification-test.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ describe("signature-verification-test", () => {
1313
it("Verify Ed25519 signature with actual signature", async () => {
1414
// Create a keypair for testing
1515
const signer = Keypair.generate();
16-
16+
1717
// Create a test message
1818
const message = Buffer.from("Hello, Anchor Signature Verification Test!");
19-
19+
2020
// Create a mock signature (in real implementation, this would be properly signed)
2121
const signature = new Uint8Array(64).fill(1); // Mock signature
22-
22+
2323
// Create instruction to call the program
2424
const instruction = await program.methods
2525
.verifyEd25519Signature(message, Array.from(signature) as [number, ...number[]])
@@ -31,16 +31,16 @@ describe("signature-verification-test", () => {
3131

3232
// Create transaction with the signature verification instruction
3333
const transaction = new Transaction().add(instruction);
34-
34+
3535
// Add the Ed25519 signature instruction to the transaction
3636
const ed25519Instruction = Ed25519Program.createInstructionWithPublicKey({
3737
publicKey: signer.publicKey.toBytes(),
3838
message: message,
3939
signature: signature,
4040
});
41-
41+
4242
transaction.add(ed25519Instruction);
43-
43+
4444
try {
4545
await provider.sendAndConfirm(transaction, [signer]);
4646
console.log("✅ Ed25519 signature verified successfully using custom helper!");
@@ -53,14 +53,14 @@ describe("signature-verification-test", () => {
5353
it("Verify Secp256k1 signature with actual signature", async () => {
5454
// Create ETH address (20 bytes)
5555
const ethAddress = crypto.randomBytes(20);
56-
56+
5757
// Create a test message hash (32 bytes)
5858
const messageHash = crypto.randomBytes(32);
59-
59+
6060
// Create a mock signature
6161
const signature = new Uint8Array(64).fill(2);
6262
const recoveryId = 0;
63-
63+
6464
// Create instruction to call the program
6565
const instruction = await program.methods
6666
.verifySecp256k1Signature(
@@ -76,17 +76,17 @@ describe("signature-verification-test", () => {
7676

7777
// Create transaction with the signature verification instruction
7878
const transaction = new Transaction().add(instruction);
79-
79+
8080
// Add the Secp256k1 signature instruction to the transaction
8181
const secp256k1Instruction = Secp256k1Program.createInstructionWithPublicKey({
8282
publicKey: Buffer.from(ethAddress), // Use ETH address as public key
8383
message: messageHash,
8484
signature: signature,
8585
recoveryId: recoveryId,
8686
});
87-
87+
8888
transaction.add(secp256k1Instruction);
89-
89+
9090
try {
9191
await provider.sendAndConfirm(transaction, []);
9292
console.log("✅ Secp256k1 signature verified successfully using custom helper!");

0 commit comments

Comments
 (0)