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
  1. HOW TO INTEGRATE
  2. Quadrata SDK
  3. Advanced
  4. Client Libraries
  5. Client React Hooks

useOnboardStatus

Quadrata SDK Client Hook: useOnboardStatus

PreviousClient React HooksNextClient Examples

Last updated 10 months ago

useOnboardStatus is a hook that you can take advantage of throughout your application if you need to check the status of a wallet's onboarding application.

This hook is already used and handled for you when you use the Quadrata or QuadrataEager client components with kycProps specified.

You are not required to use this hook, but if you want to or find a need for it, it is exposed for you.

This hook takes advantage of the API Service Library, .

The results are parsed for you in a format that allows you to pass them directly to the Quadrata client library as partial props.

import * as QuadrataTypes from '@quadrata/sdk/client';
import { useOnboardStatus } from '@quadrata/sdk/client';

const {
    error,
    parsed,
    clientProps,
    refreshOnboardStatus,
    isLoading,
} = useOnboardStatus({
    chainId: QuadrataTypes.QuadrataNetwork.SEPOLIA,
    walletAddress: '0x123',
    attributes: [
        QuadrataTypes.QuadrataAttribute.DID,
        QuadrataTypes.QuadrataAttribute.COUNTRY,
        QuadrataTypes.QuadrataAttribute.AML
    ],
    offeringId: 'optional-unique-offering-id',
    isBypassMint: false,
    apiAccessToken: accessToken,
    privacyScopes: [
        QuadrataTypes.QuadrataPrivacyConsent.DATE_OF_BIRTH,
        QuadrataTypes.QuadrataPrivacyConsent.EMAIL
    ]
}, quadrataSdkConfig);

Response

  • error - If an error occurs, this will be an error object instance of QuadrataSdkApiError

  • parsed - The onboard status API endpoint returns a response payload that needs to evaluated. This evaluation is done for you and returned as an object:

    • attributesToClaim - Array of attributes that need to be claimed by the application (based on the attributes you passed in)

    • isConsentNeeded - Boolean representing whether or not the privacyScopes (if any) that you passed in require consent from the user.

    • isInReview - Boolean representing whether or not the application is completed (based on the attributes you passed in) but is still in review.

  • clientProps - An object containing the necessary props that you need to pass into the KYC onboarding application, already formatted for you.

    • accessToken - The access token required for onboarding applications.

    • attributes - Array of attributes that need to be claimed.

    • privacyScopes - Array of privacyScopes that need to be consented to.

  • refreshOnboardStatus - A function that allows you to refresh the onboard status response by calling the API again, on demand.

  • isLoading - A boolean indicating whether the onboarding status API call is processing or not.

If you just need to get onboard status or see if a passport is minted, you can use the API Service Library, . It will return a similar response.

Fetch Onboard Status
Fetch Onboard Status