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 Privacy Data

Quadrata SDK API Service: Fetch Privacy Data

PreviousFetch Passport ListNextFetch Privacy Grants

Last updated 11 months ago

Fetch underlying PII for an individual or business by a known wallet address. This is a privacy data query and incurs Quad Unit charges. This feature must be enabled for your dApp.

Parameters

Name
Type
Description

apiKey*

string

Your API Key

walletAddress*

hex string

Wallet address

privateKeyDerBase64

string

Base64 DER String

privateKeyDer

string

DER Binary String

privateKeyPem

string

PEM String

privateKey

CryptoKey

CryptoKey object

privacyAccessToken

string

scopes

QuadrataPrivacyConsent[]

Sparse scopes to fetch If you don't want everything

options

object

Fetch Options

One private key parameter is required. You can provide your private key in any of the formats listed.

See for more information

SDK Configuration

Name
Type
Description

environment*

QuadrataEnvironment

See for more information about the underlying API endpoint.

Example

import type { API } from '@quadrata/sdk/api';
import { fetchPrivacyData, QuadrataEnvironment } from '@quadrata/sdk/api';

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

const response: ResponseType = await fetchPrivacyData(
    // params
    {
        apiKey: process.env.QUADRATA_API_KEY,
        walletAddress: '0x123',
        
        // private signing key
        privateKeyDerBase64: process.env.QUADRATA_PRIVATE_KEY_DER_BASE64,
        
        // optional, if not provided, will be generated for you
        privacyAccessToken: 'access token from createPrivacyAccessToken',
        
        // optional sparse scopes
        scopes: [
            QuadrataPrivacyConsent.EMAIL,
            QuadrataPrivacyConsent.DATE_OF_BIRTH
        ],
        
        // optional fetch options
        options: {
            cache: 'no-cache'
        }
    },
    // sdk config
    { environment: QuadrataEnvironment.PRODUCTION }
);

const attributes: ParsedResponseType = response.data.attributes;

Access token If not provided, one will be generated See

Access token See

API Service Options
API Get Privacy Data
createPrivacyAccessToken
createAccessToken