# react-native-samsung-bks

> React Native wrapper for the Samsung Blockchain Keystore SDK

Latest version **0.1.1** (published 2019-10-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-samsung-bks
pnpm add react-native-samsung-bks
yarn add react-native-samsung-bks
bun add react-native-samsung-bks
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2019-10-02 |
| First published | 2019-09-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 16.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Origin Protocol Inc. |
| Maintainers | tlinton |
| Keywords | react-native, ethereum, bitcoin, blockchain |

## Links

- npm: https://www.npmjs.com/package/react-native-samsung-bks
- Repository: https://github.com/OriginProtocol/react-native-samsung-bks
- Homepage: https://github.com/OriginProtocol/react-native-samsung-bks#readme
- Issues: https://github.com/OriginProtocol/react-native-samsung-bks/issues
- npm.io page: https://npm.io/package/react-native-samsung-bks

## Recent versions

- 0.1.1 (latest) — 2019-10-02
- 0.1.0 — 2019-09-09

## README

# react-native-samsung-bks

![npm_version](https://img.shields.io/npm/v/react-native-samsung-bks.svg?style=flat-square&colorA=111d28&colorB=1a82ff)
[![license](https://img.shields.io/badge/license-MIT-6e3bea.svg?style=flat-square&colorA=111d28)](https://github.com/OriginProtocol/react-native-samsung-bks/blob/master/LICENSE)

React Native wrapper for the Samsung Blockchain Keystore SDK

## Getting started

`$ npm install react-native-samsung-bks --save`

### Automatic installatation (RN > 0.60)

### Mostly automatic installation (RN < 0.59.x)

`$ react-native link react-native-samsung-bks`

Add the following into the root project `build.gradle`

```
allprojects {
    ...
    repositories {
        ...
        flatDir {
            dirs "$rootDir/aar"
        }
    }
}
```

Download the Samsung Blockchain Keystore SDK aar file and put it in `android/aar`.

### Manual installation

#### Android

1. Open up `android/app/src/main/java/[...]/MainActivity.java`
  - Add `import com.reactlibrary.RNSamsungBKS;` to the imports at the top of the file
  - Add `new RNSamsungBKS()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
  	```
  	include ':react-native-samsung-bks'
  	project(':react-native-samsung-bks').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-react-native-sbksdk/android')
  	```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
  	```
      implementation project(':react-native-samsung-bks')
  	```
4. Add the following into the root project `build.gradle`

```
allprojects {
    ...
    repositories {
        ...
        flatDir {
            dirs "$rootDir/aar"
        }
    }
}
```


## Usage
```javascript
import RNSamsungBKS from 'react-native-samsung-bks';

```

The following methods of the SDK are available:

`RNSamsungBKS.isSupported()`

`RNSamsungBKS.getDeepLinks()`

`RNSamsungBKS.getSeedHash()`

`RNSamsungBKS.checkForMandatoryAppUpdate()`

`RNSamsungBKS.getAddressList(hdPath)`

`RNSamsungBKS.signEthTransaction(hdPath, nonce, gasPrice, gasLimit, to, value, data)`

`RNSamsungBKS.signEthPersonalMessage(hdPath, b64MessageToSign)`

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