Remove /index imports (swap to bare) (#362)

This commit is contained in:
Jaco Greeff
2019-03-14 08:41:00 +01:00
committed by GitHub
parent a7ef2dcd86
commit de67a88f45
162 changed files with 198 additions and 189 deletions
+2 -2
View File
@@ -7,8 +7,8 @@ import { Prefix } from './types';
// Original implementation: https://github.com/paritytech/polka-ui/blob/4858c094684769080f5811f32b081dd7780b0880/src/polkadot.js#L6
import bs58 from 'bs58';
import { assert, bufferToU8a, isHex, isU8a, u8aToU8a } from '@polkadot/util/index';
import { blake2AsU8a } from '@polkadot/util-crypto/index';
import { assert, bufferToU8a, isHex, isU8a, u8aToU8a } from '@polkadot/util';
import { blake2AsU8a } from '@polkadot/util-crypto';
import defaults from './defaults';
+2 -2
View File
@@ -7,8 +7,8 @@ import { Prefix } from './types';
// Original implementation: https://github.com/paritytech/polka-ui/blob/4858c094684769080f5811f32b081dd7780b0880/src/polkadot.js#L34
import bs58 from 'bs58';
import { assert, u8aConcat, u8aToBuffer, u8aToU8a } from '@polkadot/util/index';
import { blake2AsU8a } from '@polkadot/util-crypto/index';
import { assert, u8aConcat, u8aToBuffer, u8aToU8a } from '@polkadot/util';
import { blake2AsU8a } from '@polkadot/util-crypto';
import defaults from './defaults';
+3 -3
View File
@@ -4,10 +4,10 @@
import '@polkadot/util-crypto/schnorrkel/test-polyfill';
import { hexToU8a, stringToU8a } from '@polkadot/util/index';
import { cryptoWaitReady } from '@polkadot/util-crypto/index';
import { hexToU8a, stringToU8a } from '@polkadot/util';
import { cryptoWaitReady } from '@polkadot/util-crypto';
import Keyring from './index';
import Keyring from '.';
import setPrefix from './address/setPrefix';
describe('keypair', () => {
+2 -2
View File
@@ -5,8 +5,8 @@
import { KeypairType } from '@polkadot/util-crypto/types';
import { KeyringInstance, KeyringPair, KeyringPair$Json, KeyringPair$Meta, KeyringOptions } from './types';
import { assert, hexToU8a, isNumber, isHex, stringToU8a } from '@polkadot/util/index';
import { keyExtract, mnemonicToSeed , naclKeypairFromSeed as naclFromSeed, schnorrkelKeypairFromSeed as schnorrkelFromSeed, mnemonicToMiniSecret, keyFromPath } from '@polkadot/util-crypto/index';
import { assert, hexToU8a, isNumber, isHex, stringToU8a } from '@polkadot/util';
import { keyExtract, mnemonicToSeed , naclKeypairFromSeed as naclFromSeed, schnorrkelKeypairFromSeed as schnorrkelFromSeed, mnemonicToMiniSecret, keyFromPath } from '@polkadot/util-crypto';
import { decodeAddress, encodeAddress, setAddressPrefix } from './address';
import createPair from './pair';
+2 -2
View File
@@ -2,8 +2,8 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { assert, stringToU8a, u8aFixLength } from '@polkadot/util/index';
import { naclDecrypt } from '@polkadot/util-crypto/index';
import { assert, stringToU8a, u8aFixLength } from '@polkadot/util';
import { naclDecrypt } from '@polkadot/util-crypto';
import { PairInfo } from './types';
import { KEY_LENGTH, NONCE_LENGTH, PKCS8_DIVIDER, PKCS8_HEADER } from './defaults';
+2 -2
View File
@@ -4,8 +4,8 @@
import { PairInfo } from './types';
import { stringToU8a, u8aConcat, u8aFixLength, assert } from '@polkadot/util/index';
import { naclEncrypt } from '@polkadot/util-crypto/index';
import { stringToU8a, u8aConcat, u8aFixLength, assert } from '@polkadot/util';
import { naclEncrypt } from '@polkadot/util-crypto';
import { PKCS8_DIVIDER, PKCS8_HEADER } from './defaults';
+1 -1
View File
@@ -6,7 +6,7 @@ import { Keypair, KeypairType } from '@polkadot/util-crypto/types';
import { KeyringPair, KeyringPair$Json, KeyringPair$Meta } from '../types';
import { PairInfo } from './types';
import { naclKeypairFromSeed as naclFromSeed, naclSign, naclVerify, schnorrkelKeypairFromSeed as schnorrkelFromSeed, schnorrkelSign, schnorrkelVerify } from '@polkadot/util-crypto/index';
import { naclKeypairFromSeed as naclFromSeed, naclSign, naclVerify, schnorrkelKeypairFromSeed as schnorrkelFromSeed, schnorrkelSign, schnorrkelVerify } from '@polkadot/util-crypto';
import { encodeAddress } from '../address';
import decode from './decode';
+1 -1
View File
@@ -5,7 +5,7 @@
import { KeypairType } from '@polkadot/util-crypto/types';
import { KeyringPair$Json, KeyringPair$Meta } from '../types';
import { u8aToHex } from '@polkadot/util/index';
import { u8aToHex } from '@polkadot/util';
import { encodeAddress } from '../address';
+1 -1
View File
@@ -4,7 +4,7 @@
import { KeyringPairs, KeyringPair } from './types';
import { assert, isHex, isU8a, u8aToHex, u8aToU8a } from '@polkadot/util/index';
import { assert, isHex, isU8a, u8aToHex, u8aToU8a } from '@polkadot/util';
import addressDecode from './address/decode';
+3 -3
View File
@@ -4,10 +4,10 @@
// From https://github.com/paritytech/substrate/wiki/Secret-URI-Test-Vectors
import { u8aToHex } from '@polkadot/util/index';
import { cryptoWaitReady } from '@polkadot/util-crypto/index';
import { u8aToHex } from '@polkadot/util';
import { cryptoWaitReady } from '@polkadot/util-crypto';
import Keyring from './index';
import Keyring from '.';
const PHRASE = 'bottom drive obey lake curtain smoke basket hold race lonely fit walk';
+1 -1
View File
@@ -4,7 +4,7 @@
import { KeyringInstance, KeyringOptions } from './types';
import Keyring from './index';
import Keyring from '.';
const DEV_PHRASE = 'bottom drive obey lake curtain smoke basket hold race lonely fit walk';
const SEEDS = ['Alice', 'Bob', 'Charlie', 'Dave', 'Eve', 'Ferdie'];