npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

mbbank-luisepog

v1.0.0

Published

An promise-based unofficial API wrapper for Vietnam Military Commercial Joint Stock Bank (MBBank, MB)

Readme

MBBank

EN: An unofficial fully promise-based API wrapper for Vietnam Military Commercial Joint Stock Bank (MBBank, MB). Read full English version docs

VN: Promise-based API wrapper không chính thức dành cho Ngân hàng Quân Đội (MB)

Lưu ý: Việc sử dụng thư viện này có thể trái với quy định của MB và có thể dẫn tới việc bị vô hiệu hóa tài khoản hoặc tương tự. Chúng tôi không chịu trách nhiệm nếu việc trên xảy ra.

Giới thiệu

Mục đích của thư viện này là để giúp bạn dễ tương tác hơn với API của MB và có thể tự tạo được một cổng thanh toán riêng cho bản thân.

Yêu cầu

Nếu bạn chọn cách giải captcha là tesseract, hãy đảm bảo rằng Tesseract đã được cài đặt: tesseract-ocr

Dành cho Python

Thư viện này được dựa trên dự án MBBank của The DT.

Cài đặt

Hãy chạy lệnh dưới đây:

npm i mbbank

Bắt đầu

Khởi tạo đối tượng MB:

new MB({
  username: "YOUR-MB-USERNAME",
  password: "YOUR-MB-PASSWORD",

  // Với tùy chọn "preferredOCRMethod", vui lòng lưu ý rằng nếu bạn chọn lựa chọn "default" - lựa
  // chọn mặc định, thư viện sẽ cần phải tải model OCR từ Internet (GitHub) và có thể sẽ mất từ 5-
  // 15s để tải xuống, phụ thuộc vào đường truyền Internet của bạn. Nếu lựa chọn "tesseract" được
  // chọn, hãy đảm bảo rằng 'tesseract' đã được cài trên máy của bạn. Chi tiết vui lòng xem mục
  // "Yêu cầu". Lựa chọn "custom" cho phép bạn truyền một hàm tới đối tượng MB, và thư viện sẽ gọi
  // hàm được tuyền vào để giải captcha. Mặc định 'undefined', tương đương chế độ "default".
  preferredOCRMethod: "default" | "tesseract" | "custom" | undefined,

  // Nếu bạn muốn sử dụng hàm OCR tùy chỉnh, hãy cập nhật "preferredOCRMethod" thành "custom", nếu
  // không hàm sẽ không được gọi. Mặc định 'undefined'.
  customOCRFunction: (image: Buffer) => Promise<string>,

  // Tùy chọn này cho phép tập tin WebAssembly được tải xuống vào tập tin nội bộ của bạn để bỏ qua
  // việc tải đi tải lại mỗi khi thư viện được khởi chạy. Điều này cho phép thư viện chạy với tốc độ
  // nhanh hơn, tùy thuộc vào ổ cứng của bạn. Tuy nhiên, khi sử dụng lựa chọn này, bạn sẽ cần phải
  // xóa thủ công tập tin WebAssembly nếu MB cập nhật tập tin mới. Mặc định 'false'.
  saveWasm: true | false,
});

Ví dụ

Đăng nhập và lấy dữ liệu đăng nhập

(async () => {
  const { MB } = require("mbbank");

  const mb = new MB({
    username: "0123456789",
    password: "foobar",
    ...customSettings,
  });

  await mb.login();
})();

Lấy số dư tài khoản

(async () => {
  const { MB } = require("mbbank");

  const mb = new MB({
    username: "0123456789",
    password: "foobar",
    ...customSettings,
  });

  // Login bằng tay, có thể bỏ qua để thư viện login tự động.
  await mb.login();

  await mb.getBalance();
})();

Lấy lịch sử giao dịch

(async () => {
  const { MB } = require("mbbank");

  const mb = new MB({
    username: "0123456789",
    password: "foobar",
    ...customSettings,
  });

  // Login bằng tay, có thể bỏ qua để thư viện login tự động.
  await mb.login();

  await mb.getTransactionsHistory({
    accountNumber: "1234567890",
    fromDate: "dd/mm/yyyy",
    toDate: "dd/mm/yyyy",
  });
})();

Ghi công Model OCR

Mặc dù dataset là do tôi thu thập (và nó ở trên Kaggle), nhưng mô hình OCR thì được huấn luyện bởi The DT. Mô hình và code để huấn luyện có sẵn tại GitHub repository này.

Ủng hộ

Nếu thư viện này hữu ích với bạn, bạn có thể ủng hộ cho mình một cốc cà phê bằng STK 0974163549 - MB - TRAN DINH TUYEN hoặc MoMo: 0888929537

Giấy phép

Giấy phép MIT