# @pokopayment/react-native-sdk

> Poko SDK for react native

Latest version **0.6.0** (published 2023-05-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install @pokopayment/react-native-sdk
pnpm add @pokopayment/react-native-sdk
yarn add @pokopayment/react-native-sdk
bun add @pokopayment/react-native-sdk
```

## Health

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

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.0 |
| Published | 2023-05-31 |
| First published | 2023-02-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 16.0.0 |
| Dependencies | 2 |
| Unpacked size | 81.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | vuongpoko |
| Maintainers | poko.engineer |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/@pokopayment/react-native-sdk
- Repository: https://github.com/Poko-Daoism/pokopayment-reactnative-sdk
- Homepage: https://github.com/Poko-Daoism/pokopayment-reactnative-sdk#readme
- Issues: https://github.com/Poko-Daoism/pokopayment-reactnative-sdk/issues
- npm.io page: https://npm.io/package/@pokopayment/react-native-sdk

## Dependencies (2)

- [react-native-webview](https://npm.io/package/react-native-webview.md) ^11.26.1
- [react-native-permissions](https://npm.io/package/react-native-permissions.md) ^3.8.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.6.0 (latest) — 2023-05-31
- 0.5.1 — 2023-05-17
- 0.5.0 — 2023-05-17
- 0.4.0 — 2023-02-11
- 0.3.0 — 2023-02-09
- 0.2.0 — 2023-02-09

## README

# @pokopayment/react-native-sdk

Poko SDK for react native

## Installation

```sh
npm install @pokopayment/react-native-sdk
```

## Usage

```js
// Root component
import {PokoWidgetProvider} from '@pokopayment/react-native-sdk';

function App(): JSX.Element {
  return (
    <PokoWidgetProvider apiKey="your API_KEY (optional)" environment="DEVELOPMENT (default) | STAGING | PRODUCTION">
      <HelloWorld />
    </PokoWidgetProvider>
  );
}

// HelloWorld component
import {usePokoWidget} from '@pokopayment/react-native-sdk';

const {launchWidget, setApiKey, setEnv, setUserId} =
    usePokoWidget();

setApiKey('YOUR API KEY'); // required, can ignore if already provided from the PokoWidgetProvider
setUserId('Your user ID'); // required
setEnv('PRODUCTION' | 'STAGING' | 'DEVELOPMENT'); // default DEVELOPMENT

// See full list of options: https://pokoapp.gitbook.io/documentation/onramp-aggregator/sdk-integration-and-documentation/web-integration/parameters
const urlLaunched = launchWidget({
    fiat?: string; // VND, USD,..
    crypto?: string; // USDT-bsc, USDT-ethereum, BTC-bitcoin,...
    fiatAmount?: number; // 100.0
    cryptoAmount?: number; // 0.5
    strictMode?: boolean; // true | false (not allow users change fiat & crypto currency)
    fiatList?: string[]; // ['VND', 'USD']
    cryptoList?: string[]; // ['ETH-ethereum', 'BTC-bitcoin']
    excludeProviderIds?: string[]; // ['transak', 'payfura']
    signature?: string;
    providerId?: string;
    paymentMethodId?: string;
    receiveWalletAddress?: string;
});
```

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