Modern, Promise-based, and strictly typed SDK for E-IMZO
Features • Installation • Docs • Example • License
@truschery/eimzo is a lightweight wrapper that provides the best Developer Experience for interacting with E-IMZO certificates, PKCS#7 signatures, and smart filtering
- Modern API: Fully Promise-based (
async/await). No more nested callbacks - First-class TypeScript: Excellent IDE autocompletion for certificate properties and methods
- Smart Filtering: Find certificates by INN, PINFL, or validity status out of the box
- Clean Architecture: Immutable configuration and separated transport layer (
eimzo-api)
- Tests: Implement unit testing of modules
- Config: Implement a simple package configuration
- Plugins: Add functionality for interacting with other Eimzo plugins
Install the package via npm:
npm install @truschery/eimzo
# or
yarn add @truschery/eimzo
# or
pnpm add @truschery/eimzoTo view the complete documentation for the package, you can visit Docs
Ensure you have Node.js version 14 or higher installed.
To use @truschery/eimzo, Initialize the facade once and enjoy the magic:
import Eimzo from '@truschery/eimzo'
// Initialize with API key
const eimzo = new Eimzo({
keys: {
'example.com': 'my-token...'
}
})
// Get a list of certificates
const certificates = await eimzo.pfx.list({
/** filter options */
})
// Interaction with the certificate
const certificate = certificates[0]
// Signing a string with a certificate
certificate.sign('string to sign', {
// options
detached: boolean
}): string
// Is the certificate expired?
certificate.isExpired(): bool
// Does this certificate belong to an individual?
certificate.isPhysical(): boolThis project is licensed under the MIT License - see the LICENSE file for details.