
Security News
Critical Security Vulnerability in React Server Components
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.
@calculusky/ikeja-electric-sdk
Advanced tools
The SDK is a light weight package that exposes friendly interface for interacting with Ikeja Electric SOAP API and FTP Servers in your integration. It currently support the below functionalities:
pnpm install @calculusky/ikeja-electric-sdk
#or
npm install @calculusky/ikeja-electric-sdk
#or
yarn add @calculusky/ikeja-electric-sdk
First, obtain your API and FTP credentials and initialize the SDK.
CommonJS Usage
Note: In order to gain the TypeScript typings (for intellisense / autocomplete) while using CommonJS, use require().default as seen below:
const IkejaElectric = require("@calculusky/ikeja-electric-sdk").default;
Typescript Usage
import IkejaElectric from "@calculusky/ikeja-electric-sdk";
const ie = new IkejaElectric({
appId: "YOUR_APPID",
cisPassword: "YOUR_PASSWORD",
sftpPassword: "YOUR_FTP_PASSWORD",
sftpUsername: "YOUR_SFTP_USERNAME",
cisHost: "YOUR_CIS_HTTP_HOST",
cisPort: "YOUR_CIS_HTTP_PORT",
sftpHost: "YOUR_SFTP_HOST",
sftpPort: "YOUR_SFTP_PORT",
config: {
mode: "development", //values: development or production
},
});
Note: For sandbox/development environment, set the mode in the config options above to development and pass the development options.
Confirm Details
Confirm meter number or account number for a prepaid or postpaid account. This will also retrieve the information associated to the account.
const details = await ie.power.confirmDetails({
type: "MN",
requestNO: "6745548846",
});
console.log(details);
Purchase Credit
Purchase credit after a successful account confirmation. To trigger acknowledgement automatically on a successful purchase, set the acknowledge option to true. Default is false.
const response = await ie.power.purchaseCredit(
{
kind: "PREPAY",
accountType: "MD",
amountTendered: 45000,
orderNO: "20210910093045123001000001",
paidType: "POS",
requestNO: "6745548846",
},
{ acknowledge: true },
);
console.log(response);
Reprint
const data = await ie.power.reprint({
type: "MN",
requestNO: "6745548846",
orderNO: "20210910093045123001000001", //optional
});
console.log(data);
Retrieve Details Retrieve transaction details
const result = await ie.power.retrieveDetails({
beginDate: "20210905",
endDate: "20210906",
orderNO: "20210910093045123001000001",
});
console.log(result);
Acknowledge
await ie.power.acknowledge({
amountTendered: 45000,
orderNO: "20210910093045123001000001",
purchaseStatus: "SUCCESS",
receiptNO: "210918123456",
});
Upload reconciliation file
This method provides the interface to upload reconciliation file to the sftp server. It also has a notify option. When the notify option is set, the interface automatically triggers the notify-auto-reconciliation service after a successful file upload. Default is false.
const response = await ie.reconciler.uploadReconciliationFile({
firstRow: {
totalAmount: 8500,
totalRecord: 5,
transactionStartDate: "20220717",
transactionEndDate: "20220717",
},
records: [
{
amountTendered: 2000,
kind: "PREPAY",
orderNO: "20210910093045123001000001",
paidType: "POS",
receiptNO: "210918123456",
requestNO: "6745548846",
transactionDate: "20210917093045",
},
...
],
}, { notify: true },);
console.log(response)
Notify Auto Reconciliation
This method provides the functionality to manually notify the CIS Server after a successful reconciliation file upload. Note: This method is called immediately after the uploadReconciliationFile method runs with the notify options set to false.
await ie.reconciler.notifyAutoReconciliation();
FAQs
Ikeja Electric SDK for Nodejs
We found that @calculusky/ikeja-electric-sdk demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Security News
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated “elf-*” npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.

Research
/Security News
Malicious Rust crate evm-units disguised as an EVM version helper downloads and silently executes OS-specific payloads likely aimed at crypto theft.