Cleanup elliptic imports (#729)
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
// Copyright 2017-2020 @polkadot/util-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import elliptic from 'elliptic';
|
||||
import { ec as EC } from 'elliptic';
|
||||
import { assert } from '@polkadot/util';
|
||||
|
||||
const EC = elliptic.ec;
|
||||
const ec = new EC('secp256k1');
|
||||
|
||||
export default function secp256k1Compress (publicKey: Uint8Array): Uint8Array {
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
// Copyright 2017-2020 @polkadot/util-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import elliptic from 'elliptic';
|
||||
import { ec as EC } from 'elliptic';
|
||||
import { assert, bnToU8a, u8aConcat } from '@polkadot/util';
|
||||
|
||||
const EC = elliptic.ec;
|
||||
const ec = new EC('secp256k1');
|
||||
|
||||
export default function secp256k1Expand (publicKey: Uint8Array): Uint8Array {
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
|
||||
import { Keypair } from '../../types';
|
||||
|
||||
import elliptic from 'elliptic';
|
||||
import { ec as EC } from 'elliptic';
|
||||
import { assert, bnToU8a } from '@polkadot/util';
|
||||
|
||||
const EC = elliptic.ec;
|
||||
const ec = new EC('secp256k1');
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
// Copyright 2017-2020 @polkadot/util-crypto authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import elliptic from 'elliptic';
|
||||
import { ec as EC } from 'elliptic';
|
||||
|
||||
const EC = elliptic.ec;
|
||||
const ec = new EC('secp256k1');
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
import { Keypair } from '../types';
|
||||
import { HashType } from './types';
|
||||
|
||||
import elliptic from 'elliptic';
|
||||
import { ec as EC } from 'elliptic';
|
||||
import { assert, bnToU8a, u8aConcat } from '@polkadot/util';
|
||||
|
||||
import hasher from './hasher';
|
||||
|
||||
const EC = elliptic.ec;
|
||||
const ec = new EC('secp256k1');
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,13 +3,12 @@
|
||||
|
||||
import { HashType } from './types';
|
||||
|
||||
import elliptic from 'elliptic';
|
||||
import { ec as EC } from 'elliptic';
|
||||
import { assert, u8aEq, u8aToU8a } from '@polkadot/util';
|
||||
|
||||
import secp256k1Expand from './expand';
|
||||
import hasher from './hasher';
|
||||
|
||||
const EC = elliptic.ec;
|
||||
const ec = new EC('secp256k1');
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user