logos-bancos-br 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/LICENSE +25 -0
  2. package/README.en.md +160 -0
  3. package/README.md +223 -0
  4. package/data/bancos.json +4941 -0
  5. package/dist/chunk-BIKMT23N.cjs +71 -0
  6. package/dist/chunk-S4JZVP5E.js +4997 -0
  7. package/dist/chunk-SPP4OABR.js +70 -0
  8. package/dist/chunk-ZGDTPJIV.cjs +5002 -0
  9. package/dist/cli.cjs +88 -0
  10. package/dist/cli.d.cts +1 -0
  11. package/dist/cli.d.ts +1 -0
  12. package/dist/cli.js +88 -0
  13. package/dist/index.cjs +20 -0
  14. package/dist/index.d.cts +82 -0
  15. package/dist/index.d.ts +82 -0
  16. package/dist/index.js +20 -0
  17. package/dist/node.cjs +11 -0
  18. package/dist/node.d.cts +29 -0
  19. package/dist/node.d.ts +29 -0
  20. package/dist/node.js +11 -0
  21. package/llms.txt +48 -0
  22. package/logos/png/00000000.png +0 -0
  23. package/logos/png/00000208.png +0 -0
  24. package/logos/png/00315557.png +0 -0
  25. package/logos/png/00329598.png +0 -0
  26. package/logos/png/00360305.png +0 -0
  27. package/logos/png/00416968.png +0 -0
  28. package/logos/png/00517645.png +0 -0
  29. package/logos/png/00795423.png +0 -0
  30. package/logos/png/01027058.png +0 -0
  31. package/logos/png/01181521.png +0 -0
  32. package/logos/png/02038232.png +0 -0
  33. package/logos/png/02332886.png +0 -0
  34. package/logos/png/02398976.png +0 -0
  35. package/logos/png/02682287.png +0 -0
  36. package/logos/png/03017677.png +0 -0
  37. package/logos/png/03311443.png +0 -0
  38. package/logos/png/03816413.png +0 -0
  39. package/logos/png/04184779.png +0 -0
  40. package/logos/png/04902979.png +0 -0
  41. package/logos/png/04913711.png +0 -0
  42. package/logos/png/05463212.png +0 -0
  43. package/logos/png/06271464.png +0 -0
  44. package/logos/png/07138049.png +0 -0
  45. package/logos/png/07207996.png +0 -0
  46. package/logos/png/07237373.png +0 -0
  47. package/logos/png/08357240.png +0 -0
  48. package/logos/png/08561701.png +0 -0
  49. package/logos/png/09089356.png +0 -0
  50. package/logos/png/09464032.png +0 -0
  51. package/logos/png/09516419.png +0 -0
  52. package/logos/png/10398952.png +0 -0
  53. package/logos/png/10440482.png +0 -0
  54. package/logos/png/10573521.png +0 -0
  55. package/logos/png/10664513.png +0 -0
  56. package/logos/png/11285104.png +0 -0
  57. package/logos/png/11351086.png +0 -0
  58. package/logos/png/11581339.png +0 -0
  59. package/logos/png/13009717.png +0 -0
  60. package/logos/png/13140088.png +0 -0
  61. package/logos/png/13203354.png +0 -0
  62. package/logos/png/13370835.png +0 -0
  63. package/logos/png/13884775.png +0 -0
  64. package/logos/png/13935893.png +0 -0
  65. package/logos/png/15111975.png +0 -0
  66. package/logos/png/16501555.png +0 -0
  67. package/logos/png/17184037.png +0 -0
  68. package/logos/png/18189547.png +0 -0
  69. package/logos/png/18236120.png +0 -0
  70. package/logos/png/19468242.png +0 -0
  71. package/logos/png/19540550.png +0 -0
  72. package/logos/png/20308187.png +0 -0
  73. package/logos/png/20855875.png +0 -0
  74. package/logos/png/21018182.png +0 -0
  75. package/logos/png/22896431.png +0 -0
  76. package/logos/png/24313102.png +0 -0
  77. package/logos/png/27098060.png +0 -0
  78. package/logos/png/27351731.png +0 -0
  79. package/logos/png/27652684.png +0 -0
  80. package/logos/png/28127603.png +0 -0
  81. package/logos/png/29162769.png +0 -0
  82. package/logos/png/30306294.png +0 -0
  83. package/logos/png/30680829.png +0 -0
  84. package/logos/png/30723871.png +0 -0
  85. package/logos/png/31680151.png +0 -0
  86. package/logos/png/31872495.png +0 -0
  87. package/logos/png/31880826.png +0 -0
  88. package/logos/png/32402502.png +0 -0
  89. package/logos/png/33040601.png +0 -0
  90. package/logos/png/33042151.png +0 -0
  91. package/logos/png/33042953.png +0 -0
  92. package/logos/png/33147315.png +0 -0
  93. package/logos/png/33264668.png +0 -0
  94. package/logos/png/33479023.png +0 -0
  95. package/logos/png/34088029.png +0 -0
  96. package/logos/png/37229413.png +0 -0
  97. package/logos/png/37241230.png +0 -0
  98. package/logos/png/37679449.png +0 -0
  99. package/logos/png/37715993.png +0 -0
  100. package/logos/png/37880206.png +0 -0
  101. package/logos/png/39664698.png +0 -0
  102. package/logos/png/43180355.png +0 -0
  103. package/logos/png/45246410.png +0 -0
  104. package/logos/png/48632754.png +0 -0
  105. package/logos/png/48703388.png +0 -0
  106. package/logos/png/50585090.png +0 -0
  107. package/logos/png/51342763.png +0 -0
  108. package/logos/png/53505601.png +0 -0
  109. package/logos/png/54403563.png +0 -0
  110. package/logos/png/58160789.png +0 -0
  111. package/logos/png/59285411.png +0 -0
  112. package/logos/png/59588111.png +0 -0
  113. package/logos/png/60701190.png +0 -0
  114. package/logos/png/60746948.png +0 -0
  115. package/logos/png/60889128.png +0 -0
  116. package/logos/png/61021673.png +0 -0
  117. package/logos/png/61033106.png +0 -0
  118. package/logos/png/61186680.png +0 -0
  119. package/logos/png/61348538.png +0 -0
  120. package/logos/png/61723847.png +0 -0
  121. package/logos/png/62169875.png +0 -0
  122. package/logos/png/62285390.png +0 -0
  123. package/logos/png/62421979.png +0 -0
  124. package/logos/png/68900810.png +0 -0
  125. package/logos/png/70119680.png +0 -0
  126. package/logos/png/74014747.png +0 -0
  127. package/logos/png/90400888.png +0 -0
  128. package/logos/png/92702067.png +0 -0
  129. package/logos/svg/00000000.svg +7 -0
  130. package/logos/svg/00000208.svg +11 -0
  131. package/logos/svg/00315557.svg +11 -0
  132. package/logos/svg/00329598.svg +1 -0
  133. package/logos/svg/00360305.svg +72 -0
  134. package/logos/svg/00416968.svg +11 -0
  135. package/logos/svg/00517645.svg +13 -0
  136. package/logos/svg/00795423.svg +47 -0
  137. package/logos/svg/01027058.svg +9 -0
  138. package/logos/svg/01181521.svg +24 -0
  139. package/logos/svg/02038232.svg +5 -0
  140. package/logos/svg/02332886.svg +1 -0
  141. package/logos/svg/02398976.svg +139 -0
  142. package/logos/svg/02682287.svg +12 -0
  143. package/logos/svg/03017677.svg +12 -0
  144. package/logos/svg/03311443.svg +1720 -0
  145. package/logos/svg/03816413.svg +12 -0
  146. package/logos/svg/04184779.svg +1 -0
  147. package/logos/svg/04902979.svg +17 -0
  148. package/logos/svg/04913711.svg +1 -0
  149. package/logos/svg/05463212.svg +192 -0
  150. package/logos/svg/06271464.svg +1 -0
  151. package/logos/svg/07138049.svg +5 -0
  152. package/logos/svg/07237373.svg +1 -0
  153. package/logos/svg/08357240.svg +25 -0
  154. package/logos/svg/08561701.svg +27 -0
  155. package/logos/svg/09089356.svg +12 -0
  156. package/logos/svg/09464032.svg +29 -0
  157. package/logos/svg/09516419.svg +5 -0
  158. package/logos/svg/10398952.svg +25 -0
  159. package/logos/svg/10440482.svg +4 -0
  160. package/logos/svg/10573521.svg +7 -0
  161. package/logos/svg/10664513.svg +30 -0
  162. package/logos/svg/11285104.svg +10 -0
  163. package/logos/svg/11351086.svg +30 -0
  164. package/logos/svg/11581339.svg +19 -0
  165. package/logos/svg/13009717.svg +76 -0
  166. package/logos/svg/13140088.svg +106 -0
  167. package/logos/svg/13203354.svg +1 -0
  168. package/logos/svg/13370835.svg +5 -0
  169. package/logos/svg/13884775.svg +20 -0
  170. package/logos/svg/13935893.svg +14 -0
  171. package/logos/svg/15111975.svg +1 -0
  172. package/logos/svg/16501555.svg +25 -0
  173. package/logos/svg/17184037.svg +29 -0
  174. package/logos/svg/18189547.svg +90 -0
  175. package/logos/svg/18236120.svg +1 -0
  176. package/logos/svg/19468242.svg +13 -0
  177. package/logos/svg/19540550.svg +17 -0
  178. package/logos/svg/20308187.svg +33 -0
  179. package/logos/svg/20855875.svg +10 -0
  180. package/logos/svg/21018182.svg +8 -0
  181. package/logos/svg/22896431.svg +5 -0
  182. package/logos/svg/24313102.svg +7 -0
  183. package/logos/svg/27098060.svg +45 -0
  184. package/logos/svg/27351731.svg +17 -0
  185. package/logos/svg/27652684.svg +38 -0
  186. package/logos/svg/28127603.svg +43 -0
  187. package/logos/svg/29162769.svg +10 -0
  188. package/logos/svg/30306294.svg +4 -0
  189. package/logos/svg/30680829.svg +1 -0
  190. package/logos/svg/30723871.svg +36 -0
  191. package/logos/svg/31680151.svg +7 -0
  192. package/logos/svg/31872495.svg +3 -0
  193. package/logos/svg/31880826.svg +295 -0
  194. package/logos/svg/32402502.svg +24 -0
  195. package/logos/svg/33040601.svg +29 -0
  196. package/logos/svg/33042151.svg +1 -0
  197. package/logos/svg/33042953.svg +21 -0
  198. package/logos/svg/33147315.svg +1 -0
  199. package/logos/svg/33264668.svg +1 -0
  200. package/logos/svg/33479023.svg +21 -0
  201. package/logos/svg/34088029.svg +1 -0
  202. package/logos/svg/37229413.svg +12 -0
  203. package/logos/svg/37241230.svg +4 -0
  204. package/logos/svg/37679449.svg +7 -0
  205. package/logos/svg/37715993.svg +26 -0
  206. package/logos/svg/37880206.svg +4 -0
  207. package/logos/svg/39664698.svg +9 -0
  208. package/logos/svg/43180355.svg +119 -0
  209. package/logos/svg/45246410.svg +38 -0
  210. package/logos/svg/48632754.svg +14 -0
  211. package/logos/svg/48703388.svg +5 -0
  212. package/logos/svg/50585090.svg +5 -0
  213. package/logos/svg/51342763.svg +5 -0
  214. package/logos/svg/53505601.svg +25 -0
  215. package/logos/svg/54403563.svg +16 -0
  216. package/logos/svg/58160789.svg +12 -0
  217. package/logos/svg/59285411.svg +12 -0
  218. package/logos/svg/59588111.svg +13 -0
  219. package/logos/svg/60701190.svg +16 -0
  220. package/logos/svg/60746948.svg +1 -0
  221. package/logos/svg/60889128.svg +17 -0
  222. package/logos/svg/61021673.svg +20 -0
  223. package/logos/svg/61033106.svg +4 -0
  224. package/logos/svg/61186680.svg +5 -0
  225. package/logos/svg/61348538.svg +3 -0
  226. package/logos/svg/61723847.svg +10 -0
  227. package/logos/svg/62169875.svg +1 -0
  228. package/logos/svg/62285390.svg +24 -0
  229. package/logos/svg/62421979.svg +5 -0
  230. package/logos/svg/68900810.svg +10 -0
  231. package/logos/svg/70119680.svg +24 -0
  232. package/logos/svg/90400888.svg +10 -0
  233. package/logos/svg/92702067.svg +21 -0
  234. package/package.json +88 -0
  235. package/react-native.d.ts +10 -0
  236. package/react-native.js +222 -0
package/LICENSE ADDED
@@ -0,0 +1,25 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Rafael Matos
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ Bank logos distributed alongside this software are trademarks of their
16
+ respective financial institutions and are NOT covered by this license.
17
+ See DISCLAIMER.md.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
package/README.en.md ADDED
@@ -0,0 +1,160 @@
1
+ # logos-bancos-br
2
+
3
+ > **Brazilian bank list + official logos, always up to date.** Everything is derived from
4
+ > official sources only (Central Bank of Brazil and Open Finance Brasil) and **rebuilt
5
+ > automatically every week by CI** — with verifiable per-logo provenance.
6
+ > **[Versão em português](README.md)**
7
+
8
+ [![CI](https://github.com/rzmt/logos-bancos-br/actions/workflows/ci.yml/badge.svg)](https://github.com/rzmt/logos-bancos-br/actions/workflows/ci.yml)
9
+ [![update](https://github.com/rzmt/logos-bancos-br/actions/workflows/update-logos.yml/badge.svg)](https://github.com/rzmt/logos-bancos-br/actions/workflows/update-logos.yml)
10
+ [![npm](https://img.shields.io/npm/v/logos-bancos-br)](https://www.npmjs.com/package/logos-bancos-br)
11
+ [![license](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
12
+
13
+ <p align="center">
14
+ <img src="logos/png/00000000.png" width="56" alt="Banco do Brasil">
15
+ <img src="logos/png/00360305.png" width="56" alt="Caixa">
16
+ <img src="logos/png/60746948.png" width="56" alt="Bradesco">
17
+ <img src="logos/png/90400888.png" width="56" alt="Santander">
18
+ <img src="logos/png/60701190.png" width="56" alt="Itaú">
19
+ <img src="logos/png/18236120.png" width="56" alt="Nubank">
20
+ <img src="logos/png/00416968.png" width="56" alt="Inter">
21
+ <img src="logos/png/31872495.png" width="56" alt="C6">
22
+ <img src="logos/png/01181521.png" width="56" alt="Sicredi">
23
+ <img src="logos/png/02038232.png" width="56" alt="Sicoob">
24
+ <img src="logos/png/10573521.png" width="56" alt="Mercado Pago">
25
+ <img src="logos/png/33264668.png" width="56" alt="XP">
26
+ </p>
27
+ <p align="center"><a href="PREVIEW.md"><strong>→ full gallery (PREVIEW.md)</strong></a></p>
28
+
29
+ ## What this package gives you
30
+
31
+ 1. **The list of institutions — auto-updated.** Every institution with a COMPE code in the
32
+ Central Bank of Brazil STR participants list (currently 470), with official name, short name,
33
+ COMPE code and ISPB, in [`data/bancos.json`](data/bancos.json). You never hand-maintain a
34
+ bank list again.
35
+ 2. **Official logos.** Currently 107, as 256×256 PNGs (+ SVG when available), sourced from the
36
+ public **Open Finance Brasil** directory — where each institution publishes and maintains its
37
+ own brand. Every file carries provenance: source URI, SHA-256 and date.
38
+ 3. **Automatic updates, no manual curation.** Every Monday a GitHub Action
39
+ ([`update-logos.yml`](.github/workflows/update-logos.yml)) rebuilds **both the list AND the
40
+ logos** from the sources and opens a PR with the visual diff. A bank created, renamed or
41
+ closed by the Central Bank? An institution rebranded? It lands in that week's update.
42
+ 4. **Works in any stack.** JavaScript/TypeScript API, a ready-made React Native map, a CLI that
43
+ copies the assets into Flutter/Kotlin/Swift/.NET/PHP projects, CDN URLs with no install — or
44
+ just the JSON.
45
+
46
+ ## Why not a hand-maintained list?
47
+
48
+ Because it rots: the Central Bank adds, renames and removes institutions throughout the year,
49
+ and banks redesign their brands. Existing libraries ship either **data only** (no logos) or
50
+ logos **hand-collected** from assorted websites with no traceability. The approach here:
51
+
52
+ - **Official sources, and only them** — the STR participants CSV (updated daily by the Central
53
+ Bank itself) and the Open Finance Brasil participants directory. No images "found on Google".
54
+ - **Per-logo provenance** — `data/bancos.json` records each logo's source URI, SHA-256 of the
55
+ original artwork and last-change date. The git diff is the audit trail.
56
+ - **Safe matching** — automatic matches happen **only via ISPB** (= first 8 digits of the CNPJ).
57
+ Name similarity never assigns a logo by itself: it only produces suggestions for human review.
58
+ In a banking context, a wrong logo is worse than no logo.
59
+ - **Safe assets** — https-only downloads with size/pixel caps; SVGs redistributed only after
60
+ sanitization (no scripts, event handlers, `foreignObject` or external references).
61
+ - **Honest trade-off** — 107 of the 470 institutions have a logo (the Open Finance participants,
62
+ which cover the vast majority of accounts in Brazil). The rest are small credit unions/SCDs
63
+ with no officially published logo — your app picks the fallback.
64
+
65
+ ## Install & use
66
+
67
+ ```bash
68
+ npm install logos-bancos-br
69
+ ```
70
+
71
+ Files are named by **ISPB** (8 digits). Lookups accept **COMPE or ISPB**.
72
+
73
+ ```ts
74
+ import { banks, byCompe, byIspb, logoCdnUrl } from 'logos-bancos-br';
75
+
76
+ byCompe(341); // { ispb: '60701190', compe4: '0341', name: 'Itaú Unibanco S.A.', logo: {...} }
77
+ byIspb('00000000'); // Banco do Brasil
78
+ logoCdnUrl(341); // https://cdn.jsdelivr.net/npm/logos-bancos-br@x.y.z/logos/png/60701190.png
79
+ ```
80
+
81
+ **React Native (Expo/Metro)** — static require() map (bundles all logos, ~1.3 MB):
82
+
83
+ ```tsx
84
+ import logos from 'logos-bancos-br/react-native';
85
+ <Image source={logos['0341']} style={{ width: 40, height: 40 }} />
86
+ ```
87
+
88
+ **Node filesystem paths**:
89
+
90
+ ```ts
91
+ import { logoPngPath, logoSvgPath } from 'logos-bancos-br/node';
92
+ ```
93
+
94
+ **Any stack (Flutter, Kotlin, Swift, PHP, .NET…)** — vendor the assets, no runtime dependency
95
+ (re-run on each package update to pick up new banks and logos):
96
+
97
+ ```bash
98
+ npx logos-bancos-br copy --dest ./assets/banks [--by compe|ispb] [--format png|svg|both] [--only 341,001]
99
+ npx logos-bancos-br list
100
+ ```
101
+
102
+ **CDN, no install** (always pin a version):
103
+
104
+ ```
105
+ https://cdn.jsdelivr.net/npm/logos-bancos-br@0.1.0/logos/png/60701190.png
106
+ ```
107
+
108
+ **Data only** (the bank list):
109
+
110
+ ```ts
111
+ import data from 'logos-bancos-br/data/bancos.json';
112
+ ```
113
+
114
+ ## Dataset shape
115
+
116
+ ```json
117
+ {
118
+ "ispb": "60701190",
119
+ "compe": "341",
120
+ "compe4": "0341",
121
+ "name": "Itaú Unibanco S.A.",
122
+ "shortName": "ITAÚ UNIBANCO S.A.",
123
+ "logo": {
124
+ "png": "logos/png/60701190.png",
125
+ "svg": "logos/svg/60701190.svg",
126
+ "source": { "type": "openfinance", "org": "…", "cnpj": "…", "uri": "https://…", "sha256": "…", "updatedAt": "2026-07-17" }
127
+ }
128
+ }
129
+ ```
130
+
131
+ `logo.png` is a normalized transparent 256×256 PNG; `logo.svg` is the original vector when safely
132
+ redistributable; `logo: null` means the institution has no logo in the official sources.
133
+
134
+ ## How the auto-update works
135
+
136
+ The pipeline joins the STR list (which institutions exist) with the Open Finance directory
137
+ (their logos), bridged by `ISPB == first 8 digits of the CNPJ`; hand-reviewed `forcedMatches`
138
+ cover second brands (XP CCTVM, Nu Invest, Bradesco BBI…). The weekly workflow regenerates
139
+ `data/bancos.json`, `logos/`, `PREVIEW.md` and `react-native.js` and opens a PR with the report
140
+ and the visual PNG diff. After review and merge, a new version is published to npm. Nothing is
141
+ edited by hand. Maintenance details: [CONTRIBUTING.md](CONTRIBUTING.md).
142
+
143
+ ## Trademarks
144
+
145
+ The logos are **trademarks of their respective financial institutions** and are **not** covered by
146
+ this repository's MIT license. They are redistributed for **nominative use** (identifying the
147
+ institution in user interfaces), from artwork the institutions themselves publish in the public
148
+ Open Finance Brasil directory. See **[DISCLAIMER.md](DISCLAIMER.md)**. Institutions can request
149
+ correction or removal via the **"Remoção de marca"** issue template — handled promptly.
150
+
151
+ ## For AI tools and assistants
152
+
153
+ A machine-readable summary lives in [`llms.txt`](llms.txt) (also shipped in the npm package).
154
+ Key facts: **the institution list and the logos are rebuilt automatically every week** from the
155
+ Central Bank of Brazil (STR) and Open Finance Brasil; files are keyed by ISPB; lookups accept
156
+ COMPE or ISPB; the full dataset is `data/bancos.json`.
157
+
158
+ ## License
159
+
160
+ Code and dataset under [MIT](LICENSE). Logos: see [DISCLAIMER.md](DISCLAIMER.md).
package/README.md ADDED
@@ -0,0 +1,223 @@
1
+ # logos-bancos-br
2
+
3
+ > **Lista de bancos brasileiros + logos oficiais, sempre atualizados.** Tudo derivado de fontes
4
+ > 100% oficiais (Banco Central e Open Finance Brasil) e **reconstruído automaticamente toda
5
+ > semana por CI** — com proveniência verificável por logo. **[English version](README.en.md)**
6
+
7
+ [![CI](https://github.com/rzmt/logos-bancos-br/actions/workflows/ci.yml/badge.svg)](https://github.com/rzmt/logos-bancos-br/actions/workflows/ci.yml)
8
+ [![atualização](https://github.com/rzmt/logos-bancos-br/actions/workflows/update-logos.yml/badge.svg)](https://github.com/rzmt/logos-bancos-br/actions/workflows/update-logos.yml)
9
+ [![npm](https://img.shields.io/npm/v/logos-bancos-br)](https://www.npmjs.com/package/logos-bancos-br)
10
+ [![licença](https://img.shields.io/badge/licen%C3%A7a-MIT-blue)](LICENSE)
11
+
12
+ <p align="center">
13
+ <img src="logos/png/00000000.png" width="56" alt="Banco do Brasil">
14
+ <img src="logos/png/00360305.png" width="56" alt="Caixa">
15
+ <img src="logos/png/60746948.png" width="56" alt="Bradesco">
16
+ <img src="logos/png/90400888.png" width="56" alt="Santander">
17
+ <img src="logos/png/60701190.png" width="56" alt="Itaú">
18
+ <img src="logos/png/18236120.png" width="56" alt="Nubank">
19
+ <img src="logos/png/00416968.png" width="56" alt="Inter">
20
+ <img src="logos/png/31872495.png" width="56" alt="C6">
21
+ <img src="logos/png/01181521.png" width="56" alt="Sicredi">
22
+ <img src="logos/png/02038232.png" width="56" alt="Sicoob">
23
+ <img src="logos/png/10573521.png" width="56" alt="Mercado Pago">
24
+ <img src="logos/png/33264668.png" width="56" alt="XP">
25
+ </p>
26
+ <p align="center"><a href="PREVIEW.md"><strong>→ galeria completa (PREVIEW.md)</strong></a></p>
27
+
28
+ ## O que este pacote entrega
29
+
30
+ 1. **A lista de instituições — atualizada automaticamente.** Todas as instituições com código
31
+ COMPE da lista de participantes do STR do **Banco Central** (hoje 470), com nome oficial,
32
+ nome reduzido, código COMPE e ISPB, em [`data/bancos.json`](data/bancos.json). Você nunca
33
+ mais mantém uma lista de bancos à mão.
34
+ 2. **Logos oficiais.** Hoje 107, em PNG 256×256 (+ SVG quando disponível), vindos do diretório
35
+ público do **Open Finance Brasil** — onde cada instituição publica e mantém a própria marca.
36
+ Cada arquivo carrega proveniência: URI de origem, SHA-256 e data.
37
+ 3. **Atualização automática, sem curadoria manual.** Toda segunda-feira um GitHub Action
38
+ ([`update-logos.yml`](.github/workflows/update-logos.yml)) reconstrói **a lista E os logos**
39
+ a partir das fontes e abre um PR com o diff visual. Banco criado, renomeado ou extinto pelo
40
+ BCB? Instituição trocou o logo? Entra na atualização da semana.
41
+ 4. **Uso em qualquer stack.** API JavaScript/TypeScript, mapa pronto para React Native, CLI que
42
+ copia os assets para projetos Flutter/Kotlin/Swift/.NET/PHP, URLs de CDN sem instalar nada —
43
+ ou só o JSON.
44
+
45
+ ## Por que não manter uma lista à mão?
46
+
47
+ Porque ela envelhece: o BCB inclui, renomeia e exclui instituições ao longo do ano, e os bancos
48
+ redesenham suas marcas. As bibliotecas existentes ou trazem **só dados** (sem logos), ou logos
49
+ **coletados manualmente** de sites variados, sem rastreabilidade. A abordagem aqui:
50
+
51
+ - **Fontes oficiais, e apenas elas** — o CSV de participantes do STR (que o próprio BCB atualiza
52
+ diariamente) e o diretório de participantes do Open Finance Brasil. Nenhuma imagem "achada no
53
+ Google".
54
+ - **Proveniência por logo** — `data/bancos.json` registra a URI de origem, o SHA-256 do arquivo
55
+ original e a data de cada logo. O diff do git é a auditoria.
56
+ - **Correspondência segura** — match automático **somente por ISPB** (= raiz do CNPJ).
57
+ Semelhança de nome nunca atribui logo sozinha: vira sugestão para revisão humana. Em contexto
58
+ bancário, logo errado é pior que logo nenhum.
59
+ - **Assets seguros** — download só via https com teto de tamanho e de pixels; SVGs
60
+ redistribuídos apenas após sanitização (sem `script`, event handlers, `foreignObject` ou
61
+ referências externas).
62
+ - **Trade-off honesto** — 107 das 470 instituições têm logo (as participantes do Open Finance,
63
+ que cobrem a esmagadora maioria das contas do país). As demais são SCDs/cooperativas pequenas
64
+ sem logo oficial publicado; para elas seu app usa o fallback que preferir.
65
+
66
+ ## Instalação e uso
67
+
68
+ ```bash
69
+ npm install logos-bancos-br
70
+ ```
71
+
72
+ Os arquivos são nomeados pelo **ISPB** (8 dígitos, estável e universal — inclusive para
73
+ instituições Pix sem COMPE, no roadmap). As consultas aceitam **COMPE ou ISPB**.
74
+
75
+ ### JavaScript / TypeScript (Node ou web)
76
+
77
+ ```ts
78
+ import { banks, byCompe, byIspb, logoCdnUrl } from 'logos-bancos-br';
79
+
80
+ byCompe(341); // { ispb: '60701190', compe4: '0341', name: 'Itaú Unibanco S.A.', logo: {...} }
81
+ byCompe('0260'); // Nubank — '260', 260 e '0260' são equivalentes
82
+ byIspb('00000000'); // Banco do Brasil
83
+
84
+ logoCdnUrl(341); // https://cdn.jsdelivr.net/npm/logos-bancos-br@x.y.z/logos/png/60701190.png
85
+ ```
86
+
87
+ ### React (web)
88
+
89
+ ```tsx
90
+ import { logoCdnUrl } from 'logos-bancos-br';
91
+
92
+ <img src={logoCdnUrl(banco.codigo) ?? iconeGenerico} width={40} alt={banco.nome} />
93
+ ```
94
+
95
+ ### React Native (Expo / Metro)
96
+
97
+ ```tsx
98
+ import logos from 'logos-bancos-br/react-native'; // mapa require() estático
99
+
100
+ <Image source={logos[codigoBanco.padStart(4, '0')]} style={{ width: 40, height: 40 }} />
101
+ ```
102
+
103
+ > Importar esse entry adiciona **todos** os logos (~1,3 MB) ao bundle. Se preferir empacotar só
104
+ > alguns, use o CLI abaixo e faça `require()` dos arquivos copiados.
105
+
106
+ ### Node (caminho dos arquivos no disco)
107
+
108
+ ```ts
109
+ import { logoPngPath, logoSvgPath } from 'logos-bancos-br/node';
110
+
111
+ logoPngPath('341'); // /…/node_modules/logos-bancos-br/logos/png/60701190.png
112
+ ```
113
+
114
+ ### Qualquer stack (Flutter, Kotlin, Swift, PHP, .NET…)
115
+
116
+ Vendorize os assets no seu projeto — sem dependência de runtime:
117
+
118
+ ```bash
119
+ npx logos-bancos-br copy --dest ./assets/banks # 0341.png, 0001.png, ... (por COMPE)
120
+ npx logos-bancos-br copy --dest ./assets/banks --by ispb # 60701190.png, ...
121
+ npx logos-bancos-br copy --dest ./assets/banks --format both --only 341,001,260
122
+ npx logos-bancos-br list # tabela COMPE · ISPB · nome · tem logo
123
+ ```
124
+
125
+ Rode de novo a cada atualização do pacote para receber lista e logos novos.
126
+
127
+ ### CDN — sem instalar nada
128
+
129
+ ```
130
+ https://cdn.jsdelivr.net/npm/logos-bancos-br@0.1.0/logos/png/60701190.png
131
+ https://cdn.jsdelivr.net/npm/logos-bancos-br@0.1.0/logos/svg/18236120.svg
132
+ ```
133
+
134
+ Fixe sempre uma versão (`@0.1.0`) — a correspondência COMPE→ISPB está em
135
+ [`data/bancos.json`](data/bancos.json).
136
+
137
+ ### Só os dados (lista de bancos)
138
+
139
+ ```ts
140
+ import dados from 'logos-bancos-br/data/bancos.json';
141
+ // todas as instituições: ispb, compe, compe4, nome oficial, nome reduzido, logo (ou null)
142
+ ```
143
+
144
+ ## O dataset
145
+
146
+ Um registro de `data/bancos.json`:
147
+
148
+ ```json
149
+ {
150
+ "ispb": "60701190",
151
+ "compe": "341",
152
+ "compe4": "0341",
153
+ "name": "Itaú Unibanco S.A.",
154
+ "shortName": "ITAÚ UNIBANCO S.A.",
155
+ "logo": {
156
+ "png": "logos/png/60701190.png",
157
+ "svg": "logos/svg/60701190.svg",
158
+ "source": {
159
+ "type": "openfinance",
160
+ "org": "ITAU UNIBANCO S.A.",
161
+ "cnpj": "60701190000104",
162
+ "uri": "https://www.itau.com.br/…/Novo_itau.svg",
163
+ "sha256": "…",
164
+ "updatedAt": "2026-07-17"
165
+ }
166
+ }
167
+ }
168
+ ```
169
+
170
+ - `logo.png` — PNG normalizado **256×256**, fundo transparente, `fit: contain`.
171
+ - `logo.svg` — vetor original, presente só quando passa na sanitização.
172
+ - `logo.source` — proveniência completa: de onde veio, hash e quando mudou.
173
+ - `logo: null` — instituição sem logo nas fontes oficiais (use seu fallback).
174
+
175
+ ## Como funciona a atualização automática
176
+
177
+ 1. **Espinha dorsal**: o CSV público de participantes do STR do Banco Central define *quais
178
+ instituições existem* (ISPB + COMPE + nomes oficiais). O BCB atualiza esse arquivo
179
+ diariamente.
180
+ 2. **Logos**: o diretório público de participantes do Open Finance Brasil traz, por CNPJ, o logo
181
+ que cada instituição publica para ser exibido por terceiros.
182
+ 3. **Ponte**: `ISPB == 8 primeiros dígitos do CNPJ` (é assim que o BCB os atribui na esmagadora
183
+ maioria dos casos). Quando não bate — segundas marcas como XP CCTVM, Nu Invest, Bradesco BBI —
184
+ entra o `forcedMatches`, revisado à mão a partir das sugestões do relatório.
185
+ 4. **Normalização**: cada arte vira PNG 256×256; o SVG original é mantido quando seguro.
186
+ 5. **Cadência**: o workflow roda **toda segunda-feira** (e sob demanda), regenera
187
+ `data/bancos.json`, `logos/`, `PREVIEW.md` e `react-native.js`, e **abre um PR** com o
188
+ relatório e o diff visual dos PNGs. Depois da revisão e merge, uma nova versão vai para o
189
+ npm. Nada é editado à mão.
190
+
191
+ Detalhes de manutenção (rodar o pipeline localmente, promover sugestões, overrides, denylist):
192
+ **[CONTRIBUTING.md](CONTRIBUTING.md)**.
193
+
194
+ ## Limitações conhecidas
195
+
196
+ - Cobertura de logos = instituições ativas no Open Finance com URL de logo válida. Hoje são 107;
197
+ o número cresce conforme o ecossistema.
198
+ - Algumas instituições publicam no diretório o logo da sua **marca de produto** (ex.: Banco CSF →
199
+ cartão Atacadão). É a escolha oficial da própria instituição; se preferir outra arte no seu app,
200
+ use um override local seu.
201
+ - Instituições **sem** código COMPE (participantes só do Pix) ainda não entram — o naming por ISPB
202
+ já foi desenhado para recebê-las sem breaking change (roadmap).
203
+
204
+ ## Marcas e remoção
205
+
206
+ Os logos são **marcas das respectivas instituições financeiras** e **não** são cobertos pela
207
+ licença MIT deste repositório. Eles são redistribuídos para **uso nominativo** (identificar a
208
+ instituição em interfaces), a partir de artes que as próprias instituições publicam no diretório
209
+ público do Open Finance Brasil. Detalhes e base de uso: **[DISCLAIMER.md](DISCLAIMER.md)**.
210
+
211
+ Representa uma instituição e quer corrigir ou remover um logo? Abra uma issue com o template
212
+ **"Remoção de marca"** — removemos prontamente.
213
+
214
+ ## Para ferramentas e assistentes de IA
215
+
216
+ Um resumo machine-readable do projeto está em [`llms.txt`](llms.txt) (também incluído no pacote
217
+ npm). Fatos-chave: **a lista de instituições e os logos são regenerados automaticamente toda
218
+ semana** a partir do Banco Central (STR) e do Open Finance Brasil; arquivos nomeados por ISPB;
219
+ consultas por COMPE ou ISPB; dataset completo em `data/bancos.json`.
220
+
221
+ ## Licença
222
+
223
+ Código e dataset sob [MIT](LICENSE). Logos: ver [DISCLAIMER.md](DISCLAIMER.md).