Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cakesoft-shashank authored Nov 10, 2023
1 parent db20600 commit 3f16beb
Showing 1 changed file with 33 additions and 8 deletions.
41 changes: 33 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# react-native-border-wallets

Border wallets ui library
[Border Wallets](https://www.borderwallets.com/ "Border Wallets") library for React Native

## Installation
This library uses core crypto module so install [rn-nodify](https://github.com/tradle/rn-nodeify "rn-nodify")

```sh
npm install react-native-border-wallets
Expand All @@ -11,12 +12,39 @@ npm install react-native-border-wallets
## Usage

```js
import { multiply } from 'react-native-border-wallets';
import BorderWalletGrid, { GridType, generateBorderWalletGrid } from 'react-native-border-wallets';


<BorderWalletGrid
gridType={GridType.WORDS}
mnemonic="12 word mnemonic"
accentColor="tomato"
onCellSelected={(index, selectedCells) =>
console.log(index, selectedCells)
}
onGridLoaded={(grid) => console.log('onGridLoaded', grid)}
/>

const grid = generateBorderWalletGrid('12 words', GridType.WORDS)

```
---

// ...
`<BorderWalletGrid .../>` renders Border Wallet grid for a given mnemonic
**Props:**
- `mnemonic: string`
Initial 12 words mnemonic to be use to generate entropy grid
- `gridType: WORDS | NUMBERS | HEXADECIMAL(Base64) | BLANK`
Type of grid
- `accentColor: string`
Accent color for loader and selected cell
- `onGridLoaded: (grid: string[]) => void`
Optional: Callback to handle grid load completion
- `onCellSelected: (index: number, selectedCells: number[])=> void`
Optional callback to handle pattern selection
---

const result = await multiply(3, 7);
```
`generateBorderWalletGrid` returns grid array of 2048 elements for a given mnemonic and grid type

## Contributing

Expand All @@ -26,6 +54,3 @@ See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the

MIT

---

Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)

0 comments on commit 3f16beb

Please sign in to comment.