-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.js
35 lines (35 loc) · 1.25 KB
/
types.js
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
/**
* @typedef {import("@plamikcho/pbcrypto").ICrypto} BaseICrypto
* @typedef {Window & import("@dashincubator/base58check/base58check.js")}
*
* @typedef {Object} Encryptage
* @property {EncryptageEncrypt} encrypt
* @property {EncryptageDecrypt} decrypt
* @property {BaseICrypto["getIv"]} getInitVector
*
* @typedef {BaseICrypto & Encryptage} EncryptageB
* @typedef {(message: string, iv: string | ArrayBufferLike) => Promise<string>} EncryptageEncrypt
* @typedef {(ciphertext: string, iv: string | ArrayBufferLike) => Promise<string>} EncryptageDecrypt
*
* @typedef {{
* foo?: boolean;
* bar?: string | null;
* }} AlternativeDefinitionStyle
*
* @typedef {{
* encPrivKey?: HTMLElement & { passphrase?: HTMLInputElement };
* encryptWallet?: HTMLElement & { passphrase?: HTMLInputElement };
* signupCrowdNodeForm?: HTMLElement;
* acceptCrowdNodeForm?: HTMLElement;
* depositCrowdNodeForm?: HTMLElement & { amount?: HTMLInputElement };
* privKeyForm?: HTMLElement & { privateKey?: HTMLInputElement };
* balanceForm?: HTMLElement;
* fundingModal?: HTMLDialogElement,
* generatePrivKeyForm?: HTMLElement,
* addPrivKeyForm?: HTMLElement,
* } & Document} document
*
* @typedef {{
* addrs?: Object<string, string?>
* }} PrivateAndPublicKeys
*/