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
  • Parameters
  • SDK Configuration
  • Example
  1. HOW TO INTEGRATE
  2. Quadrata SDK
  3. Advanced
  4. API Libraries
  5. API Service Libraries

Fetch Onboard Status

Quadrata SDK API Service: Fetch Onboard Status

PreviousFetch Attribute ValuesNextFetch Passport List

Last updated 10 months ago

Fetch attribute status and PII consent data for a wallet address, to determine if attributes need to be claimed or privacy needs to be consented.

Parameters

Name
Type
Description

apiAccessToken*

string

walletAddress*

hex string

Wallet Address

attributes

QuadrataAttribute[]

Array of attribute names Can be provided in sdkConfig

chainId

QuadrataNetwork

Blockchain ID Can be provided in sdkConfig

offeringId

string

Unique offering id For accreditation re-attestation

privacyScopes

QuadrataPrivacyConsent[]

Privacy consent scopes For checking granted consent Can be provided in sdkConfig

options

object

Fetch Options

SDK Configuration

Name
Type
Description

environment*

QuadrataEnvironment

attributes

QuadrataAttribute[]

Attribute name array Can be provided in params

network

QuadrataNetwork

Blockchain ID Can be provided in params as chainId

privacyScopes

QuadrataPrivacyConsent[]

Privacy consent scopes For checking granted consent Can be provided in params

See for more information about the underlying API endpoint.

Example

import type { API } from '@quadrata/sdk/types';
import {
    fetchOnboardStatus,
    parseOnboardStatus,
    
    QuadrataAttribute,
    QuadrataEnvironment,
    QuadrataNetwork,
    QuadrataPrivacyConsent
} from '@quadrata/sdk/api';

type ResponseType = API.Service.FetchOnboardStatus.Response;
type ParsedResponseType = API.Service.FetchOnboardStatus.ParsedResponse;

const response: ResponseType = await fetchOnboardStatus(
    {
        apiAccessToken: 'jwt token from createAccessToken',
        
        // optional, if provided in config
        attributes: [
            QuadrataAttribute.AML,
            QuadrataAttribute.DID,
        ],  
        
        // optional, if provided in config as network
        chainId: QuadrataNetwork.MAINNET,
        
        // optional, unless you are checking for accrediation re-attestation
        offeringId: '123',
        
        // optional, if provided in config
        privacyScopes: [
            QuadrataPrivacyConsent.EMAIL,
            QuadrataPrivacyConsent.DATE_OF_BIRTH,
        ],
        
        walletAddress: '0x123',
        
        options: {
            // optional fetch options
            cache: 'no-cache'
        }
    },
    {
        // optional, if provided in above params
        attributes: [
            QuadrataAttribute.AML,
            QuadrataAttribute.DID
        ], 
        
        // required
        environment: QuadrataEnvironment.PRODUCTION,
        
        // optional, if provided in above params
        network: QuadrataNetwork.MAINNET,
        
        // optional, if provided in above params
        privacyScopes: [
            QuadrataPrivacyConsent.EMAIL,
            QuadrataPrivacyConsent.DATE_OF_BIRTH,
        ],
    }
);

/* parse the response */

const isBypassMint = false;  // or true
const status: ParsedResponseType = parseOnboardStatus(response, isBypassMint);

// status.attributesToClaim
// status.isConsentNeeded
// status.isInReview

Access token See

Access token See

API Onboard Status
createAccessToken
createAccessToken