Skip to content

Commit 7dc2fda

Browse files
committed
rename param to opts
1 parent 53dd7ca commit 7dc2fda

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/ecc_lib.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { TinySecp256k1Interface } from './types';
55
* If `eccLib` is a new instance, it will be verified before setting it as the active library.
66
*
77
* @param eccLib The instance of the ECC library to initialize.
8-
* @param skipVerification Use {DANGER_DO_NOT_VERIFY_ECCLIB:true} if ecc verification should not be executed. Not recommended!
8+
* @param opts Extra initialization options. Use {DANGER_DO_NOT_VERIFY_ECCLIB:true} if ecc verification should not be executed. Not recommended!
99
*/
10-
export declare function initEccLib(eccLib: TinySecp256k1Interface | undefined, skipVerification?: {
10+
export declare function initEccLib(eccLib: TinySecp256k1Interface | undefined, opts?: {
1111
DANGER_DO_NOT_VERIFY_ECCLIB: boolean;
1212
}): void;
1313
/**

src/ecc_lib.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ const _ECCLIB_CACHE = {};
88
* If `eccLib` is a new instance, it will be verified before setting it as the active library.
99
*
1010
* @param eccLib The instance of the ECC library to initialize.
11-
* @param skipVerification Use {DANGER_DO_NOT_VERIFY_ECCLIB:true} if ecc verification should not be executed. Not recommended!
11+
* @param opts Extra initialization options. Use {DANGER_DO_NOT_VERIFY_ECCLIB:true} if ecc verification should not be executed. Not recommended!
1212
*/
13-
function initEccLib(eccLib, skipVerification) {
13+
function initEccLib(eccLib, opts) {
1414
if (!eccLib) {
1515
// allow clearing the library
1616
_ECCLIB_CACHE.eccLib = eccLib;
1717
} else if (eccLib !== _ECCLIB_CACHE.eccLib) {
18-
if (!skipVerification?.DANGER_DO_NOT_VERIFY_ECCLIB)
18+
if (!opts?.DANGER_DO_NOT_VERIFY_ECCLIB)
1919
// new instance, verify it
2020
verifyEcc(eccLib);
2121
_ECCLIB_CACHE.eccLib = eccLib;

ts_src/ecc_lib.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ const _ECCLIB_CACHE: { eccLib?: TinySecp256k1Interface } = {};
88
* If `eccLib` is a new instance, it will be verified before setting it as the active library.
99
*
1010
* @param eccLib The instance of the ECC library to initialize.
11-
* @param skipVerification Use {DANGER_DO_NOT_VERIFY_ECCLIB:true} if ecc verification should not be executed. Not recommended!
11+
* @param opts Extra initialization options. Use {DANGER_DO_NOT_VERIFY_ECCLIB:true} if ecc verification should not be executed. Not recommended!
1212
*/
1313
export function initEccLib(
1414
eccLib: TinySecp256k1Interface | undefined,
15-
skipVerification?: { DANGER_DO_NOT_VERIFY_ECCLIB: boolean },
15+
opts?: { DANGER_DO_NOT_VERIFY_ECCLIB: boolean },
1616
): void {
1717
if (!eccLib) {
1818
// allow clearing the library
1919
_ECCLIB_CACHE.eccLib = eccLib;
2020
} else if (eccLib !== _ECCLIB_CACHE.eccLib) {
21-
if (!skipVerification?.DANGER_DO_NOT_VERIFY_ECCLIB)
21+
if (!opts?.DANGER_DO_NOT_VERIFY_ECCLIB)
2222
// new instance, verify it
2323
verifyEcc(eccLib!);
2424
_ECCLIB_CACHE.eccLib = eccLib;

0 commit comments

Comments
 (0)