Added libloki typings
parent
c768b2c350
commit
2e82bf98c1
@ -0,0 +1,27 @@
|
|||||||
|
import { PairingAuthorisation } from "../js/modules/data";
|
||||||
|
|
||||||
|
declare enum PairingTypeEnum {
|
||||||
|
REQUEST = 1,
|
||||||
|
GRANT
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CryptoInterface {
|
||||||
|
DHDecrypt: any,
|
||||||
|
DHEncrypt: any,
|
||||||
|
DecryptGCM: any, // AES-GCM
|
||||||
|
EncryptGCM: any, // AES-GCM
|
||||||
|
FallBackDecryptionError: any,
|
||||||
|
FallBackSessionCipher: any,
|
||||||
|
LokiSessionCipher: any,
|
||||||
|
PairingType: PairingTypeEnum,
|
||||||
|
_decodeSnodeAddressToPubKey: any,
|
||||||
|
decryptForPubkey: any,
|
||||||
|
decryptToken: any,
|
||||||
|
encryptForPubkey: any,
|
||||||
|
generateEphemeralKeyPair: any,
|
||||||
|
generateSignatureForPairing: any,
|
||||||
|
sha512: any,
|
||||||
|
validateAuthorisation: any,
|
||||||
|
verifyAuthorisation(authorisation: PairingAuthorisation): Promise<boolean>;
|
||||||
|
verifyPairingSignature: any,
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
import { CryptoInterface } from "./crypto";
|
||||||
|
|
||||||
|
export interface Libloki {
|
||||||
|
api: any;
|
||||||
|
crypto: CryptoInterface;
|
||||||
|
storage: any;
|
||||||
|
serviceNodes: any;
|
||||||
|
}
|
Loading…
Reference in New Issue