Skip to content

cruxprotocol/rn-crux-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RN-CRUX-UI

Usage

  1. Import CruxScreen and add it preferably against a string CRUXPAY_INJECTED_SCREEN in Route Configuration object
  2. Initialize the RNCruxUI.CruxUI object with options object
const cruxui = new RNCruxUI.CruxUI(options);
  1. Use the manage method of the cruxui object to automatically open the register/manage CRUX ID screen according to the state of the inputs provided.

ICruxUIOptions

The options object expects these keys to be defined

  1. cruxRouteName => The name of the screen constant against which the CruxScreen will be hooked up in Route Configuration.
  2. cruxClient => An instantiated object of rn-sdk's CruxClient class.
  3. navigation => The Navigation prop of the integrating app.
  4. onRegisterSuccess & onPutAddressSuccess => Functions to be called on success of registerCruxID and putAddressMap functions of cruxClient
  5. onClosePress => Function to be called onclosing the webview.
  6. onError => Any error thrown by registerCruxID & putAddressMap will call this function
  7. inputExtension => ICruxWebViewInputExtension

ICruxWebViewInputExtension

These are some params which integrator app needs to send to open the webview of crux-ui-setup

  1. theme => The theme of the buttons
  2. suggestedCruxIDSubdomain => Any preferred CRUX ID Subdomain that the user woul prefer tp register
  3. availableCurrencies => A map of wallet's currency symbol and corresponding address in IAddress format

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors