3. QuadrataReact Package
<QuadrataReact /> Component
<QuadrataReact /> Component
<QuadrataReact />
Props
<QuadrataReact />
PropsconfigBusiness
(optional)
ConfigBusiness
interface defines the required properties for the kyb onboarding flow.
configUser
(optional)
ConfigUser
interface defines the required properties for the kyc onboarding flow.
onApplicationEnd
(optional)
A callback function: triggered when the application has reached an end state.
QuadrataOnApplicationEndCallback
Individual Passport Onboarding Statuses:
- READY
- IN_REVIEW
- MINTED
Business Passport Onboarding Statuses:
- APPROVED
- DENIED
- INITIALIZED
- IN_REVIEW
onHide
(optional)
A callback function: triggered when the modal is closed.
onMintClick
(required)
A callback function. triggered when a user clicks Claim Passport. the event object passed to this function will contain all the data required to mint a passport.
event.params
event.signature
and event.signatureIssuer
should be passed to the QuadPassport.setAttributesBulk()
function in the correct order, and include the event.params.fee
as the value passed to the overrides of the setAttributes
function. see the example below.
QuadClientMintClickEventHandler
onMintParamsReady
(optional)
A callback function: triggered when the mint parameters are signed and ready. tip: useful in case the UI needs to prepare the transaction before initiating it, see example page.
QuadClientMintParamsReadyCallback
onPageChange
(optional)
A callback function: triggered when a page is changed. Passes a Page type string.
tip: Import the Page
type from the @quadrata/client-react
library
(page: Page) => void
onSign
(required)
A callback function. triggered when a user clicks Sign Wallet or Allow. It passes a message for the user to sign in the Onboarding and/or User Consent flow.
(message: string, isConsent: boolean) => void
Shared Configuration Object
QuadrataReact
component accepts configUser
and configBusines
props to configure corresponding onboarding flows. It is required to set one of the props to launch the appropriate onboarding flow. If both props are set, the onboarding selection screen is displayed.
_debug
(optional)
When true, debug information will be printed in the console. Never use in production.
boolean
accessToken
(required)
string
apiUrl
(required)
Quadrata endpoint to be used for implementation.
string
children
(optional)
Overrides the default loader component inside of the form markup. This component will be shown in all loading states during the flow. if not defined, a "Loading..." text will be shown instead.
React.ReactNode
className
(optional)
The class name to be appended to the component's root DOM element.
string
contactEmail
(optional)
The contactEmail
prop assigns an email address to all support email instances in the client.
string
darkMode
(optional)
Toggle between dark and light mode.
Default: false
boolean
discordUrl
(optional)
The discordUrl
prop accepts a string
value expected to be a link to a Discord server and will be displayed in all instances where a Discord link is displayed in the client.
string
default
- Quadrata Discord server
error
(optional)
Generic error text, when defined, an error message will appear at the bottom of the UI.
string | undefined
environment
(optional)
The environment
prop controls the environment with which the client communicates. Never set the environment
to QuadClientEnvironment.SANDBOX
in production.
QuadClientEnvironment
QuadClientEnvironment.SANDBOX
-https://int.quadrata.com/api/v1
QuadClientEnvironment.PRODUCTION
-https://prod.quadrata.com/api/v1
default
-QuadClientEnvironment.SANDBOX
protocolName
(required)
The protocolName
prop accepts a string
value for your protocol, dApp, or company name.
The protocolName
should match the name assigned for your company at Quadrata.
string
showSocialButtons
(optional)
The showSocialButtons
prop accepts a boolean
value to display or not display social share buttons. Social share buttons are displayed on the mint completed
page after a user or business has successfully onboarded.
string | undefined
Business Configuration Object
ConfigBusiness
interface defines the required properties for the kyb
onboarding flow. The ConfigBusiness
interface has no additional options than the ConfigShared
interface.
Always define your configuration object outside of your React components to prevent unexpected behavior
User Configuration Object
ConfigUser
interface defines the required properties for the kyc
onboarding flow.
account
(required)
The user's wallet address.
string
attributes
(required)
QuadAttribute[]
chainId
(required)
The decimal chain ID number of the currently connected network. In case of unsupported chain IDs the user will be navigated to the "Configuration Error" screen.
Tip: Supported chain IDs can be found in the QuadSupportedChainId
enum which can be imported from the @quadrata/core-react
NPM package.
number
countriesUnavailable
(optional)
An array of ISO country codes where the onboarding process is made unavailable.
mintComplete
(required)
Upon a successful mint, pass a true
value to this prop to display the final page.
boolean
onSign
(required)
A callback function. triggered when a user clicks Sign Wallet or Allow. It passes a message for the user to sign in the Onboarding and/or User Consent flow.
(message: string, isConsent: boolean) => void
privacyScopes
(optional)
PrivacyConsentScopeParam[] | undefined
signature
(required)
The user's signature of the "Welcome to Quadrata! By signing, you agree to the Terms of Service." message passed by the onSign
prop.
string | undefined
signatureConsent
(optional)
The user's signature when granting access to privacy data.
string | undefined
transactionHash
(required)
The mint transaction hash. If the value is not undefined, it will trigger navigation to the "Mint in progress" page and will generate the Block explorer transaction link URL.
string | undefined
Last updated