- Import
CruxScreenand add it preferably against a stringCRUXPAY_INJECTED_SCREENin Route Configuration object - Initialize the
RNCruxUI.CruxUIobject with options object
const cruxui = new RNCruxUI.CruxUI(options);- Use the
managemethod of thecruxuiobject to automatically open the register/manage CRUX ID screen according to the state of the inputs provided.
The options object expects these keys to be defined
cruxRouteName=> The name of the screen constant against which theCruxScreenwill be hooked up in Route Configuration.cruxClient=> An instantiated object of rn-sdk's CruxClient class.navigation=> The Navigation prop of the integrating app.onRegisterSuccess&onPutAddressSuccess=> Functions to be called on success ofregisterCruxIDandputAddressMapfunctions of cruxClientonClosePress=> Function to be called onclosing the webview.onError=> Any error thrown byregisterCruxID&putAddressMapwill call this functioninputExtension=> ICruxWebViewInputExtension
These are some params which integrator app needs to send to open the webview of crux-ui-setup
theme=> The theme of the buttonssuggestedCruxIDSubdomain=> Any preferred CRUX ID Subdomain that the user woul prefer tp registeravailableCurrencies=> A map of wallet's currency symbol and corresponding address inIAddressformat