SDK Configuration

Quadrata SDK Configuration

Both the API and Client libraries require configuration to work correctly. The same configuration object can be used for both libraries.

Configuration Properties

The configuration object is a plain JavaScript object that contains the following properties:

  • environment: ( Required ) The environment to use for the SDK. This is mapped from the QuadrataEnvironment enum. The API URL used by both Client and API libraries is determined by the environment you configure.

    • QuadrataEnvironment.SANDBOX - "SANDBOX"

    • QuadrataEnvironment.PRODUCTION - "PRODUCTION"

  • attributes: ( Optional ) An object containing the attributes to use for the SDK. For client libraries, these are the attributes that you want to claim. For API libraries, these are the attributes that you want to query. If not provided, you must pass the attributes as props to the SDK components or functions. These attributes are mapped from the QuadrataAttribute enum.

    • QuadrataAttribute.AML - "AML"

    • QuadrataAttribute.COUNTRY - "COUNTRY"

    • QuadrataAttribute.DID - "DID"

    • QuadrataAttribute.INVESTOR_STATUS - "INVESTOR_STATUS"

  • network: ( Optional ) The network to use for the SDK. This is mapped from the QuadrataNetwork enum. If not provided, you must pass the network as props to the SDK components or functions. For client components, this comes from the chainId prop, and for API functions, this comes from the network parameter.

    • Sandbox

      • QuadrataNetwork.SEPOLIA - 11155111

      • QuadrataNetwork.MUMBAI - 80001

      • QuadrataNetwork.FUJI - 43113

      • QuadrataNetwork.TEVMOS - 9000

      • QuadrataNetwork.OPTIMISM_GOERLI - 420

      • QuadrataNetwork.ARBITRUM_GOERLI - 421613

      • QuadrataNetwork.KAVA_TESTNET - 2221

      • QuadrataNetwork.ZKSYNC_GOERLI - 280

      • QuadrataNetwork.ZKSYNC_SEPOLIA - 300

      • QuadrataNetwork.BASE_GOERLI - 84531

    • Production

      • QuadrataNetwork.MAINNET - 1

      • QuadrataNetwork.POLYGON - 137

      • QuadrataNetwork.AVALANCHE - 43114

      • QuadrataNetwork.EVMOS - 9001

      • QuadrataNetwork.ARBITRUM - 42161

      • QuadrataNetwork.OPTIMISM - 10

      • QuadrataNetwork.KAVA - 2222

      • QuadrataNetwork.BASE - 8453

      • QuadrataNetwork.ZKSYNC_ERA - 324

  • privacyScopes: ( Optional ) An array of privacy scopes to use for the SDK. This is mapped from the QuadrataPrivacyConsent enum. If not provided, you must pass the privacy scopes as props to the SDK components or functions.

    • QuadrataPrivacyConsent.ADDRESS - "ADR"

    • QuadrataPrivacyConsent.DATE_OF_BIRTH - "DOB"

    • QuadrataPrivacyConsent.EMAIL - "EM"

    • QuadrataPrivacyConsent.FIRST_NAME - "FN"

    • QuadrataPrivacyConsent.GOV_ID_NUM - "G"

    • QuadrataPrivacyConsent.GOV_ID_CLASS - "GC"

    • QuadrataPrivacyConsent.GOV_ID_EXPIRY_DATE - "GE"

    • QuadrataPrivacyConsent.GOV_ID_ISSUE_DATE - "GI"

    • QuadrataPrivacyConsent.GOV_ID_ISSUE_AUTHORITY - "GIS"

    • QuadrataPrivacyConsent.GOV_ID_PHOTO - "GIP"

    • QuadrataPrivacyConsent.LAST_NAME - "LN"

    • QuadrataPrivacyConsent.MIDDLE_NAME - "MN"

Example

import * as QuadrataTypes from '@quadrata/sdk/types';

const quadrataSdkConfiguration: QuadrataTypes.QuadrataSdkConfiguration = {
    // required
    environment: QuadrataTypes.QuadrataEnvironment.SANDBOX;
    
    // optional
    attributes: [
        QuadrataTypes.QuadrataAttribute.DID,
        QuadrataTypes.QuadrataAttribute.COUNTRY,
        QuadrataTypes.QuadrataAttribute.AML
    ],
    
    // optional
    network: QuadrataTypes.QuadrataNetwork.SEPOLIA,
    
    // optional
    privacyScopes: [
        QuadrataTypes.QuadrataPrivacyConsent.DATE_OF_BIRTH,
        QuadrataTypes.QuadrataPrivacyConsent.EMAIL
    ]
};

Last updated