Bump dev (import sorting) (#789)
This commit is contained in:
+2
-2
@@ -12,7 +12,7 @@
|
||||
"scripts": {
|
||||
"build": "polkadot-dev-build-ts",
|
||||
"build:release": "polkadot-ci-ghact-build",
|
||||
"lint": "polkadot-dev-run-lint",
|
||||
"lint": "polkadot-dev-run-lint --fix",
|
||||
"clean": "polkadot-dev-clean-build",
|
||||
"networks:crosscheck": "polkadot-dev-run-test packages/networks/src/crosscheck",
|
||||
"postinstall": "polkadot-dev-yarn-only",
|
||||
@@ -21,7 +21,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.9",
|
||||
"@polkadot/dev": "^0.60.7",
|
||||
"@polkadot/dev": "^0.60.11",
|
||||
"@polkadot/ts": "^0.3.57",
|
||||
"@types/jest": "^26.0.16"
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { hexToU8a, stringToU8a } from '@polkadot/util';
|
||||
import { cryptoWaitReady, setSS58Format, encodeAddress } from '@polkadot/util-crypto';
|
||||
import { cryptoWaitReady, encodeAddress, setSS58Format } from '@polkadot/util-crypto';
|
||||
|
||||
import Keyring from '.';
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// Copyright 2017-2020 @polkadot/keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { KeypairType, Keypair } from '@polkadot/util-crypto/types';
|
||||
import type { KeyringInstance, KeyringPair, KeyringPair$Json, KeyringPair$JsonEncodingTypes, KeyringPair$Meta, KeyringOptions } from './types';
|
||||
import type { Keypair, KeypairType } from '@polkadot/util-crypto/types';
|
||||
import type { KeyringInstance, KeyringOptions, KeyringPair, KeyringPair$Json, KeyringPair$JsonEncodingTypes, KeyringPair$Meta } from './types';
|
||||
|
||||
import { assert, hexToU8a, isHex, isUndefined, stringToU8a } from '@polkadot/util';
|
||||
import { base64Decode, decodeAddress, encodeAddress, keyExtractSuri, keyFromPath, naclKeypairFromSeed as naclFromSeed, schnorrkelKeypairFromSeed as schnorrkelFromSeed, secp256k1KeypairFromSeed as secp256k1FromSeed, mnemonicToLegacySeed, mnemonicToMiniSecret } from '@polkadot/util-crypto';
|
||||
import { base64Decode, decodeAddress, encodeAddress, keyExtractSuri, keyFromPath, mnemonicToLegacySeed, mnemonicToMiniSecret, naclKeypairFromSeed as naclFromSeed, schnorrkelKeypairFromSeed as schnorrkelFromSeed, secp256k1KeypairFromSeed as secp256k1FromSeed } from '@polkadot/util-crypto';
|
||||
|
||||
import { DEV_PHRASE } from './defaults';
|
||||
import { createPair } from './pair';
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { PairInfo } from './types';
|
||||
import { assert, stringToU8a, u8aFixLength } from '@polkadot/util';
|
||||
import { naclDecrypt, scryptEncode, scryptFromU8a } from '@polkadot/util-crypto';
|
||||
|
||||
import { ENCODING, NONCE_LENGTH, PKCS8_DIVIDER, PKCS8_HEADER, PUB_LENGTH, SEC_LENGTH, SEED_LENGTH, SCRYPT_LENGTH } from './defaults';
|
||||
import { ENCODING, NONCE_LENGTH, PKCS8_DIVIDER, PKCS8_HEADER, PUB_LENGTH, SCRYPT_LENGTH, SEC_LENGTH, SEED_LENGTH } from './defaults';
|
||||
|
||||
const SEED_OFFSET = PKCS8_HEADER.length;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { createTestPairs } from '../testingPairs';
|
||||
import { PKCS8_DIVIDER, PKCS8_HEADER, NONCE_LENGTH, PUB_LENGTH, SCRYPT_LENGTH, SEC_LENGTH } from './defaults';
|
||||
import { NONCE_LENGTH, PKCS8_DIVIDER, PKCS8_HEADER, PUB_LENGTH, SCRYPT_LENGTH, SEC_LENGTH } from './defaults';
|
||||
|
||||
const PKCS8_LENGTH = PKCS8_DIVIDER.length + PKCS8_HEADER.length + PUB_LENGTH + SEC_LENGTH;
|
||||
const ENCODED_LENGTH = 16 + PKCS8_LENGTH + NONCE_LENGTH + SCRYPT_LENGTH;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import type { PairInfo } from './types';
|
||||
|
||||
import { u8aConcat, assert } from '@polkadot/util';
|
||||
import { assert, u8aConcat } from '@polkadot/util';
|
||||
import { naclEncrypt, scryptEncode, scryptToU8a } from '@polkadot/util-crypto';
|
||||
|
||||
import { PKCS8_DIVIDER, PKCS8_HEADER } from './defaults';
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
// Copyright 2017-2020 @polkadot/keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { cryptoWaitReady, encodeAddress as toSS58, setSS58Format } from '@polkadot/util-crypto';
|
||||
|
||||
import { hexToU8a } from '@polkadot/util';
|
||||
import { cryptoWaitReady, encodeAddress as toSS58, setSS58Format } from '@polkadot/util-crypto';
|
||||
|
||||
import { PAIRS } from '../testing';
|
||||
import { createTestPairs } from '../testingPairs';
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { KeyringPair, KeyringPair$Json, KeyringPair$JsonEncodingTypes, Keyr
|
||||
import type { PairInfo } from './types';
|
||||
|
||||
import { assert, u8aConcat, u8aToHex } from '@polkadot/util';
|
||||
import { blake2AsU8a, ethereumEncode, keccakAsU8a, keyExtractPath, keyFromPath, naclKeypairFromSeed as naclFromSeed, naclSign, schnorrkelKeypairFromSeed as schnorrkelFromSeed, schnorrkelSign, secp256k1Expand, secp256k1KeypairFromSeed as secp256k1FromSeed, secp256k1Sign, secp256k1Compress, signatureVerify } from '@polkadot/util-crypto';
|
||||
import { blake2AsU8a, ethereumEncode, keccakAsU8a, keyExtractPath, keyFromPath, naclKeypairFromSeed as naclFromSeed, naclSign, schnorrkelKeypairFromSeed as schnorrkelFromSeed, schnorrkelSign, secp256k1Compress, secp256k1Expand, secp256k1KeypairFromSeed as secp256k1FromSeed, secp256k1Sign, signatureVerify } from '@polkadot/util-crypto';
|
||||
|
||||
import { decodePair } from './decode';
|
||||
import { encodePair } from './encode';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2020 @polkadot/keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { KeyringPairs, KeyringPair } from './types';
|
||||
import type { KeyringPair, KeyringPairs } from './types';
|
||||
|
||||
import { assert, isHex, isU8a, u8aToHex, u8aToU8a } from '@polkadot/util';
|
||||
import { decodeAddress } from '@polkadot/util-crypto';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2020 @polkadot/keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { KeyringPair, KeyringOptions } from './types';
|
||||
import type { KeyringOptions, KeyringPair } from './types';
|
||||
|
||||
import { createTestKeyring } from './testing';
|
||||
import { nobody } from './pair/nobody';
|
||||
import { createTestKeyring } from './testing';
|
||||
|
||||
export interface TestKeyringMap {
|
||||
[index: string]: KeyringPair;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import type { Ss58Registry } from './types';
|
||||
|
||||
import fs from 'fs';
|
||||
|
||||
import fetch from '@polkadot/x-fetch';
|
||||
|
||||
import { all } from './';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Copyright 2017-2020 @polkadot/util-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { stringToU8a, u8aToHex, hexToU8a } from '@polkadot/util';
|
||||
import { hexToU8a, stringToU8a, u8aToHex } from '@polkadot/util';
|
||||
|
||||
import { TestKeyringMap, createTestPairs } from '../../../keyring/src/testingPairs';
|
||||
import { createTestPairs, TestKeyringMap } from '../../../keyring/src/testingPairs';
|
||||
import { decodeAddress } from '.';
|
||||
|
||||
describe('decodeAddress', (): void => {
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
import type { Prefix } from './types';
|
||||
|
||||
// Original implementation: https://github.com/paritytech/polka-ui/blob/4858c094684769080f5811f32b081dd7780b0880/src/polkadot.js#L6
|
||||
|
||||
import { assert, isHex, isU8a, u8aToU8a } from '@polkadot/util';
|
||||
|
||||
import { base58Decode } from '../base58/decode';
|
||||
|
||||
@@ -5,8 +5,8 @@ import type { Prefix } from './types';
|
||||
|
||||
import { assert } from '@polkadot/util';
|
||||
|
||||
import { DeriveJunction } from '../key/DeriveJunction';
|
||||
import { keyExtractPath } from '../key';
|
||||
import { DeriveJunction } from '../key/DeriveJunction';
|
||||
import { schnorrkelDerivePublic } from '../schnorrkel';
|
||||
import { decodeAddress } from './decode';
|
||||
import { encodeAddress } from './encode';
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
import type { Prefix } from './types';
|
||||
|
||||
// Original implementation: https://github.com/paritytech/polka-ui/blob/4858c094684769080f5811f32b081dd7780b0880/src/polkadot.js#L34
|
||||
|
||||
import { assert, u8aConcat } from '@polkadot/util';
|
||||
|
||||
import { base58Encode } from '../base58/encode';
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { createTestPairs } from '@polkadot/keyring/testingPairs';
|
||||
|
||||
import { addressEq } from '.';
|
||||
|
||||
describe('addressEq', (): void => {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { bnToU8a, stringToU8a, u8aConcat } from '@polkadot/util';
|
||||
|
||||
import { blake2AsU8a } from '../blake2/asU8a';
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { bnToU8a, compactToU8a, stringToU8a, u8aConcat, u8aSorted } from '@polkadot/util';
|
||||
|
||||
import { blake2AsU8a } from '../blake2/asU8a';
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import blakejs from 'blakejs';
|
||||
|
||||
import { u8aToU8a } from '@polkadot/util';
|
||||
import { blake2b, isReady } from '@polkadot/wasm-crypto';
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { keccak256 as keccak256Js } from 'js-sha3';
|
||||
|
||||
import { u8aToU8a } from '@polkadot/util';
|
||||
import { isReady, keccak256 } from '@polkadot/wasm-crypto';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2020 @polkadot/util-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { keyExtractPath, ExtractResult } from './extractPath';
|
||||
import { ExtractResult, keyExtractPath } from './extractPath';
|
||||
|
||||
describe('keyExtractPath', (): void => {
|
||||
it('extracts properly from soft', (): void => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2020 @polkadot/util-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { keyExtractSuri, ExtractResult } from './extractSuri';
|
||||
import { ExtractResult, keyExtractSuri } from './extractSuri';
|
||||
|
||||
describe('keyExtractSuri', (): void => {
|
||||
it('does not extract from invalid suri', (): void => {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// Copyright 2017-2020 @polkadot/util-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { KeypairType, Keypair } from '../types';
|
||||
import type { Keypair, KeypairType } from '../types';
|
||||
|
||||
import { DeriveJunction } from './DeriveJunction';
|
||||
import { keyHdkdEcdsa } from './hdkdEcdsa';
|
||||
import { keyHdkdEd25519 } from './hdkdEd25519';
|
||||
import { keyHdkdSr25519 } from './hdkdSr25519';
|
||||
import { keyHdkdEcdsa } from './hdkdEcdsa';
|
||||
|
||||
const generators = {
|
||||
ecdsa: keyHdkdEcdsa,
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
// - Remove mnemonicToSeed (we only use the sync variant)
|
||||
|
||||
import { sha256 } from 'hash.js';
|
||||
|
||||
import { assert, u8aToU8a } from '@polkadot/util';
|
||||
|
||||
import { pbkdf2Encode } from '../pbkdf2';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Copyright 2017-2020 @polkadot/util-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { cryptoWaitReady } from '..';
|
||||
import { mnemonicGenerate, WordCount } from './generate';
|
||||
import { mnemonicValidate } from './validate';
|
||||
import { cryptoWaitReady } from '..';
|
||||
|
||||
describe('mnemonicGenerate', (): void => {
|
||||
beforeEach(async (): Promise<void> => {
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
import { u8aToHex } from '@polkadot/util';
|
||||
|
||||
import { mnemonicToEntropy } from './toEntropy';
|
||||
import tests from '../schnorrkel/keypair/testing';
|
||||
import { cryptoWaitReady } from '..';
|
||||
import { mnemonicToEntropy } from './toEntropy';
|
||||
|
||||
describe('mnemonicToEntropy', (): void => {
|
||||
beforeEach(async (): Promise<void> => {
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
import { u8aToHex } from '@polkadot/util';
|
||||
|
||||
import { mnemonicToMiniSecret } from './toMiniSecret';
|
||||
import tests from '../schnorrkel/keypair/testing';
|
||||
import { cryptoWaitReady } from '..';
|
||||
import { mnemonicToMiniSecret } from './toMiniSecret';
|
||||
|
||||
const MNEMONIC = 'seed sock milk update focus rotate barely fade car face mechanic mercy';
|
||||
const SEED = '0x4d1ab2a57929edfd018aaa974e62ed557e3f54b4104acabedf73c8f5a1dbb029';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2017-2020 @polkadot/util-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { mnemonicValidate } from './validate';
|
||||
import { cryptoWaitReady } from '..';
|
||||
import { mnemonicValidate } from './validate';
|
||||
|
||||
describe('mnemonicValidate', (): void => {
|
||||
beforeEach(async (): Promise<void> => {
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
import type { Keypair } from '../../types';
|
||||
|
||||
import * as nacl from 'tweetnacl';
|
||||
import { isReady, ed25519KeypairFromSeed } from '@polkadot/wasm-crypto';
|
||||
|
||||
import { ed25519KeypairFromSeed, isReady } from '@polkadot/wasm-crypto';
|
||||
|
||||
/**
|
||||
* @name naclKeypairFromSeed
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2017-2020 @polkadot/util-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { keyFromPath } from '../key/fromPath';
|
||||
import { keyExtractPath } from '../key';
|
||||
import { keyFromPath } from '../key/fromPath';
|
||||
import { naclBoxKeypairFromSecret, naclKeypairFromString, naclOpen, naclSeal } from '.';
|
||||
|
||||
describe('naclOpen', (): void => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2020 @polkadot/util-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { naclSeal, naclKeypairFromString, naclBoxKeypairFromSecret } from '.';
|
||||
import { naclBoxKeypairFromSecret, naclKeypairFromString, naclSeal } from '.';
|
||||
|
||||
describe('naclSeal', (): void => {
|
||||
it('seals a message', (): void => {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import { stringToU8a } from '@polkadot/util';
|
||||
import { waitReady } from '@polkadot/wasm-crypto';
|
||||
|
||||
import { naclSign, naclKeypairFromSeed } from '.';
|
||||
import { naclKeypairFromSeed, naclSign } from '.';
|
||||
|
||||
describe('naclSign', (): void => {
|
||||
beforeEach(async (): Promise<void> => {
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
import type { Keypair } from '../types';
|
||||
|
||||
import * as nacl from 'tweetnacl';
|
||||
|
||||
import { assert, u8aToU8a } from '@polkadot/util';
|
||||
import { isReady, ed25519Sign } from '@polkadot/wasm-crypto';
|
||||
import { ed25519Sign, isReady } from '@polkadot/wasm-crypto';
|
||||
|
||||
/**
|
||||
* @name naclSign
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import { stringToU8a } from '@polkadot/util';
|
||||
import { waitReady } from '@polkadot/wasm-crypto';
|
||||
|
||||
import { naclVerify, naclKeypairFromSeed } from '.';
|
||||
import { naclKeypairFromSeed, naclVerify } from '.';
|
||||
|
||||
describe('naclVerify', (): void => {
|
||||
let publicKey: Uint8Array;
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import * as nacl from 'tweetnacl';
|
||||
|
||||
import { assert, u8aToU8a } from '@polkadot/util';
|
||||
import { isReady, ed25519Verify } from '@polkadot/wasm-crypto';
|
||||
import { ed25519Verify, isReady } from '@polkadot/wasm-crypto';
|
||||
|
||||
/**
|
||||
* @name naclSign
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// Adapted from https://gist.github.com/calvinmetcalf/91e8e84dc63c75f2aa53
|
||||
|
||||
import { hmac, sha512 } from 'hash.js';
|
||||
|
||||
import { u8aConcat } from '@polkadot/util';
|
||||
|
||||
export function pbkdf2Sync (password: Uint8Array, salt: Uint8Array, rounds: number, len = 64): Uint8Array {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { hexToBn } from '@polkadot/util';
|
||||
|
||||
import { randomAsHex } from './asHex';
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import type { Params } from './types';
|
||||
|
||||
import scryptsy from 'scryptsy';
|
||||
|
||||
import { bufferToU8a, u8aToBuffer, u8aToU8a } from '@polkadot/util';
|
||||
import { isReady, scrypt } from '@polkadot/wasm-crypto';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import type { Params } from './types';
|
||||
|
||||
import { u8aToBn, assert } from '@polkadot/util';
|
||||
import { assert, u8aToBn } from '@polkadot/util';
|
||||
|
||||
import { DEFAULT_PARAMS } from './defaults';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2020 @polkadot/util-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { u8aToHex, hexToU8a } from '@polkadot/util';
|
||||
import { hexToU8a, u8aToHex } from '@polkadot/util';
|
||||
|
||||
import { mnemonicToMiniSecret } from '../../mnemonic';
|
||||
import { secp256k1KeypairFromSeed } from '..';
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import * as nacl from 'tweetnacl';
|
||||
|
||||
import { isReady, sha512 } from '@polkadot/wasm-crypto';
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import hasher from 'xxhashjs/lib/xxhash64';
|
||||
|
||||
import { isBuffer, isString, u8aToBuffer } from '@polkadot/util';
|
||||
|
||||
export default function xxhash64AsValue (data: Buffer | Uint8Array | string, seed: number): number {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
// Copyright 2017-2020 @polkadot/util authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { BN_ZERO, BN_ONE, BN_TEN, BN_HUNDRED, BN_THOUSAND } from '.';
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { BN_HUNDRED, BN_ONE, BN_TEN, BN_THOUSAND, BN_ZERO } from '.';
|
||||
|
||||
describe('consts', (): void => {
|
||||
it('BN_ZERO equals 0', (): void => {
|
||||
expect(
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { isFunction } from '../is/function';
|
||||
|
||||
import { bnFromHex } from '.';
|
||||
|
||||
describe('bnFromHex', (): void => {
|
||||
|
||||
@@ -5,10 +5,10 @@ import type { ToBn } from '../types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { isBigInt } from '../is/bigInt';
|
||||
import { isToBn } from '../is/toBn';
|
||||
import { isHex } from '../is/hex';
|
||||
import { hexToBn } from '../hex/toBn';
|
||||
import { isBigInt } from '../is/bigInt';
|
||||
import { isHex } from '../is/hex';
|
||||
import { isToBn } from '../is/toBn';
|
||||
|
||||
function numberToBn <ExtToBn extends ToBn> (value: number | ExtToBn | BN): BN {
|
||||
return BN.isBN(value)
|
||||
|
||||
@@ -6,8 +6,8 @@ import type { ToBn, ToBnOptions } from '../types';
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { isNumber } from '../is/number';
|
||||
import { bnToU8a } from './toU8a';
|
||||
import { u8aToHex } from '../u8a';
|
||||
import { bnToU8a } from './toU8a';
|
||||
|
||||
const ZERO_STR = '0x00';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2017-2020 @polkadot/util authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { assert } from './assert';
|
||||
import { isString } from './is/string';
|
||||
import { assert } from './assert';
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
type This = typeof globalThis;
|
||||
|
||||
@@ -9,7 +9,7 @@ import { bnToBn } from '../bn/toBn';
|
||||
import { isBoolean } from '../is/boolean';
|
||||
import { isUndefined } from '../is/undefined';
|
||||
import { formatDecimal } from './formatDecimal';
|
||||
import { SI, SI_MID, calcSi, findSi } from './si';
|
||||
import { calcSi, findSi, SI, SI_MID } from './si';
|
||||
|
||||
interface Defaults {
|
||||
decimals: number;
|
||||
|
||||
@@ -5,8 +5,8 @@ import type { Logger } from './types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { logger } from '.';
|
||||
import { format } from './logger';
|
||||
import { logger } from '.';
|
||||
|
||||
describe('logger', (): void => {
|
||||
let dateMatch: unknown;
|
||||
|
||||
@@ -5,12 +5,12 @@ import type { Logger, Logger$Data } from './types';
|
||||
|
||||
import { formatDate } from './format/formatDate';
|
||||
import { isBn } from './is/bn';
|
||||
import { isBuffer } from './is/buffer';
|
||||
import { isFunction } from './is/function';
|
||||
import { isObject } from './is/object';
|
||||
import { isU8a } from './is/u8a';
|
||||
import { u8aToHex } from './u8a/toHex';
|
||||
import { u8aToU8a } from './u8a/toU8a';
|
||||
import { isBuffer } from './is';
|
||||
|
||||
type ConsoleType = 'error' | 'log' | 'warn';
|
||||
type LogType = ConsoleType | 'debug';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// Copyright 2017-2020 @polkadot/util authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { bufferToU8a } from '../buffer/toU8a';
|
||||
import { hexToU8a } from '../hex/toU8a';
|
||||
import { isBuffer } from '../is/buffer';
|
||||
import { isHex } from '../is/hex';
|
||||
import { isString } from '../is/string';
|
||||
import { bufferToU8a } from '../buffer/toU8a';
|
||||
import { hexToU8a } from '../hex/toU8a';
|
||||
import { stringToU8a } from '../string/toU8a';
|
||||
|
||||
function convertArray (value: number[] | Uint8Array): Uint8Array {
|
||||
|
||||
@@ -1712,9 +1712,9 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/dev@npm:^0.60.7":
|
||||
version: 0.60.7
|
||||
resolution: "@polkadot/dev@npm:0.60.7"
|
||||
"@polkadot/dev@npm:^0.60.11":
|
||||
version: 0.60.11
|
||||
resolution: "@polkadot/dev@npm:0.60.11"
|
||||
dependencies:
|
||||
"@babel/cli": ^7.12.8
|
||||
"@babel/core": ^7.12.9
|
||||
@@ -1756,6 +1756,7 @@ __metadata:
|
||||
eslint-plugin-promise: ^4.2.1
|
||||
eslint-plugin-react: ^7.21.5
|
||||
eslint-plugin-react-hooks: ^4.2.0
|
||||
eslint-plugin-simple-import-sort: ^7.0.0-beta.1
|
||||
eslint-plugin-sort-destructure-keys: ^1.3.5
|
||||
fs-extra: ^9.0.1
|
||||
gh-pages: ^3.1.0
|
||||
@@ -1776,7 +1777,7 @@ __metadata:
|
||||
typedoc-plugin-markdown: ^3.0.11
|
||||
typedoc-plugin-no-inherit: ^1.2.0
|
||||
typescript: ^4.1.2
|
||||
yargs: ^16.1.1
|
||||
yargs: ^16.2.0
|
||||
bin:
|
||||
polkadot-ci-ghact-build: scripts/polkadot-ci-ghact-build.cjs
|
||||
polkadot-ci-ghact-docs: scripts/polkadot-ci-ghact-docs.cjs
|
||||
@@ -1800,7 +1801,7 @@ __metadata:
|
||||
polkadot-exec-typedoc: scripts/polkadot-exec-typedoc.cjs
|
||||
polkadot-exec-vuepress: scripts/polkadot-exec-vuepress.cjs
|
||||
polkadot-exec-webpack: scripts/polkadot-exec-webpack.cjs
|
||||
checksum: 0241c5dfd9a9bb334b56712ef5c8caded11d5506753a4a2644dd3532d4159906eb5a1074f1014ca034c0b94c66e5112ad9ffe8d6bc2cc1500351149a30bdf719
|
||||
checksum: d583afb3162f8e806d1226ae71cf2860a276fb9e3b2a89c91596d6fec4dd3638555cdfa7568a2f09371bb1a77db485a61d82354aa3867458d8dea60212a99664
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -4431,6 +4432,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-plugin-simple-import-sort@npm:^7.0.0-beta.1":
|
||||
version: 7.0.0-beta.1
|
||||
resolution: "eslint-plugin-simple-import-sort@npm:7.0.0-beta.1"
|
||||
peerDependencies:
|
||||
eslint: ">=5.0.0"
|
||||
checksum: ca77161eed5babb78a55182478dcc3534ffb2f4bff543ba8746944000eb04191eb53b8c634e1b61e69ee175088e098f50290e75c9bea1db7e3d0843c4155d8e7
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-plugin-sort-destructure-keys@npm:^1.3.5":
|
||||
version: 1.3.5
|
||||
resolution: "eslint-plugin-sort-destructure-keys@npm:1.3.5"
|
||||
@@ -8986,7 +8996,7 @@ fsevents@~2.1.2:
|
||||
resolution: "root-workspace-0b6124@workspace:."
|
||||
dependencies:
|
||||
"@babel/core": ^7.12.9
|
||||
"@polkadot/dev": ^0.60.7
|
||||
"@polkadot/dev": ^0.60.11
|
||||
"@polkadot/ts": ^0.3.57
|
||||
"@types/jest": ^26.0.16
|
||||
languageName: unknown
|
||||
@@ -10777,7 +10787,7 @@ fsevents@~2.1.2:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"yargs@npm:^16.0.3, yargs@npm:^16.1.1":
|
||||
"yargs@npm:^16.0.3":
|
||||
version: 16.1.1
|
||||
resolution: "yargs@npm:16.1.1"
|
||||
dependencies:
|
||||
@@ -10791,3 +10801,18 @@ fsevents@~2.1.2:
|
||||
checksum: f88462770b6d65107b7295bdd68c38bc3cba9ab0362df476f44c5f6770ee2f39f48bca9813e8a9dc792a15f93e051a7e37346c0f66cf0ec35c63869963c43e0c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"yargs@npm:^16.2.0":
|
||||
version: 16.2.0
|
||||
resolution: "yargs@npm:16.2.0"
|
||||
dependencies:
|
||||
cliui: ^7.0.2
|
||||
escalade: ^3.1.1
|
||||
get-caller-file: ^2.0.5
|
||||
require-directory: ^2.1.1
|
||||
string-width: ^4.2.0
|
||||
y18n: ^5.0.5
|
||||
yargs-parser: ^20.2.2
|
||||
checksum: a79ce1f043021cd645de1ffebb6149541d382ba68f4a6b5eca5d2ad65af51893371bbd78e240dc3b6cf0cbb419511ba5bda715dec992e4266e6863ea49f14feb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
Reference in New Issue
Block a user