From cc36c975feed56cacc9b73570dd22919663d0c8e Mon Sep 17 00:00:00 2001 From: Rastislav Date: Thu, 1 Aug 2024 23:11:43 +0200 Subject: [PATCH] Fix crypto ts --- ican.js | 4 +--- package.json | 2 +- src/index.d.ts | 8 ++++---- src/index.js | 4 +--- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/ican.js b/ican.js index cd32bea..0ed6cdc 100644 --- a/ican.js +++ b/ican.js @@ -181,7 +181,6 @@ /** * Convert the passed BCAN to an ICAN for this country specification. - * This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_ICAN_check_digits * * @param bcan the BCAN to convert to ICAN * @returns {string} the ICAN @@ -199,7 +198,7 @@ /** * Check of the passed BCAN is valid. - * This function only checks the format of the BCAN (length and matching the letetr/number specs) but does not + * This function only checks the format of the BCAN (length and matching the leter/number specs) but does not * verify the check digit. * * @param bcan the BCAN to validate @@ -398,7 +397,6 @@ /** * Convert the passed BCAN to an ICAN for this country specification. - * This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_ICAN_check_digits * * @param countryCode the country of the BCAN * @param bcan the BCAN to convert to ICAN diff --git a/package.json b/package.json index 63ae235..e9273ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@blockchainhub/ican", - "version": "0.4.0", + "version": "0.4.1", "description": "A JavaScript library to validate, format, and convert International Crypto Account Numbers (ICAN) and Basic Crypto Account Numbers (BCAN).", "keywords": [ "ican", diff --git a/src/index.d.ts b/src/index.d.ts index 6a3fb10..8f0c398 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -25,7 +25,7 @@ interface ICANStatic { * @param onlyCrypto Check only crypto definitions. * @returns True if valid, false otherwise. */ - isValid(ican: string, onlyCrypto: boolean): boolean; + isValid(ican: string, onlyCrypto?: boolean): boolean; /** * @summary Check of the passed BCAN is valid. @@ -33,7 +33,7 @@ interface ICANStatic { * @param bcan The BCAN to validate. * @returns True if valid, false otherwise. */ - isValidBCAN(countryCode: string, bcan: string, onlyCrypto: boolean): boolean; + isValidBCAN(countryCode: string, bcan: string, onlyCrypto?: boolean): boolean; /** * @summary Returns the ICAN in a print format. @@ -75,7 +75,7 @@ declare namespace ICAN { /** an example valid ICAN */ readonly example: string; /** Check if the passed ican is valid according to this specification. */ - isValid(ican: string, onlyCrypto: boolean): boolean; + isValid(ican: string, onlyCrypto?: boolean): boolean; /** * Convert the passed ICAN to a country-specific BCAN. */ @@ -91,7 +91,7 @@ declare namespace ICAN { * This function only checks the format of the BCAN (length and matching the letetr/number specs) but does not * verify the check digit. */ - isValidBCAN(bcan: string, onlyCrypto: boolean): boolean; + isValidBCAN(bcan: string, onlyCrypto?: boolean): boolean; } } diff --git a/src/index.js b/src/index.js index 8185525..d4f37ed 100644 --- a/src/index.js +++ b/src/index.js @@ -181,7 +181,6 @@ /** * Convert the passed BCAN to an ICAN for this country specification. - * This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_ICAN_check_digits * * @param bcan the BCAN to convert to ICAN * @returns {string} the ICAN @@ -199,7 +198,7 @@ /** * Check of the passed BCAN is valid. - * This function only checks the format of the BCAN (length and matching the letetr/number specs) but does not + * This function only checks the format of the BCAN (length and matching the leter/number specs) but does not * verify the check digit. * * @param bcan the BCAN to validate @@ -398,7 +397,6 @@ /** * Convert the passed BCAN to an ICAN for this country specification. - * This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_ICAN_check_digits * * @param countryCode the country of the BCAN * @param bcan the BCAN to convert to ICAN