UNPKG

621 BTypeScriptView Raw
1export type HexString = string;
2export type Algorithm = 'ecdsa-secp256k1' | 'ed25519';
3export type KeyType = 'private' | 'public';
4export interface KeyPair {
5 privateKey: HexString;
6 publicKey: HexString;
7}
8export interface DeriveKeyPairOptions {
9 validator?: boolean;
10 accountIndex?: number;
11}
12export interface SigningScheme {
13 deriveKeypair: (entropy: Uint8Array, options?: DeriveKeyPairOptions) => KeyPair;
14 sign: (message: Uint8Array, privateKey: HexString) => HexString;
15 verify: (message: Uint8Array, signature: HexString, publicKey: HexString) => boolean;
16}
17//# sourceMappingURL=types.d.ts.map
\No newline at end of file