3. QuadrataReact Package
<QuadrataReact /> Component
<QuadrataReact /> Component import {
QuadAttribute,
QuadClientEnvironment,
QuadrataReact,
QuadrataReactConfigShared,
QuadrataReactConfigUser
} from '@quadrata/quadrata-react';
let configShared: QuadrataReactConfigShared = {
_debug: false, // When true, debug information will be printed in the console.
accessToken: undefined, // JWT access token
apiUrl: 'https://prod.quadrata.com/api/v1', // Quadrata endpoint to be used for implementation.
children: undefined, // Component to override the default loading component
className: 'custom_class', // The class name to be appended to the component's root DOM element.
contactEmail: '[email protected]', // Contact email address
darkMode: false, // Toggle between dark and light mode
discordUrl: 'https://discord.gg/SR5Fc6BK', // Discord link URL
error: undefined, // Generic error text, when defined, an error message will appear at the bottom of the UI.
environment: QuadClientEnvironment.SANDBOX, // Integration environment to use.
protocolName: 'Example Inc.', // Your protocol name
showSocialButtons: false, // Show or hide the social media share buttons on the `mint complete` page.
};
let configUser: QuadrataReactConfigUser = {
...configShared,
account: '', // Wallet address of the user to onboard
attributes: [] as QuadAttribute[], // An array of Quadrata attributes required by the protocol.
bypassMint: boolean // Optional boolean to allow bypass minting the Quadrata Passport
countriesUnavailable: undefined, // Array of country codes that make the onboarding process unavailable.
mintComplete: false, // Upon a successful mint, pass a true value to this prop to display the final page.
mintError: string, // Optional error message to be displayed in the MINT_STATUS view
privacyScopes: undefined, // An array of Quadrata Privacy Scope attributes that can be requested from the users' PII.
signature: '', // The user's signature of the `Welcome to Quadrata! By signing, you agree to the Terms of Service.`
signatureConsent: '', // The user's signature when granting access to PII data.
transactionHash: '', // The mint transaction hash.
};
const MyComponent = () => {
<QuadrataReact
configBusiness={configShared} // Configuration for KYB onboarding
configUser={configUser} // Configuration for KYC onboarding
onApplicationEnd={handleOnApplicationEnd} // Optional call function: triggered when the onboarding reaches an end state.
onHide={handleHide} // Optional callback function: triggered when the modal is closed
onMintClick={handleMintClick} // Callback function: triggered when a user clicks "Claim Passport"
onMintParamsReady={handleMintParamsReady} // Optional callback function: triggered when the mint parameters are signed and ready to mint
onPageChange={handlePageChange} // Optional callback function: triggers when a page changes
onSign={handleSign} // Callback function: triggered when a user attemps to Sign Wallet or Allow Consent
>
Loading...
</QuadrataReact>
}<QuadrataReact /> Props
<QuadrataReact /> PropsProp
Description
Type
Shared Configuration Object
Prop
Description
Type
Business Configuration Object
User Configuration Object
Prop
Description
Type
Last updated