Skip to content

Commit

Permalink
Add 'utf8' to type of sign enc parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
tonesnotes committed Feb 25, 2024
1 parent 707b06d commit b02a7f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/primitives/PrivateKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default class PrivateKey extends BigNumber {
* const privateKey = PrivateKey.fromRandom();
* const signature = privateKey.sign('Hello, World!');
*/
sign (msg: number[] | string, enc?: 'hex', forceLowS: boolean = true, customK?: Function | BigNumber): Signature {
sign (msg: number[] | string, enc?: 'hex' | 'utf8', forceLowS: boolean = true, customK?: Function | BigNumber): Signature {
const msgHash = new BigNumber(sha256(msg, enc), 16)
return sign(msgHash, this, forceLowS, customK)
}
Expand Down

0 comments on commit b02a7f6

Please sign in to comment.