1 | // Copyright 2017-2022 @polkadot/util-crypto authors & contributors
|
2 | // SPDX-License-Identifier: Apache-2.0
|
3 | import '@polkadot/x-bigint/shim';
|
4 | import { utils as utilsNobleSecp256k1 } from '@noble/secp256k1';
|
5 | import { u8aConcat } from '@polkadot/util';
|
6 | import { cryptoWaitReady } from "./crypto.js";
|
7 | import { hmacSha256AsU8a } from "./hmac/index.js"; // Set overrides on the secp256k1 utils
|
8 | // - hmacShaSync - This needs to be set, unset by default
|
9 |
|
10 | utilsNobleSecp256k1.hmacSha256Sync = (key, ...messages) => hmacSha256AsU8a(key, u8aConcat(...messages)); // start init process immediately
|
11 |
|
12 |
|
13 | cryptoWaitReady().catch(() => {// shouldn't happen, logged and caught inside cryptoWaitReady
|
14 | }); |
\ | No newline at end of file |