@arkecosystem/typescript-crypto 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -27995,7 +27995,7 @@ var Message = class _Message {
27995
27995
  const signature = await privateKey.sign(Buffer.from(message).toString("hex"));
27996
27996
  return _Message.new({
27997
27997
  publicKey,
27998
- signature: signature.r + signature.s + Number(signature.v).toString(16),
27998
+ signature: signature.r + signature.s + signature.v.toString(16).padStart(2, "0"),
27999
27999
  message
28000
28000
  });
28001
28001
  }
@@ -27,7 +27,7 @@ export class Message {
27
27
  const signature = yield privateKey.sign(Buffer.from(message).toString("hex"));
28
28
  return Message.new({
29
29
  publicKey,
30
- signature: signature.r + signature.s + Number(signature.v).toString(16),
30
+ signature: signature.r + signature.s + signature.v.toString(16).padStart(2, "0"),
31
31
  message,
32
32
  });
33
33
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkecosystem/typescript-crypto",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "engines": {
5
5
  "node": ">=20.12.2"
6
6
  },
@@ -27,7 +27,7 @@ export class Message {
27
27
 
28
28
  return Message.new({
29
29
  publicKey,
30
- signature: signature.r + signature.s + Number(signature.v).toString(16),
30
+ signature: signature.r + signature.s + signature.v.toString(16).padStart(2, "0"),
31
31
  message,
32
32
  });
33
33
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "message": "Hello, world!",
3
3
  "publicKey": "0243333347c8cbf4e3cbc7a96964181d02a2b0c854faa2fef86b4b8d92afcf473d",
4
- "signature": "0e2e53409be748834cac44052817ecef569b429a0492aa6bbc0d934eb71a09547e77aeef33d45669bbcba0498149f0e2b637fe8905186e08a5410c6f2b013bb40"
4
+ "signature": "0e2e53409be748834cac44052817ecef569b429a0492aa6bbc0d934eb71a09547e77aeef33d45669bbcba0498149f0e2b637fe8905186e08a5410c6f2b013bb400"
5
5
  }