Quadrata Integration
  • INTRODUCTION
    • Introduction to Quadrata
    • Passport Attributes
  • HOW TO INTEGRATE
    • Quadrata SDK
      • Get Started Quickly
      • Advanced
        • Installation
        • SDK Configuration
        • Onboarding Example
        • Client Libraries
          • Client Configuration
          • Client Lazy Loading
          • Client Eager Loading
          • Client Helper Component
          • Client React Hooks
            • useOnboardStatus
          • Client Examples
            • With Wagmi Connect
            • KYC Only
            • KYB Only
            • All In One
        • API Libraries
          • API Configuration
          • API Service Options
          • API Service Libraries
            • Create Access Token
            • Create Privacy Access Token
            • Fetch Attribute Values
            • Fetch Onboard Status
            • Fetch Passport List
            • Fetch Privacy Data
            • Fetch Privacy Grants
            • Fetch Wallet Screening
            • Revoke Privacy Grants
    • Onboard users
      • Individual Passport Onboarding
        • 1. Installation
        • 2. API Authentication
        • 3. API Onboard Status
        • 4. QuadClient Package
        • 5. Privacy Data Permissions
        • 6. Full Example
      • Business Passport Onboarding
        • 1. Installation
        • 2. API Authentication
        • 3. QuadrataKyb Package
        • 4. Privacy Data Permissions
        • 5. Full Example
      • All-In-One Passport Onboarding
        • 1. Installation
        • 2. API Authentication
        • 3. QuadrataReact Package
        • 4. Full Example
    • Request Privacy Data
      • List of Privacy Data
      • Privacy Data Permissions
      • API Requests
        • How to sign API
          • Full Example
          • Generate ECDSA Key Pair
        • API Get Privacy Permissions
        • API Privacy Access Token
        • API Get Privacy Data
        • API Revoke Permissions
    • Query attributes
      • Via Smart Contract
        • Query a single attribute
        • Query multiple attributes
        • Query Helper
      • Via API
    • On-Chain Wallet Screening
      • How to sign API
        • Full Example
        • Generate ECDSA Key Pair
      • API Get On-Chain AML Score
    • Webhooks
      • Onboarding Webhooks
      • Ongoing Monitoring Webhooks
      • Webhook Request Signature
    • Burn Passports
  • additional information
    • Smart contracts
    • Quadrata Sandbox
    • Passport Issuers
    • Privileged Roles & Ownership
    • Constants
    • Flex Kit Attributes
      • Smart Contract Addresses
Powered by GitBook
On this page
  • Quadrata Component Props
  • Enabling the All In One Component
  • Example
  1. HOW TO INTEGRATE
  2. Quadrata SDK
  3. Advanced
  4. Client Libraries

Client Configuration

Quadrata SDK Client Configuration

PreviousClient LibrariesNextClient Lazy Loading

Last updated 10 months ago

Quadrata Component Props

The Quadrata component accepts the following props:

  • sdkConfig: ( Required ) The object.

  • accessToken: ( Required ) The access token obtained from the endpoint. This is a JWT token that grants access to most API calls.

  • clientConfig: ( Optional ) The client configuration is an optional set of configuration parameters that are shared by both and onboarding applications. While you can specify the configuration only once, you are also able to override the configuration for each onboarding application. The client configuration parameters are mapped from both, and configuration libraries at @quadrata/kyb-react and @quadrata/client-react respectively.

  • sharedProps: ( Optional ) The shared props object is an optional set of props that are shared by both and . While you can specify the shared props only once, you are also able to override the shared props for each onboarding application. The shared props are mapped from both and shared libraries at @quadrata/kyb-react and @quadrata/client-react respectively. If any event handlers are passed into both sharedProps and kybProps or kycProps, both will be called, but shared props handlers will be called last.

  • kycProps: ( Optional ) Specifying props will tell the Quadrata component to render the . The props are mapped from the library at @quadrata/client-react.

  • kybProps: ( Optional ) Specifying props will tell the Quadrata component to render the . The props are mapped from the library at @quadrata/kyb-react.

  • helperComponent: ( Required ) The is required as either a child component or as a prop. Its purpose is to provide a way to interact with the Quadrata SDK from within your application. The props passed to your helper will let you know the state of an application and allow you to launch the application from a button click or other. The helper component is mapped from the component Helper type at @quadrata/sdk/types/components/helper. There are different helper components for both KYB and KYC onboarding applications which contain different props.

Enabling the All In One Component

The is enabled when you specify a combination of properties in the Quadrata Component.

You can enable the All In One Component in one of the following ways:

  • Specify sharedProps and either kybProps or kycProps

  • Specify both kybProps and kycProps

Example

import * as QuadrataTypes from '@quadrata/sdk/types';
import { withWagmiConnect, Quadrata } from '@quadrata/sdk/client';

const quadrataSdkConfig: QuadrataTypes.QuadrataSdkConfiguration = {
    environment: QuadrataTypes.QuadrataEnvironment.SANDBOX
};

// busines onboarding props
const kybProps = {
    // ...
};

// individual onboarding props
const kycProps = {
    attributes: [
        QuadrataTypes.QuadrataAttribute.DID,
        QuadrataTypes.QuadrataAttribute.COUNTRY,
        QuadrataTypes.QuadrataAttribute.AML
    ],
};

export default function AllInOneComponent(props: { accessToken: string }) {
    const quadrataProps = withWagmiConnect({
        accessToken: props.accessToken,
        sdkConfig: quadrataSdkConfig,
        clientConfig: {
            _debug: true,
            protocolName: 'Your Company Name'
        },
        sharedProps: {
            onApplicationEnd: (data: Record<string, any>) => {
                console.log('Application ended', data.status, data.error);
            }
        },
        kybProps: kybProps,
        kycProps: kycProps,
    });
    return (
        <Quadrata {...quadrataProps}>
            {((helper: QuadrataTypes.Client.Component.Helper) => {
                if (!helper.isWalletConnected) {
                    return <p>Wallet is not connected</p>;
                }
                if (helper.isApplicationComplete) {
                    return <p>Application is Complete</p>;
                }
                return (
                    <button
                        disabled={!helper.isApplicationReady}
                        onClick={helper.launchApplication}
                    >
                        Launch Application
                    </button>
                );
            })}
        </Quadrata>
    );
}
SDK Configuration
Quadrata API Login
KYB
KYC
KYB
KYC
KYB
KYC
KYB
KYC
KYC
KYC onboarding application
KYC
KYC
KYB
KYB onboarding application
KYB
KYB
helper component
All In One Component