https://github.com/bithyve/react-native-border-wallets
Border Wallets grid for React Native
https://github.com/bithyve/react-native-border-wallets
border-wallet
Last synced: 6 months ago
JSON representation
Border Wallets grid for React Native
- Host: GitHub
- URL: https://github.com/bithyve/react-native-border-wallets
- Owner: bithyve
- License: mit
- Created: 2023-11-09T05:25:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-30T07:13:21.000Z (over 2 years ago)
- Last Synced: 2025-10-02T05:41:46.801Z (10 months ago)
- Topics: border-wallet
- Language: TypeScript
- Homepage:
- Size: 1.89 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# react-native-border-wallets
[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
```
## Usage
```js
import BorderWalletGrid, { GridType, generateBorderWalletGrid } from 'react-native-border-wallets';
console.log(index, selectedCells)
}
onGridLoaded={(grid) => console.log('onGridLoaded', grid)}
/>
const grid = generateBorderWalletGrid('12 words', GridType.WORDS)
```
---
`` 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
---
`generateBorderWalletGrid` returns grid array of 2048 elements for a given mnemonic and grid type
## Contributing
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
## License
MIT