forked from paulo-stark/ecdsa-node-react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
27 lines (27 loc) · 771 Bytes
/
index.d.ts
File metadata and controls
27 lines (27 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
declare module "starkbank-ecdsa" {
export module Ecdsa {
export function sign(
message: string | ArrayBuffer,
privateKey: PrivateKey,
hashfunc?: (s: string | ArrayBuffer) => Promise<string>,
randNum?: string,
): Promise<Signature>;
export function verify(
message: string | ArrayBuffer,
signature: Signature,
publicKey: PublicKey,
hashfunc?: (s: string | ArrayBuffer) => Promise<string>,
): Promise<boolean>;
}
export class PublicKey {
static fromPem(publicKeyPem: string): PublicKey;
}
export class PrivateKey {
static fromPem(publicKeyPem: string): Signature;
}
export class Signature {
toDer(): string;
toBase64(): string;
static fromBase64(s: string): Signature;
}
}