s/cryptoInit/bundleInit/ (#1445)

* s/cryptoInit/bundleInit/

* Adjust imports
This commit is contained in:
Jaco
2022-03-26 17:09:34 +02:00
committed by GitHub
parent 1e380ca1eb
commit 0dbc359f07
5 changed files with 10 additions and 10 deletions
+21
View File
@@ -0,0 +1,21 @@
// Copyright 2017-2022 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/x-bigint/shim';
import { utils as utilsNobleSecp256k1 } from '@noble/secp256k1';
import { u8aConcat } from '@polkadot/util';
// import { cryptoWaitReady } from './crypto';
import { hmacSha256AsU8a } from './hmac';
// Set overrides on the secp256k1 utils
// - hmacShaSync - This needs to be set, unset by default
utilsNobleSecp256k1.hmacSha256Sync = (key: Uint8Array, ...messages: Uint8Array[]) =>
hmacSha256AsU8a(key, u8aConcat(...messages));
// // start init process immediately
// cryptoWaitReady().catch((): void => {
// // shouldn't happen, logged above
// });