UNPKG

ibantools-germany

Version:

IBAN Validator and Generator for German Bank Accounts

30 lines (29 loc) 1.13 kB
/** * ibantools-germany * Copyright (c) 2022-2026 Markus Baumer <markus@baumer.dev> * SPDX-License-Identifier: MIT OR MPL-2.0 */ import type { ProbablyString } from "./types"; /** * Generate and return BBAN from account number and BLZ * * There is no check digit validation. If you want to get a valid BBAN you have * to to pass the result to isValidBBAN() or validate the account number and * BLZ to isValidAccountNumberBLZ() beforehand. * * @param accountNumber Account number with up to 10 digits * @param blz German BLZ with 8 digits * @returns BBAN or null if invalid */ export declare const generateBBAN: (accountNumber: ProbablyString, blz: ProbablyString) => string | null; /** * Generate IBAN from BBAN und country * * Returns null if IBAN can't be generated, i.e. provided values are faulty * or BBAN+country is invalid (if param 'validate' is true) * * @param accountNumber Account number with up to 10 digits * @param blz German BLZ with 8 digits * @returns IBAN or null if invalid */ export declare const generateIBAN: (accountNumber: ProbablyString, blz: ProbablyString) => string | null;