Skip to content

Commit 04bd3cd

Browse files
committed
Fixed index.d.ts
1 parent c1e5420 commit 04bd3cd

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

Diff for: index.d.ts

+18-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
1-
declare module 'starkbank-ecdsa' {
1+
declare module "starkbank-ecdsa" {
22
export module Ecdsa {
3-
export async function sign(message: string, privateKey: PrivateKey, hashfunc: (s: string) => string = null, randNum: string = null): Signature;
4-
export async function verify(message: string, signature: Signature, publicKey: PublicKey, hashfunc: (s: string) => string = null): bool;
3+
export function sign(
4+
message: string | ArrayBuffer,
5+
privateKey: PrivateKey,
6+
hashfunc?: (s: string | ArrayBuffer) => Promise<string>,
7+
randNum?: string,
8+
): Promise<Signature>;
9+
export function verify(
10+
message: string | ArrayBuffer,
11+
signature: Signature,
12+
publicKey: PublicKey,
13+
hashfunc?: (s: string | ArrayBuffer) => Promise<string>,
14+
): Promise<boolean>;
515
}
616
export class PublicKey {
7-
static fromPem(publicKeyPem: string);
17+
static fromPem(publicKeyPem: string): PublicKey;
818
}
919
export class PrivateKey {
10-
static fromPem(publicKeyPem: string);
20+
static fromPem(publicKeyPem: string): Signature;
1121
}
1222
export class Signature {
13-
toDer();
14-
toBase64();
15-
static fromBase64(s: string);
23+
toDer(): string;
24+
toBase64(): string;
25+
static fromBase64(s: string): Signature;
1626
}
1727
}

0 commit comments

Comments
 (0)