# fkwallet

> FKWallet API

Latest version **1.0.2** (published 2022-09-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install fkwallet
pnpm add fkwallet
yarn add fkwallet
bun add fkwallet
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-09-19 |
| First published | 2021-11-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 44.8 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Author | xTCry [Vladislav Kh] |
| Maintainers | xtcry |
| Keywords | fkwallet, api |

## Links

- npm: https://www.npmjs.com/package/fkwallet
- Repository: https://github.com/xTCry/node-fkwallet-api
- Homepage: https://github.com/xTCry/node-fkwallet-api#readme
- Issues: https://github.com/xTCry/node-fkwallet-api/issues
- npm.io page: https://npm.io/package/fkwallet

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.24.0
- [query-string](https://npm.io/package/query-string.md) ^7.0.1

## Recent versions

- 1.0.2 (latest) — 2022-09-19
- 1.0.1 — 2021-11-07
- 1.0.0 — 2021-11-07

## README

# NodeJS [FKWallet](https://www.fkwallet.ru/docs) API

[![license](https://img.shields.io/npm/l/fkwallet?style=flat-square)](https://github.com/xTCry/node-fkwallet-api/blob/main/LICENSE)
[![npm](https://img.shields.io/npm/v/fkwallet?style=flat-square)](https://npmjs.com/package/fkwallet)
[![downloads](https://img.shields.io/npm/dm/fkwallet?style=flat-square)](https://npmjs.com/package/fkwallet)
[![GitHub](https://img.shields.io/github/stars/xTCry/node-fkwallet-api?style=flat-square)](https://github.com/xTCry/node-fkwallet-api)
[![last commit](https://img.shields.io/github/last-commit/xTCry/node-fkwallet-api?style=flat-square)](https://github.com/xTCry/node-fkwallet-api)

## 📦 Установка

```shell
yarn add fkwallet
```

## 🛠️ Использование

```typescript
import 'dotenv/config';
import { ApiClient, CryptoType } from 'fkwallet';

const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));

const main = async () => {
  const api = new ApiClient(
    process.env.WALLET_PROVIDER_FKWALLET_SHOP_ID!,
    process.env.WALLET_PROVIDER_FKWALLET_API_KEY!,
  );

  let time = Date.now();
  const balance = await api.getBalance();
  console.log('balance', balance);
  console.log(`Time: ${Date.now() - time} ms`);

  await sleep(1e3);
  time = Date.now();
  const btcAddressNew = await api.createCryptoAddress(CryptoType.BTC);
  console.log('btcAddressNew', btcAddressNew);
  console.log(`Time: ${Date.now() - time} ms`);

  await sleep(1e3);
  time = Date.now();
  const btcAddress = await api.getCryptoAddress(CryptoType.BTC);
  console.log('btcAddress', btcAddress);
  console.log(`Time: ${Date.now() - time} ms`);

  await sleep(1e3);
  time = Date.now();
  const paymentStatus = await api.getPaymentStatus({ payment_id: 22664540 });
  console.log('paymentStatus', paymentStatus.data.payment_id);
  console.log(`Time: ${Date.now() - time} ms`);
};
main().then();

```

---
_Source: https://npm.io/package/fkwallet · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
