/** * logos-bancos-br — Brazilian bank logos and data from official sources only. * * Universal entry point: works in Node, bundlers (web) and React Native. * The dataset is inlined at build time; no filesystem or network access. * * - Node filesystem paths for the shipped assets: `logos-bancos-br/node`. * - React Native static require() map: `logos-bancos-br/react-native`. */ interface BankLogoSource { /** * Where the logo came from: * - `openfinance`: published by the institution in the Open Finance Brasil * participants directory (matched by ISPB/CNPJ); * - `direct-uri`: a hand-reviewed direct URL; * - `override`: a manually maintained file in the repository; * - `brand`: inherited from the institution's cooperative system * (Sicoob, Sicredi, …) via a curated rule — shared asset, one file per brand. */ type: 'openfinance' | 'direct-uri' | 'override' | 'brand'; /** Open Finance organisation name, when type is `openfinance`. */ org: string | null; /** Organisation CNPJ (14 digits), when type is `openfinance`. */ cnpj: string | null; /** System brand token when type is `brand` (e.g. "SICOOB"). */ brand?: string; /** Source URI of the original artwork. */ uri: string; /** SHA-256 of the original artwork (provenance / change detection). */ sha256: string; /** ISO date (YYYY-MM-DD) of the last time the artwork changed. */ updatedAt: string; } interface BankLogo { /** Package-relative path of the normalized 256×256 PNG. */ png: string; /** Package-relative path of the original SVG, when safely redistributable. */ svg: string | null; source: BankLogoSource; } /** * Pix participation attributes, verbatim from the Central Bank's daily * "participantes ativos do Pix" list (values kept in Portuguese as published). */ interface PixInfo { /** "Direta" | "Indireta" — participation in the SPI settlement system. */ spiParticipationType: string; /** "Obrigatória" | "Facultativa". */ pixParticipationType: string; /** e.g. "Provedor de Conta Transacional", "Iniciador". */ modality: string; institutionType: string; authorizedByBcb: boolean; } /** Main-list institution: has a COMPE code (Central Bank STR participant). */ interface Bank { /** 8-digit ISPB (Central Bank identifier). */ ispb: string; /** COMPE number as published by the Central Bank (e.g. "1", "341"). */ compe: string; /** COMPE zero-padded to 4 digits (e.g. "0001", "0341"). */ compe4: string; /** Official full name (Nome Extenso). */ name: string; /** Official short name (Nome Reduzido). */ shortName: string; /** Pix participation attributes; null when not an active Pix participant. */ pix: PixInfo | null; /** Logo info, or null when the institution has no logo in the official sources. */ logo: BankLogo | null; } /** * Pix-only institution (no COMPE code) — shipped in the separate * `data/instituicoes-pix.json` dataset so the main list stays clean. */ interface PixInstitution { /** 8-digit ISPB (Central Bank identifier). */ ispb: string; /** Discriminant vs Bank: Pix-only institutions have no COMPE code. */ compe: null; compe4: null; /** 14-digit CNPJ from the Pix participants list. */ cnpj: string; name: string; shortName: string; pix: PixInfo; logo: BankLogo | null; } /** Any institution from either dataset. */ type Institution = Bank | PixInstitution; /** Package version (used to pin CDN URLs). */ declare const version: string; /** Normalizes a COMPE code ("341", 341, "0341") to the 4-digit form. */ declare function normalizeCompe(code: string | number): string; /** Normalizes an ISPB (number or string) to the 8-digit form. */ declare function normalizeIspb(ispb: string | number): string; /** * The main list: every institution with a COMPE code in the Central Bank STR * participants list. Pix-only institutions live in `pixInstitutions()`. */ declare function banks(): readonly Bank[]; /** * Pix-only institutions (active Pix participants without a COMPE code) — * fintechs, payment institutions and cooperative-system affiliates. Kept in a * separate dataset so the main list stays clean. */ declare function pixInstitutions(): readonly PixInstitution[]; /** Every institution from both datasets (main list + Pix-only). */ declare function allInstitutions(): readonly Institution[]; /** Looks a bank up by COMPE code ("341", 341 and "0341" are equivalent). */ declare function byCompe(code: string | number): Bank | undefined; /** Looks any institution (main list or Pix-only) up by 8-digit ISPB. */ declare function byIspb(ispb: string | number): Institution | undefined; /** * Convenience lookup: digits with more than 4 characters are treated as an * ISPB, anything else as a COMPE code. */ declare function findBank(code: string | number | Institution): Institution | undefined; interface LogoCdnUrlOptions { /** Which asset to link. Defaults to `png`; `svg` returns null when there is no safe SVG. */ format?: 'png' | 'svg'; /** Package version for the pinned URL. Defaults to this build's version. */ version?: string; } /** * URL of the logo served by the jsDelivr CDN (no install required), pinned to * this package version. Returns null when the bank is unknown or has no logo. * * Example: https://cdn.jsdelivr.net/npm/logos-bancos-br@0.1.0/logos/png/60701190.png */ declare function logoCdnUrl(code: string | number | Institution, { format, version: pinnedVersion }?: LogoCdnUrlOptions): string | null; export { type Bank, type BankLogo, type BankLogoSource, type Institution, type LogoCdnUrlOptions, type PixInfo, type PixInstitution, allInstitutions, banks, byCompe, byIspb, findBank, logoCdnUrl, normalizeCompe, normalizeIspb, pixInstitutions, version };