-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
50 lines (48 loc) · 1.2 KB
/
index.d.ts
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
export interface KeygenParams {
roomId: string
participantIndex: number
participantsCount: number
participantsThreshold: number
relayAddress: string
timeoutSeconds: number
}
export interface KeygenResult {
key?: string
error?: string
}
export interface SignParams {
roomId: string
key: string
data: string
participantsIndexes: Array<number>
relayAddress: string
timeoutSeconds: number
}
export interface SignResult {
result?: string
error?: string
}
/**
*
* Re-Exports
*
*/
export function getVersion(): string
export function keygen(params: KeygenParams): Promise<KeygenResult>
export function sign(params: SignParams): Promise<SignResult>
/**
*
* Ethers
*
*/
export interface EthersResult {
result?: string
error?: string
}
export function publicKeyToEthereumAddress(publicKey: string): EthersResult
export function privateKeyToEthereumAddress(privateKey: string): EthersResult
export function privateKeyToPublicKey(privateKey: string, compressed?: boolean | undefined | null): EthersResult
export function encodeMessageSignature(messageHash: string, chainId: number, signatureRecid: string): EthersResult