From c7d0fd5b72b725fbadc9edc9a733985df672ffe3 Mon Sep 17 00:00:00 2001 From: Alexander T Date: Mon, 4 Nov 2019 23:01:21 +0200 Subject: [PATCH] bip39: Provides its own types (#39648) --- notNeededPackages.json | 6 ++++++ types/bip39/bip39-tests.ts | 14 -------------- types/bip39/index.d.ts | 30 ------------------------------ types/bip39/tsconfig.json | 23 ----------------------- types/bip39/tslint.json | 3 --- 5 files changed, 6 insertions(+), 70 deletions(-) delete mode 100644 types/bip39/bip39-tests.ts delete mode 100644 types/bip39/index.d.ts delete mode 100644 types/bip39/tsconfig.json delete mode 100644 types/bip39/tslint.json diff --git a/notNeededPackages.json b/notNeededPackages.json index cd2829b374..a794901a3b 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -294,6 +294,12 @@ "sourceRepoURL": "https://github.com/Microsoft/Bing-Maps-V8-TypeScript-Definitions", "asOfVersion": "2.0.15" }, + { + "libraryName": "bip39", + "typingsPackageName": "bip39", + "sourceRepoURL": "https://github.com/bitcoinjs/bip39", + "asOfVersion": "3.0.0" + }, { "libraryName": "bitcoinjs-lib", "typingsPackageName": "bitcoinjs-lib", diff --git a/types/bip39/bip39-tests.ts b/types/bip39/bip39-tests.ts deleted file mode 100644 index 1ec9611bb8..0000000000 --- a/types/bip39/bip39-tests.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as bip39 from 'bip39'; - -// Test generate a random mnemonic -const mnemonic: string = bip39.generateMnemonic(); - -// Test generate a random mnemonic with strength -bip39.generateMnemonic(64); - -// Test mnemonic to seed -const seedHex: string = bip39.mnemonicToSeedHex('basket actual'); -const seed: Buffer = bip39.mnemonicToSeed('basket actual'); - -// Test validation -bip39.validateMnemonic(mnemonic); diff --git a/types/bip39/index.d.ts b/types/bip39/index.d.ts deleted file mode 100644 index 0cfbbe4f4d..0000000000 --- a/types/bip39/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Type definitions for bip39 2.4 -// Project: https://github.com/bitcoinjs/bip39, https://github.com/weilu/bip39 -// Definitions by: Satana Charuwichitratana -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -export const wordlists: { - EN: string[]; - JA: string[]; - chinese_simplified: string[]; - chinese_traditional: string[]; - english: string[]; - french: string[]; - italian: string[]; - japanese: string[]; - spanish: string[]; -}; - -export function entropyToMnemonic(entropyHex: Buffer | string, wordlist?: string[]): string; - -export function generateMnemonic(strength?: number, rng?: (size: number) => Buffer, wordlist?: string[]): string; - -export function mnemonicToEntropy(mnemonic: string, wordlist?: string[]): string; - -export function mnemonicToSeed(mnemonic: string, password?: string): Buffer; - -export function mnemonicToSeedHex(mnemonic: string, password?: string): string; - -export function validateMnemonic(mnemonic: string, wordlist?: string[]): boolean; diff --git a/types/bip39/tsconfig.json b/types/bip39/tsconfig.json deleted file mode 100644 index bb95bb90d0..0000000000 --- a/types/bip39/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "bip39-tests.ts" - ] -} \ No newline at end of file diff --git a/types/bip39/tslint.json b/types/bip39/tslint.json deleted file mode 100644 index f93cf8562a..0000000000 --- a/types/bip39/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "dtslint/dt.json" -}