react-native-border-wallets
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

react-native-border-wallets

Border Wallets library for React Native

Installation

This library uses core crypto module so install rn-nodify

npm install react-native-border-wallets

Usage

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

generateBorderWalletGrid returns grid array of 2048 elements for a given mnemonic and grid type

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Package Sidebar

Install

npm i react-native-border-wallets

Weekly Downloads

2

Version

0.1.1

License

MIT

Unpacked Size

195 kB

Total Files

43

Last publish

Collaborators

  • shashank.bithyve
  • utkarsh28
  • antuz123