How kayiwarahim/relworx-node works
Relworx is a TypeScript SDK for Relworx mobile-money payments. Applications configure the SDK, then request collections or disbursements, or query wallet balance and transaction status/history; results are provider JSON. Payment services validate input before the shared HTTP client sends requests, while errors preserve response and uncertain-outcome details. A separate exported verifier checks webhook signatures for application-controlled callbacks. Edges reflect shown calls or README-described usage; no webhook receiver or persistence layer is part of this SDK.
Main entry points: client.ts Relworx HTTP client · index.ts Service facade · services.ts Collections · webhooks.ts Signature verifier
Components 14
SDK entry
- Client factory
src/index.ts - Service facade
src/index.ts - SDK contracts
src/types.ts
Payment operations
- Collections
src/services.ts - Disbursements
src/services.ts - Wallet balance
src/services.ts - Transactions
src/services.ts - Payment validation
src/validation.ts
HTTP transport
- Relworx HTTP client
src/client.ts - Relworx API
- SDK errors
src/errors.ts
Webhook security
- Signature verifier
src/webhooks.ts
Other components
- Integrating application
- Webhook sender
Connections 22
- Integrating application → Client factory: creates SDK
README.md - Client factory → Service facade: constructs
src/index.ts - Integrating application → Collections: requests collection
README.md - Integrating application → Disbursements: sends payout
README.md - Integrating application → Wallet balance: checks balance
README.md - Integrating application → Transactions: checks history
README.md - Service facade → Collections: exposes
src/index.ts - Service facade → Disbursements: exposes
src/index.ts - Service facade → Wallet balance: exposes
src/index.ts - Service facade → Transactions: exposes
src/index.ts - Collections → Payment validation: validates
src/services.ts - Disbursements → Payment validation: validates
src/services.ts - Collections → Relworx HTTP client: posts request
src/services.ts - Disbursements → Relworx HTTP client: posts payment
src/services.ts - Wallet balance → Relworx HTTP client: gets balance
src/services.ts - Transactions → Relworx HTTP client: gets records
src/services.ts - Relworx HTTP client → Relworx API: sends HTTP
README.md - Relworx HTTP client → SDK errors: raises errors
src/client.ts - Integrating application → Signature verifier: verifies callback
README.md - Webhook sender → Integrating application: sends callback
README.md - Client factory → SDK contracts: accepts config
src/index.ts - Signature verifier → SDK contracts: uses payload types
src/webhooks.ts