
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@scwar/nestjs-paystack
Advanced tools
A comprehensive NestJS module for integrating with Paystack API
A comprehensive NestJS module for integrating with the Paystack API. This package provides a complete wrapper around all Paystack API endpoints with robust error handling, retries, and TypeScript support.
npm install @scwar/nestjs-paystack
import { PaystackModule } from '@scwar/nestjs-paystack';
@Module({
imports: [
PaystackModule.forRoot({
secretKey: 'your-paystack-secret-key',
baseUrl: 'https://api.paystack.co',
timeout: 30000,
retries: 3,
}),
],
})
export class AppModule {}
import { PaystackService } from '@scwar/nestjs-paystack';
@Injectable()
export class PaymentService {
constructor(private readonly paystackService: PaystackService) {}
async createTransaction(amount: number, email: string) {
return this.paystackService.transaction.initialize({
amount: amount * 100, // Convert to kobo
email,
callback_url: 'https://your-domain.com/verify',
});
}
}
interface PaystackModuleOptions {
secretKey: string;
baseUrl?: string;
timeout?: number;
retries?: number;
retryDelay?: number;
maxRetryDelay?: number;
}
The package provides comprehensive error handling with detailed error messages:
try {
const result = await this.paystackService.transaction.initialize(data);
} catch (error) {
if (error instanceof PaystackError) {
console.log('Paystack Error:', error.message);
console.log('Error Code:', error.code);
console.log('HTTP Status:', error.status);
}
}
Automatic retries with exponential backoff for failed requests:
// Configure retries in module options
PaystackModule.forRoot({
secretKey: 'your-key',
retries: 3, // Number of retry attempts
retryDelay: 1000, // Initial delay in ms
maxRetryDelay: 10000, // Maximum delay in ms
})
# Run tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:cov
This package includes an automated version bumping system that follows semantic versioning and conventional commits.
The system automatically determines the appropriate version bump based on your commits:
# Automatically determine and bump version
npm run version:auto
# Manual version bumps
npm run version:patch # 1.0.0 โ 1.0.1
npm run version:minor # 1.0.0 โ 1.1.0
npm run version:major # 1.0.0 โ 2.0.0
All commits must follow the Conventional Commits specification:
# Feature commits (minor version bump)
git commit -m "feat: add new payment method"
# Bug fix commits (patch version bump)
git commit -m "fix: resolve authentication issue"
# Breaking change commits (major version bump)
git commit -m "feat!: breaking change in API"
# Documentation commits (no version bump)
git commit -m "docs: update README with examples"
# Test commits (no version bump)
git commit -m "test: add unit tests for payment service"
# Complete release process with automatic version bump
npm run release:auto
# Manual release with specific version bump
npm run release:patch
npm run release:minor
npm run release:major
# 1. Bump version and update changelog
npm run version:auto
# 2. Build and test
npm run build && npm test
# 3. Commit changes
git add .
git commit -m "chore: bump version to $(node -p \"require('./package.json').version\")"
# 4. Create tag
git tag "v$(node -p \"require('./package.json').version\")"
# 5. Push changes and tag
git push && git push --tags
# 6. Publish to npm
npm publish
The changelog is automatically updated with each version bump:
# Update changelog with recent changes
npm run changelog:update
# Generate full changelog from git history
npm run changelog:generate -- --full
The package includes GitHub Actions workflows for:
Pre-commit hooks ensure code quality:
git checkout -b feature/amazing-feature
)git push origin feature/amazing-feature
)Important: All commits must follow the conventional commit format to ensure proper version bumping.
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please open an issue on GitHub or contact the maintainers.
See CHANGELOG.md for a list of changes and version history.
FAQs
A comprehensive NestJS module for integrating with Paystack API
The npm package @scwar/nestjs-paystack receives a total of 9 weekly downloads. As such, @scwar/nestjs-paystack popularity was classified as not popular.
We found that @scwar/nestjs-paystack demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last weekโs supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.