@types/node 14.0.25 → 14.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- node/README.md +1 -1
- node/crypto.d.ts +35 -1
- node/package.json +2 -2
node/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (http://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Fri, 24 Jul 2020 19:02:01 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Buffer`, `Symbol`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `exports`, `global`, `module`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
14
|
|
node/crypto.d.ts
CHANGED
|
@@ -431,7 +431,7 @@ declare module "crypto" {
|
|
|
431
431
|
/** @deprecated since v10.0.0 */
|
|
432
432
|
const DEFAULT_ENCODING: BufferEncoding;
|
|
433
433
|
|
|
434
|
-
type KeyType = 'rsa' | 'dsa' | 'ec';
|
|
434
|
+
type KeyType = 'rsa' | 'dsa' | 'ec' | 'ed25519';
|
|
435
435
|
type KeyFormat = 'pem' | 'der';
|
|
436
436
|
|
|
437
437
|
interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
|
|
@@ -445,6 +445,12 @@ declare module "crypto" {
|
|
|
445
445
|
privateKey: KeyObject;
|
|
446
446
|
}
|
|
447
447
|
|
|
448
|
+
interface ED25519KeyPairKeyObjectOptions {
|
|
449
|
+
/**
|
|
450
|
+
* No options.
|
|
451
|
+
*/
|
|
452
|
+
}
|
|
453
|
+
|
|
448
454
|
interface ECKeyPairKeyObjectOptions {
|
|
449
455
|
/**
|
|
450
456
|
* Name of the curve to use.
|
|
@@ -529,6 +535,16 @@ declare module "crypto" {
|
|
|
529
535
|
};
|
|
530
536
|
}
|
|
531
537
|
|
|
538
|
+
interface ED25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
539
|
+
publicKeyEncoding: {
|
|
540
|
+
type: 'pkcs1' | 'spki';
|
|
541
|
+
format: PubF;
|
|
542
|
+
};
|
|
543
|
+
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
544
|
+
type: 'sec1' | 'pkcs8';
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
|
|
532
548
|
interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
|
|
533
549
|
publicKey: T1;
|
|
534
550
|
privateKey: T2;
|
|
@@ -552,6 +568,12 @@ declare module "crypto" {
|
|
|
552
568
|
function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
|
|
553
569
|
function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
554
570
|
|
|
571
|
+
function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
|
|
572
|
+
function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
|
|
573
|
+
function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
|
|
574
|
+
function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
|
|
575
|
+
function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
576
|
+
|
|
555
577
|
function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
|
|
556
578
|
function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
|
|
557
579
|
function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
|
|
@@ -570,6 +592,12 @@ declare module "crypto" {
|
|
|
570
592
|
function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
|
|
571
593
|
function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
|
|
572
594
|
|
|
595
|
+
function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
|
|
596
|
+
function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
|
|
597
|
+
function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
|
|
598
|
+
function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
|
|
599
|
+
function generateKeyPair(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
|
|
600
|
+
|
|
573
601
|
namespace generateKeyPair {
|
|
574
602
|
function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
|
|
575
603
|
function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
|
|
@@ -588,6 +616,12 @@ declare module "crypto" {
|
|
|
588
616
|
function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
|
|
589
617
|
function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
|
|
590
618
|
function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
619
|
+
|
|
620
|
+
function __promisify__(type: "ed25519", options: ED25519KeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
|
|
621
|
+
function __promisify__(type: "ed25519", options: ED25519KeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
|
|
622
|
+
function __promisify__(type: "ed25519", options: ED25519KeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
|
|
623
|
+
function __promisify__(type: "ed25519", options: ED25519KeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
|
|
624
|
+
function __promisify__(type: "ed25519", options: ED25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
591
625
|
}
|
|
592
626
|
|
|
593
627
|
/**
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.26",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -246,6 +246,6 @@
|
|
|
246
246
|
},
|
|
247
247
|
"scripts": {},
|
|
248
248
|
"dependencies": {},
|
|
249
|
-
"typesPublisherContentHash": "
|
|
249
|
+
"typesPublisherContentHash": "84663a04233bed9c933d13792d95d0a6232a960e6a142e6c698b7e79a30daee3",
|
|
250
250
|
"typeScriptVersion": "3.0"
|
|
251
251
|
}
|