$ show TheNorthMemory/wechatpay-axios-plugin
wechatpay-axios-plugin is a Node.js SDK for interacting with WeChat Pay APIs (both v2 and v3). It provides a promise-based, chained interface for making API requests, handles automatic request signing and response verification, includes cryptographic utilities for AES/RSA operations, and offers CLI tools for developers. The architecture centers around a Wechatpay class that creates axios instances for XML-based (APIv2) and JSON-based (APIv3) endpoints, with specialized transformers for data format conversion and security handling. The library actively maintains compatibility with modern Node.js versions and cryptographic standards.
The LLM identified 2 files worth highlighting for reuse:
Implements AES-GCM, AES-ECB, and AES-CBC encryption/decryption with proper padding and authentication tag handling. Demonstrates non-obvious skill in managing crypto operation edge cases across Node.js versions, particularly the GCM tag length validation for older Node releases. The module is isolated (only depends on Node's crypto module) and could be extracted for use in any project requiring AES operations.
Provides comprehensive RSA encryption, decryption, signing, and verification with support for multiple key formats (PKCS#1, PKCS#8, SPKI) and file:// loading. Shows expertise in avoiding deprecated PKCS#1 v1.5 padding in favor of RSA-OAEP, proper key object handling, and cross-format compatibility. The module is isolated (depends only on crypto and fs) and could be extracted for any project needing RSA operations with modern key management.