Skip to content

Commit 68a398d

Browse files
committed
fixes
1 parent 394f565 commit 68a398d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/secp256k1-compat.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ interface Signature {
3030
}
3131

3232
function output(
33-
out: Output = (len: number) => new Uint8Array(len),
33+
out: Output = (len: number): Uint8Array => new Uint8Array(len),
3434
length: number,
3535
value?: Uint8Array
36-
) {
36+
): Uint8Array {
3737
if (typeof out === "function") {
3838
out = out(length);
3939
}
@@ -123,7 +123,7 @@ export function ecdsaRecover(
123123
msgHash: Uint8Array,
124124
compressed = true,
125125
out?: Output
126-
) {
126+
): Uint8Array {
127127
assertBytes(msgHash, 32);
128128
assertBool("compressed", compressed);
129129
const sign = getSignature(signature);
@@ -193,7 +193,7 @@ export function publicKeyNegate(
193193
publicKey: Uint8Array,
194194
compressed = true,
195195
out?: Output
196-
) {
196+
): Uint8Array {
197197
assertBytes(publicKey, 33, 65);
198198
assertBool("compressed", compressed);
199199
const point = Point.fromHex(publicKey).negate();
@@ -204,7 +204,7 @@ export function publicKeyCombine(
204204
publicKeys: Uint8Array[],
205205
compressed = true,
206206
out?: Output
207-
) {
207+
): Uint8Array {
208208
if (!Array.isArray(publicKeys) || !publicKeys.length) {
209209
throw new TypeError(
210210
`Expected array with one or more items, not ${publicKeys}`
@@ -229,7 +229,7 @@ export function publicKeyTweakAdd(
229229
tweak: Uint8Array,
230230
compressed = true,
231231
out?: Output
232-
) {
232+
): Uint8Array {
233233
assertBytes(publicKey, 33, 65);
234234
assertBytes(tweak, 32);
235235
assertBool("compressed", compressed);
@@ -247,7 +247,7 @@ export function publicKeyTweakMul(
247247
tweak: Uint8Array,
248248
compressed = true,
249249
out?: Output
250-
) {
250+
): Uint8Array {
251251
assertBytes(publicKey, 33, 65);
252252
assertBytes(tweak, 32);
253253
assertBool("compressed", compressed);
@@ -317,7 +317,7 @@ export function ecdh(
317317
hashfn?: (x: Uint8Array, y: Uint8Array, data: Uint8Array) => Uint8Array;
318318
} = {},
319319
out?: Output
320-
) {
320+
): Uint8Array {
321321
assertBytes(publicKey, 33, 65);
322322
assertBytes(privateKey, 32);
323323
if (typeof options !== "object" || options === null) {

src/utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export {
77
concatBytes,
88
createView,
99
bytesToHex as toHex,
10-
utf8ToBytes,
10+
utf8ToBytes
1111
} from "@noble/hashes/utils";
1212
export { assertBool, assertBytes };
1313

@@ -46,7 +46,7 @@ export function equalsBytes(a: Uint8Array, b: Uint8Array): boolean {
4646

4747
// Internal utils
4848
export function wrapHash(hash: (msg: Uint8Array) => Uint8Array) {
49-
return (msg: Uint8Array) => {
49+
return (msg: Uint8Array): Uint8Array => {
5050
assertBytes(msg);
5151
return hash(msg);
5252
};

0 commit comments

Comments
 (0)