Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Это полностью типизированная реализация клиента API Киви Банка
В коде довфига комментариев, взятых из официального описания API,
поэтому если у вас VSCode
или WebStorm
, которые умеют их подгружать как подсказки в коде, проблем не должно возникнуть.
@todo
Полноценные доки потом напишу
const QIWI = require("qiwi-sdk");
const qp = new QIWI.Personal(process.env.QIWI_TOKEN);
qp.getPersonProfile().then(console.log);
// => { contractInfo: {...}, authInfo: {...}, userInfo: {...} }
const QIWI = require("qiwi-sdk");
const qp = new QIWI.Personal(process.env.QIWI_TOKEN);
const receiver = "+79123456789";
const provider = 99;
async function main() {
const profile = await qp.getPersonProfile();
const wallet = profile.authInfo.personId;
const accounts = await qp.getAccounts(wallet);
const rubleAccount = accounts.find(
(acc) => acc.balance && acc.balance.currency === QIWI.Personal.Currency.RUB
);
const commission = await qp.getCommission(
provider,
receiver,
rubleAccount.balance.amount
);
const totalToSteal = parseFloat(rubleAccount.balance.amount - balance);
const payment = await qp.pay(provider, receiver, totalToSteal);
console.log(payment);
}
main();
const QIWI = require("qiwi-sdk");
const qp = new QIWI.Personal(process.env.QIWI_TOKEN);
async function main() {
const profile = await qp.getPersonProfile();
const wallet = profile.authInfo.personId;
const [pk, sk] = await qp.createP2PKeyPair("My super name");
// Да, они инвертированы в порядке,
// так как PublicKey не всегда нужен
const p2pc = new QIWI.P2P(sk, pk);
const bill = await p2pc.createBill({
amount: {
value: 1000,
currency: QIWI.P2P.Currency.RUB
},
expirationDateTime: QIWI.P2P.formatLifetime(2 /* 2 дня */),
comment: "Создание сайта pornhub.com"
});
console.log(bill.payUrl);
}
main();
FAQs
⭐ QIWI SDK for node: P2P Payments & Wallet management
The npm package qiwi-sdk receives a total of 1,300 weekly downloads. As such, qiwi-sdk popularity was classified as popular.
We found that qiwi-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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.