diff --git a/package-lock.json b/package-lock.json index e4a29a3..7cac037 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "fhevmjs", - "version": "0.5.0-13", + "version": "0.5.0-14", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "fhevmjs", - "version": "0.5.0-13", + "version": "0.5.0-14", "license": "BSD-3-Clause-Clear", "dependencies": { "@types/keccak": "^3.0.4", diff --git a/package.json b/package.json index d867682..323226c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fhevmjs", - "version": "0.5.0-13", + "version": "0.5.0-14", "description": "fhEVM SDK for blockchain using TFHE", "main": "lib/node.js", "types": "lib/node/node.d.ts", diff --git a/src/sdk/keypair.test.ts b/src/sdk/keypair.test.ts index 860c044..dc9bbc2 100644 --- a/src/sdk/keypair.test.ts +++ b/src/sdk/keypair.test.ts @@ -42,7 +42,7 @@ describe('token', () => { expect(eip712.primaryType).toBe('Reencrypt'); expect(eip712.types.Reencrypt.length).toBe(1); expect(eip712.types.Reencrypt[0].name).toBe('publicKey'); - expect(eip712.types.Reencrypt[0].type).toBe('bytes32'); + expect(eip712.types.Reencrypt[0].type).toBe('bytes'); }); it('create a valid EIP712 with delegated accunt', async () => { @@ -64,7 +64,7 @@ describe('token', () => { expect(eip712.primaryType).toBe('Reencrypt'); expect(eip712.types.Reencrypt.length).toBe(2); expect(eip712.types.Reencrypt[0].name).toBe('publicKey'); - expect(eip712.types.Reencrypt[0].type).toBe('bytes32'); + expect(eip712.types.Reencrypt[0].type).toBe('bytes'); expect(eip712.types.Reencrypt[1].name).toBe('delegatedAccount'); expect(eip712.types.Reencrypt[1].type).toBe('address'); }); diff --git a/src/sdk/keypair.ts b/src/sdk/keypair.ts index 0b461d3..5bd73a9 100644 --- a/src/sdk/keypair.ts +++ b/src/sdk/keypair.ts @@ -43,7 +43,7 @@ export const createEIP712 = { name: 'verifyingContract', type: 'address' }, ], // Refer to primaryType. - Reencrypt: [{ name: 'publicKey', type: 'bytes32' }], + Reencrypt: [{ name: 'publicKey', type: 'bytes' }], }, // This defines the message you're proposing the user to sign, is dapp-specific, and contains // anything you want. There are no required fields. Be as explicit as possible when building out