ibantools-germany
Version:
IBAN Validator and Generator for German Bank Accounts
55 lines (52 loc) • 2.09 kB
TypeScript
/**
* ibantools-germany
* Copyright (C) 2022-2024 Markus Baumer <markus@baumer.dev>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { ProbablyString } from "./types";
/**
* Validate bank account number and BLZ
*
* IMPORTANT: A positive result does not does not necessarily mean that
* the account exists; it only checks for structure and check digit!
*
* @param accountNumber Account number with up to 10 digits
* @param blz German BLZ with 8 digits
* @returns
*/
export declare const isValidAccountNumberBLZ: (accountNumber: ProbablyString, blz: ProbablyString) => boolean;
/**
* Validate German BBAN
*
* IMPORTANT: A positive result does not does not necessarily mean that
* the account exists; it only checks for structure and check digit!
*
* @param bban German BBAN with 18 digits
* @returns
*/
export declare const isValidBBAN: (bban: ProbablyString) => boolean;
/**
* Validate (German) IBAN
*
* If `onlyGermany` is true, it will return false for any IBAN not starting
* with "DE". If false, non-German IBAN will be verified but no national
* methods will be applied.
*
* IMPORTANT: A positive result does not does not necessarily mean that
* the account exists; it only checks for structure and check digit!
*
* @param iban German IBAN with 22 chars
* @param onlyGermany Allow only German IBANs (default: false)
* @returns
*/
export declare const isValidIBAN: (iban: ProbablyString, onlyGermany?: boolean) => boolean;